Name
XtAppNextEvent — return next event from an application’s X event queue.
Synopsis
void XtAppNextEvent(app_context, event_return)
XtAppContext app_context;
XEvent ∗event_return;
Arguments
app_contextSpecifies the application context that identifies the application.
event_return
Returns the event information from the dequeued event structure.
Description
If a server has queued an event for the specified application, XtAppNextEvent removes the event from the queue and returns it to the caller.
If there are no events in the X input queue, XtAppNextEvent flushes the X output buffers of each Display in the application context and waits for an event from the X server or auxiliary input sources or for a timeout value to expire. If a timer pseudo-event or auxiliary input event occurs, XtAppNextEvent dispatches the designated callbacks. When an X event occurs, XtAppNextEvent removes it from the queue and returns it. The events returned by XtAppNextEvent should be dispatched with XtDispatchEvent. XtAppNextEvent dispatches XtWorkProcs and XtTimerCallbackProcs directly that are registered for app_context. See XtAppAddWorkProc and XtAppAddTimeOut.
XtAppNextEvent blocks until an event occurs. An application can instead use this wait time by interleaving background processing with calls to XtAppPending.
Programs rarely need this much control over the event dispatching mechanism. Most programs use XtAppMainLoop.
See Also
XtAppAddWorkProc(1), XtAppMainLoop(1), XtAppPeekEvent(1), XtAppPending(1), XtAppProcessEvent(1), XtDispatchEvent(1),
XtWorkProc(2).