Manual Pages for Linux CentOS command on man wl_event_loop
MyWebUniversity

Manual Pages for Linux CentOS command on man wl_event_loop

wleventloop(3) Wayland wleventloop(3)

NAME

wleventloop - An event loop context. SYNOPSIS

#include Public Member Functions struct wleventloop * wleventloopcreate (void) void wleventloopdestroy (struct wleventloop *loop) void wleventloopdispatchidle (struct wleventloop *loop) int wleventloopdispatch (struct wleventloop *loop, int timeout) int wleventloopgetfd (struct wleventloop *loop) void wleventloopadddestroylistener (struct wleventloop *loop, struct wllistener *listener) struct wllistener * wleventloopgetdestroylistener (struct wleventloop *loop, wlnotifyfunct notify) Detailed Description An event loop context. Usually you create an event loop context, add sources to it, and call wleventloopdispatch() in a loop to process events. See Also: wleventsource Member Function Documentation void wleventloopadddestroylistener (struct wleventloop *loop, struct wllistener *listener) Register a destroy listener for an event loop context Parameters: loop The event loop context whose destruction to listen for. listener The listener with the callback to be called. See Also: wllistener struct wleventloop * wleventloopcreate (void) Create a new event loop context Returns: A new event loop context object. 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 wleventloopdispatch() in a loop until the program terminates. Alternatively, an event loop can be embedded in another event loop by its file descriptor, see wleventloopgetfd(). void wleventloopdestroy (struct wleventloop *loop) Destroy an event loop context Parameters: loop The event loop to be destroyed. 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 wleventsourceremove() on all event sources before destroying the event loop context. int wleventloopdispatch (struct wleventloop *loop, inttimeout) Wait for events and dispatch them Parameters: loop The event loop whose sources to wait for. timeout The polling timeout in milliseconds. Returns:

0 for success, -1 for polling error. 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 wleventsourcecheck() are dispatched in a loop until their dispatch functions all return zero. void wleventloopdispatchidle (struct wleventloop *loop) Dispatch the idle sources Parameters: loop The event loop whose idle sources are dispatched. See Also: wleventloopaddidle() struct wllistener * wleventloopgetdestroylistener (struct wleventloop *loop, wlnotifyfunctnotify) Get the listener struct for the specified callback Parameters: loop The event loop context to inspect. notify The destroy callback to find. Returns: The wllistener registered to the event loop context with the given callback pointer. int wleventloopgetfd (struct wleventloop *loop) Get the event loop file descriptor Parameters: loop The event loop context. Returns: The aggregate file descriptor. 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 wleventloopdispatch() on the event loop context to dispatch all the available events. Author Generated automatically by Doxygen for Wayland from the source code. Version 1.15.0 Tue Oct 30 2018 wleventloop(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™