[Xcb] [PATCH proto 3/5] xinput: Add DeviceControl enum

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


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

diff --git a/src/xinput.xml b/src/xinput.xml
index 193a351..72f89a2 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -771,8 +771,16 @@ authorization from the authors.
 
     <!-- GetDeviceControl -->
 
+    <enum name="DeviceControl">
+        <item name="resolution"> <value>1</value> </item>
+        <item name="abs_calib">  <value>2</value> </item>
+        <item name="core">       <value>3</value> </item>
+        <item name="enable">     <value>4</value> </item>
+        <item name="abs_area">   <value>5</value> </item>
+    </enum>
+
     <request name="GetDeviceControl" opcode="34">
-        <field type="CARD16" name="control_id" />
+        <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD8"  name="device_id" />
         <pad bytes="1" />
         <reply>
@@ -784,12 +792,12 @@ authorization from the authors.
     </request>
 
     <struct name="DeviceState">
-        <field type="CARD16" name="control_id" />
+        <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD16" name="len" />
     </struct>
 
     <struct name="DeviceResolutionState">
-        <field type="CARD16" name="control_id" />
+        <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD16" name="len" />
         <field type="CARD32" name="num_valuators" />
         <list type="CARD32"  name="resolution_values">
@@ -804,7 +812,7 @@ authorization from the authors.
     </struct>
 
     <struct name="DeviceAbsCalibState">
-        <field type="CARD16" name="control_id" />
+        <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD16" name="len" />
         <field type="INT32"  name="min_x" />
         <field type="INT32"  name="max_x" />
@@ -817,7 +825,7 @@ authorization from the authors.
     </struct>
 
     <struct name="DeviceAbsAreaState">
-        <field type="CARD16" name="control_id" />
+        <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD16" name="len" />
         <field type="CARD32" name="offset_x" />
         <field type="CARD32" name="offset_y" />
@@ -828,7 +836,7 @@ authorization from the authors.
     </struct>
 
     <struct name="DeviceCoreState">
-        <field type="CARD16" name="control_id" />
+        <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD16" name="len" />
         <field type="CARD8"  name="status" />
         <field type="CARD8"  name="iscore" />
@@ -836,7 +844,7 @@ authorization from the authors.
     </struct>
 
     <struct name="DeviceEnableState">
-        <field type="CARD16" name="control_id" />
+        <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD16" name="len" />
         <field type="CARD8"  name="enable" />
         <pad bytes="3" />
@@ -845,7 +853,7 @@ authorization from the authors.
     <!-- ChangeDeviceControl
 
     <request name="ChangeDeviceControl" opcode="35">
-        <field type="CARD16" name="control_id" />
+        <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD8"  name="device_id" />
         <pad bytes="1" />
         Uninterpreted: list of DeviceCtl structures
@@ -859,12 +867,12 @@ authorization from the authors.
     -->
 
     <struct name="DeviceCtl">
-        <field type="CARD16" name="control_id" />
+        <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD16" name="len" />
     </struct>
 
     <struct name="DeviceResolutionCtl">
-        <field type="CARD16" name="control_id" />
+        <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD16" name="len" />
         <field type="CARD8"  name="first_valuator" />
         <field type="CARD8"  name="num_valuators" />
@@ -874,7 +882,7 @@ authorization from the authors.
     </struct>
 
     <struct name="DeviceAbsCalibCtl">
-        <field type="CARD16" name="control_id" />
+        <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD16" name="len" />
         <field type="INT32"  name="min_x" />
         <field type="INT32"  name="max_x" />
@@ -887,7 +895,7 @@ authorization from the authors.
     </struct>
 
     <struct name="DeviceAbsAreaCtrl">
-        <field type="CARD16" name="control_id" />
+        <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD16" name="len" />
         <field type="CARD32" name="offset_x" />
         <field type="CARD32" name="offset_y" />
@@ -898,14 +906,14 @@ authorization from the authors.
     </struct>
 
     <struct name="DeviceCoreCtrl">
-        <field type="CARD16" name="control_id" />
+        <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD16" name="len" />
         <field type="CARD8"  name="status" />
         <pad bytes="3" />
     </struct>
 
     <struct name="DeviceEnableCtrl">
-        <field type="CARD16" name="control_id" />
+        <field type="CARD16" name="control_id" enum="DeviceControl" />
         <field type="CARD16" name="len" />
         <field type="CARD8"  name="enable" />
         <pad bytes="3" />
-- 
1.8.0.3



More information about the Xcb mailing list