[Xcb] [PATCH proto 09/22 V2] xinput: struct ValuatorState.mode: add mask
Christian Linhart
chris at DemoRecorder.com
Tue Aug 19 04:12:32 PDT 2014
add new enum ValuatorStateModeMask as mask to field "mode"
V2: patch revised according to suggestions from Peter Harris:
* use bit instead of value
* use names which indicate the way the bits should be flipped
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2095
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1783
---
src/xinput.xml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/xinput.xml b/src/xinput.xml
index 2a12057..c1a24ee 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -764,19 +764,24 @@ <struct name="ButtonState">
<field type="CARD8" name="num_buttons" />
<pad bytes="1" />
<list type="CARD8" name="buttons">
<value>32</value>
</list>
</struct>
+ <enum name="ValuatorStateModeMask">
+ <item name="DeviceModeAbsolute"> <bit>0</bit> </item>
+ <item name="OutOfProximity"> <bit>1</bit> </item>
+ </enum>
+
<struct name="ValuatorState">
<field type="CARD8" name="class_id" enum="InputClass" />
<field type="CARD8" name="len" />
<field type="CARD8" name="num_valuators" />
- <field type="CARD8" name="mode" />
+ <field type="CARD8" name="mode" mask="ValuatorStateModeMask" />
<list type="CARD32" name="valuators">
<fieldref>num_valuators</fieldref>
</list>
</struct>
<struct name="InputState">
<field type="CARD8" name="class_id" enum="InputClass" />
-- 2.0.1
More information about the Xcb
mailing list