summaryrefslogtreecommitdiff
path: root/XInput.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-01-10 14:53:01 +1030
committerPeter Hutterer <whot@hyena.localdomain>2007-01-10 14:53:01 +1030
commitb50c4424020d1b2b641ce15ee3ffea41a287a160 (patch)
treec53a03d6f56de3ee1f06f80d387f992cf3a5f6b3 /XInput.h
parent3b84ea85ace4dc9fe1caf7d7c45c0c51ee35b4b2 (diff)
add deviceEnterNotify event, DeviceEnterNotify, DeviceLeaveNotify support
add MPX Major/Minor version numbers
Diffstat (limited to 'XInput.h')
-rw-r--r--XInput.h34
1 files changed, 34 insertions, 0 deletions
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