aboutsummaryrefslogtreecommitdiff
path: root/backends/keymapper/keymap.h
diff options
context:
space:
mode:
Diffstat (limited to 'backends/keymapper/keymap.h')
-rw-r--r--backends/keymapper/keymap.h37
1 files changed, 14 insertions, 23 deletions
diff --git a/backends/keymapper/keymap.h b/backends/keymapper/keymap.h
index 73f2293653..4c3e89700f 100644
--- a/backends/keymapper/keymap.h
+++ b/backends/keymapper/keymap.h
@@ -36,8 +36,8 @@
namespace Common {
-struct HardwareKey;
-class HardwareKeySet;
+struct HardwareInput;
+class HardwareInputSet;
/**
* Hash function for KeyState
@@ -52,7 +52,7 @@ template<> struct Hash<KeyState>
class Keymap {
public:
- Keymap(const String& name, Keymap *parent = 0) : _name(name), _parent(parent) {}
+ Keymap(const String& name) : _name(name) {}
Keymap(const Keymap& km);
~Keymap();
@@ -67,7 +67,7 @@ public:
/**
* Get the list of all the Actions contained in this Keymap
*/
- List<Action*>& getActions() { return _actions; }
+ List<Action *>& getActions() { return _actions; }
/**
* Find the Action that a key is mapped to
@@ -80,9 +80,9 @@ public:
/**
* Load this keymap's mappings from the config manager.
- * @param hwKeys the set to retrieve hardware key pointers from
+ * @param hwInputs the set to retrieve hardware input pointers from
*/
- void loadMappings(const HardwareKeySet *hwKeys);
+ void loadMappings(const HardwareInputSet *hwInputs);
/**
* Save this keymap's mappings to the config manager
@@ -91,17 +91,13 @@ public:
*/
void saveMappings();
-
- void automaticMapping(HardwareKeySet *hwKeys);
-
/**
* Returns true if all UserAction's in Keymap are mapped, or,
- * all HardwareKey's from the given set have been used up.
+ * all HardwareInputs from the given set have been used up.
*/
- bool isComplete(const HardwareKeySet *hwKeys);
+ bool isComplete(const HardwareInputSet *hwInputs);
const String& getName() { return _name; }
- Keymap *getParent() { return _parent; }
private:
friend struct Action;
@@ -114,15 +110,15 @@ private:
void addAction(Action *action);
/**
- * Registers a HardwareKey to the given Action
+ * Registers a HardwareInput to the given Action
* @param action Action in this Keymap
- * @param key pointer to HardwareKey to map
+ * @param key pointer to HardwareInput to map
* @see Action::mapKey
*/
- void registerMapping(Action *action, const HardwareKey *key);
+ void registerMapping(Action *action, const HardwareInput *input);
/**
- * Unregisters a HardwareKey from the given Action (if one is mapped)
+ * Unregisters a HardwareInput from the given Action (if one is mapped)
* @param action Action in this Keymap
* @see Action::mapKey
*/
@@ -131,14 +127,9 @@ private:
Action *findAction(const char *id);
const Action *findAction(const char *id) const;
- void internalMapKey(Action *action, HardwareKey *hwKey);
-
- Action *getParentMappedAction(KeyState key);
-
String _name;
- Keymap *_parent;
- List<Action*> _actions;
- HashMap<KeyState, Action*> _keymap;
+ List<Action *> _actions;
+ HashMap<KeyState, Action *> _keymap;
ConfigManager::Domain *_configDomain;
};