NAME
XtAppNextEvent − dispatch timer and alternate input event and return the next X event.
SYNOPSIS
void XtAppNextEvent(app_context, event_return)
XtAppContext app_context;
XEvent ∗event_return;
Inputs
app_contextSpecifies the application context.
Outputs
event_return
Returns the dequeued event structure.
DESCRIPTION
If there is an X event pending on any of the Displays in app_context, XtAppNextEvent() returns that event in event_return. Otherwise, it flushes the X output buffer of each Display, and if there is a background work procedure registered (see XtAppAddWorkProc()), XtAppNextEvent() calls it and starts over by checking for pending events. If there are no pending events and no work procedures, XtAppNextEvent() blocks while waiting for input on any of the Display connections, activity on any of the alternate input sources registered with XtAppAddInput(), or the expiration of any timers registered with XtAppAddTimeOut().
If there is activity on an alternate input source or if a timeout interval elapses, XtAppNextEvent() calls the callback that was registered with the input source or with the timer. If an X event occurs, XtAppNextEvent() removes that event from the queue and returns it in event_return.
USAGE
Programs rarely need this much control over the event dispatching mechanism. Most programs use XtAppMainLoop(). If you want to process a single X, input, or timer event, consider XtAppProcessEvent().
SEE ALSO
XtAppAddInputUNIX SYSTEM V/68, XtAppAddTimeOutUNIX SYSTEM V/68, XtAppAddWorkProcUNIX SYSTEM V/68, XtAppMainLoopUNIX SYSTEM V/68, XtAppPeekEventUNIX SYSTEM V/68, XtAppPendingUNIX SYSTEM V/68, XtAppProcessEventUNIX SYSTEM V/68, XtDispatchEventUNIX SYSTEM V/68.