[−][src]Trait orbtk_shell::window_adapter::WindowAdapter
The WindowAdapter
represents the bridge to the Shell
backend.
It receives events from the Window
and runs it's own logic.
Required methods
fn mouse_position(&self) -> Point
Gets the current mouse position.
fn active(&mut self, active: bool)
Is called if active state of the window is changed.
fn run(&mut self, render_context: &mut RenderContext2D)
Runs the inner logic of the shell adapter.
Provided methods
fn resize(&mut self, _width: f64, _height: f64)
Is called after the window is resized.
fn mouse(&mut self, _x: f64, _y: f64)
Is called after the mouse was moved.
fn mouse_event(&mut self, _event: MouseEvent)
Is called after the state of a mouse button is changed.
fn scroll(&mut self, _delta_x: f64, _delta_y: f64)
Is called if mouse wheel or trackpad detect scroll event.
fn key_event(&mut self, _event: KeyEvent)
Is called after the state of a keyboard key is changed.
fn quit_event(&mut self)
Is called after the quit event of the window is called.