[PATCH inputproto multitouch 5/5] specs: extend XI2.1 raw events to include touch events

Peter Hutterer peter.hutterer at who-t.net
Sun Aug 28 16:20:32 PDT 2011


RawEvents are simple enough that we can re-use the detail field for the
touch ID tracking and just update the respective event types.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 XI2.h              |    8 +++++++-
 specs/XI2proto.txt |    7 ++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/XI2.h b/XI2.h
index bd6829d..04e3631 100644
--- a/XI2.h
+++ b/XI2.h
@@ -197,7 +197,10 @@
 #define XI_TouchEnd                      19
 #define XI_TouchOwnership                20
 #define XI_TouchUpdate                   21
-#define XI_LASTEVENT                     XI_TouchUpdate
+#define XI_RawTouchBegin                 22
+#define XI_RawTouchEnd                   23
+#define XI_RawTouchUpdate                24
+#define XI_LASTEVENT                     XI_RawTouchUpdate
 /* NOTE: XI2LASTEVENT in xserver/include/inputstr.h must be the same value
  * as XI_LASTEVENT if the server is supposed to handle masks etc. for this
  * type of event. */
@@ -227,5 +230,8 @@
 #define XI_TouchEndMask                  (1 << XI_TouchEnd)
 #define XI_TouchOwnershipChangedMask     (1 << XI_TouchOwnershipChanged)
 #define XI_TouchUpdateMask               (1 << XI_TouchUpdate)
+#define XI_RawTouchBeginMask             (1 << XI_RawTouchBegin)
+#define XI_RawTouchEndMask               (1 << XI_RawTouchEnd)
+#define XI_RawTouchUpdateMask            (1 << XI_RawTouchUpdate)
 
 #endif /* _XI2_H_ */
diff --git a/specs/XI2proto.txt b/specs/XI2proto.txt
index 61d2fbc..660b632 100644
--- a/specs/XI2proto.txt
+++ b/specs/XI2proto.txt
@@ -1819,6 +1819,9 @@ Version 2.1:
         - TouchUpdate
         - TouchOwnership
         - TouchEnd
+        - RawTouchBegin
+        - RawTouchUpdate
+        - RawTouchEnd
 
 All events have a set of common fields specified as EVENTHEADER.
 
@@ -2107,7 +2110,7 @@ that grabbed the device only.
     eventtype
         The type of event that occured on the device.
     detail
-        The button number or keycode.
+        The button number, keycode or touch ID*.
     flags
         Flags as described in DeviceEvent.
     valuators_len
@@ -2119,6 +2122,8 @@ that grabbed the device only.
     axisvalues_raw
         Untransformed valuator data in device-native resolution.
 
+* since XI 2.1
+
 [[events-enterleave]]
     ┌───
         Enter or Leave or FocusIn or FocusOut
-- 
1.7.6



More information about the xorg-devel mailing list