summaryrefslogtreecommitdiffstats
path: root/include/ui
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-07-14 12:06:54 -0700
committerDianne Hackborn <hackbod@google.com>2009-07-14 18:51:53 -0700
commitc968c3a9c782eaf44a5772cd388e5c690e5be4f3 (patch)
treeb63f5623ce1816c10b70630f4d8d335d7aead3a4 /include/ui
parent512bac1a9adb288fb305b17d5d1c234e01e2e517 (diff)
downloadframeworks_native-c968c3a9c782eaf44a5772cd388e5c690e5be4f3.zip
frameworks_native-c968c3a9c782eaf44a5772cd388e5c690e5be4f3.tar.gz
frameworks_native-c968c3a9c782eaf44a5772cd388e5c690e5be4f3.tar.bz2
Implement virtual button support.
The kernel can now publish a property describing the layout of virtual hardware buttons on the touchscreen. These outside of the display area (outside of the absolute x and y controller range the driver reports), and when the user presses on them a key event will be generated rather than a touch event. This also includes a number of tweaks to the absolute controller processing to make things work better on the new screens. For example, we now reject down events outside of the display area. Still left to be done is the ability to cancel a key down event, so the user can slide up from the virtual keys to the touch screen without causing a virtual key to execute.
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/EventHub.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/ui/EventHub.h b/include/ui/EventHub.h
index e12c4f1..d9c0af2 100644
--- a/include/ui/EventHub.h
+++ b/include/ui/EventHub.h
@@ -73,6 +73,9 @@ public:
int getKeycodeState(int key) const;
int getKeycodeState(int32_t deviceId, int key) const;
+ status_t scancodeToKeycode(int32_t deviceId, int scancode,
+ int32_t* outKeycode, uint32_t* outFlags) const;
+
// special type codes when devices are added/removed.
enum {
DEVICE_ADDED = 0x10000000,
@@ -121,7 +124,7 @@ private:
mutable Mutex mLock;
bool mHaveFirstKeyboard;
- int32_t mFirstKeyboardId; // the API is that the build in keyboard is id 0, so map it
+ int32_t mFirstKeyboardId; // the API is that the built-in keyboard is id 0, so map it
struct device_ent {
device_t* device;