Trait piston::FocusEvent
source · pub trait FocusEvent: Sized {
// Required methods
fn from_focused(focused: bool, old_event: &Self) -> Option<Self>;
fn focus<U, F>(&self, f: F) -> Option<U>
where F: FnMut(bool) -> U;
// Provided method
fn focus_args(&self) -> Option<bool> { ... }
}
Expand description
When window gets or loses focus.
Required Methods§
sourcefn from_focused(focused: bool, old_event: &Self) -> Option<Self>
fn from_focused(focused: bool, old_event: &Self) -> Option<Self>
Creates a focus event.
Preserves time stamp from original input event, if any.
Provided Methods§
sourcefn focus_args(&self) -> Option<bool>
fn focus_args(&self) -> Option<bool>
Returns focus arguments.
Object Safety§
This trait is not object safe.