[PATCH inputproto 2/2] Add TouchStateNotify/TouchMotion/TouchClass, bump to 2.1

Daniel Stone daniel at fooishbar.org
Sun Sep 19 22:03:03 PDT 2010


Introduce multitouch support through a new TouchClass, as well as new
TouchBegin, TouchEnd and TouchMotion events.  Bump to version 2.1.

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
 XI2.h        |   25 +++++-
 XI2proto.h   |  115 ++++++++++++++++++++++-
 XI2proto.txt |  294 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 configure.ac |    2 +-
 4 files changed, 419 insertions(+), 17 deletions(-)

diff --git a/XI2.h b/XI2.h
index 6ba1377..56c0d7f 100644
--- a/XI2.h
+++ b/XI2.h
@@ -32,10 +32,12 @@
 #define Dont_Check                              0
 #endif
 #define XInput_2_0                              7
+#define XInput_2_1                              8
 
 
 #define XI_2_Major                              2
 #define XI_2_Minor                              0
+#define XI_2_1_Minor                            1
 
 /* Property event flags */
 #define XIPropertyDeleted                       0
@@ -65,6 +67,7 @@
 #define XIGrabtypeKeycode                       1
 #define XIGrabtypeEnter                         2
 #define XIGrabtypeFocusIn                       3
+#define XIGrabtypeTouchBegin                    4
 
 /* Passive grab modifier */
 #define XIAnyModifier                           (1U << 31)
@@ -78,6 +81,9 @@
 #define XIAsyncPairedDevice                     3
 #define XIAsyncPair                             4
 #define XISyncPair                              5
+/* The following flags are since XI 2.1 only. */
+#define XIAcceptTouch                           6
+#define XIReplayTouch                           7
 
 /* DeviceChangedEvent change reasons */
 #define XISlaveSwitch                           1
@@ -113,10 +119,12 @@
 #define XISlaveKeyboard                         4
 #define XIFloatingSlave                         5
 
-/* Device classes */
+/* Device classes: classes that are not identical to Xi 1.x classes must be
+ * numbered starting from 8. */
 #define XIKeyClass                              0
 #define XIButtonClass                           1
 #define XIValuatorClass                         2
+#define XITouchClass                            8
 
 /* Device event flags (common) */
 /* Device event flags (key events only) */
@@ -133,6 +141,13 @@
 #define XIAllDevices                            0
 #define XIAllMasterDevices                      1
 
+/* Mask for TouchMotion */
+#define XITouchXMask                     (1 << 0)
+#define XITouchYMask                     (1 << 1)
+#define XITouchTouchSizeMask             (1 << 2)
+#define XITouchToolSizeMask              (1 << 3)
+#define XITouchOrientationMask           (1 << 4)
+
 /* Event types */
 #define XI_DeviceChanged                 1
 #define XI_KeyPress                      2
@@ -151,7 +166,10 @@
 #define XI_RawButtonPress                15
 #define XI_RawButtonRelease              16
 #define XI_RawMotion                     17
-#define XI_LASTEVENT                     XI_RawMotion
+#define XI_TouchBegin                    18
+#define XI_TouchEnd                      19
+#define XI_TouchMotion                   20
+#define XI_LASTEVENT                     XI_TouchMotion
 /* 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. */
@@ -177,5 +195,8 @@
 #define XI_RawButtonPressMask            (1 << XI_RawButtonPress)
 #define XI_RawButtonReleaseMask          (1 << XI_RawButtonRelease)
 #define XI_RawMotionMask                 (1 << XI_RawMotion)
+#define XI_TouchBeginMask                (1 << XI_TouchBegin)
+#define XI_TouchEndMask                  (1 << XI_TouchEnd)
+#define XI_TouchMotionMask               (1 << XI_TouchMotion)
 
 #endif /* _XI2_H_ */
diff --git a/XI2proto.h b/XI2proto.h
index fb345f4..f218abe 100644
--- a/XI2proto.h
+++ b/XI2proto.h
@@ -189,6 +189,48 @@ typedef struct {
     uint16_t    pad2;
 } xXIValuatorInfo;
 
