XEventsQueued
Syntax
int XEventsQueued(display, mode)
Display *display;
int mode;
Arguments
display
| Specifies the connection to the X server.
|
mode
| Specifies the mode.
You can pass
QueuedAlready,
QueuedAfterFlush,
or
QueuedAfterReading.
|
Description
If mode is
QueuedAlready,
XEventsQueued()
returns the number of events
already in the event queue (and never performs a system call).
If mode is
QueuedAfterFlush,
XEventsQueued()
returns the number of events already in the queue if the number is nonzero.
If there are no events in the queue,
XEventsQueued()
flushes the output buffer,
attempts to read more events out of the application's connection,
and returns the number read.
If mode is
QueuedAfterReading,
XEventsQueued()
returns the number of events already in the queue if the number is nonzero.
If there are no events in the queue,
XEventsQueued()
attempts to read more events out of the application's connection
without flushing the output buffer and returns the number read.
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
XQLength()
function.
See also
XFlush(),
XIfEvent(),
XNextEvent(),
XPending(),
XPutBackEvent(),
XSync(),
"Event Queue Management"
Christophe Tronche, ch@tronche.com