Support axis source, axis discrete, frame and axis stop events
[jonas: only send focus wl_pointer.frame if resource supports it]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
diff --git a/src/compositor.h b/src/compositor.h
index ddcafc6..5970e57 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -254,6 +254,8 @@
struct weston_pointer_axis_event {
uint32_t axis;
wl_fixed_t value;
+ bool has_discrete;
+ int32_t discrete;
};
struct weston_pointer_grab;
@@ -266,6 +268,8 @@
void (*axis)(struct weston_pointer_grab *grab,
uint32_t time,
struct weston_pointer_axis_event *event);
+ void (*axis_source)(struct weston_pointer_grab *grab, uint32_t source);
+ void (*frame)(struct weston_pointer_grab *grab);
void (*cancel)(struct weston_pointer_grab *grab);
};
@@ -404,6 +408,12 @@
uint32_t time,
struct weston_pointer_axis_event *event);
void
+weston_pointer_send_axis_source(struct weston_pointer *pointer,
+ uint32_t source);
+void
+weston_pointer_send_frame(struct weston_pointer *pointer);
+
+void
weston_pointer_set_focus(struct weston_pointer *pointer,
struct weston_view *view,
wl_fixed_t sx, wl_fixed_t sy);
@@ -1143,6 +1153,12 @@
notify_axis(struct weston_seat *seat, uint32_t time,
struct weston_pointer_axis_event *event);
void
+notify_axis_source(struct weston_seat *seat, uint32_t source);
+
+void
+notify_pointer_frame(struct weston_seat *seat);
+
+void
notify_key(struct weston_seat *seat, uint32_t time, uint32_t key,
enum wl_keyboard_key_state state,
enum weston_key_state_update update_state);