49 auto* kd = std::get_if<Core::WindowEvent::KeyData>(&event.
data);
54 auto* bd = std::get_if<Core::WindowEvent::MouseButtonData>(&event.
data);
void try_resume()
Called by EventSource when event arrives.
std::coroutine_handle m_handle
Vruta::EventSource & m_source
Vruta::EventFilter m_filter
void await_suspend(std::coroutine_handle<> handle)
Suspend coroutine, register for event notification.
Core::WindowEvent await_resume()
Resume with event data.
bool filter_matches(const Core::WindowEvent &event) const
Core::WindowEvent m_result
bool await_ready()
Check if event already available.
std::optional< Core::WindowEvent > pop_event(const EventFilter &filter)
Pop event matching filter from queue.
void register_waiter(Kriya::EventAwaiter *awaiter)
void unregister_waiter(Kriya::EventAwaiter *awaiter)
Event data for window and input events.
std::optional< IO::Keys > key_code
std::optional< IO::MouseButtons > button
std::optional< Core::WindowEventType > event_type