aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-08-24 14:35:55 -0400
committerTony Crisci <tony@dubstepdish.com>2017-08-26 08:32:11 -0400
commit98f4cdfccb7d2ace2929bca45f0479b3472b96ac (patch)
tree03128da9c11198dc3dbe929bf9a413c1d945189c /include
parent13e895d943eca5e86f68230c5ca503090866aafc (diff)
implement wlr_cursor_map_input_to_output
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_cursor.h12
-rw-r--r--include/wlr/types/wlr_pointer.h4
2 files changed, 14 insertions, 2 deletions
diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h
index 380d8a6f..64a75e4f 100644
--- a/include/wlr/types/wlr_cursor.h
+++ b/include/wlr/types/wlr_cursor.h
@@ -32,14 +32,22 @@ void wlr_cursor_set_xcursor(struct wlr_cursor *cur, struct wlr_xcursor *xcur);
* Warp the cursor to the given x and y in layout coordinates. If x and y are
* out of the layout boundaries or constraints, no warp will happen.
*
+ * `dev` may be passed to respect device mapping constraints. If `dev` is NULL,
+ * device mapping constraints will be ignored.
+ *
* Returns true when the mouse warp was successful.
*/
-bool wlr_cursor_warp(struct wlr_cursor *cur, double x, double y);
+bool wlr_cursor_warp(struct wlr_cursor *cur, struct wlr_input_device *dev,
+ double x, double y);
/**
* Move the cursor in the direction of the given x and y coordinates.
+ *
+ * `dev` may be passed to respect device mapping constraints. If `dev` is NULL,
+ * device mapping constraints will be ignored.
*/
-void wlr_cursor_move(struct wlr_cursor *cur, double delta_x, double delta_y);
+void wlr_cursor_move(struct wlr_cursor *cur, struct wlr_input_device *dev,
+ double delta_x, double delta_y);
/**
* Attaches this input device to this cursor. The input device must be one of:
diff --git a/include/wlr/types/wlr_pointer.h b/include/wlr/types/wlr_pointer.h
index 13a2d045..9153963a 100644
--- a/include/wlr/types/wlr_pointer.h
+++ b/include/wlr/types/wlr_pointer.h
@@ -20,12 +20,14 @@ struct wlr_pointer {
};
struct wlr_event_pointer_motion {
+ struct wlr_input_device *device;
uint32_t time_sec;
uint64_t time_usec;
double delta_x, delta_y;
};
struct wlr_event_pointer_motion_absolute {
+ struct wlr_input_device *device;
uint32_t time_sec;
uint64_t time_usec;
double x_mm, y_mm;
@@ -33,6 +35,7 @@ struct wlr_event_pointer_motion_absolute {
};
struct wlr_event_pointer_button {
+ struct wlr_input_device *device;
uint32_t time_sec;
uint64_t time_usec;
uint32_t button;
@@ -52,6 +55,7 @@ enum wlr_axis_orientation {
};
struct wlr_event_pointer_axis {
+ struct wlr_input_device *device;
uint32_t time_sec;
uint64_t time_usec;
enum wlr_axis_source source;