summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-05-25 12:14:12 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-05-25 15:22:15 +1000
commit31f492bf9471fc593275fb95f97312db21439641 (patch)
tree91a40ee8b01d629e1bd6c9a78dddafbbf421e925
parentf065f6c12aa5c2e79f1af38908e86d20a2efdc86 (diff)
Add XIGetSelectedEvents request and reply.
Counterpart to XISelectEvents, used to retrieve event masks from the server.
-rw-r--r--XI2proto.h30
-rw-r--r--XI2proto.txt22
2 files changed, 51 insertions, 1 deletions
diff --git a/XI2proto.h b/XI2proto.h
index 8ca8f8b..331b831 100644
--- a/XI2proto.h
+++ b/XI2proto.h
@@ -98,10 +98,11 @@
#define X_XIChangeProperty 57
#define X_XIDeleteProperty 58
#define X_XIGetProperty 59
+#define X_XIGetSelectedEvents 60
/*@}*/
/** Number of XI requests */
-#define XI2REQUESTS (X_XIGetProperty - X_XIQueryPointer + 1)
+#define XI2REQUESTS (X_XIGetSelectedEvents - X_XIQueryPointer + 1)
/** Number of XI2 events */
#define XI2EVENTS (XI_LASTEVENT + 1)
@@ -326,6 +327,33 @@ typedef struct {
} xXISelectEventsReq;
#define sz_xXISelectEventsReq 12
+/**
+ * @struct xXIGetSelectedEventsReq
+ * Query for selected events on a given window.
+ */
+typedef struct {
+ uint8_t reqType; /**< Input extension major code */
+ uint8_t ReqType; /**< Always ::X_XIGetSelectedEvents */
+ uint16_t length; /**< Length in 4 byte units */
+ Window window;
+} xXIGetSelectedEventsReq;
+#define sz_xXIGetSelectedEventsReq 8
+
+typedef struct {
+ uint8_t repType; /**< Input extension major opcode */
+ uint8_t RepType; /**< Always ::X_XIGetSelectedEvents */
+ uint16_t sequenceNumber;
+ uint32_t length;
+ uint16_t num_masks; /**< Number of xXIEventMask structs
+ trailing the reply */
+ uint16_t pad0;
+ uint32_t pad1;
+ uint32_t pad2;
+ uint32_t pad3;
+ uint32_t pad4;
+ uint32_t pad5;
+} xXIGetSelectedEventsReply;
+#define sz_xXIGetSelectedEventsReply 32
/**
* @struct xXIQueryPointerReq
diff --git a/XI2proto.txt b/XI2proto.txt
index 3122387..ef6c9e5 100644
--- a/XI2proto.txt
+++ b/XI2proto.txt
@@ -368,6 +368,28 @@ XI2. Clients should ignore this data.
If 'mask_len' is 0, the event mask for the given device is cleared.
┌───
+ XIGetSelectedEvents
+ window: Window
+ ▶
+ num_masks: CARD16
+ masks: LISTofEVENTMASK
+ └───
+
+
+ window
+ The window to select the events on.
+ num_masks
+ Number of items in mask.
+ masks
+ Selected event masks by this client.
+
+ Masks are returned on a per-device basis, with masks for 'AllDevices' and
+ 'AllMasterDevices' returned separately.
+
+ If 'num_masks' is 0, no events have been selected by this client on the
+ given window.
+
+ ┌───
XIQueryPointer
window: Window
deviceid: DEVICEID