Trait piston_window::mouse::MouseRelativeEvent[][src]

pub trait MouseRelativeEvent {
    pub fn from_pos(x: [f64; 2], old_event: &Self) -> Option<Self>;
pub fn mouse_relative<U, F>(&self, f: F) -> Option<U>
    where
        F: FnMut([f64; 2]) -> U
; pub fn mouse_relative_args(&self) -> Option<[f64; 2]> { ... } }

The relative movement of mouse cursor.

These events might be emitted even the cursor is captured by the window.

Required methods

pub fn from_pos(x: [f64; 2], old_event: &Self) -> Option<Self>[src]

Creates a mouse relative event.

Preserves time stamp from original input event, if any.

pub fn mouse_relative<U, F>(&self, f: F) -> Option<U> where
    F: FnMut([f64; 2]) -> U, 
[src]

Calls closure if this is a mouse relative event.

Loading content...

Provided methods

pub fn mouse_relative_args(&self) -> Option<[f64; 2]>[src]

Returns mouse relative arguments.

Loading content...

Implementors

impl MouseRelativeEvent for Event[src]

Loading content...