[Xcb] [xsync] attributes of XCBSyncCreateAlarm
Ian Osgood
iano at quirkster.com
Wed Jul 19 18:26:17 PDT 2006
---------- Original Message ----------------------------------
From: Vincent Torri <vtorri at univ-evry.fr>
Date: Wed, 19 Jul 2006 19:25:31 +0200 (CEST)
>
>Hello,
>
>Usually, for a list of attributes, there is an enum defined in the header
>file of the extension. I don't see any in the sync.h file.
>
>According to the doc of the sync protocol, the attributes of
>XCBSyncCreateAlarm are:
>
>trigger: of type TRIGGER (counter, value-type, value, test-type)
>delta : of type int64
>events : of type bool
>
>so, how can i use attributes with XCBSyncCreateAlarm ?
>
>thank you
>
>Vincent
Indeed, I think these defines from xextproto/sync.h are missing:
/*
* Flags for Alarm Attributes
*/
#define XSyncCACounter (1L<<0)
#define XSyncCAValueType (1L<<1)
#define XSyncCAValue (1L<<2)
#define XSyncCATestType (1L<<3)
#define XSyncCADelta (1L<<4)
#define XSyncCAEvents (1L<<5)
xcb-proto/src/extensions/sync.xml should be patched like this:
<enum name="CA">
<item name="Counter"><bit>0</bit></item>
... etc. ...
</enum>
Also, I notice that some of the field types of the structs refer to the enumeration names instead of CARD8/16/32. What size do these end up in the structure definitions? C enums don't actually specify a physical size, so these might be incorrect compared to the wire protocol (xextproto/syncstr.h).
These are a few of the reasons why I wouldn't consider any of the xcb-proto work finished and releasable until we have working test code exercising every bit of it.
Ian
More information about the Xcb
mailing list