This manual page is for Mac OS X version 10.6.3

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



XFlush(3)                                      XLIB FUNCTIONS                                      XFlush(3)



NAME
       XFlush, XSync, XEventsQueued, XPending - handle output buffer or event queue

SYNTAX
       int XFlush(Display *display);

       int XSync(Display *display, Bool discard);

       int XEventsQueued(Display *display, int mode);

       int XPending(Display *display);

ARGUMENTS
       discard   Specifies a Boolean value that indicates whether XSync discards all events on the event
                 queue.

       display   Specifies the connection to the X server.

       mode      Specifies the mode.  You can pass QueuedAlready, QueuedAfterFlush, or QueuedAfterReading.

DESCRIPTION
       The XFlush function flushes the output buffer.  Most client applications need not use this function
       because the output buffer is automatically flushed as needed by calls to XPending, XNextEvent, and
       XWindowEvent.  Events generated by the server may be enqueued into the library's event queue.

       The XSync function flushes the output buffer and then waits until all requests have been received and
       processed by the X server.  Any errors generated must be handled by the error handler.  For each pro-tocol protocol
       tocol error received by Xlib, XSync calls the client application's error handling routine (see sec-tion section
       tion 11.8.2).  Any events generated by the server are enqueued into the library's event queue.

       Finally, if you passed False, XSync does not discard the events in the queue.  If you passed True,
       XSync discards all events in the queue, including those events that were on the queue before XSync
       was called.  Client applications seldom need to call XSync.

       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 con-nection, connection,
       nection, and returns the number read.  If mode is QueuedAfterReading, XEventsQueued returns the num-ber number
       ber 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.

       The XPending function returns the number of events that have been received from the X server but have
       not been removed from the event queue.  XPending is identical to XEventsQueued with the mode
       QueuedAfterFlush specified.

SEE ALSO
       AllPlanes(3X11), XIfEvent(3X11), XNextEvent(3X11), XPutBackEvent(3X11)
       Xlib - C Language X Interface



X Version 11                                    libX11 1.2.1                                       XFlush(3)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Did this document help you? Yes It's good, but... Not helpful...