neuwld

patched neuwld library (tracked)
git clone https://git.daat.foo/neuwld.git
Log | Files | Refs | README | LICENSE

commit 50e7d711ba84881a2751175d66ba677f6035c4c7
parent 6b8e13e49537d0a56312058647f03b4a680c332a
Author: Michael Forney <mforney@mforney.org>
Date:   Thu,  5 Sep 2013 01:53:26 -0700

Just use uint32_t instead of enum wld_format

Forward declarations of enum don't really make sense.

Diffstat:
Mpixman.c | 2+-
Mpixman.h | 3+--
Mwayland-drm.c | 2+-
Mwayland-drm.h | 5++---
Mwayland-private.h | 3+--
Mwayland-shm.c | 4++--
Mwayland-shm.h | 6++----
Mwayland.c | 3+--
Mwayland.h | 4+---
9 files changed, 12 insertions(+), 20 deletions(-)

diff --git a/pixman.c b/pixman.c @@ -113,7 +113,7 @@ void wld_pixman_destroy_context(struct wld_pixman_context * context) struct wld_drawable * wld_pixman_create_drawable (struct wld_pixman_context * context, uint32_t width, uint32_t height, - void * data, uint32_t pitch, enum wld_format format) + void * data, uint32_t pitch, uint32_t format) { struct pixman_drawable * pixman; diff --git a/pixman.h b/pixman.h @@ -28,7 +28,6 @@ struct wld_pixman_context; struct wld_drawable; -enum wld_format; /** * Create a new drawing context which uses Pixman to do software rendering on @@ -48,7 +47,7 @@ void wld_pixman_destroy_context(struct wld_pixman_context * context); */ struct wld_drawable * wld_pixman_create_drawable (struct wld_pixman_context * context, uint32_t width, uint32_t height, - void * data, uint32_t pitch, enum wld_format format); + void * data, uint32_t pitch, uint32_t format); #endif diff --git a/wayland-drm.c b/wayland-drm.c @@ -190,7 +190,7 @@ int wld_wayland_drm_get_fd(struct wld_wayland_drm_context * drm) struct wld_drawable * wld_wayland_drm_create_drawable (struct wld_wayland_drm_context * drm, uint32_t width, uint32_t height, - enum wld_format format, struct wl_buffer ** buffer) + uint32_t format, struct wl_buffer ** buffer) { struct wld_drawable * drawable; diff --git a/wayland-drm.h b/wayland-drm.h @@ -29,7 +29,6 @@ struct wld_wayland_drm_context; struct wld_drawable; -enum wld_format; struct wl_display; struct wl_event_queue; @@ -53,7 +52,7 @@ void wld_wayland_drm_destroy_context(struct wld_wayland_drm_context * context); * @see enum wld_format */ bool wld_wayland_drm_has_format(struct wld_wayland_drm_context * context, - enum wld_format format); + uint32_t format); /** * Get the opened file descriptor for the DRM device. @@ -65,7 +64,7 @@ int wld_wayland_drm_get_fd(struct wld_wayland_drm_context * context); */ struct wld_drawable * wld_wayland_drm_create_drawable (struct wld_wayland_drm_context * context, uint32_t width, uint32_t height, - enum wld_format format, struct wl_buffer ** buffer); + uint32_t format, struct wl_buffer ** buffer); #endif diff --git a/wayland-private.h b/wayland-private.h @@ -27,7 +27,6 @@ #include <stdint.h> struct wld_drawable; -enum wld_format format; struct wl_display; struct wl_event_queue; @@ -37,7 +36,7 @@ typedef void * (* wayland_create_context_func_t)(struct wl_display * display, struct wl_event_queue * queue); typedef void (* wayland_destroy_context_func_t)(void * context); typedef struct wld_drawable * (* wayland_create_drawable_func_t) - (void * context, uint32_t width, uint32_t height, enum wld_format format, + (void * context, uint32_t width, uint32_t height, uint32_t format, struct wl_buffer ** buffer); struct wld_wayland_interface diff --git a/wayland-shm.c b/wayland-shm.c @@ -64,7 +64,7 @@ const static struct wl_shm_listener shm_listener = { .format = &shm_format, }; -static inline uint32_t wayland_format(enum wld_format format) +static inline uint32_t wayland_format(uint32_t format) { switch (format) { @@ -153,7 +153,7 @@ bool wld_shm_has_format(struct wld_shm_context * shm, uint32_t format) struct wld_drawable * wld_shm_create_drawable(struct wld_shm_context * shm, uint32_t width, uint32_t height, - enum wld_format format, + uint32_t format, struct wl_buffer ** buffer) { char name[] = "/tmp/wld-XXXXXX"; diff --git a/wayland-shm.h b/wayland-shm.h @@ -29,7 +29,6 @@ struct wld_shm_context; struct wld_drawable; -enum wld_format; struct wl_display; struct wl_event_queue; @@ -52,15 +51,14 @@ void wld_shm_destroy_context(struct wld_shm_context * context); * * @see enum wld_format */ -bool wld_shm_has_format(struct wld_shm_context * context, - enum wld_format format); +bool wld_shm_has_format(struct wld_shm_context * context, uint32_t format); /** * Create a new SHM drawable with the specified dimensions. */ struct wld_drawable * wld_shm_create_drawable(struct wld_shm_context * context, uint32_t width, uint32_t height, - enum wld_format format, + uint32_t format, struct wl_buffer ** buffer); #endif diff --git a/wayland.c b/wayland.c @@ -196,8 +196,7 @@ void wld_wayland_destroy_context(struct wld_wayland_context * wayland) struct wld_drawable * wld_wayland_create_drawable (struct wld_wayland_context * context, struct wl_surface * surface, - uint32_t width, uint32_t height, enum wld_format format, - uint32_t damage_flags) + uint32_t width, uint32_t height, uint32_t format, uint32_t damage_flags) { struct wayland_drawable * wayland; diff --git a/wayland.h b/wayland.h @@ -31,7 +31,6 @@ struct wl_surface; struct wl_buffer; struct wld_wayland_context; -enum wld_format; enum wld_wayland_interface_id { @@ -97,8 +96,7 @@ void wld_wayland_destroy_context(struct wld_wayland_context * context); */ struct wld_drawable * wld_wayland_create_drawable (struct wld_wayland_context * context, struct wl_surface * surface, - uint32_t width, uint32_t height, enum wld_format format, - uint32_t damage_flags); + uint32_t width, uint32_t height, uint32_t format, uint32_t damage_flags); /** * Enable or disable damage tracking on the specified Wayland drawable.