+/**
+ * Denotes multitouch capability on a device, in general terms; XITouchInfo
+ * is used to detail specific touchpoints.
+ */
+typedef struct {
+    uint16_t    type;              /**< Always TouchClass                    */
+    uint16_t    length;            /**< Length in 4 byte units               */
+    uint16_t    sourceid;          /**< Source device for this class         */
+    uint8_t     mode;              /**< ::XIModeRelative,  XIModeAbsolute    */
+    uint8_t     pad0;
+    FP3232      min_x;             /**< Min x value                          */
+    FP3232      max_x;             /**< Max x value                          */
+    FP3232      min_y;             /**< Min y value                          */
+    FP3232      max_y;             /**< Max y value                          */
+    FP3232      min_touch_width;   /**< Min touch/tool width                 */
+    FP3232      max_touch_width;   /**< Max touch/tool width                 */
+    uint32_t    max_touches;       /**< Max number of active touchpoints     */
+    uint32_t    num_touches;       /**< Current number of active touchpoints */
+    uint32_t    pad1;
+    uint32_t    pad2;
+} xXITouchClassInfo;
+
+/**
+ * Denotes a touchpoint on a device.
+ * One XITouchInfo describes exactly one touchpoint on the device; capabilities
+ * are given in XITouchClassInfo.
+ */
+typedef struct {
+    uint16_t    length;            /**< Length in 4 byte units               */
+    uint16_t    orientation;       /**< Last published orientation           */
+    uint32_t    touchid;           /**< Valuator number                      */
+    Atom        tool;              /**< Tool identifier                      */
+    FP3232      x;                 /**< Last published x value               */
+    FP3232      y;                 /**< Last published y value               */
+    FP3232      touch_major;       /**< Last published touch width (maj axis)*/
+    FP3232      touch_minor;       /**< Last published touch width (min axis)*/
+    FP3232      tool_major;        /**< Last published tool width (maj axis) */
+    FP3232      tool_minor;        /**< Last published tool width (min axis) */
+    uint32_t    pad0;
+    uint32_t    pad1;
+} xXITouchInfo;
+
 
 /**
  * Used to select for events on a given window.
@@ -612,7 +654,9 @@ typedef struct {
 
 
 /**
- * Allow or replay events on the specified grabbed device.
+ * Allow or replay events on the specified grabbed device.  The
+ * Detail variant was added in XI 2.1 for TouchBegin grabs: servers
+ * must check the request length to determine which to use.
  */
 typedef struct {
     uint8_t     reqType;
@@ -625,6 +669,18 @@ typedef struct {
 } xXIAllowEventsReq;
 #define sz_xXIAllowEventsReq                   12
 
+typedef struct {
+    uint8_t     reqType;
+    uint8_t     ReqType;                /**< Always ::X_XIAllowEvents */
+    uint16_t    length;                 /**< Length in 4 byte units */
+    Time        time;
+    uint16_t    deviceid;
+    uint8_t     mode;
+    uint8_t     pad;
+    uint32_t    detail;
+} xXIAllowEventsDetailReq;
+#define sz_xXIAllowEventsDetailReq         16
+
 
 /**
  * Passively grab the device.
@@ -969,6 +1025,63 @@ typedef struct
     uint32_t    pad3;
 } xXIPropertyEvent;
 
+/**
+ * Sent as TouchBegin when a touch sequence starts and TouchEnd when it
+ * finishes.
+ */
+typedef struct
+{
+    uint8_t     type;                   /**< Always GenericEvent              */
+    uint8_t     extension;              /**< XI extension offset              */
+    uint16_t    sequenceNumber;         /**< Sequence number of event         */
+    uint32_t    length;                 /**< Length in 4 byte units           */
+    uint16_t    evtype;                 /**< ::XI_TouchBegin, XI_TouchEnd     */
+    uint16_t    deviceid;               /**< Device event was delivered to    */
+    Time        time;                   /**< Time event was received          */
+    uint32_t    touchid;                /**< Unique identifier for this touch */
+    uint32_t    tool;                   /**< Finger/tool ID (if supported)    */
+    uint16_t    sourceid;               /**< Provoking device                 */
+    uint16_t    pad0;
+    Window      root;                   /**< Root window for this event       */
+    Window      event;                  /**< Window event was delivered to    */
+    Window      child;                  /**< Window event occurred within     */
+} xXITouchStateEvent;
+
+typedef xXITouchStateEvent xXITouchBeginEvent;
+typedef xXITouchStateEvent xXITouchEndEvent;
+
+/**
+ * Sent when a touchpoint moves (analagous to MotionNotify).
+ */
+typedef struct
+{
+    uint8_t     type;                   /**< Always GenericEvent              */
+    uint8_t     extension;              /**< XI extension offset              */
+    uint16_t    sequenceNumber;         /**< Sequence number of event         */
+    uint32_t    length;                 /**< Length in 4 byte units           */
+    uint16_t    evtype;                 /**< ::XI_TouchMotion                 */
+    uint16_t    deviceid;               /**< Device event was delivered to    */
+    Time        time;                   /**< Time of event generation         */
+    uint16_t    sourceid;               /**< Provoking device                 */
+    uint16_t    mask;                   /**< Components present in this event */
+    uint32_t    touchid;                /**< Unique identifier for this touch */
+    Window      root;                   /**< Root window for this event       */
+    Window      event;                  /**< Window event was delivered to    */
+    Window      child;                  /**< Window event occurred within     */
+    FP1616      root_x;                 /**< x value scaled to screen co-ords */
+    FP1616      root_y;                 /**< y value scaled to screen co-ords */
+    FP1616      event_x;                /**< x value within event window      */
+    FP1616      event_y;                /**< y value within event window      */
+    FP3232      x;                      /**< Unscaled x co-ordinate           */
+    FP3232      y;                      /**< Unscaled y co-ordinate           */
+    FP3232      touch_width_major;      /**< Major axis of touched area       */
+    FP3232      touch_width_minor;      /**< Minor axis of touched area       */
+    FP3232      tool_width_major;       /**< Major axis of proximate tool     */
+    FP3232      tool_width_minor;       /**< Minor axis of proximate tool     */
+    uint16_t    orientation;            /**< Tool orientation, in degrees     */
+    uint16_t    flags;                  /**< Bitmask of flags */
+} xXITouchMotionEvent;
+
 
 #undef Window
 #undef Time
diff --git a/XI2proto.txt b/XI2proto.txt
index 10f58c2..8e1bb22 100644
--- a/XI2proto.txt
+++ b/XI2proto.txt
@@ -1,16 +1,20 @@
 
                             The X Input Extension
-                                Version 2.0
+                                Version 2.1
 
                               Peter Hutterer
                          peter.hutterer at redhat.com
                                Red Hat, Inc.
 
+                               Daniel Stone
+                           daniel at fooishbar.org
+                              Collabora Ltd.
+
 
 
 1. Introduction
 
-The X Input Extension version 2.0 (XI2) is the second major release of the X
+The X Input Extension version 2.x (XI2) is the second major release of the X
 Input Extension.
 
 XI2 provides a number of enhancements over version 1.5, including:
@@ -31,6 +35,25 @@ used on applications employing the core protocol. XI2 addresses both of these
 issues by enabling devices to be both extended and core devices and providing
 device information in each event (with the exception of core events).
 
+XI 2.1, a minor release, provides multitouch capability by adding touch events
+(TouchBegin, TouchEnd and TouchMotion, as well as TouchClassInfo).  Touch
+events provide a stream of pointer information for individual touchpoints,
+and are delivered separately to existing pointer and keyboard events.  The
+previous approach of providing separate devices was unsuitable for multitouch
+devices which can have touchpoints rapidly appearing and disappearing, so
+XI 2.1 adds multitouch classes within an umbrella device, which can send to
+multiple clients.
+
+XI 2.1 adds support for two classes of touch input devices:
+- direct multitouch devices such as touchscreens, where touch actions map
+  directly to points on the screen.  These devices allow all the same actions
+  to be performed as a traditional pointer, from any touchpoint.
+- indirect multitouch devices such as touchpads and mice with attached
+  multitouch surfaces.  These devices provide a number of independent
+  touchpoints whose inputs are interpreted relative to the current pointer
+  position on that device, and usually offer a more limited set of actions,
+  such as gestures.
+
                               ❧❧❧❧❧❧❧❧❧❧❧
 
 2. Notations used in this document
@@ -61,7 +84,7 @@ COMPLEXFIELDTYPE:  { name of subfield:   type of subfield,
 
                               ❧❧❧❧❧❧❧❧❧❧❧
 
-3. Interoperability between version 1.x and 2.0
+3. Interoperability between version 1.x and 2.x
 
 There is little interaction between 1.x and 2.x versions of the X Input
 Extension. Clients are requested to avoid mixing XI1.x and XI2 code as much as
@@ -95,6 +118,35 @@ XI 1.x was not designed with support for multiple master devices (see Section
 to XI 1.x clients, all other master devices are invisible and cannot be
 accessed from XI 1.x calls.
 
+3.4 Multitouch support
+
+The XI 1.x model was not designed for multiple-interaction devices, such as
+multitouch touchscreens/touchpads.  Creating and destroying new devices for
+each touchpoint was deemed unsustainable: it is a fairly resource-intensive
+operation, as well as being complicated and very difficult to get right for
+clients.
+
+XI 2.1 sends touch events via a new TouchClass, generating three new events:
+TouchBegin, TouchMotion, and TouchEnd.  A TouchBegin event signifies a new
+touchpoint; clients may grab TouchBegin events for exclusive delivery, and
+optionally direct their later delivery (see the touch section in
+XIAllowEvents).  Once a TouchBegin event has sent, all motion events from that
+touch are directed to the final client which received TouchBegin, regardless
+of any active core, XI 1.x, or XI 2.0 device grabs.  All parameters for the
+touchpoint (e.g. tool ID, axis ranges and mode) can be found through a
+combination of the touchpoint's TouchBegin event and the device's TouchClass.
+
+Delivery is handled separately for each touchpoint: a device may have an
+active core grab from client A, but also be delivering touch stream B to
+client B and touch stream C to client C; all these occur simultaneously.
+Touch events are still delivered through the device hierachy: if no event was
+sent through the slave device, it will be routed up to the master for possible
+delivery.
+
+When a touchpoint is destroyed (i.e. the finger was lifted from the device), a
+TouchEnd event is sent to the client, and that touchpoint no longer exists; no
+operations may be performed on it.
+
                               ❧❧❧❧❧❧❧❧❧❧❧
 
 4. The Master/Slave device hierarchy
@@ -296,6 +348,35 @@ are required to be 0.
                   value:                FP3232
                   resolution:           CARD32 }
 
+    TOUCHCLASS* { type:                 TouchClass
+                  length:               CARD16
+                  sourceid:             CARD16
+                  mode:                 CARD8
+                  min_x:                FP3232
+                  max_x:                FP3232
+                  min_y:                FP3232
+                  max_y:                FP3232
+                  min_touch_width:      FP3232
+                  max_touch_width:      FP3232
+                  max_touches:          CARD32
+                  num_touches:          CARD32
+                  (unused):             CARD32
+                  (unused):             CARD32
+                  touches:              LISTofTOUCHINFO }
+
+    TOUCHINFO*  { length:               CARD16
+                  last_orientation:     CARD16
+                  touchid:              CARD32
+                  tool:                 CARD32
+                  last_x:               FP3232
+                  last_y:               FP3232
+                  last_touch_major:     FP3232
+                  last_touch_minor:     FP3232
+                  last_tool_major:      FP3232
+                  last_tool_minor:      FP3232 }
+
+    *: since XI 2.1, must not be sent to 2.0 clients
+
     XIQueryDevice details information about the requested input devices.
 
     devices
@@ -397,6 +478,41 @@ are required to be 0.
     An axis in Relative mode may specify min and max as a hint to the
     client. If no min and max information is available, both must be 0.
 
+    TouchClass:
+    type
+        Always TouchClass.
+    length
+        Length in 4 byte units.
+    sourceid
+        The device this class originates from.
+    mode
+        Specifies whether co-ordinates given are in absolute or relative
+        space.
+    min_x, max_x, min_y, max_y
+        Range of the respective axes.
+    min_touch_width, max_touch_width
+        Range of the touch and tool width axes, both major and minor.
+    max_touches
+        The maximum number of touchpoints that may be active at one time, or 0
+        if unlimited/unknown.
+    num_touches
+        The number of following TouchInfo structs (i.e. number of active
+        touchpoints).
+
+    TouchInfo:
+    length
+        Length in 4 byte units.
+    touchid
+        A unique identifier describing this touchpoint.
+    tool
+        The physical tool which provoked this touch.
+    last_x, last_y, last_touch_major, last_touch_minor, last_tool_major,
+    last_tool_minor, last_orientation
+        Last reported values for the respective axes.
+
+    For more information, please see the TouchBegin/TouchEnd section.
+
+
     ┌───
         XISelectEvents
             window:         Window
@@ -792,9 +908,9 @@ are required to be 0.
     └───
 
     This request actively grabs control of the specified input device. Further
-    input events from this device are reported only to the grabbing client.
-    This request overides any previous active grab by this client for this
-    device.
+    input events (other than touch events) from this device are reported only to
+    the grabbing client.  This request overides any previous active grab by this
+    client for this device.
 
     deviceid
         The device to grab.
@@ -892,7 +1008,10 @@ are required to be 0.
             time:            TIMESTAMP or CurrentTime
             event_mode:      { AsyncDevice, SyncDevice,
                                AsyncPairedDevice, SyncPairedDevice,
-                               ReplayDevice, AsyncPair, SyncPair }
+                               ReplayDevice, AsyncPair, SyncPair,
+                               AcceptTouch*, ReplayTouch* }
+            detail*:         CARD32
+        * since XI 2.1
     └───
 
     The XIAllowEvents request releases some queued events if the client
@@ -905,6 +1024,9 @@ are required to be 0.
     event_mode
         Specifies whether a device is to be thawed and events are to be
         replayed.
+    detail
+        If applicable, provides an additional detail to match; interpretation
+        depends on the event_mode.
 
     The request has no effect if the specified time is earlier than the
     last-grab time of the most recent active grab for the client, or if the
@@ -978,6 +1100,18 @@ are required to be 0.
         thaws for both. AsyncPair has no effect unless both the device and the
         paired master device frozen by the client.
         AsyncPair has no effect if deviceid specifies a slave device.
+     AcceptTouch
+        If the touchid specified by detail is frozen by the client, the touch
+        is thawed and its event delivery continues to that client.  AcceptTouch
+        has no effect if the specified touch is not frozen by the client.
+     ReplayTouch
+        If the touchid specified by detail is frozen by the client, the touch
+        stream for that touchid is thawed, the grab is released and that event
+        is completely reprocessed.  This time, however, the request ignores any
+        passive grabs at or above (towards the root) the grab-window of the
+        grab just released.
+        The request has no effect if the specified touch is not grabbed by
+        the client or if it is not frozen as the result of an event.
 
     ┌───
         XIPassiveGrabDevice
@@ -999,12 +1133,14 @@ are required to be 0.
     └───
 
         GRABTYPE         { GrabtypeButton, GrabtypeKeycode, GrabtypeEnter,
-                           GrabtypeFocusIn}
+                           GrabtypeFocusIn, GrabtypeTouchBegin* }
 
         GRABMODIFIERINFO {   status:    Access
                              modifiers: CARD32 }
 
