[Xcb] Working on XCB-XI

Peter Hutterer mailinglists at who-t.net
Thu Dec 14 00:49:57 PST 2006


I just spent one exciting (well, not really) afternoon transforming  
XIproto.h into xml format. Which means I have a very preliminary  
version of XCB-XI.

Two questions before I can post the xml file to the list and you guys  
can put it into xcb.

1) The XListInputDevices reply contains the following items:  
LISTofINPUTINFO
where INPUTINFO can be either KEYINFO, BUTTONINFO or VALUATORINFO.
How do I express it in the xcb-xml that the list is made up of any  
combination of those?
something like

<list type="KeyInfo|ButtonInfo|ValuatorInfo" name="inputinfo">
	<fieldref>info</fieldref>
</list>

where KeyInfo, ButtonInfo and Valuator info are three different  
structs in the form
<struct name="XXXInfo">
	<field type="CARD8" name="class"/>
	<field type="CARD8" name="length"/>
	... fields specific for each type
</struct>

The "class" field specifies what type it is.
A similar problem happens with other requests/replies as well.

2) Is it possible to field-reference out of a struct?
<request name="GetDeviceMotionEvents" opcode="10">
   ...
	<field type="CARD8" name="nevents"/>
	<field type="CARD8" name="axes"/>
   ...
	<list type="DeviceTimeCoord" name="events">
		<fieldref>nevents</fieldref>
	</list>
</request>

<struct name="DeviceTimeCoord">
	...
	<list type="CARD16" name="data">
		<fieldref>axes</fieldref> // references the axes value in the request
	</list>
</struct>


I think that should be it. Once I can put that in XML, I should be done.


Cheers,
   Peter

--
Multi-Pointer X Server
http://wearables.unisa.edu.au/mpx




More information about the Xcb mailing list