pub fn drain_pending_events(
events: &Arc<Mutex<EventState>>,
canvas_size: (u32, u32),
focused: bool,
mouse_down: bool,
mouse_pos: (f32, f32),
) -> Vec<(u32, String, Vec<u8>)>Expand description
Drain built-in event sources + the pending custom-event queue and return
(callback_id, type, data) tuples to dispatch via on_event.
state is mutably accessed once. The runtime then calls on_event for
each returned tuple, after writing the type/data into EventState::current
via set_current_event.