[Xcb] GSoC 2009: XKB and XI2 support
Peter Harris
pharris at opentext.com
Wed Sep 30 15:32:38 PDT 2009
Mariusz Ceier wrote:
> Peter Harris pisze:
>> 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-4]
> all done
That was fast. Thanks!
>> 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
>> implementation.
>>
> I don't understand this, should I replace <enumref> with <value>, add
> some comment ?
Yes, please.
That way, processors don't have to know how to handle <enumref> outside
of <bitcase> just for those two usages.
> <enumref> always references constants, so maybe I should document that
> <list> with <enumref> length expression, if fixed-length list ?
I'd prefer you just use <value> for constant length lists.
A few more details:
1. "KeyMask" is used before you define it. Everything should be defined
before its first use.
Then you define KeyMask with a <typedef> to KeyButMask, and a comment
indicating you probably wanted ModMask instead. Except this is an enum,
not a type. Enums can't sensibly be used as types in XCB as far as I
know (doc/xml-xcb.txt appears incorrect on this point?).
Could you please just use KeyButMask (or ModMask) directly?
2. In a similar vein, you use SymInterpret (an enum) as a type for a
list. Since enums don't have a wire size, this is invalid. The list
should probably have a size type (such as CARD8, CARD16, or CARD32), and
may be marked with enum="SymInterpret".
3. You use enum="KP_Group", but never define KP_Group. Typo?
Thanks again,
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