PointerGesture

Enum PointerGesture 

Source
pub enum PointerGesture {
    Drag {
        dx: i32,
        dy: i32,
        x0: i32,
        y0: i32,
        series_id: u8,
    },
    Pinch {
        center: (i32, i32),
        dilation: (f32, f32),
        series_id: u8,
    },
}
Expand description

Pointer gesture.

Pointer gestures are higher level descriptions of the actions performed by pointer devices. These are easier to interpret than the information in a PointerEvent, so the applicaton can implement actions according to pointer gestures.

Variants§

§

Drag

A drag gesture.

Drag gestures are performed by clicking and dragging with a mouse or by dragging one finger on a touchscreen.

Fields

§dx: i32

Displacement in the X dimension (in pixels).

§dy: i32

Displacement in the Y dimension (in pixels).

§x0: i32

X position (in pixels) of the previous pointer location

§y0: i32

Y position (in pixels) of the previous pointer location

§series_id: u8

ID for the series of gestures.

Gestures that are generated as part of the same action have the same series ID.

§

Pinch

A pinch gesture.

Pinch gestures are performed by touching two fingers on a touchscreen and moving them closer together or futher apart.

Fields

§center: (i32, i32)

Center of the pinch gesture.

The pinch gesture center is the mean point between the locations of the two fingers involved in the pinch.

§dilation: (f32, f32)

Dilation factor.

The dilation factor indicates the zoom factor that the relative movement of the fingers has caused.

§series_id: u8

ID for the series of gestures.

Gestures that are generated as part of the same action have the same series ID.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.