Trait GestureEventCoordinates

Source
pub trait GestureEventCoordinates: AsRaw<libinput_event_gesture> {
    // Provided methods
    fn dx(&self) -> f64 { ... }
    fn dx_unaccelerated(&self) -> f64 { ... }
    fn dy(&self) -> f64 { ... }
    fn dy_unaccelerated(&self) -> f64 { ... }
}
Expand description

Common functions for Gesture-Events having coordinates.

Provided Methods§

Source

fn dx(&self) -> f64

Return the delta between the last event and the current event.

If a device employs pointer acceleration, the delta returned by this function is the accelerated delta.

Relative motion deltas are normalized to represent those of a device with 1000dpi resolution. See Normalization of relative motion for more details.

Source

fn dx_unaccelerated(&self) -> f64

Return the relative delta of the unaccelerated motion vector of the current event.

Relative unaccelerated motion deltas are normalized to represent those of a device with 1000dpi resolution. See Normalization of relative motion for more details. Note that unaccelerated events are not equivalent to ‘raw’ events as read from the device.

Any rotation applied to the device also applies to gesture motion (see rotation_set_angle).

Source

fn dy(&self) -> f64

Return the delta between the last event and the current event.

If a device employs pointer acceleration, the delta returned by this function is the accelerated delta.

Relative motion deltas are normalized to represent those of a device with 1000dpi resolution. See Normalization of relative motion for more details.

Source

fn dy_unaccelerated(&self) -> f64

Return the relative delta of the unaccelerated motion vector of the current event.

Relative unaccelerated motion deltas are normalized to represent those of a device with 1000dpi resolution. See Normalization of relative motion for more details. Note that unaccelerated events are not equivalent to ‘raw’ events as read from the device.

Any rotation applied to the device also applies to gesture motion (see rotation_set_angle).

Implementors§