diff options
author | Jeff Brown <jeffbrown@google.com> | 2010-07-02 15:37:36 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2010-07-03 19:23:01 -0700 |
commit | f16c26dec9651628b0c130e2504e2cc911393aea (patch) | |
tree | 62184683fd5e1634f81b89ab9311cbba11450217 /include/ui | |
parent | bf83375c73f0dcde5d97b36273e3fd971411e866 (diff) | |
download | frameworks_native-f16c26dec9651628b0c130e2504e2cc911393aea.zip frameworks_native-f16c26dec9651628b0c130e2504e2cc911393aea.tar.gz frameworks_native-f16c26dec9651628b0c130e2504e2cc911393aea.tar.bz2 |
More native input dispatch work.
Removed old input dispatch code.
Refactored the policy callbacks.
Pushed a tiny bit of the power manager state down to native.
Fixed long press on MENU.
Made the virtual key detection and cancelation a bit more precise.
Change-Id: I5d8c1062f7ea0ab3b54c6fadb058c4d5f5a9e02e
Diffstat (limited to 'include/ui')
-rw-r--r-- | include/ui/InputReader.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/ui/InputReader.h b/include/ui/InputReader.h index 781da35..03c8112 100644 --- a/include/ui/InputReader.h +++ b/include/ui/InputReader.h @@ -250,7 +250,13 @@ struct InputDevice { nsecs_t downTime; struct CurrentVirtualKeyState { - bool down; + enum Status { + STATUS_UP, + STATUS_DOWN, + STATUS_CANCELED + }; + + Status status; nsecs_t downTime; int32_t keyCode; int32_t scanCode; @@ -295,6 +301,7 @@ struct InputDevice { void calculatePointerIds(); bool isPointInsideDisplay(int32_t x, int32_t y) const; + const InputDevice::VirtualKey* findVirtualKeyHit() const; }; InputDevice(int32_t id, uint32_t classes, String8 name); @@ -390,11 +397,9 @@ public: virtual bool getDisplayInfo(int32_t displayId, int32_t* width, int32_t* height, int32_t* orientation) = 0; - /* Provides feedback for a virtual key. + /* Provides feedback for a virtual key down. */ - virtual void virtualKeyFeedback(nsecs_t when, int32_t deviceId, - int32_t action, int32_t flags, int32_t keyCode, - int32_t scanCode, int32_t metaState, nsecs_t downTime) = 0; + virtual void virtualKeyDownFeedback() = 0; /* Intercepts a key event. * The policy can use this method as an opportunity to perform power management functions |