[][src]Trait input::mouse::MouseRelativeEvent

pub trait MouseRelativeEvent: Sized {
    fn from_pos(x: [f64; 2], old_event: &Self) -> Option<Self>;
fn mouse_relative<U, F>(&self, f: F) -> Option<U>
    where
        F: FnMut([f64; 2]) -> U
; 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

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

Creates a mouse relative event.

Preserves time stamp from original input event, if any.

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

Calls closure if this is a mouse relative event.

Loading content...

Provided methods

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

Returns mouse relative arguments.

Loading content...

Implementors

impl MouseRelativeEvent for Event[src]

Loading content...