libt3widget
Main Page
Modules
Namespaces
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
src
key.h
1
/* Copyright (C) 2011-2013 G.P. Halkes
2
This program is free software: you can redistribute it and/or modify
3
it under the terms of the GNU General Public License version 3, as
4
published by the Free Software Foundation.
5
6
This program is distributed in the hope that it will be useful,
7
but WITHOUT ANY WARRANTY; without even the implied warranty of
8
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
GNU General Public License for more details.
10
11
You should have received a copy of the GNU General Public License
12
along with this program. If not, see <http://www.gnu.org/licenses/>.
13
*/
14
#ifndef T3_WIDGET_KEYS_H
15
#define T3_WIDGET_KEYS_H
16
17
#include <climits>
18
#include <t3widget/widget_api.h>
19
20
namespace
t3_widget {
21
22
#if INT_MAX < 2147483647L
23
24
typedef
long
key_t
;
25
#else
26
typedef
int
key_t
;
27
#endif
28
29
enum
{
30
EKEY_FIRST_SPECIAL = 0x110000,
31
};
32
34
enum
{
35
EKEY_IGNORE = (
key_t
) -1,
36
37
EKEY_END = EKEY_FIRST_SPECIAL,
38
EKEY_HOME,
39
EKEY_PGUP,
40
EKEY_PGDN,
41
EKEY_LEFT,
42
EKEY_RIGHT,
43
EKEY_UP,
44
EKEY_DOWN,
45
EKEY_DEL,
46
EKEY_INS,
47
EKEY_BS,
48
EKEY_NL,
49
EKEY_KP_CENTER,
50
51
EKEY_KP_END,
52
EKEY_KP_HOME,
53
EKEY_KP_PGUP,
54
EKEY_KP_PGDN,
55
EKEY_KP_LEFT,
56
EKEY_KP_RIGHT,
57
EKEY_KP_UP,
58
EKEY_KP_DOWN,
59
EKEY_KP_DEL,
60
EKEY_KP_INS,
61
EKEY_KP_NL,
62
EKEY_KP_DIV,
63
EKEY_KP_MUL,
64
EKEY_KP_PLUS,
65
EKEY_KP_MINUS,
66
67
EKEY_F1 = 0x110100,
68
EKEY_F2,
69
EKEY_F3,
70
EKEY_F4,
71
EKEY_F5,
72
EKEY_F6,
73
EKEY_F7,
74
EKEY_F8,
75
EKEY_F9,
76
EKEY_F10,
77
EKEY_F11,
78
EKEY_F12,
79
EKEY_F13,
80
EKEY_F14,
81
EKEY_F15,
82
EKEY_F16,
83
EKEY_F17,
84
EKEY_F18,
85
EKEY_F19,
86
EKEY_F20,
87
EKEY_F21,
88
EKEY_F22,
89
EKEY_F23,
90
EKEY_F24,
91
EKEY_F25,
92
EKEY_F26,
93
EKEY_F27,
94
EKEY_F28,
95
EKEY_F29,
96
EKEY_F30,
97
EKEY_F31,
98
EKEY_F32,
99
EKEY_F33,
100
EKEY_F34,
101
EKEY_F35,
102
EKEY_F36,
103
104
/* Make sure the synthetic keys are out of the way of future aditions. */
106
EKEY_RESIZE
= 0x111000,
112
EKEY_HOTKEY
,
114
EKEY_EXTERNAL_UPDATE
,
116
EKEY_UPDATE_TERMINAL
,
118
EKEY_MOUSE_EVENT
,
119
121
EKEY_ESC
= 27,
123
EKEY_SHIFT
= 0x40000000,
125
EKEY_META
= 0x20000000,
127
EKEY_CTRL
= 0x10000000,
129
EKEY_PROTECT
= 0x08000000,
131
EKEY_KEY_MASK
= 0x1fffff
132
};
133
135
T3_WIDGET_API
key_t
read_key
(
void
);
149
T3_WIDGET_API
void
set_key_timeout
(
int
msec);
150
155
T3_WIDGET_API
int
get_key_timeout
(
void
);
156
165
T3_WIDGET_API
void
signal_update
(
void
);
166
167
};
// namespace
168
#endif
Generated on Sun Jun 9 2013 14:42:33 for libt3widget by
1.8.1.2