diff options
author | 2010-07-15 22:22:42 -0700 | |
---|---|---|
committer | 2010-07-15 22:22:42 -0700 | |
commit | 9c48c34ebe2d87e68d0a90b2e7334d1722368f37 (patch) | |
tree | 0988f0a07abbfa77cae83931d6f647f5cf532c7a | |
parent | 5c1ed84a2dec7efe914d0d1abb6834f8543fb9f1 (diff) | |
parent | 0e8852766d2cc0ef82ed0846a4cae55ead01fdbf (diff) |
Merge "Implement native key pre-dispatching to IMEs." into gingerbread
-rw-r--r-- | include/ui/Input.h | 2 | ||||
-rw-r--r-- | libs/ui/Input.cpp | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/include/ui/Input.h b/include/ui/Input.h index f06988832d..d9b109197c 100644 --- a/include/ui/Input.h +++ b/include/ui/Input.h @@ -152,6 +152,7 @@ public: protected: void initialize(int32_t deviceId, int32_t source); + void initialize(const InputEvent& from); private: int32_t mDeviceId; @@ -202,6 +203,7 @@ public: int32_t repeatCount, nsecs_t downTime, nsecs_t eventTime); + void initialize(const KeyEvent& from); private: int32_t mAction; diff --git a/libs/ui/Input.cpp b/libs/ui/Input.cpp index e5f014f421..5253c72aa3 100644 --- a/libs/ui/Input.cpp +++ b/libs/ui/Input.cpp @@ -18,6 +18,11 @@ void InputEvent::initialize(int32_t deviceId, int32_t source) { mSource = source; } +void InputEvent::initialize(const InputEvent& from) { + mDeviceId = from.mDeviceId; + mSource = from.mSource; +} + // class KeyEvent bool KeyEvent::hasDefaultAction(int32_t keyCode) { @@ -106,6 +111,18 @@ void KeyEvent::initialize( mEventTime = eventTime; } +void KeyEvent::initialize(const KeyEvent& from) { + InputEvent::initialize(from); + mAction = from.mAction; + mFlags = from.mFlags; + mKeyCode = from.mKeyCode; + mScanCode = from.mScanCode; + mMetaState = from.mMetaState; + mRepeatCount = from.mRepeatCount; + mDownTime = from.mDownTime; + mEventTime = from.mEventTime; +} + // class MotionEvent void MotionEvent::initialize( |