From 0d21496e53e88a65347ae7ffab3d4a20403f838a Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Thu, 24 Feb 2022 15:30:26 -0500 Subject: backend/libinput: rework tablet_pad interface The wlr_libinput_input_device now owns its wlr_tablet_pad, instead of creating a new wlr_libinput_input_device for it. --- include/backend/libinput.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'include/backend') diff --git a/include/backend/libinput.h b/include/backend/libinput.h index 808da101..6579b1af 100644 --- a/include/backend/libinput.h +++ b/include/backend/libinput.h @@ -40,6 +40,7 @@ struct wlr_libinput_input_device { struct wlr_touch touch; struct wlr_tablet tablet; struct wl_list tablet_tools; // see backend/libinput/tablet_tool.c + struct wlr_tablet_pad tablet_pad; struct wl_list link; }; @@ -125,13 +126,14 @@ void handle_tablet_tool_tip(struct libinput_event *event, void handle_tablet_tool_button(struct libinput_event *event, struct wlr_tablet *tablet); -struct wlr_tablet_pad *create_libinput_tablet_pad( - struct libinput_device *device); +void init_device_tablet_pad(struct wlr_libinput_input_device *dev); +struct wlr_libinput_input_device *device_from_tablet_pad( + struct wlr_tablet_pad *tablet_pad); void handle_tablet_pad_button(struct libinput_event *event, - struct libinput_device *device); + struct wlr_tablet_pad *tablet_pad); void handle_tablet_pad_ring(struct libinput_event *event, - struct libinput_device *device); + struct wlr_tablet_pad *tablet_pad); void handle_tablet_pad_strip(struct libinput_event *event, - struct libinput_device *device); + struct wlr_tablet_pad *tablet_pad); #endif -- cgit v1.2.3