[Xcb] how to use the record extension in xcb...

zmqdev zmqdev at amitego.com
Thu Dec 15 08:51:44 UTC 2016


Hello,

I'm currently writing a new version of a (working) program that uses the 
record extension, so I want to use xcb instead of Xlib.

However, I am unclear on how to separate the multiple items contained in 
a single reply from the record extension.

The only working example I found was this answer on stackoverflow

	https://stackoverflow.com/questions/20823894/xcb-record-x11-extension-example

It works, but does 'magic' to access the several data items that are 
contained in a single xcb_record_enable_context_reply_t (as per protocol 
specification of record extension).

I thought of iterator functions, but for some reason, the header file 
<xcb/record.h> has only the one function

	xcb_generic_iterator_t
	xcb_record_enable_context_data_end (const 
xcb_record_enable_context_reply_t *R  /**< */);

and no xcb_record_enable_context_data_iterator or 
xcb_record_enable_context_data_next.

How does the 'magic' of the example work?
How I do I access all the data contained in a single reply?

Cheers.



More information about the Xcb mailing list