Trait wita::EventHandler
source · [−]pub trait EventHandler {
Show 28 methods
fn idle(&mut self) { ... }
fn pre_processing(&mut self) { ... }
fn post_processing(&mut self) { ... }
fn draw(&mut self, ev: Draw<'_>) { ... }
fn activated(&mut self, ev: Activated<'_>) { ... }
fn inactivated(&mut self, ev: Inactivated<'_>) { ... }
fn closed(&mut self, ev: Closed<'_>) { ... }
fn moved(&mut self, ev: Moved<'_>) { ... }
fn resizing(&mut self, ev: Resizing<'_>) { ... }
fn resized(&mut self, ev: Resized<'_>) { ... }
fn minimized(&mut self, ev: Minimized<'_>) { ... }
fn maximized(&mut self, ev: Maximized<'_>) { ... }
fn restored(&mut self, ev: Restored<'_>) { ... }
fn dpi_changed(&mut self, ev: DpiChanged<'_>) { ... }
fn mouse_input(&mut self, ev: MouseInput<'_>) { ... }
fn cursor_moved(&mut self, ev: CursorMoved<'_>) { ... }
fn cursor_entered(&mut self, ev: CursorEntered<'_>) { ... }
fn cursor_left(&mut self, ev: CursorLeft<'_>) { ... }
fn mouse_wheel(&mut self, ev: MouseWheel<'_>) { ... }
fn key_input(&mut self, ev: KeyInput<'_>) { ... }
fn char_input(&mut self, ev: CharInput<'_>) { ... }
fn ime_start_composition(&mut self, ev: ImeStartComposition<'_>) { ... }
fn ime_composition(&mut self, ev: ImeComposition<'_>) { ... }
fn ime_end_composition(&mut self, ev: ImeEndComposition<'_>) { ... }
fn drop_files(&mut self, ev: DropFiles<'_>) { ... }
fn raw_input(&mut self, ev: RawInput<'_>) { ... }
fn raw_input_device_change(&mut self, ev: RawInputDeviceChange<'_>) { ... }
fn other(&mut self, ev: Other) -> Option<isize> { ... }
}
Expand description
Trait that must implements for handling events.
Provided Methods
sourcefn idle(&mut self)
fn idle(&mut self)
This is called when there are no events.
only passed RunType::Idle
to Context::run
.
sourcefn pre_processing(&mut self)
fn pre_processing(&mut self)
This is called before a event.
only passed RunType::Idle
to Context::run
.
sourcefn post_processing(&mut self)
fn post_processing(&mut self)
This is called after a event.
only passed RunType::Idle
to Context::run
.
sourcefn inactivated(&mut self, ev: Inactivated<'_>)
fn inactivated(&mut self, ev: Inactivated<'_>)
This is called when the window has been inactivated.
sourcefn restored(&mut self, ev: Restored<'_>)
fn restored(&mut self, ev: Restored<'_>)
This is called when the window has been restored from the minimize or maximize window.
sourcefn dpi_changed(&mut self, ev: DpiChanged<'_>)
fn dpi_changed(&mut self, ev: DpiChanged<'_>)
This is called when the window’s DPI has been changed.
sourcefn mouse_input(&mut self, ev: MouseInput<'_>)
fn mouse_input(&mut self, ev: MouseInput<'_>)
This is called when the mouse button has been pressed and released on the window.
sourcefn cursor_moved(&mut self, ev: CursorMoved<'_>)
fn cursor_moved(&mut self, ev: CursorMoved<'_>)
This is called when the cursor has been moved on the window.
sourcefn cursor_entered(&mut self, ev: CursorEntered<'_>)
fn cursor_entered(&mut self, ev: CursorEntered<'_>)
This is called when the cursor has been entered the window.
sourcefn cursor_left(&mut self, ev: CursorLeft<'_>)
fn cursor_left(&mut self, ev: CursorLeft<'_>)
This is called when the cursor has been left the window.
sourcefn mouse_wheel(&mut self, ev: MouseWheel<'_>)
fn mouse_wheel(&mut self, ev: MouseWheel<'_>)
This is called when the mouse wheel has been rotated or tilted.
sourcefn key_input(&mut self, ev: KeyInput<'_>)
fn key_input(&mut self, ev: KeyInput<'_>)
This is called when the keyboard key has been pressed and released.
sourcefn char_input(&mut self, ev: CharInput<'_>)
fn char_input(&mut self, ev: CharInput<'_>)
This is called when the keyboard key has been inputed the character.
sourcefn ime_start_composition(&mut self, ev: ImeStartComposition<'_>)
fn ime_start_composition(&mut self, ev: ImeStartComposition<'_>)
This is called when the IME starts composition.
sourcefn ime_composition(&mut self, ev: ImeComposition<'_>)
fn ime_composition(&mut self, ev: ImeComposition<'_>)
This is called when the IME composition status has been changed.
sourcefn ime_end_composition(&mut self, ev: ImeEndComposition<'_>)
fn ime_end_composition(&mut self, ev: ImeEndComposition<'_>)
This is called when the IME ends composition.
sourcefn drop_files(&mut self, ev: DropFiles<'_>)
fn drop_files(&mut self, ev: DropFiles<'_>)
This is called when files have been dropped on the window.
sourcefn raw_input_device_change(&mut self, ev: RawInputDeviceChange<'_>)
fn raw_input_device_change(&mut self, ev: RawInputDeviceChange<'_>)
This is called when a device state has been changead.