[Xcb] [PATCH proto 4/5] xinput: Minor fixes, add CountedString structure

Daniel Martin consume.noise at gmail.com
Thu Jan 3 06:02:39 PST 2013


Fix some minor mistakes in "uninterpreted comments", i.e. the list of
device names is not a list of null-terminated strings. It's a list of
structures with a length prefix, add the CountedString structure to
represent it.

Signed-off-by: Daniel Martin <consume.noise at gmail.com>
---
 src/xinput.xml | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/xinput.xml b/src/xinput.xml
index 72f89a2..d8bba3a 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -80,6 +80,13 @@ authorization from the authors.
         <pad bytes="1" />
     </struct>
 
+    <struct name="CountedString">
+        <field type="CARD8" name="length" />
+        <list type="CARD8"  name="string">
+            <fieldref>length</fieldref>
+        </list>
+    </struct>
+
     <request name="ListInputDevices" opcode="2">
         <reply>
             <pad bytes="1" />
@@ -88,8 +95,8 @@ authorization from the authors.
             <list type="DeviceInfo" name="devices">
                 <fieldref>devices_len</fieldref>
             </list>
-            <!-- Uninterpreted: list of deviceinfo structs of 3 the subtypes -->
-            <!-- Uninterpreted: list of null-terminated strings -->
+            <!-- Uninterpreted: list of InputInfo structures, length is sum of all devices.num_class_info -->
+            <!-- Uninterpreted: list of CountedString structures, length is devices_len -->
         </reply>
     </request>
 
@@ -253,7 +260,7 @@ authorization from the authors.
 
     <struct name="DeviceTimeCoord">
         <field type="TIMESTAMP" name="time" />
-        <!-- Uninterpreted: list of CARD16 -->
+        <!-- Uninterpreted: list of CARD16, length is num_axes from GetDeviceMotionEvents -->
     </struct>
 
     <!-- ChangeKeyboardDevice -->
@@ -504,7 +511,7 @@ authorization from the authors.
         <field type="CARD32" name="mask" />
         <field type="CARD8"  name="device_id" />
         <field type="CARD8"  name="feedback_id" />
-        Uninterpreted: list of FeedbackCtl structures
+        Uninterpreted: field of FeedbackCtl structure
     </request>
 
     -->
@@ -787,7 +794,7 @@ authorization from the authors.
             <pad bytes="1" />
             <field type="CARD8" name="status" altenum="GrabStatus" />
             <pad bytes="23" />
-            <!-- Uninterpreted: list of DeviceState structures -->
+            <!-- Uninterpreted: field of DeviceState structure -->
         </reply>
     </request>
 
@@ -856,7 +863,7 @@ authorization from the authors.
         <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD8"  name="device_id" />
         <pad bytes="1" />
-        Uninterpreted: list of DeviceCtl structures
+        Uninterpreted: field of DeviceCtl structure
         <reply>
             <pad byte="1" />
             <field type="CARD8" name="status" altenum="GrabStatus" />
-- 
1.8.0.3



More information about the Xcb mailing list