Struct rich_sdl2_rust::event::EventBox
source · pub struct EventBox<'video> { /* private fields */ }
Expand description
It takes the closure of handler to register, and delivers events to your event handlers by polling.
Implementations§
source§impl<'video> EventBox<'video>
impl<'video> EventBox<'video>
sourcepub fn handle_quit(&mut self, handler: EventHandler<'video, QuitEvent>)
pub fn handle_quit(&mut self, handler: EventHandler<'video, QuitEvent>)
Registers the handler to handle QuitEvent
.
sourcepub fn handle_window(&mut self, handler: EventHandler<'video, WindowEvent>)
pub fn handle_window(&mut self, handler: EventHandler<'video, WindowEvent>)
Registers the handler to handle WindowEvent
.
sourcepub fn handle_keyboard(&mut self, handler: EventHandler<'video, KeyboardEvent>)
pub fn handle_keyboard(&mut self, handler: EventHandler<'video, KeyboardEvent>)
Registers the handler to handle KeyboardEvent
.
sourcepub fn handle_input(&mut self, handler: EventHandler<'video, TextInputEvent>)
pub fn handle_input(&mut self, handler: EventHandler<'video, TextInputEvent>)
Registers the handler to handle TextInputEvent
.
sourcepub fn handle_editing(&mut self, handler: EventHandler<'video, TextEditingEvent>)
pub fn handle_editing(&mut self, handler: EventHandler<'video, TextEditingEvent>)
Registers the handler to handle TextEditingEvent
.
sourcepub fn handle_mouse(&mut self, handler: EventHandler<'video, MouseEvent>)
pub fn handle_mouse(&mut self, handler: EventHandler<'video, MouseEvent>)
Registers the handler to handle MouseEvent
.
sourcepub fn handle_controller(
&mut self,
handler: EventHandler<'video, ControllerEvent<'video>>
)
pub fn handle_controller(
&mut self,
handler: EventHandler<'video, ControllerEvent<'video>>
)
Registers the handler to handle ControllerEvent
.
sourcepub fn handle_joystick(
&mut self,
handler: EventHandler<'video, JoystickEvent<'video>>
)
pub fn handle_joystick(
&mut self,
handler: EventHandler<'video, JoystickEvent<'video>>
)
Registers the handler to handle JoystickEvent
.
sourcepub fn handle_audio_device(
&mut self,
handler: EventHandler<'video, AudioDeviceEvent>
)
pub fn handle_audio_device(
&mut self,
handler: EventHandler<'video, AudioDeviceEvent>
)
Registers the handler to handle AudioDeviceEvent
.
sourcepub fn handle_drop(&mut self, handler: EventHandler<'video, DropEvent>)
pub fn handle_drop(&mut self, handler: EventHandler<'video, DropEvent>)
Registers the handler to handle DropEvent
.
sourcepub fn handle_gesture(&mut self, handler: EventHandler<'video, GestureEvent>)
pub fn handle_gesture(&mut self, handler: EventHandler<'video, GestureEvent>)
Registers the handler to handle GestureEvent
.
sourcepub fn wait_next_event_with(&self, timeout_ms: u32)
pub fn wait_next_event_with(&self, timeout_ms: u32)
Waits until the next event occurs, but unlock with timeout seconds.