aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJosef Gajdusek <atx@atx.name>2019-10-20 16:03:24 +0200
committerSimon Ser <contact@emersion.fr>2019-12-31 10:29:02 +0100
commita7b538008b85fac57eea8e6ac8903d50c8392a29 (patch)
treeb14b6d9edc264cbae92652a6f04566995818efab /include
parent21e1953b61abae4911c32c457c1d87530e622610 (diff)
virtual-pointer: Add support for the wlr-virtual-pointer-unstable-v1
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_virtual_pointer_v1.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_virtual_pointer_v1.h b/include/wlr/types/wlr_virtual_pointer_v1.h
new file mode 100644
index 00000000..7d2d80d9
--- /dev/null
+++ b/include/wlr/types/wlr_virtual_pointer_v1.h
@@ -0,0 +1,53 @@
+/*
+ * This an unstable interface of wlroots. No guarantees are made regarding the
+ * future consistency of this API.
+ */
+#ifndef WLR_USE_UNSTABLE
+#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
+#endif
+
+#ifndef WLR_TYPES_WLR_VIRTUAL_POINTER_V1_H
+#define WLR_TYPES_WLR_VIRTUAL_POINTER_V1_H
+
+#include <wayland-server-core.h>
+#include <wayland-server-protocol.h>
+#include <wlr/interfaces/wlr_input_device.h>
+#include <wlr/interfaces/wlr_pointer.h>
+
+struct wlr_virtual_pointer_manager_v1 {
+ struct wl_global *global;
+ struct wl_list virtual_pointers; // struct wlr_virtual_pointer_v1*
+
+ struct wl_listener display_destroy;
+
+ struct {
+ struct wl_signal new_virtual_pointer; // struct wlr_virtual_pointer_v1_new_pointer_event*
+ struct wl_signal destroy;
+ } events;
+};
+
+struct wlr_virtual_pointer_v1 {
+ struct wlr_input_device input_device;
+ struct wl_resource *resource;
+ /* Vertical and horizontal */
+ struct wlr_event_pointer_axis axis_event[2];
+ enum wl_pointer_axis axis;
+ bool axis_valid[2];
+
+ struct wl_list link;
+
+ struct {
+ struct wl_signal destroy; // struct wlr_virtual_pointer_v1*
+ } events;
+};
+
+struct wlr_virtual_pointer_v1_new_pointer_event {
+ struct wlr_virtual_pointer_v1 *new_pointer;
+ /** Suggested by client; may be NULL. */
+ struct wlr_seat *suggested_seat;
+};
+
+struct wlr_virtual_pointer_manager_v1* wlr_virtual_pointer_manager_v1_create(
+ struct wl_display *display);
+
+#endif