aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorMarkus Ongyerth <ongy@ongy.net>2018-04-24 08:10:45 +0200
committerMarkus Ongyerth <ongy@ongy.net>2018-07-14 09:40:39 +0200
commite235f7d33621b5879a5f9a8a1d89d4a8515857c3 (patch)
treee1c8a9d3d6966753fdccf3940197929f5681bedf /include/wlr
parent77bac448ccac9827abfa2ab10e798295f07f3980 (diff)
Basic tablet_v2 object lifetime
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_tablet_pad.h2
-rw-r--r--include/wlr/types/wlr_tablet_tool.h2
-rw-r--r--include/wlr/types/wlr_tablet_v2.h62
3 files changed, 64 insertions, 2 deletions
diff --git a/include/wlr/types/wlr_tablet_pad.h b/include/wlr/types/wlr_tablet_pad.h
index b633f439..b71f5b9a 100644
--- a/include/wlr/types/wlr_tablet_pad.h
+++ b/include/wlr/types/wlr_tablet_pad.h
@@ -32,7 +32,7 @@ struct wlr_tablet_pad {
void *data;
};
-struct wlr_tablet_pad_group_v2 {
+struct wlr_tablet_pad_group {
struct wl_list link;
size_t button_count;
diff --git a/include/wlr/types/wlr_tablet_tool.h b/include/wlr/types/wlr_tablet_tool.h
index 884b486a..114ce98a 100644
--- a/include/wlr/types/wlr_tablet_tool.h
+++ b/include/wlr/types/wlr_tablet_tool.h
@@ -17,7 +17,7 @@ enum wlr_tablet_tool_type {
Wacom Inking Pen */
WLR_TABLET_TOOL_TYPE_AIRBRUSH, /**< An airbrush-like tool */
WLR_TABLET_TOOL_TYPE_MOUSE, /**< A mouse bound to the tablet */
- WLR_TABLET_TOOL_TYPE_LENS, /**< A mouse tool with a lens */
+ WLR_TABLET_TOOL_TYPE_LENS, /**< A mouse tool with a lens */
};
struct wlr_tablet_tool_tool {
diff --git a/include/wlr/types/wlr_tablet_v2.h b/include/wlr/types/wlr_tablet_v2.h
new file mode 100644
index 00000000..358f0719
--- /dev/null
+++ b/include/wlr/types/wlr_tablet_v2.h
@@ -0,0 +1,62 @@
+#ifndef WLR_TYPES_WLR_TABLET_V2_H
+#define WLR_TYPES_WLR_TABLET_V2_H
+
+#include <wayland-server.h>
+#include <wlr/types/wlr_seat.h>
+#include <wlr/types/wlr_input_device.h>
+
+struct wlr_tablet_manager_v2 {
+ struct wl_global *wl_global;
+ struct wl_list clients; // wlr_tablet_manager_client_v2::link
+ struct wl_list seats; // wlr_tablet_seat_v2::link
+
+ struct wl_listener display_destroy;
+
+ void *data;
+};
+
+struct wlr_tablet_v2_tablet {
+ struct wl_list link; // wlr_tablet_seat_v2::tablets
+ struct wlr_tablet_tool *wlr_tool;
+ struct wlr_input_device *wlr_device;
+ struct wl_list clients; // wlr_tablet_client_v2::tablet_link
+
+ struct wl_listener tool_destroy;
+};
+
+struct wlr_tablet_v2_tablet_tool {
+ struct wl_list link; // wlr_tablet_seat_v2::tablets
+ struct wlr_tablet_tool_tool *wlr_tool;
+ struct wl_list clients; // wlr_tablet_tool_client_v2::tablet_link
+
+ struct wl_listener tool_destroy;
+};
+
+struct wlr_tablet_v2_tablet_pad {
+ struct wl_list link; // wlr_tablet_seat_v2::pads
+ struct wlr_tablet_pad *wlr_pad;
+ struct wlr_input_device *wlr_device;
+ struct wl_list clients; // wlr_tablet_pad_client_v2::tablet_link
+
+ struct wl_listener pad_destroy;
+};
+
+struct wlr_tablet_v2_tablet *wlr_make_tablet(
+ struct wlr_tablet_manager_v2 *manager,
+ struct wlr_seat *wlr_seat,
+ struct wlr_input_device *wlr_device);
+
+struct wlr_tablet_v2_tablet_pad *wlr_make_tablet_pad(
+ struct wlr_tablet_manager_v2 *manager,
+ struct wlr_seat *wlr_seat,
+ struct wlr_input_device *wlr_device);
+
+struct wlr_tablet_v2_tablet_tool *wlr_make_tablet_tool(
+ struct wlr_tablet_manager_v2 *manager,
+ struct wlr_seat *wlr_seat,
+ struct wlr_tablet_tool_tool *wlr_tool);
+
+struct wlr_tablet_manager_v2 *wlr_tablet_v2_create(struct wl_display *display);
+void wlr_tablet_v2_destroy(struct wlr_tablet_manager_v2 *manager);
+
+#endif /* WLR_TYPES_WLR_TABLET_V2_H */