XI2: Split up raw events into multiple event types.
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 13 Jul 2009 05:30:50 +0000 (15:30 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 13 Jul 2009 06:04:41 +0000 (16:04 +1000)
Instead of a single XI_RawEvent type with subtypes to represent the actual
event, split up the event into XI_RawButtonPress, XI_RawButtonRelease, etc.
This way clients can select for specific raw events only instead of all of
them at once.

Note that raw events may be selected on master devices too, the server will
route them through master devices.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
XI2.h
XI2proto.txt

diff --git a/XI2.h b/XI2.h
index 6323204..2ed65f9 100644 (file)
--- a/XI2.h
+++ b/XI2.h
 #define XI_FocusIn                       9
 #define XI_FocusOut                      10
 #define XI_HierarchyChanged              11
-#define XI_RawEvent                      12
-#define XI_PropertyEvent                 13
-#define XI_LASTEVENT                     XI_PropertyEvent
+#define XI_PropertyEvent                 12
+#define XI_RawKeyPress                   13
+#define XI_RawKeyRelease                 14
+#define XI_RawButtonPress                15
+#define XI_RawButtonRelease              16
+#define XI_RawMotion                     17
+#define XI_LASTEVENT                     XI_RawMotion
 /* 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. */
 #define XI_FocusInMask                   (1 << XI_FocusIn)
 #define XI_FocusOutMask                  (1 << XI_FocusOut)
 #define XI_HierarchyChangedMask          (1 << XI_HierarchyChanged)
-#define XI_RawEventMask                  (1 << XI_RawEvent)
 #define XI_PropertyEventMask             (1 << XI_PropertyEvent)
+#define XI_RawKeyPressMask               (1 << XI_RawKeyPress)
+#define XI_RawKeyReleaseMask             (1 << XI_RawKeyRelease)
+#define XI_RawButtonPressMask            (1 << XI_RawButtonPress)
+#define XI_RawButtonReleaseMask          (1 << XI_RawButtonRelease)
+#define XI_RawMotionMask                 (1 << XI_RawMotion)
 
 #endif /* _XI2_H_ */
index a776849..12926c5 100644 (file)
@@ -1462,7 +1462,6 @@ EVENTHEADER { type:                       BYTE
     ┌───
         RawEvent
             EVENTHEADER
-            eventtype:                 RAWTYPE
             detail:                    CARD32
             valuators_len:             CARD16
             valuators:                 SETofVALUATORMASK
@@ -1470,13 +1469,10 @@ EVENTHEADER { type:                       BYTE
             axisvalues_raw:            LISTofFP3232
     └───
 
-    RAWTYPE { Motion, KeyPress, KeyRelease, ButtonPress, ButtonRelease }
-
     A RawDevice event provides the information provided by the driver to the
-    client. RawDevice events are only generated for slave devices and provide
-    both the raw data as supplied by the driver and transformed data as used
-    in the server. Transformations include, but are not limited to, axis
-    clipping and acceleration.
+    client. RawDevice provide both the raw data as supplied by the driver and
+    transformed data as used in the server. Transformations include, but are
+    not limited to, axis clipping and acceleration.
     Transformed valuator data may be equivalent to raw data. In this case,
     both raw and transformed valuator data is provided.
     RawEvents are sent exclusively to all root windows or to the client