[Xcb] XKEYBOARD protocol definition

Antoine Latter aslatter at gmail.com
Wed Nov 11 17:29:07 PST 2009

On Wed, Nov 11, 2009 at 5:45 PM, Peter Harris <pharris at opentext.com> wrote:
> By using <bitcase>, you can vary the type of the data used. In a
> hypothetical future server-side XCB, you could auto-generate boilerplate
> that checks to make sure that CreateWindow/BorderPixmap is, in fact, a
> valid Pixmap XID. This may also be useful for type-checking bindings
> (perhaps Haskell - Antoine?).
> For a slightly less hypothetical example, you can link the appropriate
> enums to individual fields. This will let the Wireshark dissector
> pretty-print RENDER/ChangePicture/repeat as "RepeatReflect" instead of
> "3". Once I update the wireshark dissector generator, that is. (RENDER
> example used instead of CreateWindow, since core X11 is still dissected
> by the legacy X11 dissector in Wireshark.)

If I could link the allowed fields in a value-param to their type at
compile-time that would be pretty special, and that sounds like what
you're aiming for. I'm still not sure what that would look like with
the new bitcase syntax - I haven't been following too closely.

At minimum, the list+popcount approach lets us get away from the
value-mask bitwidth hack.


More information about the Xcb mailing list