[Xcb] [PATCH proto 5/8] xinput: ev KeyPress: support list axisvalues
Christian Linhart
chris at demorecorder.com
Thu Sep 4 08:48:59 PDT 2014
The length of list axisvalues is determined by the number of bits set in the
list valuator_mask.
This is computed using sumof over popcount of the list-elements of valuator_mask.
This uses the new expression type <listelement-ref/> which refers to the current
list-element iterated by sumof.
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt?id=inputproto-2.3.1#n2214
code:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.h?id=inputproto-2.3.1#n944
---
src/xinput.xml | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/xinput.xml b/src/xinput.xml
index 61aacb7..02a8597 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -2270,16 +2270,21 @@ <event name="KeyPress" number="2" xge="true">
<field type="GroupInfo" name="group" />
<list type="CARD32" name="button_mask">
<fieldref>buttons_len</fieldref>
</list>
<list type="CARD32" name="valuator_mask">
<fieldref>valuators_len</fieldref>
</list>
- <!-- Uninterpreted: list (axisvalues) of FP3232,
- length is <popcount> on valuator_mask list -->
+ <list type="FP3232" name="axisvalues">
+ <sumof ref="valuator_mask">
+ <popcount>
+ <listelement-ref/>
+ </popcount>
+ </sumof>
+ </list>
</event>
<eventcopy name="KeyRelease" number="3" ref="KeyPress" />
<enum name="PointerEventFlags">
<item name="PointerEmulated"> <bit>16</bit> </item>
</enum>
--
2.0.1
More information about the Xcb
mailing list