aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/tablet.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/input/tablet.h')
-rw-r--r--include/sway/input/tablet.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/include/sway/input/tablet.h b/include/sway/input/tablet.h
new file mode 100644
index 00000000..f30e232a
--- /dev/null
+++ b/include/sway/input/tablet.h
@@ -0,0 +1,62 @@
1#ifndef _SWAY_INPUT_TABLET_H
2#define _SWAY_INPUT_TABLET_H
3#include <wlr/types/wlr_layer_shell_v1.h>
4
5struct sway_seat;
6struct wlr_tablet_tool;
7
8struct sway_tablet {
9 struct wl_list link;
10 struct sway_seat_device *seat_device;
11 struct wlr_tablet_v2_tablet *tablet_v2;
12};
13
14struct sway_tablet_tool {
15 struct sway_seat *seat;
16 struct sway_tablet *tablet;
17 struct wlr_tablet_v2_tablet_tool *tablet_v2_tool;
18
19 double tilt_x, tilt_y;
20
21 struct wl_listener set_cursor;
22 struct wl_listener tool_destroy;
23};
24
25struct sway_tablet_pad {
26 struct wl_list link;
27 struct sway_seat_device *seat_device;
28 struct sway_tablet *tablet;
29 struct wlr_tablet_v2_tablet_pad *tablet_v2_pad;
30
31 struct wl_listener attach;
32 struct wl_listener button;
33 struct wl_listener ring;
34 struct wl_listener strip;
35
36 struct wlr_surface *current_surface;
37 struct wl_listener surface_destroy;
38
39 struct wl_listener tablet_destroy;
40};
41
42struct sway_tablet *sway_tablet_create(struct sway_seat *seat,
43 struct sway_seat_device *device);
44
45void sway_configure_tablet(struct sway_tablet *tablet);
46
47void sway_tablet_destroy(struct sway_tablet *tablet);
48
49void sway_tablet_tool_configure(struct sway_tablet *tablet,
50 struct wlr_tablet_tool *wlr_tool);
51
52struct sway_tablet_pad *sway_tablet_pad_create(struct sway_seat *seat,
53 struct sway_seat_device *device);
54
55void sway_configure_tablet_pad(struct sway_tablet_pad *tablet_pad);
56
57void sway_tablet_pad_destroy(struct sway_tablet_pad *tablet_pad);
58
59void sway_tablet_pad_notify_enter(struct sway_tablet_pad *tablet_pad,
60 struct wlr_surface *surface);
61
62#endif