[−][src]Trait miniquad::EventHandlerFree
A trait defining event callbacks. Used for miniquad's setup with user-owned Context. The only difference from EventHandler - will not receive "&mut Context"
Required methods
Loading content...Provided methods
pub fn resize_event(&mut self, _width: f32, _height: f32)
[src]
pub fn mouse_motion_event(&mut self, _x: f32, _y: f32)
[src]
pub fn mouse_wheel_event(&mut self, _x: f32, _y: f32)
[src]
pub fn mouse_button_down_event(
&mut self,
_button: MouseButton,
_x: f32,
_y: f32
)
[src]
&mut self,
_button: MouseButton,
_x: f32,
_y: f32
)
pub fn mouse_button_up_event(&mut self, _button: MouseButton, _x: f32, _y: f32)
[src]
pub fn char_event(&mut self, _character: char, _keymods: KeyMods, _repeat: bool)
[src]
pub fn key_down_event(
&mut self,
_keycode: KeyCode,
_keymods: KeyMods,
_repeat: bool
)
[src]
&mut self,
_keycode: KeyCode,
_keymods: KeyMods,
_repeat: bool
)
pub fn key_up_event(&mut self, _keycode: KeyCode, _keymods: KeyMods)
[src]
pub fn touch_event(&mut self, phase: TouchPhase, _id: u64, x: f32, y: f32)
[src]
Default implementation emulates mouse clicks
pub fn raw_mouse_motion(&mut self, _dx: f32, _dy: f32)
[src]
Represents raw hardware mouse motion event Note that these events are delivered regardless of input focus and not in pixels, but in hardware units instead. And those units may be different from pixels depending on the target platform
pub fn quit_requested_event(&mut self)
[src]
This event is sent when the userclicks the window's close button or application code calls the ctx.request_quit() function. The event handler callback code can handle this event by calling ctx.cancel_quit() to cancel the quit. If the event is ignored, the application will quit as usual.