#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; \
_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)
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
#define numInputClasses 7
-#define IEVENTS 16
+#define IEVENTS 18
#define IERRORS 5
#define CLIENT_REQ 1
#define XI_DeviceKeystateNotify 13
#define XI_DeviceButtonstateNotify 14
#define XI_DevicePresenceNotify 15
+#define XI_DeviceEnterNotify 16
+#define XI_DeviceLeaveNotify 17
/*********************************************************
*
} 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