summaryrefslogtreecommitdiffstats
path: root/include/input
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/input
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/input')
-rw-r--r--include/input/Input.h6
-rw-r--r--include/input/InputTransport.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/include/input/Input.h b/include/input/Input.h
index c360f63..1da8356 100644
--- a/include/input/Input.h
+++ b/include/input/Input.h
@@ -379,6 +379,10 @@ public:
inline int32_t getButtonState() const { return mButtonState; }
+ inline int32_t setButtonState(int32_t buttonState) { mButtonState = buttonState; }
+
+ inline int32_t getActionButton() const { return mActionButton; }
+
inline float getXOffset() const { return mXOffset; }
inline float getYOffset() const { return mYOffset; }
@@ -532,6 +536,7 @@ public:
int32_t deviceId,
int32_t source,
int32_t action,
+ int32_t actionButton,
int32_t flags,
int32_t edgeFlags,
int32_t metaState,
@@ -584,6 +589,7 @@ public:
protected:
int32_t mAction;
+ int32_t mActionButton;
int32_t mFlags;
int32_t mEdgeFlags;
int32_t mMetaState;
diff --git a/include/input/InputTransport.h b/include/input/InputTransport.h
index e7e383b..6dc77b7 100644
--- a/include/input/InputTransport.h
+++ b/include/input/InputTransport.h
@@ -84,6 +84,7 @@ struct InputMessage {
int32_t deviceId;
int32_t source;
int32_t action;
+ int32_t actionButton;
int32_t flags;
int32_t metaState;
int32_t buttonState;
@@ -232,6 +233,7 @@ public:
int32_t deviceId,
int32_t source,
int32_t action,
+ int32_t actionButton,
int32_t flags,
int32_t edgeFlags,
int32_t metaState,