diff options
author | Kristian Høgsberg <krh@redhat.com> | 2008-11-08 15:39:41 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2008-11-08 15:49:49 -0500 |
commit | b7a01928beda1f9ada42e6a32c5d8ab0400d1069 (patch) | |
tree | f6d32a92c39ec95d263980785ede32a3f0579a2c /wayland.h | |
parent | f099fd24a364e8ee7a2b9a5d7277e0dfd481bfe4 (diff) | |
download | wayland-b7a01928beda1f9ada42e6a32c5d8ab0400d1069.tar.gz wayland-b7a01928beda1f9ada42e6a32c5d8ab0400d1069.tar.xz wayland-b7a01928beda1f9ada42e6a32c5d8ab0400d1069.zip |
Add prototypes warnings, use -fvisibility.
Diffstat (limited to 'wayland.h')
-rw-r--r-- | wayland.h | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -3,8 +3,28 @@ #include <stdint.h> +/* GCC visibility */ +#if defined(__GNUC__) && __GNUC__ >= 4 +#define WL_EXPORT __attribute__ ((visibility("default"))) +#else +#define WL_EXPORT +#endif + #define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0]) +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) + +struct wl_list { + struct wl_list *prev; + struct wl_list *next; +}; + +void wl_list_init(struct wl_list *list); +void wl_list_insert(struct wl_list *list, struct wl_list *elm); +void wl_list_remove(struct wl_list *elm); + enum { WL_EVENT_READABLE = 0x01, WL_EVENT_WRITEABLE = 0x02 @@ -144,5 +164,7 @@ struct wl_compositor_interface { void wl_display_set_compositor(struct wl_display *display, struct wl_compositor *compositor); +struct wl_compositor * +wl_compositor_create(struct wl_display *display); #endif |