XEventsQueued()XEventsQueued()NameXEventsQueued – check the number of events in the event queue.
Synopsis
int XEventsQueued(display, mode)
Display *display;
int mode;
Arguments
display Specifies a connection to a Display structure, returned from
XOpenDisplay().
mode Specifies whether the request buffer is flushed if there are
no events in Xlib's queue. You can specify one of these con‐
stants: QueuedAlready, QueuedAfterFlush, QueuedAfterReading.
Returns
The number of events.
DescriptionXEventsQueued() checks whether events are queued. If there are events
in Xlib's queue, the routine returns immediately to the calling rou‐
tine. Its return value is the number of events regardless of mode.
mode specifies what happens if no events are found on Xlib's queue.
· If mode is QueuedAlready, and there are no events in the queue,
XEventsQueued() returns zero (it does not flush the request buffer
or attempt to read more events from the connection).
· If mode is QueuedAfterFlush, and there are no events in the queue,
XEventsQueued() flushes the request buffer, attempts to read more
events out of the application's connection, and returns the number
read.
· If mode is QueuedAfterReading, and there are no events in the queue,
XEventsQueued() attempts to read more events out of the applica‐
tion's connection without flushing the request buffer and returns
the number read.
Note that XEventsQueued() always returns immediately without I/O if
there are events already in the queue.
XEventsQueued() with mode QueuedAfterFlush is identical in behavior to
XPending(). XEventsQueued() with mode QueuedAlready is identical to
the QLength() macro (see Appendix C, Macros).
For more information, see Volume One, Chapter 8, Events.
See AlsoXQLength(), XAllowEvents(), XCheckIfEvent(), XCheckMaskEvent(), XCheck‐
TypedEvent(), XCheckTypedWindowEvent(), XCheckWindowEvent(), XGetInput‐
Focus(), XGetMotionEvents(), XIfEvent(), XMaskEvent(), XNextEvent(),
XPeekEvent(), XPeekIfEvent(), XPending(), XPutBackEvent(), XSelectIn‐
put(), XSendEvent(), XSetInputFocus(), XSynchronize(), XWindowEvent().
Xlib - Resource Manager XEventsQueued()