summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-10-18 12:23:34 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-10-18 12:23:34 +0930
commit52e2f24b3a21741d2fb0614642fd5b12b72c0d3d (patch)
tree981aff4c7b50cec4b5e1acddfa777b438cbccd35
parent3c5555544e06f1be70e6981446e2a92dc1e2aecd (diff)
Create new XAttachInfo class for attachment info (slave devices).
Thanks to XLibs design we can't just change XDeviceInfo without breaking the ABI. So here's a new class that isn't actually a class on the wire.
-rw-r--r--XI.h1
-rw-r--r--XInput.h17
2 files changed, 18 insertions, 0 deletions
diff --git a/XI.h b/XI.h
index 475b12d..43b8745 100644
--- a/XI.h
+++ b/XI.h
@@ -255,6 +255,7 @@ SOFTWARE.
#define ProximityClass 4
#define FocusClass 5
#define OtherClass 6
+#define AttachClass 7
#define KbdFeedbackClass 0
#define PtrFeedbackClass 1
diff --git a/XInput.h b/XInput.h
index 8bf11b1..3d1da54 100644
--- a/XInput.h
+++ b/XInput.h
@@ -893,6 +893,23 @@ typedef struct _XValuatorInfo
XAxisInfoPtr axes;
} XValuatorInfo;
+/**
+ * Fake class, added to each device when parsing XListInputDevices internally.
+ * Indicates the master device this device is attached to. If the device is a
+ * master device, the value of attached is to be ignored.
+ */
+typedef struct _XAttachInfo
+ {
+#if defined(__cplusplus) || defined(c_plusplus)
+ XID c_class;
+#else
+ XID class;
+#endif
+ int length;
+ unsigned char attached;
+ } XAttachInfo;
+
+typedef struct _XAttachInfo *XAttachInfoPtr;
/*******************************************************************
*