diff options
author | Prashant Malani <pmalani@google.com> | 2015-08-11 18:29:28 -0700 |
---|---|---|
committer | Prashant Malani <pmalani@google.com> | 2015-09-14 13:55:21 -0700 |
commit | ac72bbf4e46d6689070df09a25db2960a9036eb2 (patch) | |
tree | e1c0eeef8780ab788f52fbf13f5951425d832535 /include | |
parent | 4baa69ddd25296ee40e84c230af88d1fc7e229a7 (diff) | |
download | frameworks_native-ac72bbf4e46d6689070df09a25db2960a9036eb2.zip frameworks_native-ac72bbf4e46d6689070df09a25db2960a9036eb2.tar.gz frameworks_native-ac72bbf4e46d6689070df09a25db2960a9036eb2.tar.bz2 |
inputflinger: Initial support for rotary encoders.
This change introduces support for rotary encoder input devices.
We also define a new input source (namely, AINPUT_SOURCE_ROTARY_ENCODER)
and a new axis of input (namely, AXIS_SCROLL), since the rotary encoder
motion doesn't necessarily tie to a horizontal or vertical scroll
motion.
A ROTARY_ENCODER input device class is also introduced, corresponding to
the new input source.
A new input source can be defined as producing rotary encoder motion
events, if its corresponding .idc file contains the following
declaration:
device.type = rotaryEncoder
Bug: 18707397
Change-Id: I8ccd540908311d1ff44fdfeba81b691895413641
Signed-off-by: Prashant Malani <pmalani@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/android/input.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/android/input.h b/include/android/input.h index 5ab4e29..5eeb7fc 100644 --- a/include/android/input.h +++ b/include/android/input.h @@ -644,6 +644,13 @@ enum { */ AMOTION_EVENT_AXIS_TILT = 25, /** + * Axis constant: Generic scroll axis of a motion event. + * + * - This is used for scroll axis motion events that can't be classified as strictly + * vertical or horizontal. The movement of a rotating scroller is an example of this. + */ + AMOTION_EVENT_AXIS_SCROLL = 26, + /** * Axis constant: Generic 1 axis of a motion event. * The interpretation of a generic axis is device-specific. */ @@ -817,6 +824,8 @@ enum { AINPUT_SOURCE_TOUCH_NAVIGATION = 0x00200000 | AINPUT_SOURCE_CLASS_NONE, /** joystick */ AINPUT_SOURCE_JOYSTICK = 0x01000000 | AINPUT_SOURCE_CLASS_JOYSTICK, + /** rotary encoder */ + AINPUT_SOURCE_ROTARY_ENCODER = 0x00400000 | AINPUT_SOURCE_CLASS_NONE, /** any */ AINPUT_SOURCE_ANY = 0xffffff00, |