aboutsummaryrefslogtreecommitdiff
path: root/X11
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-06 08:50:17 +0200
committermarha <marha@users.sourceforge.net>2011-10-06 08:50:17 +0200
commit543c5ecf97b067fe5e0824f996c227e30ee693b0 (patch)
tree7207e6216bd20423b473153e10d1975ca17700fd /X11
parenta411d3abb8352c0f65fd4f045d825c0b023dadf4 (diff)
parentb520df571e0a319eae5231d09f36b98f28b8914a (diff)
downloadvcxsrv-543c5ecf97b067fe5e0824f996c227e30ee693b0.tar.gz
vcxsrv-543c5ecf97b067fe5e0824f996c227e30ee693b0.tar.bz2
vcxsrv-543c5ecf97b067fe5e0824f996c227e30ee693b0.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'X11')
-rw-r--r--X11/extensions/XI.h11
-rw-r--r--X11/extensions/XI2.h82
-rw-r--r--X11/extensions/XI2proto.h59
3 files changed, 129 insertions, 23 deletions
diff --git a/X11/extensions/XI.h b/X11/extensions/XI.h
index 7b443997c..378b34a16 100644
--- a/X11/extensions/XI.h
+++ b/X11/extensions/XI.h
@@ -135,17 +135,6 @@ SOFTWARE.
#define XI_FOOTMOUSE "FOOTMOUSE"
#define XI_JOYSTICK "JOYSTICK"
-/* Indices into the versions[] array (XExtInt.c). Used as a index to
- * retrieve the minimum version of XI from _XiCheckExtInit */
-#define Dont_Check 0
-#define XInput_Initial_Release 1
-#define XInput_Add_XDeviceBell 2
-#define XInput_Add_XSetDeviceValuators 3
-#define XInput_Add_XChangeDeviceControl 4
-#define XInput_Add_DevicePresenceNotify 5
-#define XInput_Add_DeviceProperties 6
-/* DO NOT ADD TO HERE -> XI2 */
-
#define XI_Absent 0
#define XI_Present 1
diff --git a/X11/extensions/XI2.h b/X11/extensions/XI2.h
index 3c39946f5..2514d5529 100644
--- a/X11/extensions/XI2.h
+++ b/X11/extensions/XI2.h
@@ -25,23 +25,36 @@
#ifndef _XI2_H_
#define _XI2_H_
-/* Indices into the versions[] array (XExtInt.c). Used as a index to
- * retrieve the minimum version of XI from _XiCheckExtInit.
- * For indices 0 to 6 see XI.h */
-#ifndef Dont_Check /* defined in XI.h */
-#define Dont_Check 0
+#warning "XI 2.1 is not stable yet."
+#warning "Applications relying on this header will break as the protocol sees updates."
+#ifndef XINPUT2_1_USE_UNSTABLE_PROTOCOL
+#error "Define XINPUT2_1_USE_UNSTABLE_PROTOCOL to disable this error"
+#endif
+#warning "XI 2.2 is not stable yet."
+#warning "Applications relying on this header will break as the protocol sees updates."
+#ifndef XINPUT2_2_USE_UNSTABLE_PROTOCOL
+#error "Define XINPUT2_2_USE_UNSTABLE_PROTOCOL to disable this error"
#endif
#define XInput_2_0 7
-
+/* DO NOT ADD TO THIS LIST. These are libXi-specific defines.
+ See commit libXi-1.4.2-21-ge8531dd */
#define XI_2_Major 2
-#define XI_2_Minor 0
+#define XI_2_Minor 2
/* Property event flags */
#define XIPropertyDeleted 0
#define XIPropertyCreated 1
#define XIPropertyModified 2
+/* Property modes */
+#define XIPropModeReplace 0
+#define XIPropModePrepend 1
+#define XIPropModeAppend 2
+
+/* Special property type used for XIGetProperty */
+#define XIAnyPropertyType 0L
+
/* Enter/Leave and Focus In/Out modes */
#define XINotifyNormal 0
#define XINotifyGrab 1
@@ -60,11 +73,28 @@
#define XINotifyPointerRoot 6
#define XINotifyDetailNone 7
+/* Grab modes */
+#define XIGrabModeSync 0
+#define XIGrabModeAsync 1
+#define XIGrabModeTouch 2
+
+/* Grab reply status codes */
+#define XIGrabSuccess 0
+#define XIAlreadyGrabbed 1
+#define XIGrabInvalidTime 2
+#define XIGrabNotViewable 3
+#define XIGrabFrozen 4
+
+/* Grab owner events values */
+#define XIOwnerEvents True
+#define XINoOwnerEvents False
+
/* Passive grab types */
#define XIGrabtypeButton 0
#define XIGrabtypeKeycode 1
#define XIGrabtypeEnter 2
#define XIGrabtypeFocusIn 3
+#define XIGrabtypeTouchBegin 4
/* Passive grab modifier */
#define XIAnyModifier (1U << 31)
@@ -78,6 +108,8 @@
#define XIAsyncPairedDevice 3
#define XIAsyncPair 4
#define XISyncPair 5
+#define XIAcceptTouch 6
+#define XIRejectTouch 7
/* DeviceChangedEvent change reasons */
#define XISlaveSwitch 1
@@ -113,15 +145,33 @@
#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 XIScrollClass 3
+#define XITouchClass 8
+
+/* Scroll class types */
+#define XIScrollTypeVertical 1
+#define XIScrollTypeHorizontal 2
+
+/* Scroll class flags */
+#define XIScrollFlagNoEmulation (1 << 0)
+#define XIScrollFlagPreferred (1 << 1)
/* Device event flags (common) */
/* Device event flags (key events only) */
#define XIKeyRepeat (1 << 16)
/* Device event flags (pointer events only) */
+#define XIPointerEmulated (1 << 16)
+/* Device event flags (touch events only) */
+#define XITouchPendingEnd (1 << 16)
+
+/* Touch modes */
+#define XIDirectTouch 1
+#define XIDependentTouch 2
/* XI2 event mask macros */
#define XISetMask(ptr, event) (((unsigned char*)(ptr))[(event)>>3] |= (1 << ((event) & 7)))
@@ -151,7 +201,14 @@
#define XI_RawButtonPress 15
#define XI_RawButtonRelease 16
#define XI_RawMotion 17
-#define XI_LASTEVENT XI_RawMotion
+#define XI_TouchBegin 18 /* XI 2.1 */
+#define XI_TouchEnd 19
+#define XI_TouchOwnership 20
+#define XI_TouchUpdate 21
+#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. */
@@ -177,5 +234,12 @@
#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_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/X11/extensions/XI2proto.h b/X11/extensions/XI2proto.h
index e16b8af8c..9b867d803 100644
--- a/X11/extensions/XI2proto.h
+++ b/X11/extensions/XI2proto.h
@@ -193,6 +193,32 @@ typedef struct {
uint16_t pad2;
} xXIValuatorInfo;
+/***
+ * Denotes a scroll valuator on a device.
+ * One XIScrollInfo describes exactly one scroll valuator that must have a
+ * XIValuatorInfo struct.
+ */
+typedef struct {
+ uint16_t type; /**< Always ValuatorClass */
+ uint16_t length; /**< Length in 4 byte units */
+ uint16_t sourceid; /**< source device for this class */
+ uint16_t number; /**< Valuator number */
+ uint16_t scroll_type; /**< ::XIScrollTypeVertical, ::XIScrollTypeHorizontal */
+ uint16_t pad0;
+ uint32_t flags; /**< ::XIScrollFlagEmulate, ::XIScrollFlagPreferred */
+ FP3232 increment; /**< Increment for one unit of scrolling */
+} xXIScrollInfo;
+
+/**
+ * Denotes multitouch capability on a device.
+ */
+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; /**< DirectTouch or DependentTouch */
+ uint8_t num_touches; /**< Maximum number of touches (0==unlimited) */
+} xXITouchInfo;
/**
* Used to select for events on a given window.
@@ -626,8 +652,10 @@ typedef struct {
uint16_t deviceid;
uint8_t mode;
uint8_t pad;
+ uint32_t touch_id; /**< Since XI 2.2 */
+ Window grab_window; /**< Since XI 2.2 */
} xXIAllowEventsReq;
-#define sz_xXIAllowEventsReq 12
+#define sz_xXIAllowEventsReq 20 /**< Was 12 before XI 2.2 */
/**
@@ -862,7 +890,31 @@ typedef struct
} xXIDeviceChangedEvent;
/**
- * Default input event for pointer or keyboard input.
+ * The owner of a touch stream has passed on ownership to another client.
+ */
+typedef struct
+{
+ uint8_t type; /**< Always GenericEvent */
+ uint8_t extension; /**< XI extension offset */
+ uint16_t sequenceNumber;
+ uint32_t length; /**< Length in 4 byte units */
+ uint16_t evtype; /**< XI_TouchOwnership */
+ uint16_t deviceid; /**< Device that has changed */
+ Time time;
+ uint32_t touchid;
+ Window root;
+ Window event;
+ Window child;
+/* └──────── 32 byte boundary ────────┘ */
+ uint16_t sourceid; /**< Source of the new classes */
+ uint16_t pad0;
+ uint32_t flags;
+ uint32_t pad1;
+ uint32_t pad2;
+} xXITouchOwnershipEvent;
+
+/**
+ * Default input event for pointer, keyboard or touch input.
*/
typedef struct
{
@@ -889,6 +941,7 @@ typedef struct
uint32_t flags; /**< ::XIKeyRepeat */
xXIModifierInfo mods;
xXIGroupInfo group;
+ uint32_t active_touches; /**< Number of touches on source device (XI 2.1 only) */
} xXIDeviceEvent;
@@ -907,7 +960,7 @@ typedef struct
uint16_t deviceid;
Time time;
uint32_t detail;
- uint16_t pad0;
+ uint16_t sourceid; /**< The source device (XI 2.1) */
uint16_t valuators_len; /**< Length of trailing valuator
mask in 4 byte units */
uint32_t flags; /**< ::XIKeyRepeat */