Trait WindowEventHandler
Source pub trait WindowEventHandler: Send + Sync {
// Required methods
fn update(&self, _window: &mut Window) -> Result<()>;
fn draw(&mut self, _window: &mut Window) -> Result<()>;
// Provided methods
fn key_down_event(
&self,
_window: &mut Window,
_event: KeyboardEvent,
) -> Result<()> { ... }
fn key_up_event(
&self,
_window: &mut Window,
_event: KeyboardEvent,
) -> Result<()> { ... }
fn mouse_motion_event(
&self,
_window: &mut Window,
_event: MouseMotionEvent,
) -> Result<()> { ... }
fn mouse_button_down_event(
&self,
_window: &mut Window,
_event: MouseClickEvent,
) -> Result<()> { ... }
fn mouse_button_up_event(
&self,
_window: &mut Window,
_event: MouseClickEvent,
) -> Result<()> { ... }
fn mouse_wheel_event(
&self,
_window: &mut Window,
_event: MouseWheelEvent,
) -> Result<()> { ... }
}