[Xcb] GSoC 2009: XKB and XI2 support

Peter Harris pharris at opentext.com
Mon Sep 28 14:42:39 PDT 2009

Mariusz Ceier wrote:
> Julien Danjou pisze:
>> Everything is available at:
>> http://github.com/mceier/input-protos-for-xcb/

This is a great work. Thank you for all your effort.

I especially like <bitcase> and <enumref>. This looks like it could
easily be extended to CreateWindow/ChangeWindowAttributes (and similar).
My initial plan was to hang type information off the enum, but your way
is much more flexible.

A few comments as I begin to work with the xcbproto side of this:

0) The history is quite messy. Before this is merged, it should be
cleaned up (see "git rebase -i", etc). But don't waste time doing this
yet, as further changes will be needed first.

1) make check fails. This should be a matter of applying your replyof
removal patch, and adjusting the XSD to reflect recent changes (add
popcount and unop, remove neg). <switch> needs to be named as a valid
field inside a bitcase, too.

2) In your enums, you should be using <bit> 4 </bit> instead of <value>
0x10 </value> (and etc).

3) The values that aren't single bits should be decimalized. It's harder
to read, but not forcing hex decoding on every processor is a plus.
(This policy was put in place by commit 183ecf ). Perhaps put the
hexadecimal into a comment on the same line?

4) You use <op> in an <enum>. This is new syntax that decoders don't
need to support, since you're defining a constant. Just use <value> 32
</value> instead of your complex op. Leave the calculation comment, of

5) If you propagate the KeyNameLength constant to structs KeyName and
KeyAlias, you can document that <enumref> must refer to a <bit> and is
only valid as the first entry of a <bitcase>, simplifying processor

6) <case> doesn't appear to be used anywhere, and can be removed from
the XSD.

 Peter Harris
               Open Text Connectivity Solutions Group
Peter Harris                    http://www.opentext.com/connectivity
Research and Development        Phone: +1 905 762 6001
pharris at opentext.com            Toll Free: 1 877 359 4866

More information about the Xcb mailing list