Struct runa_wayland_protocols::wayland::wl_pointer::v9::events::AxisRelativeDirection
source · pub struct AxisRelativeDirection {
pub axis: Axis,
pub direction: AxisRelativeDirection,
}
Expand description
axis relative physical direction event
Relative directional information of the entity causing the axis motion.
For a wl_pointer.axis event, the wl_pointer.axis_relative_direction event specifies the movement direction of the entity causing the wl_pointer.axis event. For example:
- if a user’s fingers on a touchpad move down and this causes a wl_pointer.axis vertical_scroll down event, the physical direction is ‘identical’
- if a user’s fingers on a touchpad move down and this causes a wl_pointer.axis vertical_scroll up scroll up event (‘natural scrolling’), the physical direction is ‘inverted’.
A client may use this information to adjust scroll motion of components. Specifically, enabling natural scrolling causes the content to change direction compared to traditional scrolling. Some widgets like volume control sliders should usually match the physical direction regardless of whether natural scrolling is active. This event enables clients to match the scroll direction of a widget to the physical direction.
This event does not occur on its own, it is coupled with a wl_pointer.axis event that represents this axis value. The protocol guarantees that each axis_relative_direction event is always followed by exactly one axis event with the same axis number within the same wl_pointer.frame. Note that the protocol allows for other events to occur between the axis_relative_direction and its coupled axis event.
The axis number is identical to the axis number in the associated axis event.
The order of wl_pointer.axis_relative_direction, wl_pointer.axis_discrete and wl_pointer.axis_source is not guaranteed.
Fields§
§axis: Axis
§direction: AxisRelativeDirection
Implementations§
Trait Implementations§
source§impl Clone for AxisRelativeDirection
impl Clone for AxisRelativeDirection
source§fn clone(&self) -> AxisRelativeDirection
fn clone(&self) -> AxisRelativeDirection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AxisRelativeDirection
impl Debug for AxisRelativeDirection
source§impl<'a> Deserialize<'a> for AxisRelativeDirection
impl<'a> Deserialize<'a> for AxisRelativeDirection
source§impl PartialEq<AxisRelativeDirection> for AxisRelativeDirection
impl PartialEq<AxisRelativeDirection> for AxisRelativeDirection
source§fn eq(&self, other: &AxisRelativeDirection) -> bool
fn eq(&self, other: &AxisRelativeDirection) -> bool
self
and other
values to be equal, and is used
by ==
.