Trait piston_window::FocusEvent[][src]

pub trait FocusEvent {
    pub fn from_focused(focused: bool, old_event: &Self) -> Option<Self>;
pub fn focus<U, F>(&self, f: F) -> Option<U>
    where
        F: FnMut(bool) -> U
; pub fn focus_args(&self) -> Option<bool> { ... } }

When window gets or loses focus.

Required methods

pub fn from_focused(focused: bool, old_event: &Self) -> Option<Self>[src]

Creates a focus event.

Preserves time stamp from original input event, if any.

pub fn focus<U, F>(&self, f: F) -> Option<U> where
    F: FnMut(bool) -> U, 
[src]

Calls closure if this is a focus event.

Loading content...

Provided methods

pub fn focus_args(&self) -> Option<bool>[src]

Returns focus arguments.

Loading content...

Implementors

impl FocusEvent for Event[src]

Loading content...