diff options
author | Jeff Brown <jeffbrown@google.com> | 2010-12-23 17:50:18 -0800 |
---|---|---|
committer | Alex Ray <aray@google.com> | 2013-07-30 13:56:55 -0700 |
commit | 8659f0be9a7cac99d55f58601d68c0c6da55af7b (patch) | |
tree | a3cc83dcbb27f428bd759d8f9718f67dde16a5f1 | |
parent | c974d4dbe00c46bb9f12e4802b47d4b41bc1fca6 (diff) | |
download | system_core-8659f0be9a7cac99d55f58601d68c0c6da55af7b.zip system_core-8659f0be9a7cac99d55f58601d68c0c6da55af7b.tar.gz system_core-8659f0be9a7cac99d55f58601d68c0c6da55af7b.tar.bz2 |
Add initial support for cursor-based pointing devices.
Some parts stubbed out but you can plug in a mouse and move
a green cursor around to interact with the UI.
Change-Id: I80d597a7f11d3bd92041890f74b3c77326975e6e
-rw-r--r-- | include/utils/PropertyMap.h | 6 | ||||
-rw-r--r-- | libs/utils/PropertyMap.cpp | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/include/utils/PropertyMap.h b/include/utils/PropertyMap.h index a54f819..a9e674f 100644 --- a/include/utils/PropertyMap.h +++ b/include/utils/PropertyMap.h @@ -71,6 +71,12 @@ public: bool tryGetProperty(const String8& key, int32_t& outValue) const; bool tryGetProperty(const String8& key, float& outValue) const; + /* Adds all values from the specified property map. */ + void addAll(const PropertyMap* map); + + /* Gets the underlying property map. */ + inline const KeyedVector<String8, String8>& getProperties() const { return mProperties; } + /* Loads a property map from a file. */ static status_t load(const String8& filename, PropertyMap** outMap); diff --git a/libs/utils/PropertyMap.cpp b/libs/utils/PropertyMap.cpp index fd7edec..d472d45 100644 --- a/libs/utils/PropertyMap.cpp +++ b/libs/utils/PropertyMap.cpp @@ -109,6 +109,12 @@ bool PropertyMap::tryGetProperty(const String8& key, float& outValue) const { return true; } +void PropertyMap::addAll(const PropertyMap* map) { + for (size_t i = 0; i < map->mProperties.size(); i++) { + mProperties.add(map->mProperties.keyAt(i), map->mProperties.valueAt(i)); + } +} + status_t PropertyMap::load(const String8& filename, PropertyMap** outMap) { *outMap = NULL; |