X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb.h;h=8a81bb9edea1db07e0b1827512ccd19746832263;hb=527df3c84bd71113cedc7f55089c02d1c099ecad;hp=3e61ebdf974f3f20589d28b4f1ce932613949cbe;hpb=2415c11dec5e5adb0c17f98aa52fbb371a4f8f23;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb.h b/src/xcb.h index 3e61ebd..8a81bb9 100644 --- a/src/xcb.h +++ b/src/xcb.h @@ -271,6 +271,22 @@ xcb_generic_event_t *xcb_wait_for_event(xcb_connection_t *c); */ xcb_generic_event_t *xcb_poll_for_event(xcb_connection_t *c); +/** + * @brief Returns the next event without reading from the connection. + * @param c: The connection to the X server. + * @return The next already queued event from the server. + * + * This is a version of xcb_poll_for_event that only examines the + * event queue for new events. The function doesn't try to read new + * events from the connection if no queued events are found. + * + * This function is useful for callers that know in advance that all + * interesting events have already been read from the connection. For + * example, callers might use xcb_wait_for_reply and be interested + * only of events that preceded a specific reply. + */ +xcb_generic_event_t *xcb_poll_for_queued_event(xcb_connection_t *c); + /** * @brief Returns the next event or error that precedes the given request. * @param c: The connection to the X server.