[Xcb] [PATCH proto 21/22 V3] xinput: ev DeviceStateNotify.classes_reported: mask

Christian Linhart chris at DemoRecorder.com
Sat Aug 23 04:05:43 PDT 2014


add new enum "ClassesReportedMask" as mask to field "classes_reported"

V2: patch revised according to suggestion from Peter Harris:
* use names which indicate the way the bits should be flipped

V3: revised the diff-context according to the modification of patch 18/22 V2

spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2401
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n2220
---
 src/xinput.xml | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/xinput.xml b/src/xinput.xml
index 55db451..73af5f0 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -1865,21 +1865,33 @@ <event name="DeviceFocusIn" number="6">
         <pad bytes="18" />
     </event>
 
     <eventcopy name="DeviceFocusOut" number="7" ref="DeviceFocusIn" />
     <eventcopy name="ProximityIn"    number="8" ref="DeviceKeyPress" />
     <eventcopy name="ProximityOut"   number="9" ref="DeviceKeyPress" />
 
+    <enum name="ClassesReportedMask">
+        <item name="OutOfProximity">     <bit>7</bit> </item> <!-- 0x80 -->
+            <!-- 0 = InProxmity, 1 = OutOfProximity -->
+
+        <item name="DeviceModeAbsolute"> <bit>6</bit> </item> <!-- 0x40 -->
+            <!-- 0 = Relative, 1 = Absolute -->
+
+        <item name="ReportingValuators"> <bit>2</bit> </item> <!-- 0x04 -->
+        <item name="ReportingButtons">   <bit>1</bit> </item> <!-- 0x02 -->
+        <item name="ReportingKeys">      <bit>0</bit> </item> <!-- 0x01 -->
+    </enum>
+
     <event name="DeviceStateNotify" number="10">
         <field type="BYTE"      name="device_id" altmask="MoreEventsMask" />
         <field type="TIMESTAMP" name="time" />
         <field type="CARD8"     name="num_keys" />
         <field type="CARD8"     name="num_buttons" />
         <field type="CARD8"     name="num_valuators" />
-        <field type="CARD8"     name="classes_reported" />
+        <field type="CARD8"     name="classes_reported" mask="ClassesReportedMask" />
         <list type="CARD8"      name="buttons">
             <value>4</value>
         </list>
         <list type="CARD8" name="keys">
             <value>4</value>
         </list>
         <list type="CARD32" name="valuators">
-- 2.0.1 _______________________________________________ Xcb mailing list Xcb at lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xcb 
_______________________________________________
Xcb mailing list
Xcb at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xcb




More information about the Xcb mailing list