mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
implement wlr_cursor_map_input_to_output
This commit is contained in:
parent
13e895d943
commit
98f4cdfccb
6 changed files with 104 additions and 15 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue