aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-01-27 10:22:06 -0500
committerGitHub <noreply@github.com>2019-01-27 10:22:06 -0500
commit018727b1fc41dcd739ab464c84581c44dd1497ca (patch)
tree31ae7fc75fdabcdc125bb1b3b29260503ea5b96a /include
parent89eacf556a64512a4d6ba8241e91f1d287007ad2 (diff)
parentb45fc24b1893484c02420fbb33d7ebb69bbf1eae (diff)
Merge pull request #1503 from emersion/pointer-frame
pointer: add a frame event
Diffstat (limited to 'include')
-rw-r--r--include/rootston/cursor.h3
-rw-r--r--include/wlr/types/wlr_cursor.h1
-rw-r--r--include/wlr/types/wlr_pointer.h1
-rw-r--r--include/wlr/types/wlr_seat.h15
4 files changed, 20 insertions, 0 deletions
diff --git a/include/rootston/cursor.h b/include/rootston/cursor.h
index b5bb682f..d1db6856 100644
--- a/include/rootston/cursor.h
+++ b/include/rootston/cursor.h
@@ -38,6 +38,7 @@ struct roots_cursor {
struct wl_listener motion_absolute;
struct wl_listener button;
struct wl_listener axis;
+ struct wl_listener frame;
struct wl_listener touch_down;
struct wl_listener touch_up;
@@ -71,6 +72,8 @@ void roots_cursor_handle_button(struct roots_cursor *cursor,
void roots_cursor_handle_axis(struct roots_cursor *cursor,
struct wlr_event_pointer_axis *event);
+void roots_cursor_handle_frame(struct roots_cursor *cursor);
+
void roots_cursor_handle_touch_down(struct roots_cursor *cursor,
struct wlr_event_touch_down *event);
diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h
index 44ced1f0..6475669c 100644
--- a/include/wlr/types/wlr_cursor.h
+++ b/include/wlr/types/wlr_cursor.h
@@ -51,6 +51,7 @@ struct wlr_cursor {
struct wl_signal motion_absolute;
struct wl_signal button;
struct wl_signal axis;
+ struct wl_signal frame;
struct wl_signal touch_up;
struct wl_signal touch_down;
diff --git a/include/wlr/types/wlr_pointer.h b/include/wlr/types/wlr_pointer.h
index 6da4c02a..9dfe7aaa 100644
--- a/include/wlr/types/wlr_pointer.h
+++ b/include/wlr/types/wlr_pointer.h
@@ -23,6 +23,7 @@ struct wlr_pointer {
struct wl_signal motion_absolute;
struct wl_signal button;
struct wl_signal axis;
+ struct wl_signal frame;
} events;
void *data;
diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h
index f6df7413..103fa24d 100644
--- a/include/wlr/types/wlr_seat.h
+++ b/include/wlr/types/wlr_seat.h
@@ -68,6 +68,7 @@ struct wlr_pointer_grab_interface {
void (*axis)(struct wlr_seat_pointer_grab *grab, uint32_t time,
enum wlr_axis_orientation orientation, double value,
int32_t value_discrete, enum wlr_axis_source source);
+ void (*frame)(struct wlr_seat_pointer_grab *grab);
void (*cancel)(struct wlr_seat_pointer_grab *grab);
};
@@ -349,6 +350,13 @@ void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t time,
int32_t value_discrete, enum wlr_axis_source source);
/**
+ * Send a frame event to the surface with pointer focus. Compositors should use
+ * `wlr_seat_pointer_notify_frame()` to send axis events to respect pointer
+ * grabs.
+ */
+void wlr_seat_pointer_send_frame(struct wlr_seat *wlr_seat);
+
+/**
* Start a grab of the pointer of this seat. The grabber is responsible for
* handling all pointer events until the grab ends.
*/
@@ -391,6 +399,13 @@ void wlr_seat_pointer_notify_axis(struct wlr_seat *wlr_seat, uint32_t time,
int32_t value_discrete, enum wlr_axis_source source);
/**
+ * Notify the seat of a frame event. Frame events are sent to end a group of
+ * events that logically belong together. Motion, button and axis events should
+ * all be followed by a frame event.
+ */
+void wlr_seat_pointer_notify_frame(struct wlr_seat *wlr_seat);
+
+/**
* Whether or not the pointer has a grab other than the default grab.
*/
bool wlr_seat_pointer_has_grab(struct wlr_seat *seat);