From ba5b1676dfb0041c88e4966a6c32dee5a5a6513a Mon Sep 17 00:00:00 2001 From: random human Date: Mon, 1 Oct 2018 03:54:21 +0530 Subject: 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). --- include/wlr/types/wlr_relative_pointer_v1.h | 30 ++++++++++++++++++++++++++--- include/wlr/types/wlr_seat.h | 1 + 2 files changed, 28 insertions(+), 3 deletions(-) (limited to 'include/wlr') 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; -- cgit v1.2.3