aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_relative_pointer_v1.h4
-rw-r--r--include/wlr/types/wlr_seat.h12
2 files changed, 16 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_relative_pointer_v1.h b/include/wlr/types/wlr_relative_pointer_v1.h
index 94ae053b..c74766b9 100644
--- a/include/wlr/types/wlr_relative_pointer_v1.h
+++ b/include/wlr/types/wlr_relative_pointer_v1.h
@@ -66,4 +66,8 @@ struct wlr_relative_pointer_v1 {
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);
+void wlr_relative_pointer_v1_send_relative_motion(struct wl_resource *resource,
+ uint64_t time, double dx, double dy, double dx_unaccel, double
+ dy_unaccel);
+
#endif
diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h
index 9fc1ba95..54e04e24 100644
--- a/include/wlr/types/wlr_seat.h
+++ b/include/wlr/types/wlr_seat.h
@@ -314,6 +314,18 @@ void wlr_seat_pointer_clear_focus(struct wlr_seat *wlr_seat);
void wlr_seat_pointer_send_motion(struct wlr_seat *wlr_seat, uint32_t time,
double sx, double sy);
+/** Send relative motion events to the surface with pointer focus. Coordinates
+ * for the motion event are relative to current pointer location, both
+ * accelerated and unaccelerated. Compositors should use
+ * `wlr_seat_pointer_notify_relative_motion()` to send relative motion events
+ * to respect relative pointer requests by clients.
+ *
+ * Note that the timestamp is 64 bit, split into high 32 bits and low 32 bits.
+ */
+void wlr_seat_pointer_notify_relative_motion(struct wlr_seat *wlr_seat,
+ uint64_t time, double dx, double dy, double dx_unaccel,
+ double dy_unaccel);
+
/**
* Send a button event to the surface with pointer focus. Coordinates for the
* button event are surface-local. Returns the serial. Compositors should use