#include <wayland-server-core.h>
struct wl_event_loop * wl_event_loop_create (void)
void wl_event_loop_destroy (struct wl_event_loop *loop)
void wl_event_loop_dispatch_idle (struct wl_event_loop *loop)
int wl_event_loop_dispatch (struct wl_event_loop *loop, int timeout)
int wl_event_loop_get_fd (struct wl_event_loop *loop)
void wl_event_loop_add_destroy_listener (struct wl_event_loop *loop, struct wl_listener *listener)
struct wl_listener * wl_event_loop_get_destroy_listener (struct wl_event_loop *loop, wl_notify_func_t notify)
An event loop context.
Usually you create an event loop context, add sources to it, and call wl_event_loop_dispatch() in a loop to process events.
See also
Parameters
See also
Returns
This creates a new event loop context. Initially this context is empty. Event sources need to be explicitly added to it.
Normally the event loop is run by calling wl_event_loop_dispatch() in a loop until the program terminates. Alternatively, an event loop can be embedded in another event loop by its file descriptor, see wl_event_loop_get_fd().
Parameters
This emits the event loop destroy signal, closes the event loop file descriptor, and frees loop.
If the event loop has existing sources, those cannot be safely removed afterwards. Therefore one must call wl_event_source_remove() on all event sources before destroying the event loop context.
Parameters
Returns
All the associated event sources are polled. This function blocks until any event source delivers an event (idle sources excluded), or the timeout expires. A timeout of -1 disables the timeout, causing the function to block indefinitely. A timeout of zero causes the poll to always return immediately.
All idle sources are dispatched before blocking. An idle source is destroyed when it is dispatched. After blocking, all other ready sources are dispatched. Then, idle sources are dispatched again, in case the dispatched events created idle sources. Finally, all sources marked with wl_event_source_check() are dispatched in a loop until their dispatch functions all return zero.
Parameters
See also
Parameters
Returns
Parameters
Returns
This function returns the aggregate file descriptor, that represents all the event sources (idle sources excluded) associated with the given event loop context. When any event source makes an event available, it will be reflected in the aggregate file descriptor.
When the aggregate file descriptor delivers an event, one can call wl_event_loop_dispatch() on the event loop context to dispatch all the available events.
Generated automatically by Doxygen for Wayland from the source code.