summaryrefslogtreecommitdiff
path: root/XInput.h
diff options
context:
space:
mode:
authorDaniel Stone <daniel.stone@nokia.com>2006-07-17 19:34:45 -0400
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-07-17 19:34:45 -0400
commit7a4a2a3e733378abced0a184627adfda4ed387b9 (patch)
tree2ebde5313c1b0aa68506550454bb292512cfd38c /XInput.h
parent6767671f502964d385aa41de3a45fb479c6330c0 (diff)
add DevicePresenceNotify event, clean up
Add DevicePresenceNotify event, which indicates that something in the device list changed (Kristian Høgsberg, Red Hat). Add a core event control, which toggles the sending or not of core events by an extended device. Clean up some random detritus from the MetroLink merge.
Diffstat (limited to 'XInput.h')
-rw-r--r--XInput.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/XInput.h b/XInput.h
index ee44105..2f1fffb 100644
--- a/XInput.h
+++ b/XInput.h
@@ -149,6 +149,13 @@ SOFTWARE.
#define NoExtensionEvent(d,type,_class) \
{ _class = ((XDevice *) d)->device_id << 8 | _noExtensionEvent;}
+#define DevicePresence(dpy, type, _class) \
+ { \
+ extern int_XiGetDevicePresenceNotifyEvent(Display *); \
+ type = _XiGetDevicePresenceNotifyEvent(dpy); \
+ _class = (0x10000 | _devicePresence); \
+ }
+
#define BadDevice(dpy,error) _xibaddevice(dpy, &error)
#define BadClass(dpy,error) _xibadclass(dpy, &error)
@@ -418,6 +425,24 @@ typedef struct {
/*******************************************************************
*
+ * DevicePresenceNotify event. This event is sent when the list of
+ * input devices changes. No information about the change is
+ * contained in this event, the client should use XListInputDevices()
+ * to learn what has changed.
+ *
+ */
+
+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; /* unused */
+ Time time;
+} XDevicePresenceNotifyEvent;
+
+/*******************************************************************
+ *
* Control structures for input devices that support input class
* Feedback. These are used by the XGetFeedbackControl and
* XChangeFeedbackControl functions.
@@ -632,6 +657,22 @@ typedef struct {
int *max_resolutions;
} XDeviceResolutionState;
+typedef struct {
+ XID control;
+ int length;
+ int min_x;
+ int max_x;
+ int min_y;
+ int max_y;
+ int button_threshold;
+} XDeviceTSControl, XDeviceTSState;
+
+typedef struct {
+ XID control;
+ int length;
+ int status;
+} XDeviceCoreControl, XDeviceCoreState;
+
/*******************************************************************
*
* An array of XDeviceList structures is returned by the