Trait piston::FocusEvent[][src]

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

When window gets or loses focus.

Required methods

Creates a focus event.

Preserves time stamp from original input event, if any.

Calls closure if this is a focus event.

Provided methods

Returns focus arguments.

Implementors