[Xcb] Proposal: Link fields to enums in the protocol XML files

Peter Harris pharris at opentext.com
Mon Jan 5 10:12:51 PST 2009

Barton C Massey wrote:
> Someone probably should through the rest of the protocol
> descriptions and add the relevant information.  Sounds like
> work. :-)

I don't mind rolling up my sleeves.

However, there are a few requests and events in xproto.xml that have not
been annotated yet. Specifically: QueryPointer, ButtonPress, KeyPress,
MotionNotify, and EnterNotify.

All of these requests/events are specified as "KEYBUTMASK" in the
protocol definition. KeyButMask is the union of ButtonMask and ModMask.

The two options I see are: (a) Allow an enum to contain other enums, or
(b) duplicate by hand the contents of ButtonMask and ModMask.

Both of these look ugly to me. (b) is clearly less work (as none of the
generators will have to recursively parse enums), but feels slightly
uglier than (a).

What are your thoughts?

 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