diff options
| author | 2009-03-03 19:31:44 -0800 | |
|---|---|---|
| committer | 2009-03-03 19:31:44 -0800 | |
| commit | 9066cfe9886ac131c34d59ed0e2d287b0e3c0087 (patch) | |
| tree | d88beb88001f2482911e3d28e43833b50e4b4e97 /libs/ui/KeyLayoutMap.h | |
| parent | d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 (diff) | |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'libs/ui/KeyLayoutMap.h')
| -rw-r--r-- | libs/ui/KeyLayoutMap.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/libs/ui/KeyLayoutMap.h b/libs/ui/KeyLayoutMap.h new file mode 100644 index 000000000000..43f84ce4964d --- /dev/null +++ b/libs/ui/KeyLayoutMap.h @@ -0,0 +1,31 @@ +#ifndef KEYLAYOUTMAP_H +#define KEYLAYOUTMAP_H + +#include <utils/KeyedVector.h> + +namespace android { + +class KeyLayoutMap +{ +public: + KeyLayoutMap(); + ~KeyLayoutMap(); + + status_t load(const char* filename); + + status_t map(int32_t scancode, int32_t *keycode, uint32_t *flags) const; + status_t findScancodes(int32_t keycode, Vector<int32_t>* outScancodes) const; + +private: + struct Key { + int32_t keycode; + uint32_t flags; + }; + + status_t m_status; + KeyedVector<int32_t,Key> m_keys; +}; + +}; + +#endif // KEYLAYOUTMAP_H |