summaryrefslogtreecommitdiffstats
path: root/include/android
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2015-05-11 19:52:27 +0100
committerMichael Wright <michaelwr@google.com>2015-05-14 13:25:41 +0100
commit48a8a0e4322969e1551536d6183af3a1faa2240b (patch)
treec30586e4c77090e21da1c3abb05900806059d358 /include/android
parent53dca3aadda499824d3d0b2bbc25a72fc1a37877 (diff)
downloadframeworks_native-48a8a0e4322969e1551536d6183af3a1faa2240b.zip
frameworks_native-48a8a0e4322969e1551536d6183af3a1faa2240b.tar.gz
frameworks_native-48a8a0e4322969e1551536d6183af3a1faa2240b.tar.bz2
Add new MotionEvent actions for button press and release.
Introduce ACTION_BUTTON_PRESS and ACTION_BUTTON_RELEASE as actions to signal a button press or release. If these actions happen simulanteously with a DOWN or UP event then they're explicitly ordered to happen after the DOWN or preceding the UP in order to send them to the most recently targeted view. Also, introduce new stylus button constants that differ from the constants we use for mouse buttons. Bug: 20704355 Change-Id: Ib960a5004db5429ad2fc8db020704773e2978327
Diffstat (limited to 'include/android')
-rw-r--r--include/android/input.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/android/input.h b/include/android/input.h
index a660761..c7635b8 100644
--- a/include/android/input.h
+++ b/include/android/input.h
@@ -305,6 +305,12 @@ enum {
/* The pointer is not down but has exited the boundaries of a window or view.
*/
AMOTION_EVENT_ACTION_HOVER_EXIT = 10,
+
+ /* One or more buttons have been pressed. */
+ AMOTION_EVENT_ACTION_BUTTON_PRESS = 11,
+
+ /* One or more buttons have been released. */
+ AMOTION_EVENT_ACTION_BUTTON_RELEASE = 12,
};
/*
@@ -405,6 +411,8 @@ enum {
AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2,
AMOTION_EVENT_BUTTON_BACK = 1 << 3,
AMOTION_EVENT_BUTTON_FORWARD = 1 << 4,
+ AMOTION_EVENT_BUTTON_STYLUS_PRIMARY = 1 << 5,
+ AMOTION_EVENT_BUTTON_STYLUS_SECONDARY = 1 << 6,
};
/*