aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorrandom human <random.bored.human@gmail.com>2018-09-28 04:43:52 +0530
committerAlex Maese <memaese@hotmail.com>2018-12-21 12:20:47 -0600
commit3a3d1b661714a7d37b8a4450fe0c3dec50027622 (patch)
treec505b2a8277280bf7e52d1f3571ffed38b292efc /include
parent82d36025e1b84a317b5e48d6f622eb9583ce6f2d (diff)
relative_pointer: create skeleton and build
Add protocol, header and type files to build. Create skeleton structs, creator and destroyer, and define implementations.
Diffstat (limited to 'include')
-rw-r--r--include/rootston/desktop.h2
-rw-r--r--include/wlr/types/wlr_relative_pointer_v1.h45
2 files changed, 47 insertions, 0 deletions
diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h
index b1fcaca0..56d2a129 100644
--- a/include/rootston/desktop.h
+++ b/include/rootston/desktop.h
@@ -17,6 +17,7 @@
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_presentation_time.h>
#include <wlr/types/wlr_gtk_primary_selection.h>
+#include <wlr/types/wlr_relative_pointer_v1.h>
#include <wlr/types/wlr_screencopy_v1.h>
#include <wlr/types/wlr_screenshooter.h>
#include <wlr/types/wlr_text_input_v3.h>
@@ -65,6 +66,7 @@ struct roots_desktop {
struct wlr_pointer_constraints_v1 *pointer_constraints;
struct wlr_presentation *presentation;
struct wlr_foreign_toplevel_manager_v1 *foreign_toplevel_manager_v1;
+ struct wlr_relative_pointer_manager_v1 *relative_pointer_manager;
struct wl_listener new_output;
struct wl_listener layout_change;
diff --git a/include/wlr/types/wlr_relative_pointer_v1.h b/include/wlr/types/wlr_relative_pointer_v1.h
new file mode 100644
index 00000000..815dcaca
--- /dev/null
+++ b/include/wlr/types/wlr_relative_pointer_v1.h
@@ -0,0 +1,45 @@
+/*
+ * 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_RELATIVE_POINTER_V1_H
+#define WLR_TYPES_WLR_RELATIVE_POINTER_V1_H
+
+#include <wayland-server.h>
+
+
+/* This protocol specifies a set of interfaces used for making clients able to
+ * receive relative pointer events not obstructed by barriers (such as the
+ * monitor edge or other pointer barriers).
+ */
+
+struct wlr_relative_pointer_manager_v1 {
+ struct wl_list resources;
+ struct wl_global *global;
+
+ struct {
+ struct wl_signal destroy;
+ struct wl_signal get_relative_pointer;
+ } requests;
+
+ void *data;
+};
+
+struct wlr_relative_pointer_v1 {
+ struct wl_resource *resource;
+
+ struct {
+ struct wl_signal destroy;
+ } destroy;
+
+ void *data;
+};
+
+struct wlr_relative_pointer_manager_v1 *wlr_relative_pointer_v1_create(struct wl_display *display);
+void wlr_relative_pointer_v1_destroy(struct wlr_relative_pointer_manager_v1 *relative_pointer_manager);
+
+#endif