X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb.h;h=3ee7965d2a2d1f34f70530dc37096730dfcdab23;hb=e300ee4920bf4618f58618f3063b362f811154c1;hp=14244a70e41144d3254f44e41d553b9f61e86e3e;hpb=36c9a985aaee655c118c9f7b8425d3ac9ce0f840;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb.h b/src/xcb.h index 14244a7..3ee7965 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 Return the error for a request, or NULL if none can ever arrive. * @param c: The connection to the X server.