xinput: struct ValuatorState.mode: add mask

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
This commit is contained in:
Christian Linhart 2014-08-19 13:12:32 +02:00 committed by Christian Linhart
parent c272fb7b26
commit dcd78ec389

View file

@ -768,11 +768,16 @@ authorization from the authors.
</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>