diff options
Diffstat (limited to 'test/mtdev-mapgen.c')
| -rw-r--r-- | test/mtdev-mapgen.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/mtdev-mapgen.c b/test/mtdev-mapgen.c index 8f70998..dc1ba91 100644 --- a/test/mtdev-mapgen.c +++ b/test/mtdev-mapgen.c | |||
| @@ -26,12 +26,24 @@ | |||
| 26 | * | 26 | * |
| 27 | ****************************************************************************/ | 27 | ****************************************************************************/ |
| 28 | 28 | ||
| 29 | #include <mtdev-mapping.h> | 29 | #define MTDEV_NO_LEGACY_API |
| 30 | #include <mtdev.h> | ||
| 30 | #include <stdio.h> | 31 | #include <stdio.h> |
| 31 | 32 | ||
| 32 | #define BIT_DEF(name) \ | 33 | #define MT_ABS_SIZE 11 |
| 33 | printf("#define MTDEV_"#name"\t%d\n", \ | 34 | #define MT_SLOT_ABS_EVENTS { \ |
| 34 | cabs2mt[ABS_MT_##name] - 1) | 35 | ABS_MT_TOUCH_MAJOR, \ |
| 36 | ABS_MT_TOUCH_MINOR, \ | ||
| 37 | ABS_MT_WIDTH_MAJOR, \ | ||
| 38 | ABS_MT_WIDTH_MINOR, \ | ||
| 39 | ABS_MT_ORIENTATION, \ | ||
| 40 | ABS_MT_POSITION_X, \ | ||
| 41 | ABS_MT_POSITION_Y, \ | ||
| 42 | ABS_MT_TOOL_TYPE, \ | ||
| 43 | ABS_MT_BLOB_ID, \ | ||
| 44 | ABS_MT_TRACKING_ID, \ | ||
| 45 | ABS_MT_PRESSURE, \ | ||
| 46 | } | ||
| 35 | 47 | ||
| 36 | static unsigned int cabs2mt[ABS_CNT]; | 48 | static unsigned int cabs2mt[ABS_CNT]; |
| 37 | static unsigned int cmt2abs[MT_ABS_SIZE]; | 49 | static unsigned int cmt2abs[MT_ABS_SIZE]; |
| @@ -63,17 +75,5 @@ int main(int argc, char *argv[]) | |||
| 63 | for (i = 0; i < MT_ABS_SIZE; i++) | 75 | for (i = 0; i < MT_ABS_SIZE; i++) |
| 64 | printf(" 0x%04x,%s", cmt2abs[i], newln(i, MT_ABS_SIZE)); | 76 | printf(" 0x%04x,%s", cmt2abs[i], newln(i, MT_ABS_SIZE)); |
| 65 | printf("};\n\n"); | 77 | printf("};\n\n"); |
| 66 | BIT_DEF(TOUCH_MAJOR); | ||
| 67 | BIT_DEF(TOUCH_MINOR); | ||
| 68 | BIT_DEF(WIDTH_MAJOR); | ||
| 69 | BIT_DEF(WIDTH_MINOR); | ||
| 70 | BIT_DEF(ORIENTATION); | ||
| 71 | BIT_DEF(POSITION_X); | ||
| 72 | BIT_DEF(POSITION_Y); | ||
| 73 | BIT_DEF(TOOL_TYPE); | ||
| 74 | BIT_DEF(BLOB_ID); | ||
| 75 | BIT_DEF(TRACKING_ID); | ||
| 76 | BIT_DEF(PRESSURE); | ||
| 77 | printf("\n"); | ||
| 78 | return 0; | 78 | return 0; |
| 79 | } | 79 | } |
