diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-11-08 17:26:35 +1030 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-11-08 17:30:20 +1030 |
commit | 685a2dd32736956f5175afb9bc5773c829725fea (patch) | |
tree | e41b91bd5b051ea43831cbdffb1282ab50889d92 | |
parent | 6037b37a5bf03f0b38db6a83fe1bc48551b8363c (diff) |
Add DeviceHierarchyChangedEvent.
Uses same event type as the now removed PointerKeyboardPairingChangedNotify.
(removing the RandomStringEvent too, should have been gone a while ago)
-rw-r--r-- | XI.h | 5 | ||||
-rw-r--r-- | XInput.h | 28 | ||||
-rw-r--r-- | XIproto.h | 49 |
3 files changed, 30 insertions, 52 deletions
@@ -318,9 +318,8 @@ SOFTWARE. #define XI_BadClass 4 /* GE masks */ -#define XI_PointerKeyboardPairingChangedMask (1 << 0) -#define XI_RandomStringMask (1 << 1) -#define XI_RawDeviceEventMask (1 << 2) +#define XI_DeviceHierarchyChangedMask (1 << 0) +#define XI_RawDeviceEventMask (1 << 2) /* Make XEventClass be a CARD32 for 64 bit servers. Don't affect client @@ -496,10 +496,8 @@ 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. + * Notifies the client that the device hierarchy has been changed. The client + * is expected to re-query the server for the device hierarchy. */ typedef struct { int type; /* GenericEvent */ @@ -507,27 +505,9 @@ typedef struct { Bool send_event; /* true if this came from a SendEvent request */ Display *display; /* Display the event was read from */ int extension; /* XI extension offset */ - int evtype; /* PointerKeyboardPairingCHangedNotify */ + int evtype; /* XI_DeviceHierarchyChangedNotify */ Time time; - XID pointerid; /* pointer deviceid */ - XID keyboardid; /* keyboard deviceid */ -} XPointerKeyboardPairingChangedNotifyEvent; - - -/* - * XRandomStringEvent. - * FOR TESTING ONLY. DO NOT USE. - */ - -typedef struct { - int type; /* GenericEvent */ - 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 */ - int extension; /* XI extension offset */ - int evtype; /* RandomStringEvent */ - char* string; -} XRandomStringEvent; +} XDeviceHierarchyChangedEvent; /* * RawDeviceEvent. @@ -119,8 +119,7 @@ struct tmask #define XI_DeviceLeaveNotify 17 /* GE events */ -#define XI_PointerKeyboardPairingChangedNotify 0 -#define XI_RandomStringEvent 1 +#define XI_DeviceHierarchyChangedNotify 0 #define XI_RawDeviceEvent 2 @@ -2079,29 +2078,6 @@ typedef struct } pairingChangedNotify; -/********************************************************** - * - * RandomStringEvent. - * GE event, != 32 bytes. - * - * FOR TESTING, DO NOT USE THIS. - */ - -typedef struct - { - BYTE type; /* always GenericEvent */ - BYTE extension; /* XI extension offset */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 evtype B16; /* XI_RandomStringEvent */ - CARD16 slen B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - } randomStringEvent; - /********************************************************* * RawDeviceEvent. * @@ -2131,6 +2107,29 @@ typedef struct } rawDeviceEvent; +/********************************************************* + * DeviceHierarchyChangedEvent. + * + * Intended as a notification event only, the client is expected to query the + * server for input devices after receipt of this event. + */ + +typedef struct + { + BYTE type; /* always GenericEvent */ + BYTE extension; /* XI extension offset */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 evtype B16; /* XI_DeviceHierarchyChangedNotify */ + CARD16 pad0 B16; + CARD32 time B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + } deviceHierarchyChangedEvent; + + #undef Window #undef Time #undef KeyCode |