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

Ian Osgood iano at quirkster.com
Mon Jan 5 10:19:48 PST 2009


On Jan 5, 2009, at 9:14 AM, Antoine Latter wrote:

> On Mon, Jan 5, 2009 at 10:57 AM, Peter Harris  
> <pharris at opentext.com> wrote:
>> Julien Danjou wrote:
>>> At 1231125498 time_t, Antoine Latter wrote:
>>>> Does this look like a good idea?  Can the added attributes be  
>>>> useful
>>>> in other ways?
>>>
>>> Seeing how enthousiastic Bart is, and how from my tiny knowledge it
>>> seems nice, I've merged the patch. ;)
>>
>> It probably could have withstood a little more review, first. I've
>> committed a fix for the missing enums and the typos I've found so  
>> far.
>>
>
> It looks like I've missed the events.  Also, I didn't annotate the
> value-params like you did because I didn't have a good idea what to do
> with them in a big picture sense.
>
> I like how your version adds comments to the enum-items with the type
> corresponding to that portion of a value-param field.
>
> Maybe next the value-param item type could be moved in an attribute of
> enum-item element itself.
>
> -Antoine

Please search the XCB mailing list archives for previous discussions  
on this topic. A few years ago we researched a quite detailed list of  
requirements for such a type annotation system. Among the challenges:  
some parameters take a union of types (two different enums; an enum  
or an XID; etc.), sometimes the same enum is used in different  
parameter widths (8-bit vs. 32-bit), and extensions referencing types  
and enums from the core protocol or another extension.

Ian



More information about the Xcb mailing list