-        Establish an explicit passive grab for a button or keycode
+        *: since XI 2.1
+
+        Establish an explicit passive grab for a button, keycode, or touch event
         on the specified input device.
 
         cursor
@@ -1015,7 +1151,8 @@ are required to be 0.
             AllMasterDevices.
         detail
             The button number, or key symbol to grab for.
-            Must be 0 for GrabtypeEnter and GrabtypeFocusIn.
+            Must be 0 for GrabtypeEnter and GrabtypeFocusIn.  For
+            GrabTypeTouchBegin, this is taken to match the tool ID if non-zero.
         grab_type
             The type of grab to establish.
         grab_window
@@ -1087,6 +1224,17 @@ are required to be 0.
         - a passive grab of the same grab_type + modifier combination does not
           does not exist on an ancestor of grab_window.
 
+        Or if grab_type is GrabTypeTouchBegin, a stream of touch events
+        (TouchBegin, all subsequent TouchMotion events, and TouchEnd) is
+        grabbed for exclusive delivery to that client if:
+        - the specified modifier keys are down, and
+        - if detail is non-zero, tool matches the detail, and
+        - the touch's focus (which may be either from the touch co-ordinates
+          themselves, or from the device's sprite) is currently within
+          grab_window or a descendant of grab_window, and
+        - a passive grab of the same grab_type + detail + modifier combination
+          does not exist on an ancestor of grab_window.
+
         A modifier of GrabAnyModifier is equivalent to issuing the request for
         all possible modifier combinations (including no modifiers). A client
         may request a grab for GrabAnyModifier and explicit modifier
