diff options
| author | emersion <contact@emersion.fr> | 2018-03-28 14:11:39 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-28 14:11:39 -0400 | 
| commit | 5dd022da1300185780ddf4b70014a6f8f306de85 (patch) | |
| tree | 331f0e5f7b748387a338b678b625bf5a1ae7f693 /include | |
| parent | 52d621e0979c3b393753d1c67b2b0fd23212ca41 (diff) | |
| parent | 3813121fefb1734ed2c2537759e6eead1c0d9a74 (diff) | |
| download | wlroots-5dd022da1300185780ddf4b70014a6f8f306de85.tar.xz | |
Merge pull request #765 from swaywm/transformed-events
Use libinput transformed events instead of width_mm/height_mm
Diffstat (limited to 'include')
| -rw-r--r-- | include/wlr/types/wlr_cursor.h | 6 | ||||
| -rw-r--r-- | include/wlr/types/wlr_input_device.h | 2 | ||||
| -rw-r--r-- | include/wlr/types/wlr_pointer.h | 4 | ||||
| -rw-r--r-- | include/wlr/types/wlr_tablet_tool.h | 12 | ||||
| -rw-r--r-- | include/wlr/types/wlr_touch.h | 8 | 
5 files changed, 17 insertions, 15 deletions
| diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h index 70dca9f7..0883f3ca 100644 --- a/include/wlr/types/wlr_cursor.h +++ b/include/wlr/types/wlr_cursor.h @@ -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 diff --git a/include/wlr/types/wlr_input_device.h b/include/wlr/types/wlr_input_device.h index 6d8e3631..d65172c1 100644 --- a/include/wlr/types/wlr_input_device.h +++ b/include/wlr/types/wlr_input_device.h @@ -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 { diff --git a/include/wlr/types/wlr_pointer.h b/include/wlr/types/wlr_pointer.h index e7ac9b46..a8969b9e 100644 --- a/include/wlr/types/wlr_pointer.h +++ b/include/wlr/types/wlr_pointer.h @@ -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 { diff --git a/include/wlr/types/wlr_tablet_tool.h b/include/wlr/types/wlr_tablet_tool.h index 59e49ef8..22bf2649 100644 --- a/include/wlr/types/wlr_tablet_tool.h +++ b/include/wlr/types/wlr_tablet_tool.h @@ -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;  }; diff --git a/include/wlr/types/wlr_touch.h b/include/wlr/types/wlr_touch.h index 8ea293eb..70070f84 100644 --- a/include/wlr/types/wlr_touch.h +++ b/include/wlr/types/wlr_touch.h @@ -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 { | 
