Enum winput::MouseMotion[][src]

pub enum MouseMotion {
    Relative {
        dx: i32,
        dy: i32,
    },
    Absolute {
        x: f32,
        y: f32,
        virtual_desk: bool,
    },
}

Describes a mouse motion.

Variants

Relative

Describes a relative mouse motion, in pixels.

Relative mouse motion is subject to the effects of the mouse speed and the two-mouse threshold values. A user sets these three values with the Pointer Speed slider of the Control Panel’s Mouse Properties sheet.

Show fields

Fields of Relative

dx: i32

The number of pixels the mouse should move, on the horizontal axis.

dy: i32

The number of pixels the mouse should move, on the vertical axis. A positive value makes the mouse go down.

Absolute

Describes an absolute mouse motion, in normalized coordinates.

Show fields

Fields of Absolute

x: f32

The normalized position of the mouse on the horizontal axis. A value of 0.0 maps to the left of the screen and a value of 1.0 maps to the right of the screen.

y: f32

The normalized position of the mouse on the vertical axis. A value of 0.0 maps to the top of the screen and a value of 1.0 maps to the bottom on the screen.

virtual_desk: bool

Whether the given normalized coordinates should map to the entier virtual desktop (if multiple monitors are used, for example).

Trait Implementations

impl Clone for MouseMotion[src]

impl Copy for MouseMotion[src]

impl Debug for MouseMotion[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.