[Xcb-commit] 10 commits - doc src xcbgen

Peter Harris peterh at kemper.freedesktop.org
Fri Apr 19 09:25:00 PDT 2013


 doc/xml-xcb.txt  |   13 +
 src/xcb.xsd      |    2 
 src/xkb.xml      |  411 +++++++++++--------------------------------------------
 xcbgen/xtypes.py |    3 
 4 files changed, 95 insertions(+), 334 deletions(-)

New commits:
commit f05f44554f519003c108534782208e638d368946
Author: Peter Harris <pharris at opentext.com>
Date:   Tue Apr 16 14:29:51 2013 -0400

    XKB: Fix calculation in GetIndicatorMap
    
    Contrary to the spec, the server doesn't set nIndicators.
    
    Signed-off-by: Peter Harris <pharris at opentext.com>

diff --git a/src/xkb.xml b/src/xkb.xml
index 5e18ee8..9b1c688 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -1536,7 +1536,7 @@ authorization from the authors.
 			<field name="nIndicators" type="CARD8" />
 			<pad bytes="15" />
 			<list name="maps" type="IndicatorMap">
-				<fieldref>nIndicators</fieldref>
+				<popcount><fieldref>which</fieldref></popcount>
 			</list>
 		</reply>
 	</request>
commit b3b5e029e7ad4426a702b6b691a9b39dcaa9804e
Author: Peter Harris <pharris at opentext.com>
Date:   Wed Apr 10 19:09:44 2013 -0400

    XKB: Fix GetKbdByName
    
    Each part of the reply has a fake type, sequence, and length. In
    addition, some parts of the reply are encoded only once even when
    multiple bits are set.
    
    Signed-off-by: Peter Harris <pharris at opentext.com>

diff --git a/src/xkb.xml b/src/xkb.xml
index b387dcb..5e18ee8 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -2004,6 +2004,8 @@ authorization from the authors.
 				<fieldref>reported</fieldref>
 				<bitcase name="types">
 					<enumref ref="GBNDetail">Types</enumref>
+					<enumref ref="GBNDetail">ClientSymbols</enumref>
+					<enumref ref="GBNDetail">ServerSymbols</enumref>
 					<!-- from the spec, this has to be a GetMap reply -->
 					<field name="getmap_type" type="CARD8" />
 				        <!-- done 'emulating' GetMap reply header-->
@@ -2096,7 +2098,12 @@ authorization from the authors.
 				</bitcase>
 				<bitcase name="compat_map">
 					<enumref ref="GBNDetail">CompatMap</enumref>
+					<!-- from the spec, this has to include a reply header -->
+					<field name="compatmap_type" type="CARD8" />
 					<field name="compatDeviceID" type="CARD8" />
+					<field name="compatmap_sequence" type="CARD16" />
+					<field name="compatmap_length" type="CARD32" />
+					<!-- done 'emulating' reply header -->
 					<field name="groupsRtrn" type="CARD8" mask="SetOfGroup" />
 					<pad bytes="1" />
 					<field name="firstSIRtrn" type="CARD16" />
@@ -2112,179 +2119,14 @@ authorization from the authors.
 						</popcount>
 					</list>
 				</bitcase>
-				<bitcase name="client_symbols">
-					<enumref ref="GBNDetail">ClientSymbols</enumref>
-					<field name="clientDeviceID" type="CARD8" />
-					<pad bytes="2" />
-					<field name="clientMinKeyCode" type="KEYCODE" />
-					<field name="clientMaxKeyCode" type="KEYCODE" />
-					<field name="present" type="CARD16" enum="MapPart" />
-					<field name="firstType" type="CARD8" />
-					<field name="nTypes" type="CARD8" />
-					<field name="totalTypes" type="CARD8" />
-					<field name="firstKeySym" type="KEYCODE" />
-					<field name="totalSyms" type="CARD16" />
-					<field name="nKeySyms" type="CARD8" />
-					<field name="firstKeyAction" type="KEYCODE" />
-					<field name="totalActions" type="CARD16" />
-					<field name="nKeyActions" type="CARD8" />
-					<field name="firstKeyBehavior" type="KEYCODE" />
-					<field name="nKeyBehaviors" type="CARD8" />
-					<field name="totalKeyBehaviors" type="CARD8" />
-					<field name="firstKeyExplicit" type="KEYCODE" />
-					<field name="nKeyExplicit" type="CARD8" />
-					<field name="totalKeyExplicit" type="CARD8" />
-					<field name="firstModMapKey" type="KEYCODE" />
-					<field name="nModMapKeys" type="CARD8" />
-					<field name="totalModMapKeys" type="CARD8" />
-					<field name="firstVModMapKey" type="KEYCODE" />
-					<field name="nVModMapKeys" type="CARD8" />
-					<field name="totalVModMapKeys" type="CARD8" />
-					<pad bytes="1" />
-					<field name="virtualMods" type="CARD16" mask="VMod" />
-					<switch name="map">
-						<fieldref>present</fieldref>
-						<bitcase>
-							<enumref ref="MapPart">KeyTypes</enumref>
-							<list name="types_rtrn" type="KeyType">
-								<fieldref>nTypes</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="MapPart">KeySyms</enumref>
-							<list name="syms_rtrn" type="KeySymMap">
-								<fieldref>nKeySyms</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="MapPart">KeyActions</enumref>
-							<list name="acts_rtrn_count" type="CARD8">
-								<fieldref>nKeyActions</fieldref>
-							</list>
-							<list name="acts_rtrn_acts" type="Action">
-								<fieldref>totalActions</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="MapPart">KeyBehaviors</enumref>
-							<list name="behaviors_rtrn" type="SetBehavior">
-								<fieldref>totalKeyBehaviors</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="MapPart">VirtualMods</enumref>
-							<list name="vmods_rtrn" type="CARD8" mask="ModMask">
-								<fieldref>nVModMapKeys</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="MapPart">ExplicitComponents</enumref>
-							<list name="explicit_rtrn" type="SetExplicit">
-								<fieldref>totalKeyExplicit</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="MapPart">ModifierMap</enumref>
-							<list name="modmap_rtrn" type="KeyModMap">
-								<fieldref>totalModMapKeys</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="MapPart">VirtualModMap</enumref>
-							<list name="vmodmap_rtrn" type="KeyVModMap">
-								<fieldref>totalVModMapKeys</fieldref>
-							</list>
-						</bitcase>
-					</switch>
-				</bitcase>
-				<bitcase name="server_symbols">
-					<enumref ref="GBNDetail">ServerSymbols</enumref>
-					<field name="serverDeviceID" type="CARD8" />
-					<pad bytes="2" />
-					<field name="serverMinKeyCode" type="KEYCODE" />
-					<field name="serverMaxKeyCode" type="KEYCODE" />
-					<field name="present" type="CARD16" enum="MapPart" />
-					<field name="firstType" type="CARD8" />
-					<field name="nTypes" type="CARD8" />
-					<field name="totalTypes" type="CARD8" />
-					<field name="firstKeySym" type="KEYCODE" />
-					<field name="totalSyms" type="CARD16" />
-					<field name="nKeySyms" type="CARD8" />
-					<field name="firstKeyAction" type="KEYCODE" />
-					<field name="totalActions" type="CARD16" />
-					<field name="nKeyActions" type="CARD8" />
-					<field name="firstKeyBehavior" type="KEYCODE" />
-					<field name="nKeyBehaviors" type="CARD8" />
-					<field name="totalKeyBehaviors" type="CARD8" />
-					<field name="firstKeyExplicit" type="KEYCODE" />
-					<field name="nKeyExplicit" type="CARD8" />
-					<field name="totalKeyExplicit" type="CARD8" />
-					<field name="firstModMapKey" type="KEYCODE" />
-					<field name="nModMapKeys" type="CARD8" />
-					<field name="totalModMapKeys" type="CARD8" />
-					<field name="firstVModMapKey" type="KEYCODE" />
-					<field name="nVModMapKeys" type="CARD8" />
-					<field name="totalVModMapKeys" type="CARD8" />
-					<pad bytes="1" />
-					<field name="virtualMods" type="CARD16" mask="VMod" />
-					<switch name="map">
-						<fieldref>present</fieldref>
-						<bitcase>
-							<enumref ref="MapPart">KeyTypes</enumref>
-							<list name="types_rtrn" type="KeyType">
-								<fieldref>nTypes</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="MapPart">KeySyms</enumref>
-							<list name="syms_rtrn" type="KeySymMap">
-								<fieldref>nKeySyms</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="MapPart">KeyActions</enumref>
-							<list name="acts_rtrn_count" type="CARD8">
-								<fieldref>nKeyActions</fieldref>
-							</list>
-							<list name="acts_rtrn_acts" type="Action">
-								<fieldref>totalActions</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="MapPart">KeyBehaviors</enumref>
-							<list name="behaviors_rtrn" type="SetBehavior">
-								<fieldref>totalKeyBehaviors</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="MapPart">VirtualMods</enumref>
-							<list name="vmods_rtrn" type="CARD8" mask="ModMask">
-								<fieldref>nVModMapKeys</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="MapPart">ExplicitComponents</enumref>
-							<list name="explicit_rtrn" type="SetExplicit">
-								<fieldref>totalKeyExplicit</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="MapPart">ModifierMap</enumref>
-							<list name="modmap_rtrn" type="KeyModMap">
-								<fieldref>totalModMapKeys</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="MapPart">VirtualModMap</enumref>
-							<list name="vmodmap_rtrn" type="KeyVModMap">
-								<fieldref>totalVModMapKeys</fieldref>
-							</list>
-						</bitcase>
-					</switch>
-				</bitcase>
 				<bitcase name="indicator_maps">
 					<enumref ref="GBNDetail">IndicatorMaps</enumref>
+					<!-- from the spec, this has to include a reply header -->
+					<field name="indicatormap_type" type="CARD8" />
 					<field name="indicatorDeviceID" type="CARD8" />
+					<field name="indicatormap_sequence" type="CARD16" />
+					<field name="indicatormap_length" type="CARD32" />
+					<!-- done 'emulating' reply header -->
 					<field name="which" type="CARD32" />
 					<field name="realIndicators" type="CARD32" />
 					<field name="nIndicators" type="CARD8" />
@@ -2295,7 +2137,13 @@ authorization from the authors.
 				</bitcase>
 				<bitcase name="key_names">
 					<enumref ref="GBNDetail">KeyNames</enumref>
+					<enumref ref="GBNDetail">OtherNames</enumref>
+					<!-- from the spec, this has to include a reply header -->
+					<field name="keyname_type" type="CARD8" />
 					<field name="keyDeviceID" type="CARD8" />
+					<field name="keyname_sequence" type="CARD16" />
+					<field name="keyname_length" type="CARD32" />
+					<!-- done 'emulating' reply header -->
 					<field name="which" type="CARD32" mask="NameDetail" />
 					<field name="keyMinKeyCode" type="KEYCODE" />
 					<field name="keyMaxKeyCode" type="KEYCODE" />
@@ -2394,110 +2242,14 @@ authorization from the authors.
 						</bitcase>
 					</switch>
 				</bitcase>
-				<bitcase name="other_names">
-					<enumref ref="GBNDetail">OtherNames</enumref>
-					<field name="otherDeviceID" type="CARD8" />
-					<field name="which" type="CARD32" mask="NameDetail" />
-					<field name="otherMinKeyCode" type="KEYCODE" />
-					<field name="otherMaxKeyCode" type="KEYCODE" />
-					<field name="nTypes" type="CARD8" />
-					<field name="groupNames" type="CARD8" mask="SetOfGroup" />
-					<field name="virtualMods" type="CARD16" mask="VMod" />
-					<field name="firstKey" type="KEYCODE" />
-					<field name="nKeys" type="CARD8" />
-					<field name="indicators" type="CARD32" />
-					<field name="nRadioGroups" type="CARD8" />
-					<field name="nKeyAliases" type="CARD8" />
-					<field name="nKTLevels" type="CARD16" />
-					<pad bytes="4" />
-					<switch name="valueList">
-						<fieldref>which</fieldref>
-						<bitcase>
-							<enumref ref="NameDetail">Keycodes</enumref>
-							<field name="keycodesName" type="ATOM" />
-						</bitcase>
-						<bitcase>
-							<enumref ref="NameDetail">Geometry</enumref>
-							<field name="geometryName" type="ATOM" />
-						</bitcase>
-						<bitcase>
-							<enumref ref="NameDetail">Symbols</enumref>
-							<field name="symbolsName" type="ATOM" />
-						</bitcase>
-						<bitcase>
-							<enumref ref="NameDetail">PhysSymbols</enumref>
-							<field name="physSymbolsName" type="ATOM" />
-						</bitcase>
-						<bitcase>
-							<enumref ref="NameDetail">Types</enumref>
-							<field name="typesName" type="ATOM" />
-						</bitcase>
-						<bitcase>
-							<enumref ref="NameDetail">Compat</enumref>
-							<field name="compatName" type="ATOM" />
-						</bitcase>
-						<bitcase>
-							<enumref ref="NameDetail">KeyTypeNames</enumref>
-							<list name="typeNames" type="ATOM">
-								<fieldref>nTypes</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="NameDetail">KTLevelNames</enumref>
-							<list name="nLevelsPerType" type="CARD8">
-								<fieldref>nKTLevels</fieldref>
-							</list>
-							<list name="ktLevelNames" type="ATOM">
-								<sumof ref="nLevelsPerType" />
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="NameDetail">IndicatorNames</enumref>
-							<list name="indicatorNames" type="ATOM">
-								<popcount>
-									<fieldref>indicators</fieldref>
-								</popcount>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="NameDetail">VirtualModNames</enumref>
-							<list name="virtualModNames" type="ATOM">
-								<popcount>
-									<fieldref>virtualMods</fieldref>
-								</popcount>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="NameDetail">GroupNames</enumref>
-							<list name="groups" type="ATOM">
-								<popcount>
-									<fieldref>groupNames</fieldref>
-								</popcount>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="NameDetail">KeyNames</enumref>
-							<list name="keyNames" type="KeyName">
-								<fieldref>nKeys</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="NameDetail">KeyAliases</enumref>
-							<list name="keyAliases" type="KeyAlias">
-								<fieldref>nKeyAliases</fieldref>
-							</list>
-						</bitcase>
-						<bitcase>
-							<enumref ref="NameDetail">RGNames</enumref>
-							<list name="radioGroupNames" type="ATOM">
-								<fieldref>nRadioGroups</fieldref>
-							</list>
-						</bitcase>
-					</switch>
-				</bitcase>
 				<bitcase name="geometry">
 					<enumref ref="GBNDetail">Geometry</enumref>
+					<!-- from the spec, this has to include a reply header -->
+					<field name="geometry_type" type="CARD8" />
 					<field name="geometryDeviceID" type="CARD8" />
+					<field name="geometry_sequence" type="CARD16" />
+					<field name="geometry_length" type="CARD32" />
+					<!-- done 'emulating' reply header -->
 					<field name="name" type="ATOM" />
 					<field name="geometryFound" type="BOOL" />
 					<pad bytes="1" />
commit ee71d96c83ec86aeb0227f259c03ed3752cc04b3
Author: Peter Harris <pharris at opentext.com>
Date:   Thu Apr 11 09:52:57 2013 -0400

    Allow multiple <enumref> in a <bitcase>
    
    Signed-off-by: Peter Harris <pharris at opentext.com>

diff --git a/doc/xml-xcb.txt b/doc/xml-xcb.txt
index 7057727..cf6d14e 100644
--- a/doc/xml-xcb.txt
+++ b/doc/xml-xcb.txt
@@ -229,13 +229,18 @@ enum; the value is restricted to one of the constants named in the enum.
   <switch> instead for new protocol definitions.
 
 <switch name="identifier"> switch expression
-    <bitcase> bitcase expression, fields </bitcase> </switch>
+    <bitcase> bitcase expression(s), fields </bitcase> </switch>
 
   This element represents conditional inclusion of fields. It can be viewed
   as sequence of multiple ifs: if ( switch expression & bitcase expression )
-  is equal to bitcase expression, bitcase fields are included in structure.
-  It can be used only as the last field of structure. New protocol definitions
-  should prefer to use this instead of <valueparam>.
+  is non-zero, bitcase fields are included in structure.  It can be used only
+  as the last field of a structure.
+
+  When a bitcase includes multiple <enumref> clauses, the contents of the
+  bitcase are only present once regardless of the number of bitcase expressions
+  that match.
+
+  New protocol definitions should prefer to use this instead of <valueparam>.
 
 Expressions
 -----------
diff --git a/src/xcb.xsd b/src/xcb.xsd
index cfa90c9..4ef269e 100644
--- a/src/xcb.xsd
+++ b/src/xcb.xsd
@@ -59,7 +59,7 @@ authorization from the authors.
   <xsd:complexType name="caseexpr">
     <xsd:sequence>
       <!-- case expression: -->
-      <xsd:group ref="expression" minOccurs="1" maxOccurs="1" />
+      <xsd:group ref="expression" minOccurs="1" maxOccurs="unbounded" />
       <!-- match -->
       <xsd:group ref="fields" minOccurs="1" maxOccurs="unbounded" />
       <xsd:choice>
commit 63fce1aa1a3df0683ddf09796fa1a744fb426e25
Author: Peter Harris <pharris at opentext.com>
Date:   Wed Apr 10 19:06:20 2013 -0400

    XKB: Change CARD8 to char where ASCII is expected
    
    This does not impact libxcb, but it makes some pretty-printers prettier.
    
    Signed-off-by: Peter Harris <pharris at opentext.com>

diff --git a/src/xkb.xml b/src/xkb.xml
index f62c55e..b387dcb 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -370,23 +370,23 @@ authorization from the authors.
 	</struct>
 
 	<struct name="KeyName">
-		<list name="name" type="CARD8">
+		<list name="name" type="char">
 			<value>4</value>
 		</list>
 	</struct>
 
 	<struct name="KeyAlias">
-		<list name="real" type="CARD8">
+		<list name="real" type="char">
 			<value>4</value>
 		</list>
-		<list name="alias" type="CARD8">
+		<list name="alias" type="char">
 			<value>4</value>
 		</list>
 	</struct>
 
 	<struct name="CountedString16">
 		<field name="length" type="CARD16" />
-		<list name="string" type="CARD8">
+		<list name="string" type="char">
 			<fieldref>length</fieldref>
 		</list>
 		<list type="void" name="alignment_pad">
commit 2ad6d97b39b90c54002c8c0fbb2612c898137386
Author: Peter Harris <pharris at opentext.com>
Date:   Wed Apr 10 19:05:23 2013 -0400

    XKB: Fix VirtualMods
    
    nVModMapKeys is usually larger than <popcount>virtualMods</popcount>.
    
    Signed-off-by: Peter Harris <pharris at opentext.com>

diff --git a/src/xkb.xml b/src/xkb.xml
index 41dbe54..f62c55e 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -1363,7 +1363,7 @@ authorization from the authors.
 				<bitcase>
 					<enumref ref="MapPart">VirtualMods</enumref>
 					<list name="vmods_rtrn" type="CARD8" mask="ModMask">
-						<fieldref>nVModMapKeys</fieldref>
+						<popcount><fieldref>virtualMods</fieldref></popcount>
 					</list>
 				</bitcase>
 				<bitcase>
@@ -1447,7 +1447,7 @@ authorization from the authors.
 			<bitcase>
 				<enumref ref="MapPart">VirtualMods</enumref>
 				<list name="vmods" type="CARD8">
-					<fieldref>nVModMapKeys</fieldref>
+					<popcount><fieldref>virtualMods</fieldref></popcount>
 				</list>
 			</bitcase>
 			<bitcase>
@@ -2071,7 +2071,7 @@ authorization from the authors.
 						<bitcase>
 							<enumref ref="MapPart">VirtualMods</enumref>
 							<list name="vmods_rtrn" type="CARD8" mask="ModMask">
-								<fieldref>nVModMapKeys</fieldref>
+								<popcount><fieldref>virtualMods</fieldref></popcount>
 							</list>
 						</bitcase>
 						<bitcase>
commit b6abdad2c2b0a332a40490d8f63a581100bc1293
Author: Peter Harris <pharris at opentext.com>
Date:   Wed Apr 10 19:04:11 2013 -0400

    XKB: Fix SymInterpret
    
    SymInterpret is referenced by the spec, but never defined. Therefore,
    the definition of SymInterpret is inferred from the server implementation.
    
    Signed-off-by: Peter Harris <pharris at opentext.com>

diff --git a/src/xkb.xml b/src/xkb.xml
index 0fc808c..41dbe54 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -268,7 +268,7 @@ authorization from the authors.
 		<item name="KeyType1">    <bit>0</bit> </item>
 	</enum>
 
-	<enum name="SymInterpret">
+	<enum name="SymInterpretMatch">
 		<item name="NoneOf">      <value>0</value> </item>
 		<item name="AnyOfOrNone"> <value>1</value> </item>
 		<item name="AnyOf">       <value>2</value> </item>
@@ -1029,6 +1029,23 @@ authorization from the authors.
 		<field name="val2value" type="CARD8" />
 	</struct>
 
+	<struct name="SIAction">
+		<field name="type" type="CARD8" enum="SAType" />
+		<list name="data" type="CARD8">
+			<value>7</value>
+		</list>
+	</struct>
+
+	<struct name="SymInterpret">
+		<field name="sym" type="KEYSYM" />
+		<field name="mods" type="CARD8" mask="ModMask" />
+		<!-- "match" may also have XkbSI_LevelOneOnly (0x80) or'd into it -->
+		<field name="match" type="CARD8" altenum="SymInterpretMatch" />
+		<field name="virtualMod" type="CARD8" mask="VModsLow" />
+		<field name="flags" type="CARD8" />
+		<field name="action" type="SIAction" />
+	</struct>
+
 	<union name="Action">
 		<field name="noaction" type="SANoAction" />
 		<field name="setmods" type="SASetMods" />
@@ -1468,11 +1485,8 @@ authorization from the authors.
 			<field name="nSIRtrn" type="CARD16" />
 			<field name="nTotalSI" type="CARD16" />
 			<pad bytes="16" />
-			<list name="si_rtrn" type="CARD8" mask="SymInterpret">
-				<op op="*">
-					<value>16</value>
-					<fieldref>nSIRtrn</fieldref>
-				</op>
+			<list name="si_rtrn" type="SymInterpret">
+				<fieldref>nSIRtrn</fieldref>
 			</list>
 			<list name="group_rtrn" type="ModDef">
 				<popcount>
@@ -1491,11 +1505,8 @@ authorization from the authors.
 		<field name="firstSI" type="CARD16" />
 		<field name="nSI" type="CARD16" />
 		<pad bytes="2"/>
-		<list name="si" type="CARD8" mask="SymInterpret">
-			<op op="*">
-				<value>16</value>
-				<fieldref>nSI</fieldref>
-			</op>
+		<list name="si" type="SymInterpret">
+			<fieldref>nSI</fieldref>
 		</list>
 		<list name="groupMaps" type="ModDef">
 			<popcount>
@@ -2092,11 +2103,8 @@ authorization from the authors.
 					<field name="nSIRtrn" type="CARD16" />
 					<field name="nTotalSI" type="CARD16" />
 					<pad bytes="16" />
-					<list name="si_rtrn" type="CARD8" mask="SymInterpret">
-						<op op="*">
-							<value>16</value>
-							<fieldref>nSIRtrn</fieldref>
-						</op>
+					<list name="si_rtrn" type="SymInterpret">
+						<fieldref>nSIRtrn</fieldref>
 					</list>
 					<list name="group_rtrn" type="ModDef">
 						<popcount>
commit 88a0f33199f628ea953977f8ad7027b6faa2f7a7
Author: Peter Harris <pharris at opentext.com>
Date:   Wed Apr 10 19:01:35 2013 -0400

    XKB: Fix CountedString16 padding
    
    Should be <pad align=4>, not <pad bytes=1>. This is a very long-winded
    way to write <pad align>, since libxcb doesn't support <pad align> yet.
    
    Signed-off-by: Peter Harris <pharris at opentext.com>

diff --git a/src/xkb.xml b/src/xkb.xml
index 5207c22..0fc808c 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -389,7 +389,23 @@ authorization from the authors.
 		<list name="string" type="CARD8">
 			<fieldref>length</fieldref>
 		</list>
-		<pad bytes="1" />
+		<list type="void" name="alignment_pad">
+			<op op="-">
+				<op op="&">
+					<op op="+">
+						<fieldref>length</fieldref>
+						<value>5</value>
+					</op>
+					<unop op="~">
+						<value>3</value>
+					</unop>
+				</op>
+				<op op="+">
+					<fieldref>length</fieldref>
+					<value>2</value>
+				</op>
+			</op>
+		</list>
 	</struct>
 
 	<struct name="KTMapEntry">
commit 01f8c3298493d2e0d3264b54c58254c705fd9865
Author: Peter Harris <pharris at opentext.com>
Date:   Wed Apr 10 18:59:57 2013 -0400

    XKB: Remove CountedString8
    
    CountedString8 is never used.
    
    Signed-off-by: Peter Harris <pharris at opentext.com>

diff --git a/src/xkb.xml b/src/xkb.xml
index c260720..5207c22 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -384,13 +384,6 @@ authorization from the authors.
 		</list>
 	</struct>
 
-	<struct name="CountedString8">
-		<field name="length" type="CARD8" />
-		<list name="string" type="CARD8">
-			<fieldref>length</fieldref>
-		</list>
-	</struct>
-
 	<struct name="CountedString16">
 		<field name="length" type="CARD16" />
 		<list name="string" type="CARD8">
commit 7265cbb3a9b546a84cfbbb9a172a19e5d92b6e52
Author: Daniel Martin <consume.noise at gmail.com>
Date:   Tue Jan 15 12:51:30 2013 +0100

    xkb: Revert half of d42d791 XKB: Fix broken events
    
    The no-sequence-number attribute was not necessary to achive what commit
    d42d791 did. The first field automatically goes between the
    response_type and the sequence field in the header. So, adding the
    xkbType field would've been sufficient to fix the broken events.
    
    Reference-to: d42d791 XKB: Fix broken events

diff --git a/src/xkb.xml b/src/xkb.xml
index a6ef374..c260720 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -2593,9 +2593,8 @@ authorization from the authors.
 
 	<!-- Events -->
 
-	<event name="NewKeyboardNotify" number="0" no-sequence-number="true">
+	<event name="NewKeyboardNotify" number="0">
 		<field name="xkbType" type="CARD8" />
-		<field name="sequence" type="CARD16" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<field name="oldDeviceID" type="CARD8" />
@@ -2609,9 +2608,8 @@ authorization from the authors.
 		<pad bytes="14" />
 	</event>
 
-	<event name="MapNotify" number="1" no-sequence-number="true">
+	<event name="MapNotify" number="1">
 		<field name="xkbType" type="CARD8" />
-		<field name="sequence" type="CARD16" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<field name="ptrBtnActions" type="CARD8" />
@@ -2636,9 +2634,8 @@ authorization from the authors.
 		<pad bytes="2" />
 	</event>
 
-	<event name="StateNotify" number="2" no-sequence-number="true">
+	<event name="StateNotify" number="2">
 		<field name="xkbType" type="CARD8" />
-		<field name="sequence" type="CARD16" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<field name="mods" type="CARD8" mask="ModMask" />
@@ -2662,9 +2659,8 @@ authorization from the authors.
 		<field name="requestMinor" type="CARD8" />
 	</event>
 
-	<event name="ControlsNotify" number="3" no-sequence-number="true">
+	<event name="ControlsNotify" number="3">
 		<field name="xkbType" type="CARD8" />
-		<field name="sequence" type="CARD16" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<field name="numGroups" type="CARD8" />
@@ -2679,9 +2675,8 @@ authorization from the authors.
 		<pad bytes="4" />
 	</event>
 
-	<event name="IndicatorStateNotify" number="4" no-sequence-number="true">
+	<event name="IndicatorStateNotify" number="4">
 		<field name="xkbType" type="CARD8" />
-		<field name="sequence" type="CARD16" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<pad bytes="3" />
@@ -2690,9 +2685,8 @@ authorization from the authors.
 		<pad bytes="12" />
 	</event>
 
-	<event name="IndicatorMapNotify" number="5" no-sequence-number="true">
+	<event name="IndicatorMapNotify" number="5">
 		<field name="xkbType" type="CARD8" />
-		<field name="sequence" type="CARD16" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<pad bytes="3" />
@@ -2701,9 +2695,8 @@ authorization from the authors.
 		<pad bytes="12" />
 	</event>
 
-	<event name="NamesNotify" number="6" no-sequence-number="true">
+	<event name="NamesNotify" number="6">
 		<field name="xkbType" type="CARD8" />
-		<field name="sequence" type="CARD16" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<pad bytes="1" />
@@ -2723,9 +2716,8 @@ authorization from the authors.
 		<pad bytes="4" />
 	</event>
 
-	<event name="CompatMapNotify" number="7" no-sequence-number="true">
+	<event name="CompatMapNotify" number="7">
 		<field name="xkbType" type="CARD8" />
-		<field name="sequence" type="CARD16" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<field name="changedGroups" type="CARD8" mask="SetOfGroup" />
@@ -2735,9 +2727,8 @@ authorization from the authors.
 		<pad bytes="16" />
 	</event>
 
-	<event name="BellNotify" number="8" no-sequence-number="true">
+	<event name="BellNotify" number="8">
 		<field name="xkbType" type="CARD8" />
-		<field name="sequence" type="CARD16" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<field name="bellClass" type="CARD8" enum="BellClassResult" />
@@ -2751,9 +2742,8 @@ authorization from the authors.
 		<pad bytes="7" />
 	</event>
 
-	<event name="ActionMessage" number="9" no-sequence-number="true">
+	<event name="ActionMessage" number="9">
 		<field name="xkbType" type="CARD8" />
-		<field name="sequence" type="CARD16" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<field name="keycode" type="KEYCODE" />
@@ -2767,9 +2757,8 @@ authorization from the authors.
 		<pad bytes="10" />
 	</event>
 
-	<event name="AccessXNotify" number="10" no-sequence-number="true">
+	<event name="AccessXNotify" number="10">
 		<field name="xkbType" type="CARD8" />
-		<field name="sequence" type="CARD16" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<field name="keycode" type="KEYCODE" />
@@ -2779,9 +2768,8 @@ authorization from the authors.
 		<pad bytes="16" />
 	</event>
 
-	<event name="ExtensionDeviceNotify" number="11" no-sequence-number="true">
+	<event name="ExtensionDeviceNotify" number="11">
 		<field name="xkbType" type="CARD8" />
-		<field name="sequence" type="CARD16" />
 		<field name="time" type="TIMESTAMP" />
 		<field name="deviceID" type="CARD8" />
 		<pad bytes="1" />
commit 28ae6975c0c9d9b2d186bdd30d96ae35191428b2
Author: Daniel Martin <consume.noise at gmail.com>
Date:   Fri Jan 11 18:10:08 2013 +0100

    Simplify boolean attribute retrieval

diff --git a/xcbgen/xtypes.py b/xcbgen/xtypes.py
index f6d4634..c97273f 100644
--- a/xcbgen/xtypes.py
+++ b/xcbgen/xtypes.py
@@ -593,8 +593,7 @@ class Event(ComplexType):
         ComplexType.__init__(self, name, elt)
         self.opcodes = {}
 
-        tmp = elt.get('no-sequence-number')
-        self.has_seq = (tmp == None or tmp.lower() == 'false' or tmp == '0')
+        self.has_seq = not bool(elt.get('no-sequence-number'))
 
         self.doc = None
         for item in list(elt):


More information about the xcb-commit mailing list