diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-05-14 18:03:53 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-05-14 18:03:53 +0930 |
commit | 42a6b9b643d22ca8df64757cf497d2c7ac2dee65 (patch) | |
tree | 75317a9528f166cbfbe6bbe8f34fe60d3125a3d1 | |
parent | ccbe2e63123c58041a3c32ae6a21b05bd8c72b04 (diff) |
Add ExtendedGrabRequest and the matching reply.
-rw-r--r-- | XI.h | 3 | ||||
-rw-r--r-- | XInput.h | 19 | ||||
-rw-r--r-- | XIproto.h | 41 |
3 files changed, 63 insertions, 0 deletions
@@ -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" @@ -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_ */ @@ -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; + /********************************************************** * |