aboutsummaryrefslogtreecommitdiff
path: root/backends/common/keymapper.h
blob: d9b1b050fbd0bd9eee3a7eedc26fde2ac7435021 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef COMMON_KEYMAPPER
#define COMMON_KEYMAPPER

#include "backends/common/keymap.h"
#include "common/list.h"

namespace Common {

class KeymapManager;

class Keymapper {
public:

	Keymapper(EventManager *eventMan);

	void registerHardwareKeySet(HardwareKeySet *keys);

	const HardwareKeySet *getHardwareKeySet() const;

	void addGlobalKeyMap(const String& name, Keymap *keymap);

	void addGameKeyMap(const String& name, Keymap *keymap);

	void initGame();
	void deInitGame();

	bool switchKeymap(const String& name);

private:

	typedef List<HardwareKey*>::iterator Iterator;

	EventManager *_eventMan;
	KeymapManager *_keymapMan;

	String _gameId;

	Keymap *_currentMap;

	const HardwareKeySet *_hardwareKeys;

};

} // end of namespace Common

#endif