summaryrefslogtreecommitdiff
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
parent3b84ea85ace4dc9fe1caf7d7c45c0c51ee35b4b2 (diff)
add deviceEnterNotify event, DeviceEnterNotify, DeviceLeaveNotify support
add MPX Major/Minor version numbers
-rw-r--r--Changelog10
-rw-r--r--XI.h6
-rw-r--r--XInput.h34
-rw-r--r--XIproto.h32
4 files changed, 71 insertions, 11 deletions
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