add GetPairedPointer request and reply.
move declaration of _XiGetDevicePresenceNotifyEvent out of the macro and wrap
it between extern "C". Otherwise C++ code won't be able to find it.
/* Definitions used by the server, library and client */
#ifndef _XI_H_
-
#define _XI_H_
#define sz_xGetExtensionVersionReq 8
#define sz_xQueryWindowAccessReq 8
#define sz_xQueryWindowAccessReply 32
#define sz_xSetClientPointerReq 12
+#define sz_xGetClientPointerReq 8
+#define sz_xGetClientPointerReply 32
+#define sz_xGetPairedPointerReq 8
+#define sz_xGetPairedPointerReply 32
#define INAME "XInputExtension"
#define NoExtensionEvent(d,type,_class) \
{ _class = ((XDevice *) d)->device_id << 8 | _noExtensionEvent;}
+
+/* We need the declaration for DevicePresence. */
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+ extern int _XiGetDevicePresenceNotifyEvent(Display *);
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
#define DevicePresence(dpy, type, _class) \
{ \
- extern int _XiGetDevicePresenceNotifyEvent(Display *); \
type = _XiGetDevicePresenceNotifyEvent(dpy); \
_class = (0x10000 | _devicePresence); \
}
XDevice* /* keyboard*/
);
+extern Bool XGetPairedPointer(
+ Display* /* display */,
+ XDevice* /* keyboard */,
+ int* /* deviceid */
+);
+
extern Bool XRegisterPairingClient(
Display* /* display */
);
char /* deviceid */
);
+extern Bool XGetClientPointer(
+ Display* /* dpy */,
+ Window /* win */,
+ int* /* deviceid */
+);
+
_XFUNCPROTOEND
#define X_ChangeWindowAccess 42
#define X_QueryWindowAccess 43
#define X_SetClientPointer 44
+#define X_GetClientPointer 45
+#define X_GetPairedPointer 46
/*********************************************************
*
/**********************************************************
*
+ * GetClientPointer.
+ *
+ */
+typedef struct {
+ CARD8 reqType;
+ CARD8 ReqType; /* Always X_GetClientPointer */
+ CARD16 length B16;
+ Window win B32;
+} xGetClientPointerReq;
+
+typedef struct {
+ CARD8 repType; /* input extension major opcode */
+ CARD8 RepType; /* Always X_GetClientPointer */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ BOOL set; /* client pointer is set */
+ CARD8 deviceid;
+ CARD16 pad0 B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xGetClientPointerReply;
+
+/**********************************************************
+ *
+ * GetPairedPointer.
+ *
+ */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 ReqType; /* Always X_GetPairedPointer */
+ CARD16 length B16;
+ CARD8 deviceid;
+ CARD8 pad0;
+ CARD16 pad1 B16;
+} xGetPairedPointerReq;
+
+typedef struct {
+ CARD8 repType; /* input extension major opcode */
+ CARD8 RepType; /* Always X_GetClientPointer */
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ BOOL paired; /* keyboard is paired */
+ CARD8 deviceid;
+ CARD16 pad0 B16;
+ CARD32 pad1 B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xGetPairedPointerReply;
+
+/**********************************************************
+ *
* Input extension events.
*
* DeviceValuator