summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-05-14 18:03:53 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-05-14 18:03:53 +0930
commit42a6b9b643d22ca8df64757cf497d2c7ac2dee65 (patch)
tree75317a9528f166cbfbe6bbe8f34fe60d3125a3d1
parentccbe2e63123c58041a3c32ae6a21b05bd8c72b04 (diff)
Add ExtendedGrabRequest and the matching reply.
-rw-r--r--XI.h3
-rw-r--r--XInput.h19
-rw-r--r--XIproto.h41
3 files changed, 63 insertions, 0 deletions
diff --git a/XI.h b/XI.h
index 179b9a2..921ea8d 100644
--- a/XI.h
+++ b/XI.h
@@ -51,6 +51,7 @@ SOFTWARE.
#ifndef _XI_H_
#define _XI_H_
+#include <X11/Xmd.h>
#define sz_xGetExtensionVersionReq 8
#define sz_xGetExtensionVersionReply 32
@@ -128,6 +129,8 @@ SOFTWARE.
#define sz_xGetPairedPointerReply 32
#define sz_xXiSelectEventReq 12
#define sz_xFakeDeviceDataReq 12
+#define sz_xExtendedGrabDeviceReq 28
+#define sz_xExtendedGrabDeviceReply 32
#define INAME "XInputExtension"
diff --git a/XInput.h b/XInput.h
index 65d95d5..baeab9b 100644
--- a/XInput.h
+++ b/XInput.h
@@ -54,6 +54,7 @@ SOFTWARE.
#include <X11/Xlib.h>
#include <X11/extensions/XI.h>
+#include <X11/extensions/Xge.h>
#define _deviceKeyPress 0
#define _deviceKeyRelease 1
@@ -1426,6 +1427,24 @@ extern Status XFakeDeviceData(
ValuatorData* /* valuators */
);
+extern Status XExtendedGrabDevice(
+ Display* /* dpy */,
+ XDevice* /* dev */,
+ Window /* grab_win */,
+ int /* device_mode */,
+ Bool /* ownerEvents */,
+ Window /* confineTo */,
+ Cursor /* cursor */,
+ int /* event_count */,
+ XEventClass* /* event_list */,
+ int /* generic_event_count */,
+ XGenericEventMask* /* generic_events */
+);
+
+extern Status XExtendedUngrabDevice(
+ Display* /* dpy */,
+ XDevice* /* dev */);
+
_XFUNCPROTOEND
#endif /* _XINPUT_H_ */
diff --git a/XIproto.h b/XIproto.h
index b904097..962c04c 100644
--- a/XIproto.h
+++ b/XIproto.h
@@ -178,6 +178,7 @@ struct tmask
#define X_GetPairedPointer 46
#define X_XiSelectEvent 47
#define X_FakeDeviceData 48
+#define X_ExtendedGrabDevice 49
/*********************************************************
*
@@ -1748,6 +1749,46 @@ typedef struct {
} xFakeDeviceDataReq;
+/************************************************************
+ *
+ * ExtendedGrabDevice.
+ *
+ * This is a grab request to acommodate GE events.
+ * Event is followed by (event_count * XEventClass) bytes, followed by
+ * (ge_event_masks * GenericEventMask) bytes.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType; /* input extension major opcode */
+ CARD8 ReqType; /* always X_ExtendedGrabDevice */
+ CARD16 length B16;
+ CARD32 grab_window B32;
+ Time time B32;
+ CARD8 ungrab; /* True if request is Ungrab request */
+ CARD8 device_mode; /* GrabModeSync or GrabModeAsync */
+ BOOL owner_events;
+ CARD8 deviceid;
+ Window confine_to B32;
+ Cursor cursor B32;
+ CARD16 event_count B16;
+ CARD16 generic_event_count B16;
+} xExtendedGrabDeviceReq;
+
+typedef struct {
+ CARD8 repType; /* X_Reply */
+ CARD8 RepType; /* always X_ExtendedGrabDevice */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32; /* 0 */
+ CARD8 status;
+ BYTE pad1, pad2, pad3;
+ CARD32 pad01 B32;
+ CARD32 pad02 B32;
+ CARD32 pad03 B32;
+ CARD32 pad04 B32;
+ CARD32 pad05 B32;
+} xExtendedGrabDeviceReply;
+
/**********************************************************
*