input: move tablet tool functions into tablet.c

Just a big move and a rename of the tablet tool destroy handler.
This commit is contained in:
Jens Peters 2025-06-10 19:37:17 +02:00 committed by Johan Malm
parent b3c1ef41c3
commit 6f6fcbc2e1
6 changed files with 101 additions and 126 deletions

View file

@ -9,6 +9,32 @@ struct seat;
struct wlr_device;
struct wlr_input_device;
struct drawing_tablet_tool {
struct seat *seat;
struct wlr_tablet_v2_tablet_tool *tool_v2;
/*
* Force mouse emulation just for a specific tool,
* even when global mouse emulation for tablet input
* is off.
*/
bool force_mouse_emulation;
enum motion motion_mode;
double x, y, dx, dy;
double distance;
double pressure;
double tilt_x, tilt_y;
double rotation;
double slider;
double wheel_delta;
struct {
struct wl_listener set_cursor;
struct wl_listener destroy;
} handlers;
struct wl_list link; /* seat.tablet_tools */
};
struct drawing_tablet {
struct wlr_input_device *wlr_input_device;
struct seat *seat;
@ -23,5 +49,7 @@ struct drawing_tablet {
void tablet_init(struct seat *seat);
void tablet_finish(struct seat *seat);
void tablet_create(struct seat *seat, struct wlr_input_device *wlr_input_device);
void tablet_tool_create(struct seat *seat, struct wlr_tablet_tool *wlr_tablet_tool);
bool tablet_tool_has_focused_surface(struct seat *seat);
#endif /* LABWC_TABLET_H */