From c8456086a164fd62c26fe3f3ade5f1e59d25eda0 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Thu, 24 Feb 2022 11:00:11 -0500 Subject: backend/libinput: rework tablet interface The wlr_libinput_device owns its wlr_tablet and its associated wlr_tablet_tools --- include/backend/libinput.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/backend/libinput.h b/include/backend/libinput.h index c8719af3..808da101 100644 --- a/include/backend/libinput.h +++ b/include/backend/libinput.h @@ -38,6 +38,8 @@ struct wlr_libinput_input_device { struct wlr_pointer pointer; struct wlr_switch switch_device; struct wlr_touch touch; + struct wlr_tablet tablet; + struct wl_list tablet_tools; // see backend/libinput/tablet_tool.c struct wl_list link; }; @@ -111,16 +113,17 @@ void handle_touch_cancel(struct libinput_event *event, void handle_touch_frame(struct libinput_event *event, struct wlr_touch *touch); -struct wlr_tablet *create_libinput_tablet( - struct libinput_device *device); +void init_device_tablet(struct wlr_libinput_input_device *dev); +struct wlr_libinput_input_device *device_from_tablet( + struct wlr_tablet *tablet); void handle_tablet_tool_axis(struct libinput_event *event, - struct libinput_device *device); + struct wlr_tablet *tablet); void handle_tablet_tool_proximity(struct libinput_event *event, - struct libinput_device *device); + struct wlr_tablet *tablet); void handle_tablet_tool_tip(struct libinput_event *event, - struct libinput_device *device); + struct wlr_tablet *tablet); void handle_tablet_tool_button(struct libinput_event *event, - struct libinput_device *device); + struct wlr_tablet *tablet); struct wlr_tablet_pad *create_libinput_tablet_pad( struct libinput_device *device); -- cgit v1.2.3