summaryrefslogtreecommitdiff
path: root/src/evdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/evdev.h')
-rw-r--r--src/evdev.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/evdev.h b/src/evdev.h
index 2f874a2..41f4941 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -39,6 +39,8 @@
#include <xf86_OSproc.h>
#include <xkbstr.h>
+#include <mtdev.h>
+
#ifndef EV_CNT /* linux 2.6.23 kernels and earlier lack _CNT defines */
#define EV_CNT (EV_MAX+1)
#endif
@@ -55,7 +57,8 @@
#define LED_CNT (LED_MAX+1)
#endif
-#define MT_NUM_AXES (ABS_MT_TRACKING_ID - ABS_MT_TOUCH_MAJOR)
+#define MT_NUM_AXES (ABS_MT_PRESSURE - ABS_MT_TOUCH_MAJOR)
+#define MT_AXIS(x) (x) - ABS_MT_TOUCH_MAJOR
#define EVDEV_MAXBUTTONS 32
#define EVDEV_MAXQUEUE 32
@@ -126,11 +129,11 @@ typedef struct {
int vals[MAX_VALUATORS];
int old_vals[MAX_VALUATORS]; /* Translate absolute inputs to relative */
- int *mt_active_tps; /* Active touchpoints in this event stream only */
- int *mt_all_tps; /* All currently active touchpoints */
- int mt_max_tps; /* Maximum number of active touchpoints */
- int mt_tp_axes[MT_NUM_AXES]; /* Valuators for the current touchpoint */
- unsigned long mt_tp_axismask[NLONGS(ABS_CNT)];
+ int mt_slot[MT_NUM_AXES]; /* Multitouch touch slots */
+ unsigned int mt_num_slots; /* Number of touch slots */
+ int mt_cur_slot; /* Current slot for MT values */
+ int *mt_ids; /* Tracking IDs of touch slots */
+ uint8_t mt_axismask[(MT_NUM_AXES + 7) / 8]; /* Bitmask of new values */
int flags;
int proximity;
@@ -202,6 +205,7 @@ typedef struct {
/* Event queue used to defer keyboard/button events until EV_SYN time. */
int num_queue;
EventQueueRec queue[EVDEV_MAXQUEUE];
+ struct mtdev *mtdev;
} EvdevRec, *EvdevPtr;
/* Event posting functions */