aboutsummaryrefslogtreecommitdiff
path: root/include/rootston/input.h
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-10-21 22:03:29 -0400
committerDrew DeVault <sir@cmpwn.com>2017-10-21 22:03:48 -0400
commit16f35ecbeacd685e7d9905a7867d8c950e369f2e (patch)
treec9cd07e837b454ff227fde4d7511a98c805bca27 /include/rootston/input.h
parent169b68b17c668fc6d3feec92f3cf72308ba4e99c (diff)
parentd4e311a1adeee7cfd2a4404d716f3e0237ead607 (diff)
Merge branch 'master' into heghe/wl_list
Diffstat (limited to 'include/rootston/input.h')
-rw-r--r--include/rootston/input.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/include/rootston/input.h b/include/rootston/input.h
index 516104a7..ddd5a05d 100644
--- a/include/rootston/input.h
+++ b/include/rootston/input.h
@@ -24,18 +24,12 @@ struct roots_keyboard {
struct roots_pointer {
struct roots_input *input;
struct wlr_input_device *device;
- // We don't listen to any pointer events directly - they go through
- // wlr_cursor
struct wl_list link;
};
struct roots_touch {
struct roots_input *input;
struct wlr_input_device *device;
- struct wl_listener down;
- struct wl_listener up;
- struct wl_listener motion;
- struct wl_listener cancel;
struct wl_list link;
};
@@ -70,6 +64,13 @@ struct roots_input_event {
struct wlr_input_device *device;
};
+struct roots_touch_point {
+ struct roots_touch *device;
+ int32_t slot;
+ double x, y;
+ struct wl_list link;
+};
+
struct roots_input {
struct roots_config *config;
struct roots_server *server;
@@ -104,9 +105,16 @@ struct roots_input {
struct wl_listener cursor_motion_absolute;
struct wl_listener cursor_button;
struct wl_listener cursor_axis;
+
+ struct wl_listener cursor_touch_down;
+ struct wl_listener cursor_touch_up;
+ struct wl_listener cursor_touch_motion;
+
struct wl_listener cursor_tool_axis;
struct wl_listener cursor_tool_tip;
+ struct wl_list touch_points;
+
struct wl_listener pointer_grab_end;
struct wl_listener request_set_cursor;
@@ -120,6 +128,8 @@ void pointer_add(struct wlr_input_device *device, struct roots_input *input);
void pointer_remove(struct wlr_input_device *device, struct roots_input *input);
void keyboard_add(struct wlr_input_device *device, struct roots_input *input);
void keyboard_remove(struct wlr_input_device *device, struct roots_input *input);
+void touch_add(struct wlr_input_device *device, struct roots_input *input);
+void touch_remove(struct wlr_input_device *device, struct roots_input *input);
void tablet_tool_add(struct wlr_input_device *device, struct roots_input *input);
void tablet_tool_remove(struct wlr_input_device *device, struct roots_input *input);