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

Antoine Latter aslatter at gmail.com
Mon Jan 5 19:17:10 PST 2009


On Mon, Jan 5, 2009 at 4:14 PM, Peter Harris <pharris at opentext.com> wrote:
>
> When I read type="PIXMAP" with my more-typeful programming language
> glasses on, it looks nothing at all like type="CARD32". They only look
> somewhat similar if I forget and leave my less-typeful glasses on. So
> the more-typeful language parsers should have no trouble.

I wasn't trying to get a dig in on C or python - sorry if it came
across like that.

Back to the topic at hand - my issue is that

 <field type="CARD32" enum="GrabMode" />

to me reads:  "Send a CARD32 over the wire whose range of allowed
values is found in the enum GrabMode"

Whereas the proposed syntax for non-CARD types would be:

 <field type="WINDOW" enum="EventDest" />

Which to me would read: "Send a valid WINDOW down the wire, or an
entry in the EventDest enum"

I propose using a different attribute on the field element for the
second case, since we mean something different.  Then I don't have to
care that CARD32 is a base type but TimeStamp and WINDOW are not.

Sorry to get picky over small points.  I'm sure I can deal with it either way.

-Antoine


More information about the Xcb mailing list