blob: ece76699b8df14a4e24a2eb968188d0a579f275e (
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
|
/*
client/key.h
This file is part of the Osirion project and is distributed under
the terms and conditions of the GNU General Public License version 2
*/
#ifndef __INCLUDED_CLIENT_KEY_H__
#define __INCLUDED_CLIENT_KEY_H__
#include <string>
namespace client {
class Key
{
public:
Key(const char *name, unsigned int keysym, char ascii=0, const char *bind=0);
~Key();
inline float & pressed() { return key_pressed; }
inline std::string const & name() const { return key_name; }
inline std::string & bind() { return key_bind; }
inline char ascii() const { return key_ascii; }
inline unsigned int sym() const { return key_sym; }
private:
unsigned int key_sym;
char key_ascii;
std::string key_name;
std::string key_bind;
float key_pressed;
};
} // namespace client
#endif // __INCLUDED_CLIENT_KEY_H__
|