[Xcb] [PATCH proto 7/7] xinput: Unlock uninterpreted lists
Daniel Martin
consume.noise at gmail.com
Tue Jan 15 23:33:50 PST 2013
The 'uninterpreted_data' lists have been added to pad the structure at
runtime and thereby making lists of such structures iterable.
This is a temporary solution until it is possible to nest a <switch> in
a <struct> correctly.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
---
src/xinput.xml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 52 insertions(+), 6 deletions(-)
diff --git a/src/xinput.xml b/src/xinput.xml
index be4dfde..431db16 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -517,6 +517,12 @@ <struct name="FeedbackState">
<field type="CARD8" name="class_id" enum="FeedbackClass" />
<field type="CARD8" name="feedback_id" />
<field type="CARD16" name="len" />
+ <list type="CARD8" name="uninterpreted_data">
+ <op op="-">
+ <fieldref>len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
</struct>
<request name="GetFeedbackControl" opcode="22">
@@ -526,7 +532,9 @@ <request name="GetFeedbackControl" opcode="22">
<pad bytes="1" />
<field type="CARD16" name="num_feedbacks" />
<pad bytes="22" />
- <!-- Uninterpreted: list (feedbacks) of FeedbackState structures -->
+ <list type="FeedbackState" name="feedbacks">
+ <fieldref>num_feedbacks</fieldref>
+ </list>
</reply>
</request>
@@ -596,13 +604,19 @@ <struct name="FeedbackCtl">
<field type="CARD8" name="class_id" enum="FeedbackClass" />
<field type="CARD8" name="feedback_id" />
<field type="CARD16" name="len" />
+ <list type="CARD8" name="uninterpreted_data">
+ <op op="-">
+ <fieldref>len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
</struct>
<request name="ChangeFeedbackControl" opcode="23">
<field type="CARD32" name="mask" />
<field type="CARD8" name="device_id" />
<field type="CARD8" name="feedback_id" />
- <!-- Uninterpreted: field (feedback) of FeedbackCtl structure -->
+ <field type="FeedbackCtl" name="feedback" />
</request>
<!-- GetDeviceKeyMapping -->
@@ -741,6 +755,13 @@ <struct name="InputState">
<field type="CARD8" name="class_id" enum="InputClass" />
<field type="CARD8" name="len" />
<field type="CARD8" name="num_items" />
+ <pad bytes="1" />
+ <list type="CARD8" name="uninterpreted_data">
+ <op op="-">
+ <fieldref>len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
</struct>
<request name="QueryDeviceState" opcode="30">
@@ -750,7 +771,9 @@ <request name="QueryDeviceState" opcode="30">
<pad bytes="1" />
<field type="CARD8" name="num_classes" />
<pad bytes="23" />
- <!-- Uninterpreted: list (classes) of InputState structures -->
+ <list type="InputState" name="classes">
+ <fieldref>num_classes</fieldref>
+ </list>
</reply>
</request>
@@ -867,6 +890,12 @@ <struct name="DeviceEnableState">
<struct name="DeviceState">
<field type="CARD16" name="control_id" enum="DeviceControl" />
<field type="CARD16" name="len" />
+ <list type="CARD8" name="uninterpreted_data">
+ <op op="-">
+ <fieldref>len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
</struct>
<request name="GetDeviceControl" opcode="34">
@@ -877,7 +906,7 @@ <request name="GetDeviceControl" opcode="34">
<pad bytes="1" />
<field type="CARD8" name="status" altenum="GrabStatus" />
<pad bytes="23" />
- <!-- Uninterpreted: field (control) of DeviceState structure -->
+ <field type="DeviceState" name="control" />
</reply>
</request>
@@ -934,13 +963,19 @@ <struct name="DeviceEnableCtrl">
<struct name="DeviceCtl">
<field type="CARD16" name="control_id" enum="DeviceControl" />
<field type="CARD16" name="len" />
+ <list type="CARD8" name="uninterpreted_data">
+ <op op="-">
+ <fieldref>len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
</struct>
<request name="ChangeDeviceControl" opcode="35">
<field type="CARD16" name="control_id" enum="DeviceControl" />
<field type="CARD8" name="device_id" />
<pad bytes="1" />
- <!-- Uninterpreted: field (control) of DeviceCtl structure -->
+ <field type="DeviceCtl" name="control" />
<reply>
<pad bytes="1" />
<field type="CARD8" name="status" altenum="GrabStatus" />
@@ -1187,11 +1222,22 @@ <struct name="DetachSlave">
<struct name="HierarchyChange">
<field type="CARD16" name="type" enum="HierarchyChangeType" />
<field type="CARD16" name="len" />
+ <list type="CARD8" name="uninterpreted_data">
+ <op op="-">
+ <op op="*">
+ <fieldref>len</fieldref>
+ <value>4</value>
+ </op>
+ <value>4</value>
+ </op>
+ </list>
</struct>
<request name="XIChangeHierarchy" opcode="43">
<field type="CARD8" name="num_changes" />
- <!-- Uninterpreted: list (changes) of HierarchyChange structures -->
+ <list type="HierarchyChange" name="changes">
+ <fieldref>num_changes</fieldref>
+ </list>
</request>
<!-- XISetClientPointer -->
--
1.8.0.3
More information about the Xcb
mailing list