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

Antoine Latter aslatter at gmail.com
Mon Jan 5 13:39:20 PST 2009


On Mon, Jan 5, 2009 at 2:45 PM, Peter Harris <pharris at opentext.com> wrote:
>> ; an enum
>> or an XID;
>
> <field type="PIXMAP" enum="Enum" /> seems pretty clear to me.

The thing I don't like about this is that it looks that same as:
  <field type="CARD32" enum="Enum" />

But means something entirely different.

What might be clearer is for the enum values to be marked as "This
enum value is a valid value of type PIXMAP".  Then the more-typeful
programming languages can generate typed constants.


> <import> has already solved this one, no? XCB extensions have been
> referencing typedefs from xcbproto and other extensions forever. I don't
> see how enums are any different.

Presumably it would look like:

  <field type="CARD32" enum="reference:Enum" />

Like we do in other cross-namespace types.  Is that what you were thinking?

-Antoine


More information about the Xcb mailing list