equal
deleted
inserted
replaced
3 |
3 |
4 #include "../Input.hh" |
4 #include "../Input.hh" |
5 #include "../Timer.hh" |
5 #include "../Timer.hh" |
6 #include "../Types.hh" |
6 #include "../Types.hh" |
7 |
7 |
|
8 #include <ClanLib/signals.h> |
8 #include <ClanLib/Display/input_device.h> |
9 #include <ClanLib/Display/input_device.h> |
9 #include <ClanLib/Display/keys.h> |
10 #include <ClanLib/Display/keys.h> |
10 |
11 |
11 #include <list> |
12 #include <list> |
12 |
13 |
196 |
197 |
197 /** |
198 /** |
198 * Are we enabled or not? |
199 * Are we enabled or not? |
199 */ |
200 */ |
200 bool _enabled; |
201 bool _enabled; |
|
202 |
|
203 /** |
|
204 * The keyevent signal |
|
205 */ |
|
206 CL_Signal_v2<BitMaskType, TimeMS> _sig_input; |
201 |
207 |
202 public: |
208 public: |
203 /** |
209 /** |
204 * Constructs the InputHandler using the given keyboard, keymap and key-repeat expire time. |
210 * Constructs the InputHandler using the given keyboard, keymap and key-repeat expire time. |
205 * |
211 * |
247 |
253 |
248 /** |
254 /** |
249 * Current enable/disable state |
255 * Current enable/disable state |
250 */ |
256 */ |
251 bool enabled (void) const { return _enabled; } |
257 bool enabled (void) const { return _enabled; } |
|
258 |
|
259 /** |
|
260 * This signal is triggered whenever there is nonzero input, or when the input goes to zero |
|
261 */ |
|
262 CL_Signal_v2<BitMaskType, TimeMS>& sig_input (void) { return _sig_input; } |
252 }; |
263 }; |
253 |
264 |
254 /** |
265 /** |
255 * Handles reading input from a keyboard and mapping it to PlayerInput/GuiInput bitmasks |
266 * Handles reading input from a keyboard and mapping it to PlayerInput/GuiInput bitmasks |
256 */ |
267 */ |
296 */ |
307 */ |
297 GuiInput readGuiInput (void); |
308 GuiInput readGuiInput (void); |
298 }; |
309 }; |
299 |
310 |
300 } |
311 } |
301 |
|
302 |
312 |
303 |
313 |
304 |
314 |
305 /* |
315 /* |
306 * Public template class method definitions |
316 * Public template class method definitions |