In general, most Agar GUI applications will use the standard Agar-Core
AG_EventLoop(3), since it uses the most efficient event-notification mechanism available for
the target platform (e.g.,
kqueue(2), select(2), etc.)
However, Agar-GUI applications are not required to use
AG_EventLoop() at all, and may use an application-specific event loop routine.
To simplify writing of custom event loops, Agar provides the
AG_GetNextEvent(3), AG_ProcessEvent(3) and
Low-level driver events are represented by the transparent, driver-independent
AG_DriverEvent structure (see
AG_Driver(3) for details and examples).