summaryrefslogtreecommitdiffstats
path: root/include/ui/InputReader.h
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-07-02 15:37:36 -0700
committerJeff Brown <jeffbrown@google.com>2010-07-03 19:23:01 -0700
commit00fa7bdd69f0868fd17ea7c881c771d785b2fbbd (patch)
tree6fff8ad404e57af316c6ce5a20020dc209eb3cc6 /include/ui/InputReader.h
parent8ecfb60a8e74dfcd51bbf3f236d5f414a4d5ac7d (diff)
downloadframeworks_base-00fa7bdd69f0868fd17ea7c881c771d785b2fbbd.zip
frameworks_base-00fa7bdd69f0868fd17ea7c881c771d785b2fbbd.tar.gz
frameworks_base-00fa7bdd69f0868fd17ea7c881c771d785b2fbbd.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/InputReader.h')
-rw-r--r--include/ui/InputReader.h15
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