mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
protocol: add axis_source.wheel_tilt
Unlike a wheel rotation, a wheel tilt is a discrete-only axis. Wheel rotations are mapped to degrees in libinput but that that does not apply to wheel tilt axes where there is no physical equivalent. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
This commit is contained in:
parent
f8ab47690c
commit
2f72d0a8a8
4 changed files with 43 additions and 4 deletions
|
|
@ -1986,10 +1986,15 @@
|
||||||
finger. One example for this source is button-based scrolling where
|
finger. One example for this source is button-based scrolling where
|
||||||
the vertical motion of a device is converted to scroll events while
|
the vertical motion of a device is converted to scroll events while
|
||||||
a button is held down.
|
a button is held down.
|
||||||
|
|
||||||
|
The "wheel tilt" axis source indicates that the actual device is a
|
||||||
|
wheel but the scroll event is not caused by a rotation but a
|
||||||
|
(usually sideways) tilt of the wheel.
|
||||||
</description>
|
</description>
|
||||||
<entry name="wheel" value="0" summary="a physical wheel" />
|
<entry name="wheel" value="0" summary="a physical wheel rotation" />
|
||||||
<entry name="finger" value="1" summary="finger on a touch surface" />
|
<entry name="finger" value="1" summary="finger on a touch surface" />
|
||||||
<entry name="continuous" value="2" summary="continuous coordinate space"/>
|
<entry name="continuous" value="2" summary="continuous coordinate space"/>
|
||||||
|
<entry name="wheel_tilt" value="3" summary="a physical wheel tilt" since="6"/>
|
||||||
</enum>
|
</enum>
|
||||||
|
|
||||||
<event name="axis_source" since="5">
|
<event name="axis_source" since="5">
|
||||||
|
|
@ -2004,7 +2009,8 @@
|
||||||
wl_pointer.axis_source.finger, a wl_pointer.axis_stop event will be
|
wl_pointer.axis_source.finger, a wl_pointer.axis_stop event will be
|
||||||
sent when the user lifts the finger off the device.
|
sent when the user lifts the finger off the device.
|
||||||
|
|
||||||
If the source is wl_pointer axis_source.wheel or
|
If the source is wl_pointer.axis_source.wheel,
|
||||||
|
wl_pointer.axis_source.wheel_tilt or
|
||||||
wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event may
|
wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event may
|
||||||
or may not be sent. Whether a compositor sends an axis_stop event
|
or may not be sent. Whether a compositor sends an axis_stop event
|
||||||
for these sources is hardware-specific and implementation-dependent;
|
for these sources is hardware-specific and implementation-dependent;
|
||||||
|
|
|
||||||
|
|
@ -4035,6 +4035,10 @@ enum wl_pointer_axis {
|
||||||
* finger. One example for this source is button-based scrolling where
|
* finger. One example for this source is button-based scrolling where
|
||||||
* the vertical motion of a device is converted to scroll events while
|
* the vertical motion of a device is converted to scroll events while
|
||||||
* a button is held down.
|
* a button is held down.
|
||||||
|
*
|
||||||
|
* The "wheel tilt" axis source indicates that the actual device is a
|
||||||
|
* wheel but the scroll event is not caused by a rotation but a
|
||||||
|
* (usually sideways) tilt of the wheel.
|
||||||
*/
|
*/
|
||||||
enum wl_pointer_axis_source {
|
enum wl_pointer_axis_source {
|
||||||
/**
|
/**
|
||||||
|
|
@ -4049,7 +4053,16 @@ enum wl_pointer_axis_source {
|
||||||
* continuous coordinate space
|
* continuous coordinate space
|
||||||
*/
|
*/
|
||||||
WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2,
|
WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2,
|
||||||
|
/**
|
||||||
|
* a physical wheel tilt
|
||||||
|
* @since 6
|
||||||
|
*/
|
||||||
|
WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3,
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* @ingroup iface_wl_pointer
|
||||||
|
*/
|
||||||
|
#define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6
|
||||||
#endif /* WL_POINTER_AXIS_SOURCE_ENUM */
|
#endif /* WL_POINTER_AXIS_SOURCE_ENUM */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -4216,7 +4229,8 @@ struct wl_pointer_listener {
|
||||||
* is wl_pointer.axis_source.finger, a wl_pointer.axis_stop event
|
* is wl_pointer.axis_source.finger, a wl_pointer.axis_stop event
|
||||||
* will be sent when the user lifts the finger off the device.
|
* will be sent when the user lifts the finger off the device.
|
||||||
*
|
*
|
||||||
* If the source is wl_pointer axis_source.wheel or
|
* If the source is wl_pointer.axis_source.wheel,
|
||||||
|
* wl_pointer.axis_source.wheel_tilt or
|
||||||
* wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event
|
* wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event
|
||||||
* may or may not be sent. Whether a compositor sends an axis_stop
|
* may or may not be sent. Whether a compositor sends an axis_stop
|
||||||
* event for these sources is hardware-specific and
|
* event for these sources is hardware-specific and
|
||||||
|
|
|
||||||
|
|
@ -3244,6 +3244,10 @@ enum wl_pointer_axis {
|
||||||
* finger. One example for this source is button-based scrolling where
|
* finger. One example for this source is button-based scrolling where
|
||||||
* the vertical motion of a device is converted to scroll events while
|
* the vertical motion of a device is converted to scroll events while
|
||||||
* a button is held down.
|
* a button is held down.
|
||||||
|
*
|
||||||
|
* The "wheel tilt" axis source indicates that the actual device is a
|
||||||
|
* wheel but the scroll event is not caused by a rotation but a
|
||||||
|
* (usually sideways) tilt of the wheel.
|
||||||
*/
|
*/
|
||||||
enum wl_pointer_axis_source {
|
enum wl_pointer_axis_source {
|
||||||
/**
|
/**
|
||||||
|
|
@ -3258,7 +3262,16 @@ enum wl_pointer_axis_source {
|
||||||
* continuous coordinate space
|
* continuous coordinate space
|
||||||
*/
|
*/
|
||||||
WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2,
|
WL_POINTER_AXIS_SOURCE_CONTINUOUS = 2,
|
||||||
|
/**
|
||||||
|
* a physical wheel tilt
|
||||||
|
* @since 6
|
||||||
|
*/
|
||||||
|
WL_POINTER_AXIS_SOURCE_WHEEL_TILT = 3,
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* @ingroup iface_wl_pointer
|
||||||
|
*/
|
||||||
|
#define WL_POINTER_AXIS_SOURCE_WHEEL_TILT_SINCE_VERSION 6
|
||||||
#endif /* WL_POINTER_AXIS_SOURCE_ENUM */
|
#endif /* WL_POINTER_AXIS_SOURCE_ENUM */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1986,10 +1986,15 @@
|
||||||
finger. One example for this source is button-based scrolling where
|
finger. One example for this source is button-based scrolling where
|
||||||
the vertical motion of a device is converted to scroll events while
|
the vertical motion of a device is converted to scroll events while
|
||||||
a button is held down.
|
a button is held down.
|
||||||
|
|
||||||
|
The "wheel tilt" axis source indicates that the actual device is a
|
||||||
|
wheel but the scroll event is not caused by a rotation but a
|
||||||
|
(usually sideways) tilt of the wheel.
|
||||||
</description>
|
</description>
|
||||||
<entry name="wheel" value="0" summary="a physical wheel rotation" />
|
<entry name="wheel" value="0" summary="a physical wheel rotation" />
|
||||||
<entry name="finger" value="1" summary="finger on a touch surface" />
|
<entry name="finger" value="1" summary="finger on a touch surface" />
|
||||||
<entry name="continuous" value="2" summary="continuous coordinate space"/>
|
<entry name="continuous" value="2" summary="continuous coordinate space"/>
|
||||||
|
<entry name="wheel_tilt" value="3" summary="a physical wheel tilt" since="6"/>
|
||||||
</enum>
|
</enum>
|
||||||
|
|
||||||
<event name="axis_source" since="5">
|
<event name="axis_source" since="5">
|
||||||
|
|
@ -2004,7 +2009,8 @@
|
||||||
wl_pointer.axis_source.finger, a wl_pointer.axis_stop event will be
|
wl_pointer.axis_source.finger, a wl_pointer.axis_stop event will be
|
||||||
sent when the user lifts the finger off the device.
|
sent when the user lifts the finger off the device.
|
||||||
|
|
||||||
If the source is wl_pointer axis_source.wheel or
|
If the source is wl_pointer.axis_source.wheel,
|
||||||
|
wl_pointer.axis_source.wheel_tilt or
|
||||||
wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event may
|
wl_pointer.axis_source.continuous, a wl_pointer.axis_stop event may
|
||||||
or may not be sent. Whether a compositor sends an axis_stop event
|
or may not be sent. Whether a compositor sends an axis_stop event
|
||||||
for these sources is hardware-specific and implementation-dependent;
|
for these sources is hardware-specific and implementation-dependent;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue