Add missing padding bytes to ChangeKeyboardMapping request
[free-sw/xcb/proto] / src / xkb.xml
index 31234e7..157df45 100644 (file)
@@ -153,10 +153,6 @@ authorization from the authors.
                <field name="skopt" type="CARD16" enum="AXSKOpt" />
        </union>
 
-       <enum name="Device">
-               <item name="UseCoreKbd"> <bit>8</bit> </item>
-               <item name="UseCorePtr"> <bit>9</bit> </item>
-       </enum>
        <typedef oldname="CARD16" newname="DeviceSpec" />
 
        <enum name="LedClassResult">
@@ -181,19 +177,16 @@ authorization from the authors.
        <typedef oldname="CARD16" newname="BellClassSpec" />
 
        <enum name="ID">
-               <item name="DfltXIId"> <bit>10</bit> </item>
+               <item name="UseCoreKbd">  <value>256</value> </item>    <!-- 0x100 -->
+               <item name="UseCorePtr">  <value>512</value> </item>    <!-- 0x200 -->
+               <item name="DfltXIClass"> <value>768</value> </item>    <!-- 0x300 -->
+               <item name="DfltXIId">   <value>1024</value> </item>    <!-- 0x400 -->
+               <item name="AllXIClass"> <value>1280</value> </item>    <!-- 0x500 -->
+               <item name="AllXIId">    <value>1536</value> </item>    <!-- 0x600 -->
+               <item name="XINone">     <value>65280</value> </item>   <!--0xff00-->
        </enum>
        <typedef oldname="CARD16" newname="IDSpec" />
 
-       <enum name="IDResult">
-               <item name="XINone"> <value>65280</value> </item>       <!--0xff00-->
-       </enum>
-
-       <enum name="MultiId">
-               <item name="AllXIIds"> <value>1280</value> </item>      <!--0x500-->
-       </enum>
-       <typedef oldname="CARD16" newname="MultiIdSpec" />
-
        <enum name="Group">
                <item name="1"> <value>0</value> </item>
                <item name="2"> <value>1</value> </item>
@@ -354,21 +347,14 @@ authorization from the authors.
                <item name="OtherNames">    <bit>7</bit> </item>
        </enum>
 
-       <enum name="XIExtDevFeature">
+       <enum name="XIFeature">
+               <item name="Keyboards">      <bit>0</bit> </item>
                <item name="ButtonActions">  <bit>1</bit> </item>
                <item name="IndicatorNames"> <bit>2</bit> </item>
                <item name="IndicatorMaps">  <bit>3</bit> </item>
                <item name="IndicatorState"> <bit>4</bit> </item>
        </enum>
 
-       <enum name="XIFeature">
-               <item name="Keyboards"> <value>1</value> </item>
-       </enum>
-
-       <enum name="XIDetail">
-               <item name="UnsupportedFeature"> <bit>15</bit> </item>
-       </enum>
-
        <enum name="PerClientFlag">
                <item name="DetectableAutoRepeat">   <bit>0</bit> </item>
                <item name="GrabsUseXKBState">       <bit>1</bit> </item>
@@ -415,8 +401,12 @@ authorization from the authors.
 
        <struct name="KTMapEntry">
                <field name="active" type="BOOL" />
+               <!-- Xlib uses a different arrangement of fields
                <field name="mods_mask" type="CARD8" mask="ModMask" />
                <field name="level" type="CARD8" />
+               -->
+               <field name="level" type="CARD8" />
+               <field name="mods_mask" type="CARD8" mask="ModMask" />
                <field name="mods_mods" type="CARD8" mask="ModMask" />
                <field name="mods_vmods" type="CARD16" mask="VMod" />
                <pad bytes="2" />
@@ -750,8 +740,8 @@ authorization from the authors.
        </struct>
 
        <struct name="DeviceLedInfo">
-               <field name="ledClass" type="LedClassSpec" mask="LedClass" />
-               <field name="ledID" type="IDSpec" mask="ID" />
+               <field name="ledClass" type="LedClassSpec" enum="LedClass" />
+               <field name="ledID" type="IDSpec" altenum="ID" />
                <field name="namesPresent" type="CARD32" />
                <field name="mapsPresent" type="CARD32" />
                <field name="physIndicators" type="CARD32" />
@@ -1135,13 +1125,13 @@ authorization from the authors.
                        </bitcase>
                        <bitcase>
                                <enumref ref="EventType">ExtensionDeviceNotify</enumref>
-                               <field name="affectExtDev" type="CARD16" mask="XIDetail" />
-                               <field name="extdevDetails" type="CARD16" mask="XIDetail" />
+                               <field name="affectExtDev" type="CARD16" mask="XIFeature" />
+                               <field name="extdevDetails" type="CARD16" mask="XIFeature" />
                        </bitcase>
                </switch>
        </request>
 
-       <request name="Bell" opcode="2">
+       <request name="Bell" opcode="3">
                <field name="deviceSpec" type="DeviceSpec" />
                <field name="bellClass" type="BellClassSpec" />
                <field name="bellID" type="IDSpec" />
@@ -1156,7 +1146,7 @@ authorization from the authors.
                <field name="window" type="WINDOW" />
        </request>
 
-       <request name="GetState" opcode="3">
+       <request name="GetState" opcode="4">
                <field name="deviceSpec" type="DeviceSpec" />
                <pad bytes="2" />
                <reply>
@@ -1543,8 +1533,8 @@ authorization from the authors.
 
        <request name="GetNamedIndicator" opcode="15">
                <field name="deviceSpec" type="DeviceSpec" />
-               <field name="ledClass" type="LedClassSpec" mask="LedClass" />
-               <field name="ledID" type="IDSpec" mask="ID" />
+               <field name="ledClass" type="LedClassSpec" enum="LedClass" />
+               <field name="ledID" type="IDSpec" altenum="ID" />
                <pad bytes="2" />
                <field name="indicator" type="ATOM" />
                <reply>
@@ -1568,8 +1558,8 @@ authorization from the authors.
 
        <request name="SetNamedIndicator" opcode="16" >
                <field name="deviceSpec" type="DeviceSpec" />
-               <field name="ledClass" type="LedClassSpec" mask="LedClass" />
-               <field name="ledID" type="IDSpec" mask="ID" />
+               <field name="ledClass" type="LedClassSpec" enum="LedClass" />
+               <field name="ledID" type="IDSpec" altenum="ID" />
                <pad bytes="2" />
                <field name="indicator" type="ATOM" />
                <field name="setState" type="BOOL" />
@@ -1596,7 +1586,7 @@ authorization from the authors.
                        <field name="minKeyCode" type="KEYCODE" />
                        <field name="maxKeyCode" type="KEYCODE" />
                        <field name="nTypes" type="CARD8" />
-                       <field name="groupNames" type="CARD8" mask="Group" />
+                       <field name="groupNames" type="CARD8" mask="SetOfGroup" />
                        <field name="virtualMods" type="CARD16" mask="VMod" />
                        <field name="firstKey" type="KEYCODE" />
                        <field name="nKeys" type="CARD8" />
@@ -1640,7 +1630,11 @@ authorization from the authors.
                                <bitcase>
                                        <enumref ref="NameDetail">KTLevelNames</enumref>
                                        <list name="nLevelsPerType" type="CARD8">
-                                               <fieldref>nKTLevels</fieldref>
+                                         <!-- Xlib uses NTypes here - 
+                                              the spec says nKTLevels is correct, but
+                                              it does not work in reality
+                                              <fieldref>nKTLevels</fieldref> -->
+                                               <fieldref>nTypes</fieldref>
                                        </list>
                                        <list name="ktLevelNames" type="ATOM">
                                                <sumof ref="nLevelsPerType" />
@@ -1987,9 +1981,16 @@ authorization from the authors.
                        <pad bytes="16" />
                        <switch name="replies">
                                <fieldref>reported</fieldref>
-                               <bitcase>
+                               <bitcase name="types">
                                        <enumref ref="GBNDetail">Types</enumref>
+                                       <!-- from the spec, this has to be a GetMap reply -->
+                                       <field name="getmap_type" type="CARD8" />
+                                       <!-- done 'emulating' GetMap reply header-->
                                        <field name="typeDeviceID" type="CARD8" />
+                                       <!-- from the spec, this has to be a GetMap reply -->
+                                       <field name="getmap_sequence" type="CARD16" />
+                                       <field name="getmap_length" type="CARD32" />
+                                       <!-- done 'emulating' GetMap reply header-->
                                        <pad bytes="2" />
                                        <field name="typeMinKeyCode" type="KEYCODE" />
                                        <field name="typeMaxKeyCode" type="KEYCODE" />
@@ -2072,7 +2073,7 @@ authorization from the authors.
                                                </bitcase>
                                        </switch>
                                </bitcase>
-                               <bitcase>
+                               <bitcase name="compat_map">
                                        <enumref ref="GBNDetail">CompatMap</enumref>
                                        <field name="compatDeviceID" type="CARD8" />
                                        <field name="groupsRtrn" type="CARD8" mask="SetOfGroup" />
@@ -2093,7 +2094,7 @@ authorization from the authors.
                                                </popcount>
                                        </list>
                                </bitcase>
-                               <bitcase>
+                               <bitcase name="client_symbols">
                                        <enumref ref="GBNDetail">ClientSymbols</enumref>
                                        <field name="clientDeviceID" type="CARD8" />
                                        <pad bytes="2" />
@@ -2178,7 +2179,7 @@ authorization from the authors.
                                                </bitcase>
                                        </switch>
                                </bitcase>
-                               <bitcase>
+                               <bitcase name="server_symbols">
                                        <enumref ref="GBNDetail">ServerSymbols</enumref>
                                        <field name="serverDeviceID" type="CARD8" />
                                        <pad bytes="2" />
@@ -2263,7 +2264,7 @@ authorization from the authors.
                                                </bitcase>
                                        </switch>
                                </bitcase>
-                               <bitcase>
+                               <bitcase name="indicator_maps">
                                        <enumref ref="GBNDetail">IndicatorMaps</enumref>
                                        <field name="indicatorDeviceID" type="CARD8" />
                                        <field name="which" type="CARD32" />
@@ -2274,14 +2275,14 @@ authorization from the authors.
                                                <fieldref>nIndicators</fieldref>
                                        </list>
                                </bitcase>
-                               <bitcase>
+                               <bitcase name="key_names">
                                        <enumref ref="GBNDetail">KeyNames</enumref>
                                        <field name="keyDeviceID" type="CARD8" />
                                        <field name="which" type="CARD32" mask="NameDetail" />
                                        <field name="keyMinKeyCode" type="KEYCODE" />
                                        <field name="keyMaxKeyCode" type="KEYCODE" />
                                        <field name="nTypes" type="CARD8" />
-                                       <field name="groupNames" type="CARD8" mask="Group" />
+                                       <field name="groupNames" type="CARD8" mask="SetOfGroup" />
                                        <field name="virtualMods" type="CARD16" mask="VMod" />
                                        <field name="firstKey" type="KEYCODE" />
                                        <field name="nKeys" type="CARD8" />
@@ -2375,14 +2376,14 @@ authorization from the authors.
                                                </bitcase>
                                        </switch>
                                </bitcase>
-                               <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="Group" />
+                                       <field name="groupNames" type="CARD8" mask="SetOfGroup" />
                                        <field name="virtualMods" type="CARD16" mask="VMod" />
                                        <field name="firstKey" type="KEYCODE" />
                                        <field name="nKeys" type="CARD8" />
@@ -2476,7 +2477,7 @@ authorization from the authors.
                                                </bitcase>
                                        </switch>
                                </bitcase>
-                               <bitcase>
+                               <bitcase name="geometry">
                                        <enumref ref="GBNDetail">Geometry</enumref>
                                        <field name="geometryDeviceID" type="CARD8" />
                                        <field name="name" type="ATOM" />
@@ -2518,16 +2519,16 @@ authorization from the authors.
 
        <request name="GetDeviceInfo" opcode="24">
                <field name="deviceSpec" type="DeviceSpec" />
-               <field name="wanted" type="CARD16" mask="XIExtDevFeature" />
+               <field name="wanted" type="CARD16" mask="XIFeature" />
                <field name="allButtons" type="BOOL" />
                <field name="firstButton" type="CARD8" />
                <field name="nButtons" type="CARD8" />
                <pad bytes="1" />
-               <field name="ledClass" type="LedClassSpec" mask="LedClass" />
-               <field name="ledID" type="IDSpec" mask="ID" />
+               <field name="ledClass" type="LedClassSpec" enum="LedClass" />
+               <field name="ledID" type="IDSpec" altenum="ID" />
                <reply>
                        <field name="deviceID" type="CARD8" />
-                       <field name="present" type="CARD16" mask="XIExtDevFeature" />
+                       <field name="present" type="CARD16" mask="XIFeature" />
                        <field name="supported" type="CARD16" mask="XIFeature" />
                        <field name="unsupported" type="CARD16" mask="XIFeature" />
                        <field name="nDeviceLedFBs" type="CARD16" />
@@ -2537,8 +2538,8 @@ authorization from the authors.
                        <field name="nBtnsRtrn" type="CARD8" />
                        <field name="totalBtns" type="CARD8" />
                        <field name="hasOwnState" type="BOOL" />
-                       <field name="dfltKbdFB" type="CARD16" mask="IDResult" />
-                       <field name="dfltLedFB" type="CARD16" mask="IDResult" />
+                       <field name="dfltKbdFB" type="CARD16" altenum="ID" />
+                       <field name="dfltLedFB" type="CARD16" altenum="ID" />
                        <pad bytes="2" />
                        <field name="devType" type="ATOM" />
                        <field name="nameLen" type="CARD16" />
@@ -2559,7 +2560,7 @@ authorization from the authors.
                <field name="deviceSpec" type="DeviceSpec" />
                <field name="firstBtn" type="CARD8" />
                <field name="nBtns" type="CARD8" />
-               <field name="change" type="CARD16" mask="XIExtDevFeature" />
+               <field name="change" type="CARD16" mask="XIFeature" />
                <field name="nDeviceLedFBs" type="CARD16" />
                <list name="btnActions" type="Action">
                        <fieldref>nBtns</fieldref>
@@ -2759,8 +2760,8 @@ authorization from the authors.
                <field name="time" type="TIMESTAMP" />
                <field name="deviceID" type="CARD8" />
                <pad bytes="1" />
-               <field name="reason" type="CARD16" mask="XIDetail" />
-               <field name="ledClass" type="CARD16" mask="LedClassResult" />
+               <field name="reason" type="CARD16" mask="XIFeature" />
+               <field name="ledClass" type="CARD16" enum="LedClassResult" />
                <field name="ledID" type="CARD8" />
                <field name="ledsDefined" type="CARD32" />
                <field name="ledState" type="CARD32" />