2008-07-19 00:57:37 +00:00
|
|
|
#ifndef COMMON_KEYMAPPER
|
|
|
|
#define COMMON_KEYMAPPER
|
|
|
|
|
2008-07-21 00:11:25 +00:00
|
|
|
#include "backends/common/keymap.h"
|
|
|
|
#include "common/list.h"
|
2008-07-19 00:57:37 +00:00
|
|
|
|
|
|
|
namespace Common {
|
|
|
|
|
2008-07-21 00:11:25 +00:00
|
|
|
class KeymapManager;
|
|
|
|
|
2008-07-19 00:57:37 +00:00
|
|
|
class Keymapper {
|
|
|
|
public:
|
|
|
|
|
2008-07-21 00:11:25 +00:00
|
|
|
Keymapper(EventManager *eventMan);
|
2008-07-19 00:57:37 +00:00
|
|
|
|
2008-07-21 00:11:25 +00:00
|
|
|
void registerHardwareKeySet(HardwareKeySet *keys);
|
|
|
|
const HardwareKeySet *getHardwareKeySet();
|
2008-07-19 19:12:49 +00:00
|
|
|
void addGlobalKeyMap(const String& name, Keymap& keymap);
|
2008-07-21 00:11:25 +00:00
|
|
|
void addGameKeyMap(const String& gameid, const String& name, Keymap& keymap);
|
2008-07-19 00:57:37 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2008-07-21 00:11:25 +00:00
|
|
|
typedef List<HardwareKey*>::iterator Iterator;
|
|
|
|
|
|
|
|
EventManager *_eventMan;
|
|
|
|
KeymapManager *_keymapMan;
|
|
|
|
|
|
|
|
Keymap *_currentMap;
|
2008-07-19 00:57:37 +00:00
|
|
|
|
2008-07-21 00:11:25 +00:00
|
|
|
const HardwareKeySet *_hardwareKeys;
|
2008-07-19 00:57:37 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2008-07-19 19:12:49 +00:00
|
|
|
} // end of namespace Common
|
|
|
|
|
|
|
|
#endif
|