summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2015-05-14 13:31:24 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-14 13:31:25 +0000
commitf27e6681048f3ee7a589ab824a1041667ff838e0 (patch)
treecb958f3237c13ccf380e2c0981029a0cef096ae2 /include
parentaf3a3778c2c17a8064da599bcabb7d141f59f9af (diff)
parent48a8a0e4322969e1551536d6183af3a1faa2240b (diff)
downloadframeworks_native-f27e6681048f3ee7a589ab824a1041667ff838e0.zip
frameworks_native-f27e6681048f3ee7a589ab824a1041667ff838e0.tar.gz
frameworks_native-f27e6681048f3ee7a589ab824a1041667ff838e0.tar.bz2
Merge "Add new MotionEvent actions for button press and release." into mnc-dev
Diffstat (limited to 'include')
-rw-r--r--include/android/input.h8
-rw-r--r--include/input/Input.h6
-rw-r--r--include/input/InputTransport.h2
3 files changed, 16 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,
};
/*
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,