From: Peter Hutterer Date: Wed, 10 Jan 2007 04:23:01 +0000 (+1030) Subject: add deviceEnterNotify event, DeviceEnterNotify, DeviceLeaveNotify support X-Git-Tag: inputproto-1.9.99.1~45 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b50c4424020d1b2b641ce15ee3ffea41a287a160;p=platform%2Fupstream%2Finputproto.git add deviceEnterNotify event, DeviceEnterNotify, DeviceLeaveNotify support add MPX Major/Minor version numbers --- diff --git a/Changelog b/Changelog deleted file mode 100644 index 5dcf225..0000000 --- a/Changelog +++ /dev/null @@ -1,10 +0,0 @@ -MPX changelog - -== 08.01.07 == - add ChangeDeviceCursor request - -== 20.12.06 == - add QueryDevicePointer request + reply - add WarpDevicePointer request - - diff --git a/XI.h b/XI.h index 6573310..3335c7d 100644 --- a/XI.h +++ b/XI.h @@ -161,6 +161,9 @@ SOFTWARE. #define XI_Add_DevicePresenceNotify_Major 1 #define XI_Add_DevicePresenceNotify_Minor 4 +#define XI_Add_MPX_Major 1 +#define XI_Add_MPX_Minor 5 + #define DEVICE_RESOLUTION 1 #define DEVICE_ABS_CALIB 2 #define DEVICE_CORE 3 @@ -254,6 +257,9 @@ SOFTWARE. #define _devicePresence 0 +#define _deviceEnter 0 +#define _deviceLeave 1 + #define XI_BadDevice 0 #define XI_BadEvent 1 #define XI_BadMode 2 diff --git a/XInput.h b/XInput.h index e5239ff..16c5a45 100644 --- a/XInput.h +++ b/XInput.h @@ -72,6 +72,9 @@ SOFTWARE. #define _deviceStateNotify 0 #define _deviceMappingNotify 1 #define _changeDeviceNotify 2 +/* Space of 4 between is necessary! */ +#define _deviceEnterNotify 6 +#define _deviceLeaveNotify 7 #define FindTypeAndClass(d,type,_class,classid,offset) \ { int _i; XInputClassInfo *_ip; \ @@ -156,6 +159,12 @@ SOFTWARE. _class = (0x10000 | _devicePresence); \ } +#define DeviceEnterNotify(d, type, _class) \ + FindTypeAndClass(d, type, _class, OtherClass, _deviceEnterNotify); + +#define DeviceLeaveNotify(d, type, _class) \ + FindTypeAndClass(d, type, _class, OtherClass, _deviceLeaveNotify); + #define BadDevice(dpy,error) _xibaddevice(dpy, &error) #define BadClass(dpy,error) _xibadclass(dpy, &error) @@ -448,6 +457,31 @@ typedef struct { XID control; } XDevicePresenceNotifyEvent; + +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; /* "event" window reported relative to */ + Window root; /* root window that the event occurred on */ + Window subwindow; /* child window */ + XID deviceid; + Time time; /* milliseconds */ + int x, y; /* pointer x, y coordinates in event window */ + int x_root, y_root; /* coordinates relative to root */ + int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */ + int detail; + /* + * NotifyAncestor, NotifyVirtual, NotifyInferior, + * NotifyNonlinear,NotifyNonlinearVirtual + */ + unsigned int state; /* key or button mask */ +} XDeviceCrossingEvent; + +typedef XDeviceCrossingEvent XDeviceLeaveWindowEvent; +typedef XDeviceCrossingEvent XDeviceEnterWindowEvent; + /******************************************************************* * * Control structures for input devices that support input class diff --git a/XIproto.h b/XIproto.h index 541e9a2..89f171a 100644 --- a/XIproto.h +++ b/XIproto.h @@ -72,7 +72,7 @@ SOFTWARE. #define numInputClasses 7 -#define IEVENTS 16 +#define IEVENTS 18 #define IERRORS 5 #define CLIENT_REQ 1 @@ -114,6 +114,8 @@ struct tmask #define XI_DeviceKeystateNotify 13 #define XI_DeviceButtonstateNotify 14 #define XI_DevicePresenceNotify 15 +#define XI_DeviceEnterNotify 16 +#define XI_DeviceLeaveNotify 17 /********************************************************* * @@ -1690,6 +1692,34 @@ typedef struct } devicePresenceNotify; +/********************************************************** + * + * deviceEnterNotify. + * + */ + +typedef struct + { + BYTE type; + BYTE pad00; + CARD16 sequenceNumber B16; + Time time B32; + Window root B32; + Window event B32; + Window child B32; + INT16 rootX B16; + INT16 rootY B16; + INT16 eventX B16; + INT16 eventY B16; + KeyButMask state B16; + BYTE mode; + /* flags are missing */ + CARD8 deviceid; + } deviceEnterNotify; + +typedef deviceEnterNotify deviceLeaveNotify; + + #undef Window #undef Time #undef KeyCode