Trait wita::EventHandler [−][src]
pub trait EventHandler {}Show methods
fn idle(&mut self) { ... } fn pre_processing(&mut self) { ... } fn post_processing(&mut self) { ... } fn draw(&mut self, window: &Window) { ... } fn activated(&mut self, window: &Window) { ... } fn inactivated(&mut self, window: &Window) { ... } fn closed(&mut self, window: &Window) { ... } fn moved(&mut self, window: &Window, position: ScreenPosition) { ... } fn resizing(&mut self, window: &Window, size: PhysicalSize<u32>) { ... } fn resized(&mut self, window: &Window, size: PhysicalSize<u32>) { ... } fn dpi_changed(&mut self, window: &Window) { ... } fn mouse_input(
&mut self,
window: &Window,
button: MouseButton,
state: KeyState,
mouse_state: MouseState<'_>
) { ... } fn cursor_moved(&mut self, window: &Window, mouse_state: MouseState<'_>) { ... } fn cursor_entered(&mut self, window: &Window, mouse_state: MouseState<'_>) { ... } fn cursor_leaved(&mut self, window: &Window, mouse_state: MouseState<'_>) { ... } fn key_input(
&mut self,
window: &Window,
key_code: KeyCode,
state: KeyState,
prev_pressed: bool
) { ... } fn char_input(&mut self, window: &Window, c: char) { ... } fn ime_start_composition(&mut self, window: &Window) { ... } fn ime_composition(
&mut self,
window: &Window,
composition: &Composition,
candidate_list: Option<&CandidateList>
) { ... } fn ime_end_composition(
&mut self,
window: &Window,
result_string: Option<&str>
) { ... } fn drop_files(
&mut self,
window: &Window,
paths: &[&Path],
position: PhysicalPosition<f32>
) { ... } fn other(&mut self, params: &OtherParams) -> Option<i32> { ... }
Expand description
Trait that must implements for handling events.
Provided methods
This is called when there are no events.
only passed RunType::Idle
to Context::run
.
fn pre_processing(&mut self)
[src]
fn pre_processing(&mut self)
[src]This is called before a event.
only passed RunType::Idle
to Context::run
.
fn post_processing(&mut self)
[src]
fn post_processing(&mut self)
[src]This is called after a event.
only passed RunType::Idle
to Context::run
.
fn inactivated(&mut self, window: &Window)
[src]
fn inactivated(&mut self, window: &Window)
[src]This is called when the window has been inactivated.
fn moved(&mut self, window: &Window, position: ScreenPosition)
[src]
fn moved(&mut self, window: &Window, position: ScreenPosition)
[src]This is called when the window has been moved.
fn resizing(&mut self, window: &Window, size: PhysicalSize<u32>)
[src]
fn resizing(&mut self, window: &Window, size: PhysicalSize<u32>)
[src]This is called when the window is resizing.
fn resized(&mut self, window: &Window, size: PhysicalSize<u32>)
[src]
fn resized(&mut self, window: &Window, size: PhysicalSize<u32>)
[src]This is called when the window has been resized.
fn dpi_changed(&mut self, window: &Window)
[src]
fn dpi_changed(&mut self, window: &Window)
[src]This is called when the window’s DPI has been changed.
fn mouse_input(
&mut self,
window: &Window,
button: MouseButton,
state: KeyState,
mouse_state: MouseState<'_>
)
[src]
fn mouse_input(
&mut self,
window: &Window,
button: MouseButton,
state: KeyState,
mouse_state: MouseState<'_>
)
[src]This is called when the mouse button has been pressed and released on the window.
fn cursor_moved(&mut self, window: &Window, mouse_state: MouseState<'_>)
[src]
fn cursor_moved(&mut self, window: &Window, mouse_state: MouseState<'_>)
[src]This is called when the cursor has been moved on the window.
fn cursor_entered(&mut self, window: &Window, mouse_state: MouseState<'_>)
[src]
fn cursor_entered(&mut self, window: &Window, mouse_state: MouseState<'_>)
[src]This is called when the cursor has been entered the window.
fn cursor_leaved(&mut self, window: &Window, mouse_state: MouseState<'_>)
[src]
fn cursor_leaved(&mut self, window: &Window, mouse_state: MouseState<'_>)
[src]This is called when the cursor has been leaved the window.
This is called when the keyboard key has been pressed and released.
fn char_input(&mut self, window: &Window, c: char)
[src]
fn char_input(&mut self, window: &Window, c: char)
[src]This is called when the keyboard key has been inputed the character.
fn ime_start_composition(&mut self, window: &Window)
[src]
fn ime_start_composition(&mut self, window: &Window)
[src]This is called when the IME starts composition.
fn ime_composition(
&mut self,
window: &Window,
composition: &Composition,
candidate_list: Option<&CandidateList>
)
[src]
fn ime_composition(
&mut self,
window: &Window,
composition: &Composition,
candidate_list: Option<&CandidateList>
)
[src]This is called when the IME composition status has been changed.
fn ime_end_composition(&mut self, window: &Window, result_string: Option<&str>)
[src]
fn ime_end_composition(&mut self, window: &Window, result_string: Option<&str>)
[src]This is called when the IME ends composition.
fn drop_files(
&mut self,
window: &Window,
paths: &[&Path],
position: PhysicalPosition<f32>
)
[src]
fn drop_files(
&mut self,
window: &Window,
paths: &[&Path],
position: PhysicalPosition<f32>
)
[src]This is called when files have been dropped on the window.
fn other(&mut self, params: &OtherParams) -> Option<i32>
[src]