diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2010-10-12 15:38:43 +0200 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2010-10-12 15:38:43 +0200 |
| commit | acea9df3381825a634c000a574f58b4ca5293ee8 (patch) | |
| tree | 3698bd55f137bc377f1b840e4fb5bf9e446e7250 /include/common.h | |
| parent | 7380af2c93dc83f4f09e293717d46eadf7799e89 (diff) | |
Same version, but using the mtdev library.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'include/common.h')
| -rw-r--r-- | include/common.h | 49 |
1 files changed, 1 insertions, 48 deletions
diff --git a/include/common.h b/include/common.h index e13088f..6d00d6e 100644 --- a/include/common.h +++ b/include/common.h | |||
| @@ -26,59 +26,12 @@ | |||
| 26 | #include <xf86.h> | 26 | #include <xf86.h> |
| 27 | #include <xf86_OSproc.h> | 27 | #include <xf86_OSproc.h> |
| 28 | #include <xf86Xinput.h> | 28 | #include <xf86Xinput.h> |
| 29 | #include <linux/input.h> | ||
| 30 | #include <errno.h> | 29 | #include <errno.h> |
| 31 | 30 | #include <mtdev-mapping.h> | |
| 32 | /* includes available in 2.6.30-rc5 */ | ||
| 33 | |||
| 34 | #ifndef BTN_TOOL_QUADTAP | ||
| 35 | #define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */ | ||
| 36 | #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ | ||
| 37 | #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ | ||
| 38 | #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ | ||
| 39 | #define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */ | ||
| 40 | #define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */ | ||
| 41 | #define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */ | ||
| 42 | #define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */ | ||
| 43 | #define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */ | ||
| 44 | #define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */ | ||
| 45 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ | ||
| 46 | #define SYN_MT_REPORT 2 | ||
| 47 | #define MT_TOOL_FINGER 0 | ||
| 48 | #define MT_TOOL_PEN 1 | ||
| 49 | #endif | ||
| 50 | |||
| 51 | /* includes available in 2.6.33 */ | ||
| 52 | #ifndef ABS_MT_PRESSURE | ||
| 53 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ | ||
| 54 | #endif | ||
| 55 | |||
| 56 | /* includes available in 2.6.36 */ | ||
| 57 | #ifndef ABS_MT_SLOT | ||
| 58 | #define ABS_MT_SLOT 0x2f /* MT slot being modified */ | ||
| 59 | #define MT_SLOT_ABS_EVENTS { \ | ||
| 60 | ABS_MT_TOUCH_MAJOR, \ | ||
| 61 | ABS_MT_TOUCH_MINOR, \ | ||
| 62 | ABS_MT_WIDTH_MAJOR, \ | ||
| 63 | ABS_MT_WIDTH_MINOR, \ | ||
| 64 | ABS_MT_ORIENTATION, \ | ||
| 65 | ABS_MT_POSITION_X, \ | ||
| 66 | ABS_MT_POSITION_Y, \ | ||
| 67 | ABS_MT_TOOL_TYPE, \ | ||
| 68 | ABS_MT_BLOB_ID, \ | ||
| 69 | ABS_MT_TRACKING_ID, \ | ||
| 70 | ABS_MT_PRESSURE, \ | ||
| 71 | } | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #define MT_ABS_SIZE 11 /* Size of MT_SLOT_ABS_EVENTS */ | ||
| 75 | 31 | ||
| 76 | #define DIM_FINGER 32 | 32 | #define DIM_FINGER 32 |
| 77 | #define DIM2_FINGER (DIM_FINGER * DIM_FINGER) | 33 | #define DIM2_FINGER (DIM_FINGER * DIM_FINGER) |
| 78 | 34 | ||
| 79 | /* event buffer size (must be a power of two) */ | ||
| 80 | #define DIM_EVENTS 512 | ||
| 81 | |||
| 82 | /* year-proof millisecond event time */ | 35 | /* year-proof millisecond event time */ |
| 83 | typedef __u64 mstime_t; | 36 | typedef __u64 mstime_t; |
| 84 | 37 | ||
