commit 5eb51462db1ab45bb08e1d1fd31cf0e673f5ebfb
parent e52798423a42df725b4a528852a254ac5e44621a
Author: Michael Forney <mforney@mforney.org>
Date: Fri, 31 Jan 2014 12:22:29 -0800
Only use upper 8 bits for implementation in object types
While I'm breaking ABI, might as well do this as well.
Diffstat:
4 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/drm.h b/drm.h
@@ -27,11 +27,13 @@
#include <stdbool.h>
#include <stdint.h>
+#define WLD_DRM_ID (0x02 << 24)
+
enum wld_drm_object_type
{
- WLD_DRM_OBJECT_HANDLE = 0x00010000,
- WLD_DRM_OBJECT_PRIME_FD = 0x00010001,
- WLD_DRM_OBJECT_GEM_NAME = 0x00010002
+ WLD_DRM_OBJECT_HANDLE = WLD_DRM_ID,
+ WLD_DRM_OBJECT_PRIME_FD,
+ WLD_DRM_OBJECT_GEM_NAME
};
enum wld_drm_flags
diff --git a/pixman.h b/pixman.h
@@ -26,9 +26,11 @@
#include <stdint.h>
+#define WLD_PIXMAN_ID (0x01 << 24)
+
enum wld_pixman_object_type
{
- WLD_PIXMAN_OBJECT_IMAGE = 0x00030000
+ WLD_PIXMAN_OBJECT_IMAGE = WLD_PIXMAN_ID
};
extern struct wld_context * wld_pixman_context;
diff --git a/wayland.h b/wayland.h
@@ -29,6 +29,8 @@
struct wl_display;
struct wl_surface;
+#define WLD_WAYLAND_ID (0x3 << 24)
+
enum wld_wayland_interface_id
{
/**
@@ -47,7 +49,7 @@ enum wld_wayland_interface_id
enum wld_wayland_object_type
{
- WLD_WAYLAND_OBJECT_BUFFER = 0x00020000
+ WLD_WAYLAND_OBJECT_BUFFER = WLD_WAYLAND_ID
};
/**
diff --git a/wld.h b/wld.h
@@ -56,7 +56,7 @@ bool wld_lookup_named_color(const char * name, uint32_t * color);
enum wld_object_type
{
- WLD_OBJECT_DATA = 0x0
+ WLD_OBJECT_DATA
};
union wld_object