41 #ifndef SWORD25_INPUTENGINE_H 42 #define SWORD25_INPUTENGINE_H 44 #include "common/keyboard.h" 46 #include "sword25/kernel/common.h" 47 #include "sword25/kernel/service.h" 48 #include "sword25/kernel/persistable.h" 63 KEY_BACKSPACE = Common::KEYCODE_BACKSPACE,
64 KEY_TAB = Common::KEYCODE_TAB,
65 KEY_CLEAR = Common::KEYCODE_CLEAR,
66 KEY_RETURN = Common::KEYCODE_RETURN,
67 KEY_PAUSE = Common::KEYCODE_PAUSE,
68 KEY_CAPSLOCK = Common::KEYCODE_CAPSLOCK,
69 KEY_ESCAPE = Common::KEYCODE_ESCAPE,
70 KEY_SPACE = Common::KEYCODE_SPACE,
71 KEY_PAGEUP = Common::KEYCODE_PAGEUP,
72 KEY_PAGEDOWN = Common::KEYCODE_PAGEDOWN,
73 KEY_END = Common::KEYCODE_END,
74 KEY_HOME = Common::KEYCODE_HOME,
75 KEY_LEFT = Common::KEYCODE_LEFT,
76 KEY_UP = Common::KEYCODE_UP,
77 KEY_RIGHT = Common::KEYCODE_RIGHT,
78 KEY_DOWN = Common::KEYCODE_DOWN,
79 KEY_PRINTSCREEN = Common::KEYCODE_PRINT,
80 KEY_INSERT = Common::KEYCODE_INSERT,
81 KEY_DELETE = Common::KEYCODE_DELETE,
82 KEY_0 = Common::KEYCODE_0,
83 KEY_1 = Common::KEYCODE_1,
84 KEY_2 = Common::KEYCODE_2,
85 KEY_3 = Common::KEYCODE_3,
86 KEY_4 = Common::KEYCODE_4,
87 KEY_5 = Common::KEYCODE_5,
88 KEY_6 = Common::KEYCODE_6,
89 KEY_7 = Common::KEYCODE_7,
90 KEY_8 = Common::KEYCODE_8,
91 KEY_9 = Common::KEYCODE_9,
92 KEY_A = Common::KEYCODE_a,
93 KEY_B = Common::KEYCODE_b,
94 KEY_C = Common::KEYCODE_c,
95 KEY_D = Common::KEYCODE_d,
96 KEY_E = Common::KEYCODE_e,
97 KEY_F = Common::KEYCODE_f,
98 KEY_G = Common::KEYCODE_g,
99 KEY_H = Common::KEYCODE_h,
100 KEY_I = Common::KEYCODE_i,
101 KEY_J = Common::KEYCODE_j,
102 KEY_K = Common::KEYCODE_k,
103 KEY_L = Common::KEYCODE_l,
104 KEY_M = Common::KEYCODE_m,
105 KEY_N = Common::KEYCODE_n,
106 KEY_O = Common::KEYCODE_o,
107 KEY_P = Common::KEYCODE_p,
108 KEY_Q = Common::KEYCODE_q,
109 KEY_R = Common::KEYCODE_r,
110 KEY_S = Common::KEYCODE_s,
111 KEY_T = Common::KEYCODE_t,
112 KEY_U = Common::KEYCODE_u,
113 KEY_V = Common::KEYCODE_v,
114 KEY_W = Common::KEYCODE_w,
115 KEY_X = Common::KEYCODE_x,
116 KEY_Y = Common::KEYCODE_y,
117 KEY_Z = Common::KEYCODE_z,
118 KEY_NUMPAD0 = Common::KEYCODE_KP0,
119 KEY_NUMPAD1 = Common::KEYCODE_KP1,
120 KEY_NUMPAD2 = Common::KEYCODE_KP2,
121 KEY_NUMPAD3 = Common::KEYCODE_KP3,
122 KEY_NUMPAD4 = Common::KEYCODE_KP4,
123 KEY_NUMPAD5 = Common::KEYCODE_KP5,
124 KEY_NUMPAD6 = Common::KEYCODE_KP6,
125 KEY_NUMPAD7 = Common::KEYCODE_KP7,
126 KEY_NUMPAD8 = Common::KEYCODE_KP8,
127 KEY_NUMPAD9 = Common::KEYCODE_KP9,
128 KEY_MULTIPLY = Common::KEYCODE_KP_MULTIPLY,
129 KEY_ADD = Common::KEYCODE_KP_PLUS,
130 KEY_SEPARATOR = Common::KEYCODE_EQUALS,
131 KEY_SUBTRACT = Common::KEYCODE_KP_MINUS,
132 KEY_DECIMAL = Common::KEYCODE_KP_PERIOD,
133 KEY_DIVIDE = Common::KEYCODE_KP_DIVIDE,
134 KEY_F1 = Common::KEYCODE_F1,
135 KEY_F2 = Common::KEYCODE_F2,
136 KEY_F3 = Common::KEYCODE_F3,
137 KEY_F4 = Common::KEYCODE_F4,
138 KEY_F5 = Common::KEYCODE_F5,
139 KEY_F6 = Common::KEYCODE_F6,
140 KEY_F7 = Common::KEYCODE_F7,
141 KEY_F8 = Common::KEYCODE_F8,
142 KEY_F9 = Common::KEYCODE_F9,
143 KEY_F10 = Common::KEYCODE_F10,
144 KEY_F11 = Common::KEYCODE_F11,
145 KEY_F12 = Common::KEYCODE_F12,
146 KEY_NUMLOCK = Common::KEYCODE_NUMLOCK,
147 KEY_SCROLL = Common::KEYCODE_SCROLLOCK,
148 KEY_LSHIFT = Common::KEYCODE_LSHIFT,
149 KEY_RSHIFT = Common::KEYCODE_RSHIFT,
150 KEY_LCONTROL = Common::KEYCODE_LCTRL,
151 KEY_RCONTROL = Common::KEYCODE_RCTRL
158 KEY_COMMAND_ENTER = 1,
159 KEY_COMMAND_LEFT = 2,
160 KEY_COMMAND_RIGHT = 3,
161 KEY_COMMAND_HOME = 4,
163 KEY_COMMAND_BACKSPACE = 6,
165 KEY_COMMAND_INSERT = 8,
166 KEY_COMMAND_DELETE = 9
256 typedef void (*CharacterCallback)(
int command);
271 typedef void (*CommandCallback)(
int command);
283 void reportCharacter(byte character);
284 void reportCommand(KEY_COMMANDS command);
290 bool registerScriptBindings();
291 void unregisterScriptBindings();
294 void testForLeftDoubleClick();
295 void alterKeyboardState(
int keycode, byte newState);
297 byte _keyboardState[2][512];
298 bool _leftMouseState[2];
299 bool _rightMouseState[2];
304 bool _rightMouseDown;
305 bool _leftDoubleClick;
306 uint _doubleClickTime;
307 int _doubleClickRectWidth;
308 int _doubleClickRectHeight;
309 uint _lastLeftClickTime;
310 int _lastLeftClickMouseX;
311 int _lastLeftClickMouseY;
312 CommandCallback _commandCallback;
313 CharacterCallback _characterCallback;
Definition: persistable.h:39
Definition: outputpersistenceblock.h:39