aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorrandom human <random.bored.human@gmail.com>2018-10-01 03:54:21 +0530
committerAlex Maese <memaese@hotmail.com>2018-12-21 12:20:48 -0600
commitba5b1676dfb0041c88e4966a6c32dee5a5a6513a (patch)
treeadaa30aec4f6514299d077b8ad0da3abdd8ad307 /include/wlr
parent3a3d1b661714a7d37b8a4450fe0c3dec50027622 (diff)
relative_pointer: implement protocol requests
Flesh out the details of the structs, signals, callback functions, and so on. weston-resizer silently works at this point (no events sent).
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_relative_pointer_v1.h30
-rw-r--r--include/wlr/types/wlr_seat.h1
2 files changed, 28 insertions, 3 deletions
diff --git a/include/wlr/types/wlr_relative_pointer_v1.h b/include/wlr/types/wlr_relative_pointer_v1.h
index 815dcaca..94ae053b 100644
--- a/include/wlr/types/wlr_relative_pointer_v1.h
+++ b/include/wlr/types/wlr_relative_pointer_v1.h
@@ -17,24 +17,48 @@
* monitor edge or other pointer barriers).
*/
+
+/* A global interface used for getting the relative pointer object for a given
+ * pointer.
+ *
+ * Signals:
+ * - destroy -> struct wlr_relative_pointer_manager_v1 *manager
+ * :: the manager was destroyed
+ * - new_relative_pointer -> struct wlr_relative_pointer_v1 *relative_pointer
+ * :: a new relative_pointer was created
+ */
+
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;
+ struct wl_signal new_relative_pointer;
+ } events;
void *data;
};
+
+/* A wp_relative_pointer object is an extension to the wl_pointer interface
+ * used for emitting relative pointer events. It shares the same focus as
+ * wl_pointer objects of the same seat and will only emit events when it has
+ * focus.
+ *
+ * Signals:
+ * - destroy -> struct wlr_relative_pointer_v1 *relative_pointer
+ * :: the relative_pointer was destroyed
+ */
+
struct wlr_relative_pointer_v1 {
+ struct wl_client *client;
struct wl_resource *resource;
+ struct wl_pointer *pointer;
struct {
struct wl_signal destroy;
- } destroy;
+ } events;
void *data;
};
diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h
index 942a3420..9fc1ba95 100644
--- a/include/wlr/types/wlr_seat.h
+++ b/include/wlr/types/wlr_seat.h
@@ -27,6 +27,7 @@ struct wlr_seat_client {
// lists of wl_resource
struct wl_list resources;
struct wl_list pointers;
+ struct wl_list relative_pointers;
struct wl_list keyboards;
struct wl_list touches;
struct wl_list data_devices;