summaryrefslogtreecommitdiffstats
path: root/wayland.h
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-11-02 10:12:29 -0500
committerKristian Høgsberg <krh@redhat.com>2008-11-06 10:51:59 -0500
commitf9bc795a7d72c0877119b3564f865af579603bde (patch)
tree058dc0ef8d58e49755fbc9b6a1141af55e6b5ba2 /wayland.h
parent362a34ed898d62558c8cd0afc8a1a93f3fd2aa4c (diff)
downloadwayland-f9bc795a7d72c0877119b3564f865af579603bde.tar.gz
wayland-f9bc795a7d72c0877119b3564f865af579603bde.tar.xz
wayland-f9bc795a7d72c0877119b3564f865af579603bde.zip
Add crude input device support.
Just pointer motion and button clicks for now, broadcast to all clients.
Diffstat (limited to 'wayland.h')
-rw-r--r--wayland.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/wayland.h b/wayland.h
index 471ec7a..a7e80a4 100644
--- a/wayland.h
+++ b/wayland.h
@@ -3,6 +3,8 @@
#include <stdint.h>
+#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
+
enum {
WL_EVENT_READABLE = 0x01,
WL_EVENT_WRITEABLE = 0x02
@@ -97,6 +99,19 @@ int wl_surface_iterator_next(struct wl_surface_iterator *iterator,
struct wl_surface **surface);
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_post_relative_event(struct wl_display *display,
+ struct wl_object *source, int dx, int dy);
+void
+wl_display_post_absolute_event(struct wl_display *display,
+ struct wl_object *source, int x, int y);
+void
+wl_display_post_button_event(struct wl_display *display,
+ struct wl_object *source, int button, int state);
+
struct wl_compositor {
struct wl_compositor_interface *interface;
};