window.c: Add touch handlers
This adds basic infrastructure for handling touch events in the toytoolkit.
diff --git a/clients/window.h b/clients/window.h
index 3c60081..a817734 100644
--- a/clients/window.h
+++ b/clients/window.h
@@ -232,6 +232,26 @@
uint32_t button,
enum wl_pointer_button_state state,
void *data);
+typedef void (*widget_touch_down_handler_t)(struct widget *widget,
+ uint32_t serial,
+ uint32_t time,
+ int32_t id,
+ float x,
+ float y,
+ void *data);
+typedef void (*widget_touch_up_handler_t)(struct widget *widget,
+ uint32_t serial,
+ uint32_t time,
+ int32_t id,
+ void *data);
+typedef void (*widget_touch_motion_handler_t)(struct widget *widget,
+ uint32_t time,
+ int32_t id,
+ float x,
+ float y,
+ void *data);
+typedef void (*widget_touch_frame_handler_t)(struct widget *widget,void *data);
+typedef void (*widget_touch_cancel_handler_t)(struct widget *widget, void *data);
typedef void (*widget_axis_handler_t)(struct widget *widget,
struct input *input, uint32_t time,
uint32_t axis,
@@ -457,9 +477,23 @@
widget_set_button_handler(struct widget *widget,
widget_button_handler_t handler);
void
+widget_set_touch_down_handler(struct widget *widget,
+ widget_touch_down_handler_t handler);
+void
+widget_set_touch_up_handler(struct widget *widget,
+ widget_touch_up_handler_t handler);
+void
+widget_set_touch_motion_handler(struct widget *widget,
+ widget_touch_motion_handler_t handler);
+void
+widget_set_touch_frame_handler(struct widget *widget,
+ widget_touch_frame_handler_t handler);
+void
+widget_set_touch_cancel_handler(struct widget *widget,
+ widget_touch_cancel_handler_t handler);
+void
widget_set_axis_handler(struct widget *widget,
widget_axis_handler_t handler);
-
void
widget_schedule_redraw(struct widget *widget);