Struct input::event::pointer::PointerAxisEvent [] [src]

pub struct PointerAxisEvent { /* fields omitted */ }

An event related to moving axis on a pointer device

Methods

impl PointerAxisEvent
[src]

Check if the event has a valid value for the given axis.

If this function returns non-zero for an axis and axis_value returns a value of 0, the event is a scroll stop event.

Return the source for a given axis event.

Axis events (scroll events) can be caused by a hardware item such as a scroll wheel or emulated from other input sources, such as two-finger or edge scrolling on a touchpad.

If the source is Finger, libinput guarantees that a scroll sequence is terminated with a scroll value of 0. A caller may use this information to decide on whether kinetic scrolling should be triggered on this scroll sequence. The coordinate system is identical to the cursor movement, i.e. a scroll value of 1 represents the equivalent relative motion of 1.

If the source is Wheel, no terminating event is guaranteed (though it may happen). Scrolling is in discrete steps, the value is the angle the wheel moved in degrees. The default is 15 degrees per wheel click, but some mice may have differently grained wheels. It is up to the caller how to interpret such different step sizes.

If the source is Continuous, no terminating event is guaranteed (though it may happen). The coordinate system is identical to the cursor movement, i.e. a scroll value of 1 represents the equivalent relative motion of 1.

If the source is WheelTilt, no terminating event is guaranteed (though it may happen). Scrolling is in discrete steps and there is no physical equivalent for the value returned here. For backwards compatibility, the value returned by this function is identical to a single mouse wheel rotation by this device (see the documentation for WheelTilt above). Callers should not use this value but instead exclusively refer to the

Return the axis value of the given axis.

The interpretation of the value depends on the axis. For the two scrolling axes Vertical and Horizontal, the value of the event is in relative scroll units, with the positive direction being down or right, respectively. For the interpretation of the value, see axis_source.

If has_axis returns false for an axis, this function returns 0 for that axis.

Return the axis value in discrete steps for a given axis event.

How a value translates into a discrete step depends on the source.

If the source is Wheel, the discrete value correspond to the number of physical mouse wheel clicks.

If the source is Continuous or Finger, the discrete value is always None.

Trait Implementations

impl Eq for PointerAxisEvent
[src]

impl Debug for PointerAxisEvent
[src]

Formats the value using the given formatter.

impl FromRaw<libinput_event_pointer> for PointerAxisEvent
[src]

Create a new instance of this type from a raw pointer. Read more

impl AsRaw<libinput_event_pointer> for PointerAxisEvent
[src]

Receive a raw pointer representing this type.

impl PartialEq for PointerAxisEvent
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Hash for PointerAxisEvent
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl EventTrait for PointerAxisEvent
[src]

Convert into a general Event again

Get the libinput context from the event.

Return the device associated with this event. Read more

impl Drop for PointerAxisEvent
[src]

A method called when the value goes out of scope. Read more