summaryrefslogtreecommitdiff
path: root/include/android/input.h
diff options
context:
space:
mode:
author Vladislav Kaznacheev <kaznacheev@google.com> 2016-12-15 18:14:58 -0800
committer Vladislav Kaznacheev <kaznacheev@google.com> 2017-01-25 16:04:57 -0800
commit78f97b3263053c388080a738b56499139517c3b6 (patch)
tree1a6df0dd8f7144c31dd5a648de9676db982b3348 /include/android/input.h
parentf70d82da86adc73eafb958b84038da39817ec79f (diff)
Support pointer capture in InputReader
When pointer capture is enabled, the pointer icon is hidden, the pointer location is not changing, and CursorInputMapper generates "captured" events with relative offsets instead of absolute positions. Captured events have their source set to a newly introduced SOURCE_MOUSE_RELATIVE (of SOURCE_CLASS_TRACKBALL). Test: InputReader_test --gtest_filter= CursorInputMapperTest.Process_PointerCapture Bug: 30897034 Change-Id: Id30cb8e7edac56ab813e22a834cc44ab263d1003
Diffstat (limited to 'include/android/input.h')
-rw-r--r--include/android/input.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/android/input.h b/include/android/input.h
index f928c6e4f0..08299899b6 100644
--- a/include/android/input.h
+++ b/include/android/input.h
@@ -835,6 +835,8 @@ enum {
AINPUT_SOURCE_BLUETOOTH_STYLUS = 0x00008000 | AINPUT_SOURCE_STYLUS,
/** trackball */
AINPUT_SOURCE_TRACKBALL = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION,
+ /** mouse relative */
+ AINPUT_SOURCE_MOUSE_RELATIVE = 0x00020000 | AINPUT_SOURCE_CLASS_NAVIGATION,
/** touchpad */
AINPUT_SOURCE_TOUCHPAD = 0x00100000 | AINPUT_SOURCE_CLASS_POSITION,
/** navigation */