14#include <egt/detail/meta.h>
51 asio::io_context&
io();
113 detail::PriorityQueue& queue();
123 void invoke_idle_callbacks();
125 struct EventLoopImpl;
128 std::unique_ptr<EventLoopImpl> m_impl;
134 bool m_do_quit{
false};
Application definition.
Definition app.h:49
Event loop interface.
Definition eventloop.h:39
EventLoop & operator=(EventLoop &&)=delete
void add_idle_callback(IdleCallback func)
Add a callback to be called any time the event loop is idle.
void draw()
Perform a draw.
int run()
Run the event loop.
int step()
Single step on the event loop.
EventLoop & operator=(const EventLoop &)=delete
int poll()
Run some pending events and return.
EventLoop(const EventLoop &)=delete
int m_exit_value
Return value when application quits.
Definition eventloop.h:137
void quit(int exit_value=0)
Quit the event loop.
std::function< void()> IdleCallback
Event callback function definition.
Definition eventloop.h:105
EventLoop(EventLoop &&)=delete
const Application & m_app
Application reference.
Definition eventloop.h:140
asio::io_context & io()
Get a reference to the internal ASIO io_context object.
EventLoop(const Application &app) noexcept
EGT framework namespace.
Definition animation.h:24