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.

This is called before a event.

only passed RunType::Idle to Context::run.

This is called after a event.

only passed RunType::Idle to Context::run.

This is called when the window needs redrawing.

This is called when the window has been activated.

This is called when the window has been inactivated.

This is called when the window has been closed.

This is called when the window has been moved.

This is called when the window is resizing.

This is called when the window has been resized.

This is called when the window’s DPI has been changed.

This is called when the mouse button has been pressed and released on the window.

This is called when the cursor has been moved on the window.

This is called when the cursor has been entered the window.

This is called when the cursor has been leaved the window.

This is called when the keyboard key has been pressed and released.

This is called when the keyboard key has been inputed the character.

This is called when the IME starts composition.

This is called when the IME composition status has been changed.

This is called when the IME ends composition.

This is called when files have been dropped on the window.

Implementors