diff options
Diffstat (limited to 'include/sway/input/cursor.h')
-rw-r--r-- | include/sway/input/cursor.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h index 6a38190b..527d0350 100644 --- a/include/sway/input/cursor.h +++ b/include/sway/input/cursor.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <stdint.h> | 4 | #include <stdint.h> |
5 | #include <wlr/types/wlr_pointer_constraints_v1.h> | 5 | #include <wlr/types/wlr_pointer_constraints_v1.h> |
6 | #include <wlr/types/wlr_pointer_gestures_v1.h> | 6 | #include <wlr/types/wlr_pointer_gestures_v1.h> |
7 | #include <wlr/types/wlr_surface.h> | 7 | #include <wlr/types/wlr_compositor.h> |
8 | #include "sway/input/seat.h" | 8 | #include "sway/input/seat.h" |
9 | #include "config.h" | 9 | #include "config.h" |
10 | 10 | ||
@@ -35,7 +35,8 @@ struct sway_cursor { | |||
35 | pixman_region32_t confine; // invalid if active_constraint == NULL | 35 | pixman_region32_t confine; // invalid if active_constraint == NULL |
36 | bool active_confine_requires_warp; | 36 | bool active_confine_requires_warp; |
37 | 37 | ||
38 | struct wlr_pointer_gestures_v1 *pointer_gestures; | 38 | struct wl_listener hold_begin; |
39 | struct wl_listener hold_end; | ||
39 | struct wl_listener pinch_begin; | 40 | struct wl_listener pinch_begin; |
40 | struct wl_listener pinch_update; | 41 | struct wl_listener pinch_update; |
41 | struct wl_listener pinch_end; | 42 | struct wl_listener pinch_end; |
@@ -51,8 +52,11 @@ struct sway_cursor { | |||
51 | 52 | ||
52 | struct wl_listener touch_down; | 53 | struct wl_listener touch_down; |
53 | struct wl_listener touch_up; | 54 | struct wl_listener touch_up; |
55 | struct wl_listener touch_cancel; | ||
54 | struct wl_listener touch_motion; | 56 | struct wl_listener touch_motion; |
57 | struct wl_listener touch_frame; | ||
55 | bool simulating_pointer_from_touch; | 58 | bool simulating_pointer_from_touch; |
59 | bool pointer_touch_up; | ||
56 | int32_t pointer_touch_id; | 60 | int32_t pointer_touch_id; |
57 | 61 | ||
58 | struct wl_listener tool_axis; | 62 | struct wl_listener tool_axis; |
@@ -60,6 +64,7 @@ struct sway_cursor { | |||
60 | struct wl_listener tool_proximity; | 64 | struct wl_listener tool_proximity; |
61 | struct wl_listener tool_button; | 65 | struct wl_listener tool_button; |
62 | bool simulating_pointer_from_tool_tip; | 66 | bool simulating_pointer_from_tool_tip; |
67 | bool simulating_pointer_from_tool_button; | ||
63 | uint32_t tool_buttons; | 68 | uint32_t tool_buttons; |
64 | 69 | ||
65 | struct wl_listener request_set_cursor; | 70 | struct wl_listener request_set_cursor; |
@@ -103,12 +108,16 @@ void cursor_unhide(struct sway_cursor *cursor); | |||
103 | int cursor_get_timeout(struct sway_cursor *cursor); | 108 | int cursor_get_timeout(struct sway_cursor *cursor); |
104 | void cursor_notify_key_press(struct sway_cursor *cursor); | 109 | void cursor_notify_key_press(struct sway_cursor *cursor); |
105 | 110 | ||
111 | void pointer_motion(struct sway_cursor *cursor, uint32_t time_msec, | ||
112 | struct wlr_input_device *device, double dx, double dy, | ||
113 | double dx_unaccel, double dy_unaccel); | ||
114 | |||
106 | void dispatch_cursor_button(struct sway_cursor *cursor, | 115 | void dispatch_cursor_button(struct sway_cursor *cursor, |
107 | struct wlr_input_device *device, uint32_t time_msec, uint32_t button, | 116 | struct wlr_input_device *device, uint32_t time_msec, uint32_t button, |
108 | enum wlr_button_state state); | 117 | enum wl_pointer_button_state state); |
109 | 118 | ||
110 | void dispatch_cursor_axis(struct sway_cursor *cursor, | 119 | void dispatch_cursor_axis(struct sway_cursor *cursor, |
111 | struct wlr_event_pointer_axis *event); | 120 | struct wlr_pointer_axis_event *event); |
112 | 121 | ||
113 | void cursor_set_image(struct sway_cursor *cursor, const char *image, | 122 | void cursor_set_image(struct sway_cursor *cursor, const char *image, |
114 | struct wl_client *client); | 123 | struct wl_client *client); |
@@ -136,4 +145,6 @@ uint32_t get_mouse_button(const char *name, char **error); | |||
136 | 145 | ||
137 | const char *get_mouse_button_name(uint32_t button); | 146 | const char *get_mouse_button_name(uint32_t button); |
138 | 147 | ||
148 | void handle_request_set_cursor_shape(struct wl_listener *listener, void *data); | ||
149 | |||
139 | #endif | 150 | #endif |