@@ -1097,6 +1245,8 @@ are required to be 0.
         A GrabtypeEnter or GrabtypeFocusIn grab is released when the
         pointer or focus leaves the window and all of its descendants,
         independent of the state of modifier keys.
+        A GrabtypeTouchBegin grab is released when the touch is ended, as
+        signified by a TouchEnd event.
         Note that the logical state of a device (as seen by means of the
         protocol) may lag the physical state if device event processing is
         frozen.
@@ -1109,7 +1259,7 @@ are required to be 0.
         with the same button or keycode and modifier combination, the
         failed modifier combinations is returned in modifiers_return. If some
         other client already has issued an XIPassiveGrabDevice request of
-        grab_type  XIGrabtypeEnter or XIGrabtypeFocusIn with the same
+        grab_type XIGrabtypeEnter or XIGrabtypeFocusIn with the same
         grab_window and the same modifier combination, the failed modifier
         combinations are returned in modifiers_return. If num_modifiers_return
         is zero, all passive grabs have been successful.
@@ -1133,6 +1283,12 @@ are required to be 0.
         XIPassiveUngrabNotify are generated and sent to the grabbing client
         before the grab deactivates.
 
+        If a touch grab activates, the TouchBegin event is first sent to that
+        client.  If the grab_mode is Synchronous, that touch stream will freeze,
+        but all other device events will be completely unaffected.  Clients
+        with synchronous grabs may use AllowEvents to either unfreeze the touch
+        stream, or replay it to another client.
+
     ┌───
         XIPassiveUngrabDevice
             deviceid:        DEVICEID
