diff options
author | Stephen Kennedy | 2008-08-06 19:21:45 +0000 |
---|---|---|
committer | Stephen Kennedy | 2008-08-06 19:21:45 +0000 |
commit | 72da19afef683677b6b75fd7697eb369224f7850 (patch) | |
tree | ff2eb32334269068f6a47f230c712dcb9562cf8c /backends/common/keymap.h | |
parent | 57b13141af10c5e0773c2e1606daca8e08410ed5 (diff) | |
download | scummvm-rg350-72da19afef683677b6b75fd7697eb369224f7850.tar.gz scummvm-rg350-72da19afef683677b6b75fd7697eb369224f7850.tar.bz2 scummvm-rg350-72da19afef683677b6b75fd7697eb369224f7850.zip |
Keymapper WIP:
* Made Keymap class responsible for loading / saving of mappings
svn-id: r33665
Diffstat (limited to 'backends/common/keymap.h')
-rw-r--r-- | backends/common/keymap.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/backends/common/keymap.h b/backends/common/keymap.h index c8b46cfd78..55e5c598d8 100644 --- a/backends/common/keymap.h +++ b/backends/common/keymap.h @@ -26,6 +26,7 @@ #ifndef COMMON_KEYMAP #define COMMON_KEYMAP +#include "common/config-manager.h" #include "common/func.h" #include "common/hashmap.h" #include "common/keyboard.h" @@ -35,6 +36,7 @@ namespace Common { struct HardwareKey; +class HardwareKeySet; /** * Hash function for KeyState @@ -74,11 +76,26 @@ public: /** * Find the Action that a key is mapped to - * @param key the key that is mapped to the required Action - * @return a pointer to the Action or 0 if no + * @param key the key that is mapped to the required Action + * @return a pointer to the Action or 0 if no */ Action *getMappedAction(const KeyState& ks) const; + /** + * Load this keymap's mappings from the given config domain and hardware key set + * @param domain config domain to load keymap from + * @param name name of the keymap to load + * @param hwKeys the set to retrieve hardware key pointers from + */ + void loadMappings(ConfigManager::Domain *domain, const String& name, const HardwareKeySet *hwKeys); + + /** + * Save this keymap's mappings to the given config domain + * @param domain config domain to save keymap to + * @param name name to save the keymap under + */ + void saveMappings(ConfigManager::Domain *domain, const String& name); + private: friend struct Action; /** |