diff options
| author | Meizu OpenSource <patchwork@meizu.com> | 2016-08-15 10:19:42 +0800 |
|---|---|---|
| committer | Meizu OpenSource <patchwork@meizu.com> | 2016-08-15 10:19:42 +0800 |
| commit | d2e1446d81725c351dc73a03b397ce043fb18452 (patch) | |
| tree | 4dbc616b7f92aea39cd697a9084205ddb805e344 /include/linux/input/mz_gesture_ts.h | |
| download | android_kernel_m2note-d2e1446d81725c351dc73a03b397ce043fb18452.tar.gz | |
first commit
Diffstat (limited to 'include/linux/input/mz_gesture_ts.h')
| -rw-r--r-- | include/linux/input/mz_gesture_ts.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/linux/input/mz_gesture_ts.h b/include/linux/input/mz_gesture_ts.h new file mode 100644 index 000000000..7534a5b75 --- /dev/null +++ b/include/linux/input/mz_gesture_ts.h @@ -0,0 +1,55 @@ +/* + * Meizu touchpanel gesture handling module + * Date: Thu, 23 Oct 2014 22:03:36 CST + * Author: Pingbo WEN <wpb@meizu.com> + * Usage: + * This module is writed for flyme gesture control. In order to capture + * touchpanel gesture by flyme, you should report gesture by mz_gesture_report + * api. + * + * In addition, If you want to change TP mode according to flyme gesture state, + * a callback is needed to update TP mode(gesture mode or sleep mode) in every + * state changing. Using mz_gesture_handle_register to register tp callback. + */ + +#ifndef MEIZU_TOUCHPANEL_GESTURE_CORE_H__ +#define MEIZU_TOUCHPANEL_GESTURE_CORE_H__ + +#include <linux/input.h> + +#define MZ_GESTURE_DISABLE (0x00) +#define MZ_GESTURE_ENABLE (0x01) +#define MZ_GESTURE_PART (0x02) + +#define GESTURE_ERROR 0x00 + +/*double tap */ +#define DOUBLE_TAP 0xA0 + +/*swipe */ +#define SWIPE_X_LEFT 0xB0 +#define SWIPE_X_RIGHT 0xB1 +#define SWIPE_Y_UP 0xB2 +#define SWIPE_Y_DOWN 0xB3 + +/*unicode */ +#define UNICODE_E 0xC0 +#define UNICODE_C 0xC1 +#define UNICODE_W 0xC2 +#define UNICODE_M 0xC3 +#define UNICODE_O 0xC4 +#define UNICODE_S 0xC5 +#define UNICODE_V_UP 0xC6 +#define UNICODE_V_DOWN 0xC7 +#define UNICODE_V_L 0xC8 +#define UNICODE_V_R 0xC9 +#define UNICODE_Z 0xCA + +/* + * @gesture accepted, return 1 + * @gesture rejected, return 0 + */ +int mz_gesture_report(struct input_dev *dev, u8 gesture); +void mz_gesture_handle_register(void (*handle) (u8)); + +#endif |
