aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.h
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2010-11-08 11:08:01 -0500
committerPeter Hutterer <peter.hutterer@who-t.net>2011-11-11 15:50:06 +1000
commite18abd0049421a98e61c15c2d56cfe2821cf4739 (patch)
tree0ebde526d8b251044e3ecc06f3b6354056ad912c /src/evdev.h
parentUse a new "Virtual Device" boolean property to mark virtual devices (diff)
downloadxf86-input-evdev-e18abd0049421a98e61c15c2d56cfe2821cf4739.tar.gz
xf86-input-evdev-e18abd0049421a98e61c15c2d56cfe2821cf4739.tar.bz2
xf86-input-evdev-e18abd0049421a98e61c15c2d56cfe2821cf4739.zip
Add experimental XI 2.1 multitouch support
This multitouch addition only supports slotted MT evdev protocol devices. Support must be enabled at configure time using --enable-multitouch. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Amendments: XI_TouchMotion -> XI_TouchUpdate, rename mtMask to mt_mask Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/evdev.h')
-rw-r--r--src/evdev.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/evdev.h b/src/evdev.h
index b2e2f42..6e3b850 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -109,9 +109,20 @@ typedef struct {
EV_QUEUE_KEY, /* xf86PostKeyboardEvent() */
EV_QUEUE_BTN, /* xf86PostButtonEvent() */
EV_QUEUE_PROXIMITY, /* xf86PostProximityEvent() */
+#ifdef MULTITOUCH
+ EV_QUEUE_TOUCH, /*xf86PostTouchEvent() */
+#endif
} type;
- int key; /* May be either a key code or button number. */
- int val; /* State of the key/button; pressed or released. */
+ union {
+ int key; /* May be either a key code or button number. */
+#ifdef MULTITOUCH
+ unsigned int touch; /* Touch ID */
+#endif
+ } detail;
+ int val; /* State of the key/button/touch; pressed or released. */
+#ifdef MULTITOUCH
+ ValuatorMask *touchMask;
+#endif
} EventQueueRec, *EventQueuePtr;
typedef struct {
@@ -126,6 +137,12 @@ typedef struct {
ValuatorMask *vals; /* new values coming in */
ValuatorMask *old_vals; /* old values for calculating relative motion */
ValuatorMask *prox; /* last values set while not in proximity */
+#ifdef MULTITOUCH
+ ValuatorMask *mt_mask;
+ int cur_slot;
+ BOOL close_slot;
+ BOOL open_slot;
+#endif
int flags;
int in_proximity; /* device in proximity */
@@ -216,6 +233,10 @@ typedef struct {
void EvdevQueueKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value);
void EvdevQueueButtonEvent(InputInfoPtr pInfo, int button, int value);
void EvdevQueueProximityEvent(InputInfoPtr pInfo, int value);
+#ifdef MULTITOUCH
+void EvdevQueueTouchEvent(InputInfoPtr pInfo, unsigned int touch,
+ ValuatorMask *mask, uint16_t type);
+#endif
void EvdevPostButtonEvent(InputInfoPtr pInfo, int button, int value);
void EvdevQueueButtonClicks(InputInfoPtr pInfo, int button, int count);
void EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int num_v, int first_v,