TurtleBrains  0.2.1
High quality, portable, C++ API for native application and game development.
tb_application_input.h
1 
9 #ifndef _TurtleBrains_ApplicationInput_h_
10 #define _TurtleBrains_ApplicationInput_h_
11 
12 #include <vector>
13 
14 #include "../core/tb_types.h"
15 
16 namespace TurtleBrains
17 {
18  namespace Application
19  {
20 
26  enum Key
27  {
28  tbKey0, tbKey1, tbKey2, tbKey3, tbKey4, tbKey5, tbKey6, tbKey7, tbKey8, tbKey9,
29  tbKeyA, tbKeyB, tbKeyC, tbKeyD, tbKeyE, tbKeyF, tbKeyG, tbKeyH, tbKeyI, tbKeyJ,
30  tbKeyK, tbKeyL, tbKeyM, tbKeyN, tbKeyO, tbKeyP, tbKeyQ, tbKeyR, tbKeyS, tbKeyT,
31  tbKeyU, tbKeyV, tbKeyW, tbKeyX, tbKeyY, tbKeyZ, tbKeySpace, tbKeyEscape, tbKeyEnter,
32  tbKeyUp, tbKeyDown, tbKeyLeft, tbKeyRight, tbMouseLeft, tbMouseRight, tbMouseMiddle, tbKeyMax
33  };
34 
35  //
36  // TODO: TIM: Planning: Do we need this? The idea was that we would post events to the RealtimeApplication.
37  //
38  //enum InputEvent
39  //{
40  // kPressedEvent,
41  // kReleasedEvent,
42  // //kRepeatEvent,
43  // kMoveEvent,
44  //};
45 
46  namespace Input
47  {
55  bool IsKeyPressed(const Key& key);
56 
64  bool IsKeyReleased(const Key& key);
65 
72  bool IsKeyDown(const Key& key);
73 
81  void GetMousePosition(int* mouseX, int* mouseY);
82 
90  bool GetMouseMovement(int* mouseX, int* mouseY);
91 
99  void SetMousePosition(int mouseX, int mouseY);
100 
101  }; /* namespace Input */
102 
103  }; /* namespace Application */
104 }; /* namespace TurtleBrains */
105 
107 
108 #endif /* _TurtleBrains_ApplicationMenu_h_ */
Contains all functions, classes and helpers related to game/application development written by Tim "B...
Definition: tb_application_dialog.h:21
Contains classes, functions and constants to create Applications, Menus, Dialogs with native controls...
Definition: tb_application_dialog.h:23
Key
Definition: tb_application_input.h:26