@@ -1148,7 +1304,7 @@ are required to be 0.
         deviceid
             The device to establish the passive grab on.
         detail
-            The button number or key symbol to ungrab.
+            The button number, key symbol, or tool ID to ungrab.
             Must be 0 for GrabtypeEnter and GrabtypeFocusIn.
         grab_type
             The type of grab to establish.
@@ -1160,7 +1316,7 @@ are required to be 0.
             Number of elements in modifiers.
 
         This request has no effect if the client does not have a passive grab
-        of the same type, same button or keycode (if applicable) and modifier
+        of the same type, same button/keycode/tool (if applicable) and modifier
         combination on the grab_window.
 
     ┌───
@@ -1338,6 +1494,10 @@ Version 2.0:
         FocusIn
         FocusOut
         PropertyEvent
+Version 2.1:
+        TouchBegin
+        TouchEnd
+        TouchMotion
 
 All events have a set of common fields specified as EVENTHEADER.
 
@@ -1673,5 +1833,113 @@ EVENTHEADER { type:                       BYTE
     what
         Specifies what has been changed.
      
+    ┌───
+        TouchBegin or TouchEnd
+            EVENTHEADER
+            sourceid:           DEVICEID
+            root:               Window
+            event:              Window
+            child:              Window
+            touchid:            CARD32
+            tool:               CARD32
+    └───
+
+    TouchBegin and TouchEnd events are sent whenever a tool or finger comes
+    into or out of physical proximity from a touch device, either beginning
+    or ending a touch sequence, respectively.
+
+    Once a TouchBegin event has been sent to a client (and that delivery did
+    not cause the touch stream to freeze -- see XIPassiveGrabDevice), all
+    subsequent events generated by that touch will be sent to that client,
+    even if it crosses window or screen boundaries.  This is similar to the
+    implicit passive grab provoked by a ButtonPress event.  If a TouchBegin
+    event is not delivered to any client, the subsequent TouchMotion and
+    TouchEnd events will be discarded.
+
+    Once a TouchEnd event has been sent, the touchpoint no longer exists and
+    cannot be used or referred to.  Note, however, that the touch ID may
+    subsequently be reused.
+
+    Capabilities for this touchpoint are given in the source device's
+    TouchClass (see XIQueryDevice).
+
+    sourceid
+        The physical device that provoked this event.
+    root
+        The root window of the window this event was delivered to.
+    event
+        The window this event was delivered to.
+    child
+        The window the event was generated in.
+    touchid
+        A unique identifier describing this touch; may be reused after
+        a TouchEnd event has been sent.  Has no meaning in and of itself;
+        see 'tool'.
+    tool
+        An Atom describing the physical entity provoking this touch
+        (e.g. pen, eraser, finger 3); the meaning is implementation-defined.
+
+
+    ┌───
+        TouchMotion
+            EVENTHEADER
+            sourceid:           DEVICEID
+            mask:               CARD16
+            root:               Window
+            event:              Window
+            child:              Window
+            touchid:            CARD32
+            root_x:             FP1616
+            root_y:             FP1616
+            event_y:            FP1616
+            event_y:            FP1616
+            x:                  FP3232
+            y:                  FP3232
+            touch_width_major:  FP3232
+            touch_width_minor:  FP3232
+            touch_width_major:  FP3232
+            touch_width_minor:  FP3232
+            orientation:        CARD16
+            flags:              CARD16
+    └───
+
+    TouchMotion events are sent whenever a touchpoint moves, in between
+    TouchBegin and TouchEnd events for the specified touchid.
+
+    sourceid
+        The physical device that provoked this event.
+    mask
+        A bitmask of the fields present in this event.  Fields which are not
+        marked as present must be ignored.
+        bit 0 (XITouchXMask): x, root_x, event_x
+        bit 1 (XITouchYMask): y, root_y, event_y
+        bit 2 (XITouchTouchWidthMask): touch_width_major, touch_width_minor
+        bit 3 (XITouchToolWidthMask): tool_width_major, tool_width_minor
+        bit 4 (XITouchOrientationMask): orientation
+    root
+        The root window of the window this event was delivered to.
+    event
+        The window this event was delivered to.
+    child
+        The window the event was generated in.
+    touchid
+        A unique identifier describing this touch.
+    root_x, root_y
+        Origin of this touchpoint in screen co-ordinate space.
+    event_x, event_y
+        Origin of this touchpoint in screen co-ordinate space.
+    x, y
+        Untranslated co-ordinates for this touchpoint.
+    touch_width_major, touch_width_minor
+        Size of the physical contact area along axes of an ellipse.
+    tool_width_major, tool_width_minor
+        Size of the proximate tool along axes of an ellipse.
+    orientation
+        Orientation in degrees (0-360°) of the contact area
+        relative to the y axis.
+    flags
+        Bitmask of miscellaneous information about this event; no members
+        currently defined.
+
 
                               ❧❧❧❧❧❧❧❧❧❧❧
diff --git a/configure.ac b/configure.ac
index 7466dc3..7f3c1a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.60])
-AC_INIT([InputProto], [2.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AC_INIT([InputProto], [2.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
-- 
1.7.1



More information about the xorg-devel mailing list