Alpha Engine: AEInput.h Source File

AlphaEngine

AEInput.h
Go to the documentation of this file.
1 /******************************************************************************/
15 /******************************************************************************/
16 
17 #ifndef AE_INPUT_H
18 #define AE_INPUT_H
19 
20 // ---------------------------------------------------------------------------
21 // Defines/Enums
22 
23 // These defines don't match the direct input defines and you should be using these
24 // defines instead of the ones in "dinput.h"
25 // For more key codes go to http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
26 
27 #define AEVK_LBUTTON VK_LBUTTON
28 #define AEVK_RBUTTON VK_RBUTTON
29 #define AEVK_MBUTTON VK_MBUTTON
30 
31 #define AEVK_BACK VK_BACK
32 #define AEVK_TAB VK_TAB
33 #define AEVK_RETURN VK_RETURN
34 #define AEVK_LSHIFT VK_LSHIFT
35 #define AEVK_RSHIFT VK_RSHIFT
36 #define AEVK_LCTRL VK_LCONTROL
37 #define AEVK_RCTRL VK_RCONTROL
38 #define AEVK_LALT VK_LMENU
39 #define AEVK_RALT VK_RMENU
40 #define AEVK_PRINTSCREEN VK_SNAPSHOT
41 #define AEVK_SCROLLLOCK VK_SCROLL
42 #define AEVK_PAUSE VK_PAUSE
43 #define AEVK_CAPSLOCK VK_CAPITAL
44 
45 #define AEVK_ESCAPE VK_ESCAPE
46 
47 #define AEVK_SPACE VK_SPACE
48 #define AEVK_PAGEUP VK_PRIOR
49 #define AEVK_PAGEDOWN VK_NEXT
50 #define AEVK_END VK_END
51 #define AEVK_HOME VK_HOME
52 #define AEVK_LEFT VK_LEFT
53 #define AEVK_UP VK_UP
54 #define AEVK_RIGHT VK_RIGHT
55 #define AEVK_DOWN VK_DOWN
56 #define AEVK_INSERT VK_INSERT
57 #define AEVK_DELETE VK_DELETE
58 
59 #define AEVK_0 0x30
60 #define AEVK_1 0x31
61 #define AEVK_2 0x32
62 #define AEVK_3 0x33
63 #define AEVK_4 0x34
64 #define AEVK_5 0x35
65 #define AEVK_6 0x36
66 #define AEVK_7 0x37
67 #define AEVK_8 0x38
68 #define AEVK_9 0x39
69 
70 #define AEVK_A 0x41
71 #define AEVK_B 0x42
72 #define AEVK_C 0x43
73 #define AEVK_D 0x44
74 #define AEVK_E 0x45
75 #define AEVK_F 0x46
76 #define AEVK_G 0x47
77 #define AEVK_H 0x48
78 #define AEVK_I 0x49
79 #define AEVK_J 0x4A
80 #define AEVK_K 0x4B
81 #define AEVK_L 0x4C
82 #define AEVK_M 0x4D
83 #define AEVK_N 0x4E
84 #define AEVK_O 0x4F
85 #define AEVK_P 0x50
86 #define AEVK_Q 0x51
87 #define AEVK_R 0x52
88 #define AEVK_S 0x53
89 #define AEVK_T 0x54
90 #define AEVK_U 0x55
91 #define AEVK_V 0x56
92 #define AEVK_W 0x57
93 #define AEVK_X 0x58
94 #define AEVK_Y 0x59
95 #define AEVK_Z 0x5A
96 
97 #define AEVK_NUMPAD0 VK_NUMPAD0
98 #define AEVK_NUMPAD1 VK_NUMPAD1
99 #define AEVK_NUMPAD2 VK_NUMPAD2
100 #define AEVK_NUMPAD3 VK_NUMPAD3
101 #define AEVK_NUMPAD4 VK_NUMPAD4
102 #define AEVK_NUMPAD5 VK_NUMPAD5
103 #define AEVK_NUMPAD6 VK_NUMPAD6
104 #define AEVK_NUMPAD7 VK_NUMPAD7
105 #define AEVK_NUMPAD8 VK_NUMPAD8
106 #define AEVK_NUMPAD9 VK_NUMPAD9
107 
108 #define AEVK_NUM_MULTIPLY VK_MULTIPLY
109 #define AEVK_NUM_PLUS VK_ADD
110 #define AEVK_NUM_MINUS VK_SUBTRACT
111 #define AEVK_NUM_PERIOD VK_DECIMAL
112 #define AEVK_NUM_DIVIDE VK_DIVIDE
113 #define AEVK_NUMLOCK VK_NUMLOCK
114 
115 #define AEVK_F1 VK_F1
116 #define AEVK_F2 VK_F2
117 #define AEVK_F3 VK_F3
118 #define AEVK_F4 VK_F4
119 #define AEVK_F5 VK_F5
120 #define AEVK_F6 VK_F6
121 #define AEVK_F7 VK_F7
122 #define AEVK_F8 VK_F8
123 #define AEVK_F9 VK_F9
124 #define AEVK_F10 VK_F10
125 #define AEVK_F11 VK_F11
126 #define AEVK_F12 VK_F12
127 
128 #define AEVK_SEMICOLON VK_OEM_1
129 #define AEVK_SLASH VK_OEM_2
130 #define AEVK_BACKQUOTE VK_OEM_3
131 #define AEVK_LBRACKET VK_OEM_4
132 #define AEVK_BACKSLASH VK_OEM_5
133 #define AEVK_RBRACKET VK_OEM_6
134 #define AEVK_QUOTE VK_OEM_7
135 
136 #define AEVK_EQUAL VK_OEM_PLUS
137 #define AEVK_MINUS VK_OEM_MINUS
138 #define AEVK_PERIOD VK_OEM_PERIOD
139 #define AEVK_COMMA VK_OEM_COMMA
140 
141 // ---------------------------------------------------------------------------
142 // Function prototypes
143 
144 #ifdef __cplusplus
145 
146 extern "C"
147 {
148 #endif
149 
150 // ---------------------------------------------------------------------------
151 
152 /******************************************************************************/
164 /******************************************************************************/
166 
167 /******************************************************************************/
178 /******************************************************************************/
179 AE_API void AEInputReset();
180 
181 /******************************************************************************/
192 /******************************************************************************/
193 AE_API void AEInputUpdate();
194 
195 /******************************************************************************/
206 /******************************************************************************/
207 AE_API void AEInputExit();
208 
209 /******************************************************************************/
226 /******************************************************************************/
228 
229 /******************************************************************************/
246 /******************************************************************************/
248 
249 /******************************************************************************/
266 /******************************************************************************/
268 
269 /******************************************************************************/
286 /******************************************************************************/
288 
289 /******************************************************************************/
306 /******************************************************************************/
307 AE_API void AEInputGetCursorPosition(s32 *pX, s32 *pY);
308 
309 /******************************************************************************/
326 /******************************************************************************/
327 AE_API void AEInputGetCursorPositionDelta(s32 *pDeltaX, s32 *pDeltaY);
328 
329 /******************************************************************************/
344 /******************************************************************************/
345 AE_API void AEInputShowCursor(s32 Show);
346 
347 // ---------------------------------------------------------------------------
348 
349 #ifdef __cplusplus
350 }
351 #endif
352 
353 // ---------------------------------------------------------------------------
354 
355 #endif // AE_INPUT_H
356 
void AEInputExit()
Free AEInput.
void AEInputReset()
Reset AEInput.
signed int s32
Definition: AETypes.h:27
u8 AEInputCheckPrev(u8 key)
Check if a keyboard button was pressed recently.
void AEInputGetCursorPosition(s32 *pX, s32 *pY)
Get the current position of the cursor, in screen coordinates.
#define AE_API
Definition: AEExport.h:53
u8 AEInputCheckTriggered(u8 key)
Check if a keyboard button was triggered.
void AEInputGetCursorPositionDelta(s32 *pDeltaX, s32 *pDeltaY)
Get the change in position of the cursor since the last update, in screen coordinates.
s32 AEInputInit()
Initialize AEInput.
unsigned char u8
Definition: AETypes.h:24
void AEInputShowCursor(s32 Show)
Set if mouse cursor is showned.
u8 AEInputCheckReleased(u8 key)
Check if a keyboard button was released.
void AEInputUpdate()
Update AEInput.
u8 AEInputCheckCurr(u8 key)
Check if a keyboard button is being pressed.
Generated on Sat Jan 4 2014 02:06:22 for Alpha Engine by   doxygen 1.8.5