[Xcb] XKB once again ...

Barton C Massey bart at cs.pdx.edu
Tue Jan 1 18:37:56 PST 2008


Awesome stuff---thanks!

Thomas, when does the Python generator go live?  I'm getting
impatient :-).

	Bart

In message <20080101.234513.465775489.mrs at localhost.localdomain> you wrote:
> Thomas Hunger <hto at arcor.de> wrote:
> 
> > I have attached the XKB xml description. It has a few new elements 
> > which need the new python generator:
> 
> With a few changes I have been able to get this XKB description to
> work with my Python-based encoder/decoder [1] (which I haven't given a
> name to yet).  It is at the point where the definition passes all the
> unit tests, which check that the encodings are reversible and that
> integers are properly aligned, and it can decode the XKB requests made
> on start-up by Gnumeric (arbitrarily chosen as a test program).
> 
> My changes to xkb.xml are available here:
> http://svn.gna.org/viewcvs/plash/scratch/x11-proxy/ext/xkb.xml
> and the patch is also pasted below.
> 
> I found the <itemlist> element (which I haven't implemented) was not
> necessary for GetMap/SetMap, which can be done as a series of <list>s
> instead.  However, other parts that used <itemlist>, such as
> SelectEvents, do not work yet.
> 
> Mark
> 
> [1] http://plash.beasts.org/wiki/X11ProxySpike
> 
> 
> --- scratch/x11-proxy/ext/xkb.xml	2007/12/31 12:31:59	684
> +++ scratch/x11-proxy/ext/xkb.xml	2008/01/01 18:35:23	690
> @@ -11,7 +11,6 @@
>  
>    <typedef oldname="CARD8" newname="DEVICESPEC" />
>  
> -  <typedef oldname="CARD8" newname="KEYCODE" />
>    <typedef oldname="CARD8" newname="KEYMASK"/>
>    <typedef oldname="CARD16" newname="BUTMASK"/>
>    <typedef oldname="CARD16" newname="KB_VMODMASK"/>
> @@ -438,6 +437,7 @@
>      </list>
>    </struct>
>  
> +  <!-- Also referred to as KB_SYMINTERP in the spec -->
>    <struct name="KB_SYMINTERPRET">
>      <field type="CARD32" name="sym" />
>      <field type="KEYMASK" name="mods" />
> @@ -446,20 +446,24 @@
>      <field type="CARD8" name="virtualMod" />
>      <field type="BOOL" name="autoRepeat" />
>      <field type="BOOL" name="lockingKey" />
> +    <!-- Not sure about the padding.  The spec doesn't specify this struct! -->
> +    <pad bytes="6" />
>    </struct>
>  
>    <struct name="KB_COUNTED_STRING8">
>      <field type="CARD8" name="length" />
> -    <list type="char" name="string">
> +    <list type="char_unpadded" name="string">
>        <fieldref>length</fieldref>
>      </list>
>    </struct>
>  
>    <struct name="KB_COUNTED_STRING16">
> +    <!-- We expect this to start and end word-aligned -->
>      <field type="CARD16" name="length" />
> -    <list type="char" name="string">
> +    <list type="char_unpadded" name="string">
>        <fieldref>length</fieldref>
>      </list>
> +    <align/>
>    </struct>
>  
>    <struct name="KB_KTMAPENTRY">
> @@ -468,6 +472,7 @@
>      <field type="CARD8" name="level" />
>      <field type="KEYMASK" name="mods_mods" />
>      <field type="KB_VMOD" name="mods_vmods" />
> +    <pad bytes="2" />
>    </struct>
>  
>    <struct name="KB_KEYTYPE">
> @@ -476,19 +481,22 @@
>      <field type="KB_VMOD" name="mods_vmods" />
>      <field type="CARD8" name="numLevels" />
>      <field type="CARD8" name="nMapEntries" />
> -    <field type="BOOL" name="hasPreserve" />
> +    <field type="BOOL" name="preserve" />
>      <pad bytes="1"/>
>      <list name="map" type="KB_KTMAPENTRY">
>        <fieldref>nMapEntries</fieldref>
>      </list>
>  
>      <!-- xxx optional extension of XKB. -->
> +    <special type="XkbPreserveEntries"/>
> +<!--
>      <list name="preserve" type="KB_MODDEF">
>        <op op="if">
>  	<fieldref>hasPreserve</fieldref>
>  	<fieldref>nMapEntries</fieldref>
>        </op>
>      </list>
> +-->
>    </struct>
>  
>    <struct name="KB_KEYSYMMAP">
> @@ -546,8 +554,8 @@
>      <field type="KB_MAPDETAILS" name="affectMap" />
>      <field type="KB_MAPDETAILS" name="map" />
>  
> -    
> -    <!-- xxx encode "ref" in op-notation??? -->
> +<!--
> +    <!- xxx encode "ref" in op-notation??? ->
>      <itemlist name="details" ref="(affect_which &amp; (~clear) &amp; (~select_all))">
>        <option flag="XCB_XKB_KB_EVENTTYPE_ENUM_NEW_KEYBOARD_NOTIFY">
>  	<field type="KB_NKNDETAIL" name="affectNewKeyboard" />
> @@ -586,17 +594,18 @@
>  	<field type="KB_MSGDETAIL" name="msgDetails" />
>        </option>
>  
> -      <!--  xxx: these parts seem to miss a flag so that they can be set
> +      <!-  xxx: these parts seem to miss a flag so that they can be set
>  	   <option flag="">
>  	   <field type="KB_AXNDETAIL" name="affectAccessX" />
>  	   <field type="KB_AXNDETAIL" name="accessXDetails" />
> -	   </option> -->
> +	   </option> ->
>  
>        <option flag="XCB_XKB_KB_EVENTTYPE_ENUM_EXTENSION_DEVICE_NOTIFY">
>  	<field type="KB_XIDETAIL" name="affectExtDev" />
>  	<field type="KB_XIDETAIL" name="extdevDetails" />
>        </option>
>      </itemlist>
> +-->
>    </request>
>  
>    <request name="Bell" opcode="3" >
> @@ -774,56 +783,33 @@
>        <field type="CARD8" name="totalVModMapKeys" />
>        <pad bytes="1"/>
>        <field type="KB_VMOD" name="virtualMods" />
> -
> -      <itemlist name="map" ref="present">
> -	<option flag="XCB_XKB_KB_MAPPART_ENUM_KEY_TYPES">
> -	  <list type="KB_KEYTYPE" name="typesRtrn">
> -	    <fieldref>nTypes</fieldref>
> -	  </list>
> -	</option>
> -	<option flag="XCB_XKB_KB_MAPPART_ENUM_KEY_SYMS">
> -	  <list type="KB_KEYSYMMAP" name="symsRtrn">
> -	    <fieldref>nKeySyms</fieldref>
> -	  </list>
> -	</option>
> -	<option flag="XCB_XKB_KB_MAPPART_ENUM_KEY_ACTIONS">
> -	  <list type="CARD8" name="actsRtrn_count">
> -	    <fieldref>nKeyActions</fieldref>
> -	  </list>
> -	  <!-- xxx pad ?-->
> -	  <list type="KB_ACTION" name="actsRtrn_acts">
> -	    <fieldref>totalActions</fieldref>
> -	  </list>
> -	</option>
> -	<option flag="XCB_XKB_KB_MAPPART_ENUM_KEY_BEHAVIORS">
> -	  <list type="KB_SETBEHAVIOR" name="behaviorsRtrn">
> -	    <fieldref>totalKeyBehaviors</fieldref>
> -	  </list>
> -	</option>
> -	<option flag="XCB_XKB_KB_MAPPART_ENUM_VIRTUAL_MODS">
> -	  <list type="KEYMASK" name="vmodsRtrn">
> -	    <popcount>virtualMods</popcount>
> -	  </list>
> -	  <!-- xxx pad ?-->
> -	</option>
> -	<option flag="XCB_XKB_KB_MAPPART_ENUM_EXPLICIT_COMPONENTS">
> -	  <list type="KB_SETEXPLICIT" name="explicitRtrn">
> -	    <fieldref>totalKeyExplicit</fieldref>
> -	  </list>
> -	  <!-- xxx pad ?-->
> -	</option>
> -	<option flag="XCB_XKB_KB_MAPPART_ENUM_MODIFIER_MAP">
> -	  <list type="KB_KEYMODMAP" name="modmapRtrn">
> -	    <fieldref>totalModMapKeys</fieldref>
> -	  </list>
> -	  <!-- xxx pad ?-->
> -	</option>
> -	<option flag="XCB_XKB_KB_MAPPART_ENUM_VIRTUAL_MOD_MAP">
> -	  <list type="KB_KEYVMODMAP" name="vmodMapRtrn">
> -	    <fieldref>totalVModMapKeys</fieldref><!-- xxx length of lists need operators -->
> -	  </list>
> -	</option>
> -      </itemlist>
> +      <list type="KB_KEYTYPE" name="types">
> +        <fieldref>nTypes</fieldref>
> +      </list>
> +      <list type="KB_KEYSYMMAP" name="syms">
> +        <fieldref>nKeySyms</fieldref>
> +      </list>
> +      <list type="CARD8" name="actions.count">
> +        <fieldref>nKeyActions</fieldref>
> +      </list>
> +      <list type="KB_ACTION" name="actions.actions">
> +        <fieldref>totalActions</fieldref>
> +      </list>
> +      <list type="KB_SETBEHAVIOR" name="behaviors">
> +        <fieldref>totalKeyBehaviors</fieldref>
> +      </list>
> +      <list type="KEYMASK" name="vmods">
> +        <fieldref>nVModMapKeys</fieldref>
> +      </list>
> +      <list type="KB_SETEXPLICIT" name="explicit">
> +        <fieldref>totalKeyExplicit</fieldref>
> +      </list>
> +      <list type="KB_KEYMODMAP" name="modmap">
> +        <fieldref>totalModMapKeys</fieldref>
> +      </list>
> +      <list type="KB_KEYVMODMAP" name="vmodmap">
> +        <fieldref>totalVModMapKeys</fieldref>
> +      </list>
>      </reply>
>    </request>
>  
> @@ -841,23 +827,20 @@
>      <field type="CARD8" name="nMapEntries" />
>      <field type="BOOL" name="preserve" />
>      <pad bytes="1"/>
> -    <list type="KB_KTMAPENTRY" name="entries">
> -      <op op="*">
> -	<value>4</value>
> -	<fieldref>nMapEntries</fieldref>
> -      </op>
> +    <list type="KB_KTSETMAPENTRY" name="entries">
> +      <fieldref>nMapEntries</fieldref>
>      </list>
>      <!-- xxx the following is the "optional" XKB extension.
>  	 Try to map it into a list -->
> +    <special type="XkbPreserveEntries"/>
> +<!--
>        <list type="KB_MODDEF" name="preserveEntries">
>  	<op op="if">
>  	  <fieldref>preserve</fieldref>
> -	  <op op="*">
> -	    <value>4</value>
> -	    <fieldref>nMapEntries</fieldref>
> -	  </op>
> +	  <fieldref>nMapEntries</fieldref>
>  	</op>
>        </list>
> +-->
>    </struct>
>  
>    <struct name="KB_KTSETMAPENTRY">
> @@ -893,47 +876,37 @@
>      <field type="CARD8" name="nVModMapKeys" />
>      <field type="CARD8" name="totalVModMapKeys" />
>      <field type="KB_VMOD" name="virtualMods" />
> -    <itemlist name="values" ref="present">
> -      <option flag="XCB_XKB_KB_MAPPART_ENUM_KEY_TYPES">
> -	<list type="KB_SETKEYTYPE" name="types">
> -	</list>
> -      </option>
> -
> -      <option flag="XCB_XKB_KB_MAPPART_ENUM_KEY_SYMS">
> -	<list type="KB_KEYSYMMAP" name="syms">
> -	</list>
> -      </option>
> -
> -      <option flag="XCB_XKB_KB_MAPPART_ENUM_KEY_ACTIONS">
> -	<list type="CARD8" name="actions.count">
> -	</list>
> -	<list type="KB_ACTION" name="actions.actions">
> -	</list>
> -      </option>
> -
> -      <option flag="XCB_XKB_KB_MAPPART_ENUM_KEY_BEHAVIORS">
> -	<list type="KB_SETBEHAVIOR" name="behaviors">
> -	</list>
> -      </option>
> -      <option flag="XCB_XKB_KB_MAPPART_ENUM_VIRTUAL_MODS">
> -	<list type="KEYMASK" name="vmods">
> -	</list>
> -      </option>
> -      <option flag="XCB_XKB_KB_MAPPART_ENUM_EXPLICIT_COMPONENTS">
> -	<list type="KB_SETEXPLICIT" name="explicit">
> -	</list>
> -      </option>
> -      <option flag="XCB_XKB_KB_MAPPART_ENUM_MODIFIER_MAP">
> -	<list type="KB_KEYMODMAP" name="modmap">
> -	</list>
> -      </option>
> -      <option flag="XCB_XKB_KB_MAPPART_ENUM_VIRTUAL_MOD_MAP">
> -	<list type="KB_KEYVMODMAP" name="vmodmap">
> -	  <!-- xxx operators everywhere -->
> -	</list>
> -      </option>
> -    </itemlist>
> +    <!-- The high-level part of the spec says LISTofKB_KEYTYPE here, which
> +         disagrees with the low-level part which refers to KB_SETKEYTYPE -->
> +    <list type="KB_SETKEYTYPE" name="types">
> +      <fieldref>nTypes</fieldref>
> +    </list>
> +    <list type="KB_KEYSYMMAP" name="syms">
> +      <fieldref>nKeySyms</fieldref>
> +    </list>
> +    <list type="CARD8" name="actions.count">
> +      <fieldref>nKeyActions</fieldref>
> +    </list>
> +    <list type="KB_ACTION" name="actions.actions">
> +      <fieldref>totalActions</fieldref>
> +    </list>
> +    <list type="KB_SETBEHAVIOR" name="behaviors">
> +      <fieldref>totalKeyBehaviors</fieldref>
> +    </list>
> +    <list type="KEYMASK" name="vmods">
> +      <fieldref>nVModMapKeys</fieldref>
> +    </list>
> +    <list type="KB_SETEXPLICIT" name="explicit">
> +      <fieldref>totalKeyExplicit</fieldref>
> +    </list>
> +    <list type="KB_KEYMODMAP" name="modmap">
> +      <fieldref>totalModMapKeys</fieldref>
> +    </list>
> +    <list type="KB_KEYVMODMAP" name="vmodmap">
> +      <fieldref>totalVModMapKeys</fieldref>
> +    </list>
>    </request>
> +
>    <request name="GetCompatMap" opcode="10" >
>      <field type="KB_DEVICESPEC" name="deviceSpec" />
>      <field type="KB_GROUP" name="groups" />
> @@ -950,16 +923,10 @@
>        <field type="CARD16" name="nTotalSI" />
>        <pad bytes="16"/>
>        <list type="KB_SYMINTERPRET" name="siRtrn">
> -	<op op="*">
> -	  <value>16</value>
> -	  <fieldref>nSIRtrn</fieldref>
> -	</op>
> +	<fieldref>nSIRtrn</fieldref>
>        </list>
> -      <list type="KB_SYMINTERPRET" name="groupRtrn">
> -	<op op="*">
> -	  <value>4</value>
> -	  <popcount>groupsRtrn</popcount>
> -	</op>
> +      <list type="KB_MODDEF" name="groupRtrn">
> +	<popcount>groupsRtrn</popcount>
>        </list>
>      </reply>
>    </request>
> @@ -974,16 +941,10 @@
>      <field type="CARD16" name="nSI" />
>      <pad bytes="2"/>
>      <list type="KB_SYMINTERPRET" name="si">
> -      <op op="*">
> -	<value>16</value>
> -	<fieldref>nSI</fieldref>
> -      </op>
> +      <fieldref>nSI</fieldref>
>      </list>
> -    <list type="KB_SYMINTERPRET" name="groupMaps">
> -      <op op="*">
> -	<value>4</value>
> -	<popcount>groups</popcount>
> -      </op>
> +    <list type="KB_MODDEF" name="groupMaps">
> +      <popcount>groups</popcount>
>      </list>
>    </request>
>  
> @@ -1010,12 +971,7 @@
>        <field type="CARD8" name="nIndicators" />
>        <pad bytes="15"/>
>        <list type="KB_INDICATORMAP" name="maps">
> -	<!-- the size needs to be calculated explicityly because 
> -	     popcount does not add a sizeof(KB_INDICATORMAP) -->
> -	<op op="*"> 
> -	  <value>12</value> 
> -	  <popcount>nIndicators</popcount>
> -	</op>
> +	<popcount>nIndicators</popcount>
>        </list>
>      </reply>
>    </request>
> @@ -1025,10 +981,7 @@
>      <pad bytes="2"/>
>      <field type="KB_INDICATOR" name="which" />
>      <list type="KB_INDICATORMAP" name="maps">
> -      <op op="*">
> -	<value>12</value>
> -	<popcount>which</popcount>
> -      </op>
> +      <popcount>which</popcount>
>      </list>
>    </request>
>  
> @@ -1045,7 +998,7 @@
>        <field type="BOOL" name="found" />
>        <field type="BOOL" name="on" />
>        <field type="BOOL" name="realIndicator" />
> -      <field type="KB_INDICATOR" name="ndx" />
> +      <field type="CARD8" name="ndx" /> <!-- should be KB_INDICATOR -->
>        <field type="KB_IMFLAGS" name="map_flags" />
>        <field type="KB_IMGROUPSWHICH" name="map_whichGroups" />
>        <field type="KB_GROUPS" name="map_groups" />
> @@ -1098,8 +1051,10 @@
>        <field type="CARD8" name="nRadioGroups" />
>        <field type="CARD8" name="nKeyAliases" />
>        <field type="CARD16" name="nKTLevels" />
> -      <pad bytes="1" />
> +      <pad bytes="4" />
>  
> +      <list type="CARD32" name="not_supported_yet" />
> +<!--
>        <itemlist name="valueList" ref="which">
>  	<option flag="XCB_XKB_KB_NAMEDETAIL_ENUM_KEYCODES_NAME">
>  	  <field type="ATOM" name="keycodesName" />
> @@ -1130,7 +1085,7 @@
>  	  <list type="CARD8" name="nLevelsPerType">
>  	    <fieldref>nKTLevels</fieldref>
>  	  </list>
> -	  <!-- p  unused, p=pad(l) xxx -->
> +	  <!- p  unused, p=pad(l) xxx ->
>  	  <list type="ATOM" name="ktLevelNames">
>  	    <fieldref>nKTLevels</fieldref>
>  	  </list>
> @@ -1181,18 +1136,27 @@
>  	  </list>
>  	</option>
>        </itemlist>
> +-->
>      </reply>
>    </request>
>  
>    <struct name="KB_PROPERTY">
> +    <!-- This is a guess: -->
> +    <field type="KB_COUNTED_STRING16" name="name" />
> +    <field type="KB_COUNTED_STRING16" name="value" />
> +<!--
> +    The spec specifies something like the following, but that can't be right
> +    because then the CARD16s wouldn't be aligned.  It also inconsistently
> +    states that KB_PROPERTYs are all 8 bytes.
>      <field type="CARD16" name="nameLength" />
> -    <list type="char" name="name">
> +    <list type="char_unpadded" name="name">
>        <fieldref>nameLength</fieldref>
>      </list>
>      <field type="CARD16" name="valueLength" />
> -    <list type="char" name="value">
> +    <list type="char_unpadded" name="value">
>        <fieldref>valueLength</fieldref>
>      </list>
> +-->
>    </struct>
>  
>    <struct name="KB_SHAPE">
> @@ -1281,10 +1245,7 @@
>      <field type="BOOL" name="vertical" />
>      <pad bytes="2"/>
>      <list type="KB_KEY" name="keys">
> -      <op op="*">
> -	<value>8</value>
> -	<fieldref>nKeys</fieldref>
> -      </op>
> +      <fieldref>nKeys</fieldref>
>      </list>
>    </struct>
>  
> @@ -1298,10 +1259,7 @@
>      <field type="CARD8" name="nKeys" />
>      <pad bytes="2"/>
>      <list type="KB_OVERLAYKEY" name="keys">
> -      <op op="*">
> -	<value>8</value>
> -	<fieldref>nKeys</fieldref>
> -      </op>
> +      <fieldref>nKeys</fieldref>
>      </list>
>    </struct>
>  
> @@ -1379,12 +1337,18 @@
>         answer: it is set as an union in XKBproto.h, so probably yes
>    -->
>  
> +  <!-- TODO: implement unions -->
> +  <struct name="KB_DOODAD">
> +    <field type="KB_SHAPEDOODAD" name="shape"/>
> +  </struct>
> +<!--
>    <union name="KB_DOODAD">
>      <field type="KB_SHAPEDOODAD" name="shape"/>
>      <field type="KB_LOGODOODAD" name="logo"/>
>      <field type="KB_TEXTDOODAD" name="text"/>
>      <field type="KB_INDICATORDOODAD" name="indicator"/>
>    </union>
> +-->
>  
>    <request name="GetGeometry" opcode="19" >
>      <field type="KB_DEVICESPEC" name="deviceSpec" />
> @@ -1392,7 +1356,6 @@
>      <field type="ATOM" name="name" />
>      <reply>
>        <field type="CARD8" name="deviceID" />
> -      <field type="CARD16" name="sequence_number" />
>        <field type="ATOM" name="name" />
>        <field type="BOOL" name="found" />
>        <pad bytes="1"/>
> @@ -1408,18 +1371,23 @@
>        <field type="CARD8" name="labelColorNdx" />
>        <field type="KB_COUNTED_STRING16" name="labelFont" />
>        <list type="KB_PROPERTY" name="properties">
> +        <fieldref>nProperties</fieldref>
>        </list>
>        <list type="KB_COUNTED_STRING16" name="colors">
> +        <fieldref>nColors</fieldref>
>        </list>
>        <list type="KB_SHAPE" name="shapes">
> +        <fieldref>nShapes</fieldref>
>        </list>
>        <list type="KB_SECTION" name="sections">
> +        <fieldref>nSections</fieldref>
>        </list>
>        <list type="KB_DOODAD" name="doodads">
> +        <fieldref>nDoodads</fieldref>
>        </list>
>        <list type="KB_KEYALIAS" name="keyAliases">
> +        <fieldref>nKeyAliases</fieldref>
>        </list>
> -      <!-- xxx length expressions everywhere -->
>      </reply>
>    </request>
>  
> @@ -1439,17 +1407,22 @@
>      <pad bytes="2"/>
>      <field type="KB_COUNTED_STRING16" name="labelFont" />
>      <list type="KB_PROPERTY" name="properties">
> +      <fieldref>nProperties</fieldref>
>      </list>
>      <list type="KB_COUNTED_STRING16" name="colors">
> +      <fieldref>nColors</fieldref>
>      </list>
>      <list type="KB_SHAPE" name="shapes">
> +      <fieldref>nShapes</fieldref>
>      </list>
>      <list type="KB_SECTION" name="sections">
> +      <fieldref>nSections</fieldref>
>      </list>
>      <list type="KB_DOODAD" name="doodads">
> +      <fieldref>nDoodads</fieldref>
>      </list>
>      <list type="KB_KEYALIAS" name="keyAliases">
> -      <!-- xxx length expressions -->
> +      <fieldref>nKeyAliases</fieldref>
>      </list>
>    </request>
>  
> @@ -1530,28 +1503,29 @@
>      <field type="KB_GBNDETAILMASK" name="want" />
>      <field type="BOOL" name="load" />
>      <pad bytes="1"/>
> +    <!-- TODO: use KB_COUNTED_STRING8 here -->
>      <field type="CARD8" name="keymapsSpecLen" />
> -    <list type="char" name="keymapsSpec">
> +    <list type="char_unpadded" name="keymapsSpec">
>        <fieldref>keymapsSpecLen</fieldref>
>      </list>
>      <field type="CARD8" name="keycodesSpecLen" />
> -    <list type="char" name="keycodesSpec">
> +    <list type="char_unpadded" name="keycodesSpec">
>        <fieldref>keycodesSpecLen</fieldref>
>      </list>
>      <field type="CARD8" name="typesSpecLen" />
> -    <list type="char" name="typesSpec">
> +    <list type="char_unpadded" name="typesSpec">
>        <fieldref>typesSpecLen</fieldref>
>      </list>
>      <field type="CARD8" name="compatMapSpecLen" />
> -    <list type="char" name="compatMapSpec">
> +    <list type="char_unpadded" name="compatMapSpec">
>        <fieldref>compatMapSpecLen</fieldref>
>      </list>
>      <field type="CARD8" name="symbolsSpecLen" />
> -    <list type="char" name="symbolsSpec">
> +    <list type="char_unpadded" name="symbolsSpec">
>        <fieldref>symbolsSpecLen</fieldref>
>      </list>
>      <field type="CARD8" name="geometrySpecLen" />
> -    <list type="char" name="geometrySpec">
> +    <list type="char_unpadded" name="geometrySpec">
>        <fieldref>geometrySpecLen</fieldref>
>      </list>
>      <!-- xxx special pad -->
> @@ -1565,6 +1539,7 @@
>        <field type="KB_GBNDETAILMASK" name="found" />
>        <field type="KB_GBNDETAILMASK" name="reported" />
>        <pad bytes="16"/>
> +<!--
>        <itemlist name="replies" ref="reported">
>  	<option flag="XCB_XKB_KB_GBNDETAIL_GBN_TYPES | XCB_XKB_KB_GBNDETAIL_GBN_CLIENT_SYMBOLS | 
>  XCB_XKB_KB_GBNDETAIL_GBN_SERVER_SYMBOLS">
> @@ -1583,6 +1558,7 @@
>  	  <replyref ref="GetGeometry" />
>  	</option>
>        </itemlist>
> +-->
>      </reply>
>    </request>
>  
> @@ -1597,10 +1573,7 @@
>        <popcount>namesPresent</popcount>
>      </list>
>      <list type="KB_INDICATORMAP" name="maps">
> -      <op op="*">
> -	<value>12</value>
> -	<popcount>mapsPresent</popcount>
> -      </op>
> +      <popcount>mapsPresent</popcount>
>      </list>
>    </struct>
>  
> @@ -1615,24 +1588,29 @@
>      <field type="KB_IDSPEC" name="ledID" />
>  
>      <reply>
> +      <field type="CARD8" name="deviceID" />
>        <field type="KB_DEVFEATURE" name="present" />
>        <field type="KB_FEATURE" name="supported" />
>        <field type="KB_FEATURE" name="unsupported" />
> -      <field type="CARD8" name="nDeviceLedFBs" />l
> +      <field type="CARD16" name="nDeviceLedFBs" />
>        <field type="CARD8" name="firstBtnWanted" />
>        <field type="CARD8" name="nBtnsWanted" />
>        <field type="CARD8" name="firstBtnRtrn" />
> -      <field type="CARD8" name="nBtnsRtrn" />b
> +      <field type="CARD8" name="nBtnsRtrn" />
>        <field type="CARD8" name="totalBtns" />
>        <field type="BOOL" name="hasOwnState" />
>        <field type="KB_IDRESULT" name="dfltKbdFB" />
>        <field type="KB_IDRESULT" name="dfltLedFB" />
>        <pad bytes="2"/>
>        <field type="ATOM" name="devType" />
> -      <field type="CARD16" name="nameLen" />n
> -      <list type="char" name="name">
> +      <field type="CARD16" name="nameLen" />
> +      <!-- This string starts at offset 2 mod 4, so requires unusual
> +           padding -->
> +      <!-- TODO: use KB_COUNTED_STRING16 -->
> +      <list type="char_unpadded" name="name">
>  	<fieldref>nameLen</fieldref>
>        </list>
> +      <align/>
>        <!-- xxx unused,p=pad(2+n) -->
>        <list type="KB_ACTION" name="btnActions">
>  	<fieldref>nBtnsRtrn</fieldref>
> @@ -1650,10 +1628,7 @@
>      <field type="KB_DEVFEATURE" name="change" />
>      <field type="CARD16" name="nDeviceLedFBs" />
>      <list type="KB_ACTION" name="btnActions">
> -      <op op="*">
> -	<fieldref>nBtns</fieldref>
> -	<value>8</value>
> -      </op>
> +      <fieldref>nBtns</fieldref>
>      </list>
>      <list type="KB_DEVICELEDINFO" name="leds">
>        <fieldref>nDeviceLedFBs</fieldref>
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb


More information about the Xcb mailing list