[Xcb] Enumerations and typed valueparams (was: XKB once again ...)

Peter Harris peter.harris at hummingbird.com
Mon Jan 14 07:36:47 PST 2008


Barton C Massey wrote:
> I'm not quite sure how these fields are being used in CG, though.
> In particular, what does the "type" attribute do?  Does the above
> generate things like
>   #define BACK_PIXMAP_NONE 0
>   #define BACK_PIXMAP_PARENT_RELATIVE 4
> or am I hopelessly confused?

In a hypothetical future server-side-XCB, the type attribute will allow 
you to automatically validate XIDs against the resource database.

In my current (unpublished) code that tries to "replay" a network trace, 
it will allow me to automatically lookup the XID translation. Currently, 
I hard-code and special-case this information; once this change goes 
into XML, I will be able to handle it automatically.

I imagine libxcb will just ignore it, although the information could be 
used to automatically generate parts of xcb/util/aux. (I see that 
xcb_params_cw_t is currently full of uint32_t, where it 
could/should/might use xcb_pixmap_t and friends instead).

Peter Harris
-- 
      Hummingbird Connectivity - A Division of Open Text
Peter Harris                    http://connectivity.hummingbird.com
Research and Development        Phone: +1 905 762 6001
peter.harris at hummingbird.com    Toll Free: 1 877 359 4866


More information about the Xcb mailing list