TurtleBrains  0.3.1
High quality, portable, C++ framework for rapid 2D game development.
tb_application_input.h
1 
9 #ifndef _TurtleBrains_ApplicationInput_h_
10 #define _TurtleBrains_ApplicationInput_h_
11 
12 namespace TurtleBrains
13 {
14  namespace Application
15  {
16 
24  enum Key
25  {
26  tbKey0, tbKey1, tbKey2, tbKey3, tbKey4, tbKey5, tbKey6, tbKey7, tbKey8, tbKey9,
27  tbKeyA, tbKeyB, tbKeyC, tbKeyD, tbKeyE, tbKeyF, tbKeyG, tbKeyH, tbKeyI, tbKeyJ,
28  tbKeyK, tbKeyL, tbKeyM, tbKeyN, tbKeyO, tbKeyP, tbKeyQ, tbKeyR, tbKeyS, tbKeyT,
29  tbKeyU, tbKeyV, tbKeyW, tbKeyX, tbKeyY, tbKeyZ, tbKeySpace, tbKeyEscape, tbKeyEnter,
30  tbKeyUp, tbKeyDown, tbKeyLeft, tbKeyRight, tbMouseLeft, tbMouseRight, tbMouseMiddle, tbKeyMax
31  };
32 
33  //
34  // TODO: TIM: Planning: Do we need this? The idea was that we would post events to the RealtimeApplication.
35  //
36  //enum InputEvent
37  //{
38  // kPressedEvent,
39  // kReleasedEvent,
40  // //kRepeatEvent,
41  // kMoveEvent,
42  //};
43 
44  namespace Input
45  {
55  bool IsKeyPressed(const Key& key);
56 
66  bool IsKeyReleased(const Key& key);
67 
76  bool IsKeyDown(const Key& key);
77 
87  void GetMousePosition(int* mouseX, int* mouseY);
88 
98  bool GetMouseMovement(int* mouseX, int* mouseY);
99 
109  void SetMousePosition(int mouseX, int mouseY);
110 
111  }; /* namespace Input */
112 
113  }; /* namespace Application */
114 }; /* namespace TurtleBrains */
115 
117 
118 #endif /* _TurtleBrains_ApplicationMenu_h_ */
Here is some information about the primary namespace.
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:24