xref: /haiku/src/preferences/keymap/Keymap.h (revision 1214ef1b2100f2b3299fc9d8d6142e46f70a4c3f)
1 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
2 //
3 //	Copyright (c) 2004, Haiku
4 //
5 //  This software is part of the Haiku distribution and is covered
6 //  by the Haiku license.
7 //
8 //
9 //  File:        Keymap.h
10 //  Author:      Jérôme Duval
11 //  Description: Keymap Preferences
12 //  Created :    July 12, 2004
13 //
14 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
15 
16 #ifndef KEYMAP_H
17 #define KEYMAP_H
18 
19 #include <InterfaceDefs.h>
20 #include <Entry.h>
21 
22 class Keymap
23 {
24 public:
25 	status_t Load(entry_ref &ref);
26 	status_t Save(entry_ref &ref);
27 	void DumpKeymap();
28 	bool IsModifierKey(uint32 keyCode);
29 	uint8 IsDeadKey(uint32 keyCode, uint32 modifiers);
30 	bool IsDeadSecondKey(uint32 keyCode, uint32 modifiers, uint8 activeDeadKey);
31 	void GetChars(uint32 keyCode, uint32 modifiers, uint8 activeDeadKey, char** chars, int32* numBytes);
32 	status_t Use();
33 private:
34 	char *fChars;
35 	key_map fKeys;
36 	uint32 fCharsSize;
37 };
38 
39 
40 #endif //KEYMAP_H
41