Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XSync(3X) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

AllPlanes(3X)

XIfEvent(3X)

XNextEvent(3X)

XPutBackEvent(3X)




XFlush(3X) XFlush(3X)
NAME XFlush, XSync, XEventsQueued, XPending - handle the output buffer and the event queue SYNOPSIS XFlush (display) Display *display; XSync (display, discard) Display *display; int discard; int XEventQueued (display, mode) Display *display; int mode; int XPending (display) Display *display; 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 XPend- ing, 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 error event received by Xlib, XSync calls the client application's error handling routine (see Section 8.12.2 in Xlib - C Language Interface ). Any events generat- ed by the server are enqueued into the library's event queue. Finally, if you pass FALSE, XSync does not discard the events in the queue. If you pass TRUE, XSync discards all events in the queue, including those events that were on the queue before XSync was called. Client applications sel- dom 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 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 of the application's connection without flushing the output buffer November, 1990 1



XFlush(3X) XFlush(3X)
and returns the number read. XEventsQueued always returns immediately without I/O if there are events already in the queue. XEventsQueued with a mode of XQueuedAfterFlush is identical in behavior to XPend- ing. XEventsQueued with a mode of QueuedAlready is identical in behavior to the XQLength func- tion. 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 XE- ventsQueued with a mode of QueuedAfterFlush. Arguments These functions accept the following arguments: discard Specifies whether XSync discards all events on the event queue. You can pass the value 0 or 1. display Specifies the connection to the X server. mode Specifies the mode. One of the following constants can be passed: QueuedAlready, QueuedAfterFlush, or QueuedAfterReading. SEE ALSO AllPlanes(3X), XIfEvent(3X), XNextEvent(3X), XPutBackEvent(3X)
Xlib - C Language Interface
2 November, 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026