xinput: new enum for device_id in some events
authorChristian Linhart <chris@DemoRecorder.com>
Tue, 19 Aug 2014 11:13:06 +0000 (13:13 +0200)
committerChristian Linhart <chris@demorecorder.com>
Mon, 25 Aug 2014 11:42:56 +0000 (13:42 +0200)
add new enum "MoreEventsMask" to be used
by event DeviceKeyPress and derived ones
for field "device_id".

V2: patch revised according to suggestion from Peter Harris:
* remove DeviceBits = 0x7f from the enum in order to avoid
  mixing bit and value in the same enum.
  ( We'd need a way to specify a range of bits for that ... )

spec and code:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1999
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h#n67
http://cgit.freedesktop.org/xorg/lib/libXi/tree/src/XExtInt.c#n534
http://cgit.freedesktop.org/xorg/xserver/tree/dix/eventconvert.c#n348
http://cgit.freedesktop.org/xorg/xserver/tree/Xi/exevents.c#n188

note:
this mask is missing in the following spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2257

src/xinput.xml

index 53eaf6a..179735f 100644 (file)
@@ -1829,6 +1829,12 @@ authorization from the authors.
         </list>
     </event>
 
+    <!-- the highest bit in a CARD8 device_id-field indicates that more
+       events will follow -->
+    <enum name="MoreEventsMask">
+       <item name="MoreEvents"> <bit>7</bit> </item> <!-- 0x80 -->
+    </enum>
+
     <event name="DeviceKeyPress" number="1">
         <field type="BYTE"      name="detail" />
         <field type="TIMESTAMP" name="time" />