diff options
author | Keith Packard <keithp@keithp.com> | 2013-04-12 20:15:41 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-11-07 14:02:37 -0800 |
commit | 79019541e7c56ddfc3828b7bf96e6e5d3cf81c56 (patch) | |
tree | 6c36ee6c42b5abeae27b423644bf57f78b392ff4 /src/xcb.h | |
parent | 7983bf0fbdc2725403f9db6154d0f5bc944040e5 (diff) |
Add event queue splitting
This allows apps to peel off certain XGE events into separate queues
for custom handling. Designed to support the Present extension
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-By: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'src/xcb.h')
-rw-r--r-- | src/xcb.h | 38 |
1 files changed, 33 insertions, 5 deletions
@@ -290,6 +290,39 @@ xcb_generic_event_t *xcb_poll_for_event(xcb_connection_t *c); */ xcb_generic_event_t *xcb_poll_for_queued_event(xcb_connection_t *c); +typedef struct xcb_special_event xcb_special_event_t; + +/** + * @brief Returns the next event from a special queue + */ +xcb_generic_event_t *xcb_poll_for_special_event(xcb_connection_t *c, + xcb_special_event_t *se); + +/** + * @brief Returns the next event from a special queue, blocking until one arrives + */ +xcb_generic_event_t *xcb_wait_for_special_event(xcb_connection_t *c, + xcb_special_event_t *se); +/** + * @typedef typedef struct xcb_extension_t xcb_extension_t + */ +typedef struct xcb_extension_t xcb_extension_t; /**< Opaque structure used as key for xcb_get_extension_data_t. */ + + +/** + * @brief Listen for a special event + */ +xcb_special_event_t *xcb_register_for_special_xge(xcb_connection_t *c, + xcb_extension_t *ext, + uint32_t eid, + uint32_t *stamp); + +/** + * @brief Stop listening for a special event + */ +void xcb_unregister_for_special_event(xcb_connection_t *c, + xcb_special_event_t *se); + /** * @brief Return the error for a request, or NULL if none can ever arrive. * @param c: The connection to the X server. @@ -328,11 +361,6 @@ void xcb_discard_reply(xcb_connection_t *c, unsigned int sequence); /* xcb_ext.c */ /** - * @typedef typedef struct xcb_extension_t xcb_extension_t - */ -typedef struct xcb_extension_t xcb_extension_t; /**< Opaque structure used as key for xcb_get_extension_data_t. */ - -/** * @brief Caches reply information from QueryExtension requests. * @param c: The connection. * @param ext: The extension data. |