diff options
author | Kristian Høgsberg <krh@redhat.com> | 2008-11-23 23:41:08 -0500 |
---|---|---|
committer | Naruto Uzumaki <root@kabuto.bos.redhat.com> | 2008-11-24 00:06:16 -0500 |
commit | 1e4b86af1ae16b9eeb4f952f2735b65536bcdc7c (patch) | |
tree | 9a2a49e71efd7489a033f8d4013055aa9bec88b6 /wayland.h | |
parent | 14fcff77265bbdf9893925c993c10d52c178e566 (diff) | |
download | wayland-1e4b86af1ae16b9eeb4f952f2735b65536bcdc7c.tar.gz wayland-1e4b86af1ae16b9eeb4f952f2735b65536bcdc7c.tar.xz wayland-1e4b86af1ae16b9eeb4f952f2735b65536bcdc7c.zip |
Expose screenshooting as an interface, drop SIGUSR hack.
This pulls in a bit of extra infrastructure for discovering adertised objects on the
client side.
Diffstat (limited to 'wayland.h')
-rw-r--r-- | wayland.h | 35 |
1 files changed, 4 insertions, 31 deletions
@@ -2,28 +2,7 @@ #define WAYLAND_H #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); +#include "wayland-util.h" enum { WL_EVENT_READABLE = 0x01, @@ -52,15 +31,6 @@ struct wl_event_source *wl_event_loop_add_idle(struct wl_event_loop *loop, wl_event_loop_idle_func_t func, void *data); -struct wl_hash { - struct wl_object **objects; - uint32_t count, alloc, id; -}; - -int wl_hash_insert(struct wl_hash *hash, struct wl_object *object); -struct wl_object *wl_hash_lookup(struct wl_hash *hash, uint32_t id); -void wl_hash_delete(struct wl_hash *hash, struct wl_object *object); - struct wl_client; enum { @@ -122,8 +92,11 @@ void wl_surface_iterator_destroy(struct wl_surface_iterator *iterator); struct wl_object * wl_input_device_create(struct wl_display *display, const char *path, uint32_t id); +void +wl_display_add_object(struct wl_display *display, struct wl_object *object); int wl_display_add_global(struct wl_display *display, struct wl_object *object); + void wl_display_post_relative_event(struct wl_display *display, struct wl_object *source, int dx, int dy); |