aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2022-02-23 14:06:02 -0500
committerKirill Primak <vyivel@eclair.cafe>2022-03-02 18:18:05 +0000
commit4f4dd9522378f4d62a47ee9b1472378c9960b2f2 (patch)
treecc69e9030642d3bef7f37cccee209b5a17806994 /include
parentd750c5ac676850d93ba7abf0a08476c4535ff1b6 (diff)
backend/libinput: rework touch interface
The wlr_libinput_input_device now owns its wlr_touch, instead of creating a new wlr_libinput_input_device for it.
Diffstat (limited to 'include')
-rw-r--r--include/backend/libinput.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/backend/libinput.h b/include/backend/libinput.h
index 69b30f26..c8719af3 100644
--- a/include/backend/libinput.h
+++ b/include/backend/libinput.h
@@ -37,6 +37,7 @@ struct wlr_libinput_input_device {
struct wlr_keyboard keyboard;
struct wlr_pointer pointer;
struct wlr_switch switch_device;
+ struct wlr_touch touch;
struct wl_list link;
};
@@ -96,18 +97,19 @@ struct wlr_libinput_input_device *device_from_switch(
void handle_switch_toggle(struct libinput_event *event,
struct wlr_switch *switch_device);
-struct wlr_touch *create_libinput_touch(
- struct libinput_device *device);
+void init_device_touch(struct wlr_libinput_input_device *dev);
+struct wlr_libinput_input_device *device_from_touch(
+ struct wlr_touch *touch);
void handle_touch_down(struct libinput_event *event,
- struct libinput_device *device);
+ struct wlr_touch *touch);
void handle_touch_up(struct libinput_event *event,
- struct libinput_device *device);
+ struct wlr_touch *touch);
void handle_touch_motion(struct libinput_event *event,
- struct libinput_device *device);
+ struct wlr_touch *touch);
void handle_touch_cancel(struct libinput_event *event,
- struct libinput_device *device);
+ struct wlr_touch *touch);
void handle_touch_frame(struct libinput_event *event,
- struct libinput_device *device);
+ struct wlr_touch *touch);
struct wlr_tablet *create_libinput_tablet(
struct libinput_device *device);