diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-01-29 18:18:56 +1030 |
---|---|---|
committer | Peter Hutterer <whot@hyena.localdomain> | 2007-01-29 18:18:56 +1030 |
commit | 4ab02ccbdad477a0d7a0bee79c947f50826f1a36 (patch) | |
tree | 5e51191e157a92239dc63aeea7f795987b52c403 | |
parent | b50c4424020d1b2b641ce15ee3ffea41a287a160 (diff) |
add ChangePointerKeyboardPairing request
add pairingChangedNotify event
-rw-r--r-- | XI.h | 3 | ||||
-rw-r--r-- | XInput.h | 30 | ||||
-rw-r--r-- | XIproto.h | 41 |
3 files changed, 73 insertions, 1 deletions
@@ -114,6 +114,7 @@ SOFTWARE. #define sz_xQueryDevicePointerReply 32 #define sz_xWarpDevicePointerReq 28 #define sz_xChangeDeviceCursorReq 16 +#define sz_xChangePointerKeyboardPairingReq 8 #define INAME "XInputExtension" @@ -256,10 +257,12 @@ SOFTWARE. #define _noExtensionEvent 9 #define _devicePresence 0 +#define _pairingChanged 1 #define _deviceEnter 0 #define _deviceLeave 1 + #define XI_BadDevice 0 #define XI_BadEvent 1 #define XI_BadMode 2 @@ -159,6 +159,13 @@ SOFTWARE. _class = (0x10000 | _devicePresence); \ } +#define PointerKeyboardPairing(dpy, type, _class) \ + { \ + extern int _XiGetPointerKeyboardPairingNotifyEvent(Display *); \ + type = _XiGetPointerKeyboardPairingNotifyEvent(Display *); \ + _class = (0x10000 | _pairingNotify); \ + } + #define DeviceEnterNotify(d, type, _class) \ FindTypeAndClass(d, type, _class, OtherClass, _deviceEnterNotify); @@ -482,6 +489,23 @@ typedef struct { typedef XDeviceCrossingEvent XDeviceLeaveWindowEvent; typedef XDeviceCrossingEvent XDeviceEnterWindowEvent; +/* + * Notifies the client that a mouse/keyboard mapping has changed. A mouse may + * have several keyboards mapped to it, but a keyboard can only map to one + * mouse. + * Keyboard events will follow the focus of the given mouse. + */ +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* unused */ + Time time; + XID pointerid; /* pointer deviceid */ + XID keyboardid; /* keyboard deviceid */ +} XPointerKeyboardPairingChangedNotifyEvent; + /******************************************************************* * * Control structures for input devices that support input class @@ -1256,6 +1280,12 @@ extern Status XUndefineDeviceCursor( Window /* win */ ); +extern Status XChangePointerKeyboardPairing( + Display* /* display */, + XDevice* /* pointer */, + XDevice* /* keyboard*/ +); + _XFUNCPROTOEND @@ -72,7 +72,7 @@ SOFTWARE. #define numInputClasses 7 -#define IEVENTS 18 +#define IEVENTS 19 #define IERRORS 5 #define CLIENT_REQ 1 @@ -116,6 +116,7 @@ struct tmask #define XI_DevicePresenceNotify 15 #define XI_DeviceEnterNotify 16 #define XI_DeviceLeaveNotify 17 +#define XI_PointerKeyboardPairingChangedNotify 18 /********************************************************* * @@ -161,6 +162,7 @@ struct tmask #define X_QueryDevicePointer 36 #define X_WarpDevicePointer 37 #define X_ChangeDeviceCursor 38 +#define X_ChangePointerKeyboardPairing 39 /********************************************************* * @@ -1493,6 +1495,20 @@ typedef struct { CARD16 pad1; } xChangeDeviceCursorReq; +/********************************************************** + * + * ChangePointerKeyboardPairing. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_ChangePointerKeyboardPairing */ + CARD16 length B16; + CARD8 pointer; /* ID of pointer devices */ + CARD8 keyboard; /* ID of keyboard device */ + CARD16 pad0; +} xChangePointerKeyboardPairingReq; /********************************************************** * @@ -1719,6 +1735,29 @@ typedef struct typedef deviceEnterNotify deviceLeaveNotify; +/********************************************************** + * + * pairingChangedNotify. + * + */ + +typedef struct + { + BYTE type; + BYTE pad00; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 pointer; + CARD8 keyboard; + CARD16 pad0; + CARD32 pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; + } pairingChangedNotify; + #undef Window #undef Time |