mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-20 06:59:42 -05:00
Merge pull request #765 from swaywm/transformed-events
Use libinput transformed events instead of width_mm/height_mm
This commit is contained in:
commit
5dd022da13
20 changed files with 105 additions and 100 deletions
|
|
@ -73,7 +73,7 @@ bool wlr_cursor_warp(struct wlr_cursor *cur, struct wlr_input_device *dev,
|
|||
double x, double y);
|
||||
|
||||
void wlr_cursor_warp_absolute(struct wlr_cursor *cur,
|
||||
struct wlr_input_device *dev, double x_mm, double y_mm);
|
||||
struct wlr_input_device *dev, double x, double y);
|
||||
|
||||
/**
|
||||
* Move the cursor in the direction of the given x and y coordinates.
|
||||
|
|
@ -155,7 +155,7 @@ void wlr_cursor_map_input_to_region(struct wlr_cursor *cur,
|
|||
* Convert absolute coordinates to layout coordinates for the device.
|
||||
*/
|
||||
bool wlr_cursor_absolute_to_layout_coords(struct wlr_cursor *cur,
|
||||
struct wlr_input_device *device, double x_mm, double y_mm,
|
||||
double width_mm, double height_mm, double *lx, double *ly);
|
||||
struct wlr_input_device *device, double x, double y,
|
||||
double *lx, double *ly);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ struct wlr_input_device {
|
|||
enum wlr_input_device_type type;
|
||||
int vendor, product;
|
||||
char *name;
|
||||
// Or 0 if not applicable to this device
|
||||
double width_mm, height_mm;
|
||||
|
||||
/* wlr_input_device.type determines which of these is valid */
|
||||
union {
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ struct wlr_event_pointer_motion {
|
|||
struct wlr_event_pointer_motion_absolute {
|
||||
struct wlr_input_device *device;
|
||||
uint32_t time_msec;
|
||||
double x_mm, y_mm;
|
||||
double width_mm, height_mm;
|
||||
// From 0..1
|
||||
double x, y;
|
||||
};
|
||||
|
||||
struct wlr_event_pointer_button {
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ struct wlr_event_tablet_tool_axis {
|
|||
struct wlr_input_device *device;
|
||||
uint32_t time_msec;
|
||||
uint32_t updated_axes;
|
||||
double x_mm, y_mm;
|
||||
double width_mm, height_mm;
|
||||
// From 0..1
|
||||
double x, y;
|
||||
double pressure;
|
||||
double distance;
|
||||
double tilt_x, tilt_y;
|
||||
|
|
@ -54,8 +54,8 @@ enum wlr_tablet_tool_proximity_state {
|
|||
struct wlr_event_tablet_tool_proximity {
|
||||
struct wlr_input_device *device;
|
||||
uint32_t time_msec;
|
||||
double x_mm, y_mm;
|
||||
double width_mm, height_mm;
|
||||
// From 0..1
|
||||
double x, y;
|
||||
enum wlr_tablet_tool_proximity_state state;
|
||||
};
|
||||
|
||||
|
|
@ -67,8 +67,8 @@ enum wlr_tablet_tool_tip_state {
|
|||
struct wlr_event_tablet_tool_tip {
|
||||
struct wlr_input_device *device;
|
||||
uint32_t time_msec;
|
||||
double x_mm, y_mm;
|
||||
double width_mm, height_mm;
|
||||
// From 0..1
|
||||
double x, y;
|
||||
enum wlr_tablet_tool_tip_state state;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ struct wlr_event_touch_down {
|
|||
struct wlr_input_device *device;
|
||||
uint32_t time_msec;
|
||||
int32_t touch_id;
|
||||
double x_mm, y_mm;
|
||||
double width_mm, height_mm;
|
||||
// From 0..1
|
||||
double x, y;
|
||||
};
|
||||
|
||||
struct wlr_event_touch_up {
|
||||
|
|
@ -37,8 +37,8 @@ struct wlr_event_touch_motion {
|
|||
struct wlr_input_device *device;
|
||||
uint32_t time_msec;
|
||||
int32_t touch_id;
|
||||
double x_mm, y_mm;
|
||||
double width_mm, height_mm;
|
||||
// From 0..1
|
||||
double x, y;
|
||||
};
|
||||
|
||||
struct wlr_event_touch_cancel {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue