Free Electron
ConsoleKeys.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __sdl_ConsoleKeys_h__
8 #define __sdl_ConsoleKeys_h__
9 
10 #include "window/WindowEvent.h"
11 namespace fe
12 {
13 namespace ext
14 {
15 
16 /**************************************************************************//**
17  @brief WindowEvent handler that watches the console for key presses
18 
19  @ingroup sdl
20 *//***************************************************************************/
21 class FE_DL_EXPORT ConsoleKeys:
22  virtual public KeyI,
23  public Initialize<ConsoleKeys>
24 {
25  public:
26  ConsoleKeys(void);
27 virtual ~ConsoleKeys(void);
28 
29  void initialize(void);
30 
31  //* As HandlerI
32 virtual void handleBind(sp<SignalerI> spSignalerI, sp<Layout> spLayout);
33 virtual void handle(Record &record);
34 
35 virtual BWORD generatesReleaseEvents(void) { return FALSE; }
36 
37  private:
38 
39  I32 keysPending(void);
40  void poll(void);
41 
42  sp<SignalerI> m_spSignalerI;
43 
44  WindowEvent m_event;
45  WindowEvent m_keyEvent;
46  Record m_keyRecord;
47 };
48 
49 } /* namespace ext */
50 } /* namespace fe */
51 
52 #endif /* __sdl_ConsoleKeys_h__ */
Keyboard event generator.
Definition: KeyI.h:20
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
WindowEvent handler that watches the console for key presses.
Definition: ConsoleKeys.h:21
Generalized windowing event.
Definition: WindowEvent.h:43
Reference to an instance of a Layout.
Definition: RecordSB.h:35