[Xcb] [PATCH proto 7/8] xinput: RawEvents: support lists axisvalues and axisvalues_raw
Christian Linhart
chris at demorecorder.com
Thu Sep 4 08:49:01 PDT 2014
Support the lists axisvalues and axisvalues_raw in RawEvents.
These are RawKeyPress, RawButtonPress, RawTouchBegin and their eventcopies.
The length of both lists is determined by the number of bits set in the
list valuator_mask. This is solved in the same way as for event KeyPress.
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt?id=inputproto-2.3.1#n2362
code:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.h?id=inputproto-2.3.1#n980
---
src/xinput.xml | 54 ++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 42 insertions(+), 12 deletions(-)
diff --git a/src/xinput.xml b/src/xinput.xml
index 4f0e34c..23e05df 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -2436,18 +2436,28 @@ <event name="RawKeyPress" number="13" xge="true">
<field type="CARD16" name="valuators_len" />
<field type="CARD32" name="flags" mask="KeyEventFlags"/>
<pad bytes="4" />
<!-- 32 byte boundary -->
<list type="CARD32" name="valuator_mask">
<fieldref>valuators_len</fieldref>
</list>
- <!-- Uninterpreted: list (axisvalues) of FP3232,
- length is <popcount> on valuator_mask list -->
- <!-- Uninterpreted: list (axisvalues_raw) of FP3232,
- length is <popcount> on valuator_mask list -->
+ <list type="FP3232" name="axisvalues">
+ <sumof ref="valuator_mask">
+ <popcount>
+ <listelement-ref/>
+ </popcount>
+ </sumof>
+ </list>
+ <list type="FP3232" name="axisvalues_raw">
+ <sumof ref="valuator_mask">
+ <popcount>
+ <listelement-ref/>
+ </popcount>
+ </sumof>
+ </list>
</event>
<eventcopy name="RawKeyRelease" number="14" ref="RawKeyPress" />
<event name="RawButtonPress" number="15" xge="true">
<field type="DeviceId" name="deviceid" altenum="Device" />
<field type="TIMESTAMP" name="time" altenum="Time" />
@@ -2457,18 +2467,28 @@ <event name="RawButtonPress" number="15" xge="true">
<field type="CARD16" name="valuators_len" />
<field type="CARD32" name="flags" mask="PointerEventFlags"/>
<pad bytes="4" />
<!-- 32 byte boundary -->
<list type="CARD32" name="valuator_mask">
<fieldref>valuators_len</fieldref>
</list>
- <!-- Uninterpreted: list (axisvalues) of FP3232,
- length is <popcount> on valuator_mask list -->
- <!-- Uninterpreted: list (axisvalues_raw) of FP3232,
- length is <popcount> on valuator_mask list -->
+ <list type="FP3232" name="axisvalues">
+ <sumof ref="valuator_mask">
+ <popcount>
+ <listelement-ref/>
+ </popcount>
+ </sumof>
+ </list>
+ <list type="FP3232" name="axisvalues_raw">
+ <sumof ref="valuator_mask">
+ <popcount>
+ <listelement-ref/>
+ </popcount>
+ </sumof>
+ </list>
</event>
<eventcopy name="RawButtonRelease" number="16" ref="RawButtonPress" />
<eventcopy name="RawMotion" number="17" ref="RawButtonPress" />
<!-- ⋅⋅⋅ Events (v2.2) ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
@@ -2544,18 +2564,28 @@ <event name="RawTouchBegin" number="22" xge="true">
<field type="CARD16" name="valuators_len" />
<field type="CARD32" name="flags" mask="TouchEventFlags"/>
<pad bytes="4" />
<!-- 32 byte boundary -->
<list type="CARD32" name="valuator_mask">
<fieldref>valuators_len</fieldref>
</list>
- <!-- Uninterpreted: list (axisvalues) of FP3232,
- length is <popcount> on valuator_mask list -->
- <!-- Uninterpreted: list (axisvalues_raw) of FP3232,
- length is <popcount> on valuator_mask list -->
+ <list type="FP3232" name="axisvalues">
+ <sumof ref="valuator_mask">
+ <popcount>
+ <listelement-ref/>
+ </popcount>
+ </sumof>
+ </list>
+ <list type="FP3232" name="axisvalues_raw">
+ <sumof ref="valuator_mask">
+ <popcount>
+ <listelement-ref/>
+ </popcount>
+ </sumof>
+ </list>
</event>
<eventcopy name="RawTouchUpdate" number="23" ref="RawTouchBegin" />
<eventcopy name="RawTouchEnd" number="24" ref="RawTouchBegin" />
<!-- ⋅⋅⋅ Events (v2.3) ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
--
2.0.1
More information about the Xcb
mailing list