Alpha Engine: AEInput.h File Reference

AlphaEngine

AEInput.h File Reference

Header file for the input library. More...

Go to the source code of this file.

Macros

#define AEVK_LBUTTON   VK_LBUTTON
 Left mouse button. More...
 
#define AEVK_RBUTTON   VK_RBUTTON
 Right mouse button. More...
 
#define AEVK_MBUTTON   VK_MBUTTON
 Middle mouse button. More...
 
#define AEVK_BACK   VK_BACK
 Backspace. More...
 
#define AEVK_TAB   VK_TAB
 
#define AEVK_RETURN   VK_RETURN
 
#define AEVK_LSHIFT   VK_LSHIFT
 
#define AEVK_RSHIFT   VK_RSHIFT
 
#define AEVK_LCTRL   VK_LCONTROL
 
#define AEVK_RCTRL   VK_RCONTROL
 
#define AEVK_LALT   VK_LMENU
 
#define AEVK_RALT   VK_RMENU
 
#define AEVK_PRINTSCREEN   VK_SNAPSHOT
 
#define AEVK_SCROLLLOCK   VK_SCROLL
 
#define AEVK_PAUSE   VK_PAUSE
 
#define AEVK_CAPSLOCK   VK_CAPITAL
 
#define AEVK_ESCAPE   VK_ESCAPE
 
#define AEVK_SPACE   VK_SPACE
 
#define AEVK_PAGEUP   VK_PRIOR
 
#define AEVK_PAGEDOWN   VK_NEXT
 
#define AEVK_END   VK_END
 
#define AEVK_HOME   VK_HOME
 
#define AEVK_LEFT   VK_LEFT
 
#define AEVK_UP   VK_UP
 
#define AEVK_RIGHT   VK_RIGHT
 
#define AEVK_DOWN   VK_DOWN
 
#define AEVK_INSERT   VK_INSERT
 
#define AEVK_DELETE   VK_DELETE
 
#define AEVK_0   0x30
 
#define AEVK_1   0x31
 
#define AEVK_2   0x32
 
#define AEVK_3   0x33
 
#define AEVK_4   0x34
 
#define AEVK_5   0x35
 
#define AEVK_6   0x36
 
#define AEVK_7   0x37
 
#define AEVK_8   0x38
 
#define AEVK_9   0x39
 
#define AEVK_A   0x41
 
#define AEVK_B   0x42
 
#define AEVK_C   0x43
 
#define AEVK_D   0x44
 
#define AEVK_E   0x45
 
#define AEVK_F   0x46
 
#define AEVK_G   0x47
 
#define AEVK_H   0x48
 
#define AEVK_I   0x49
 
#define AEVK_J   0x4A
 
#define AEVK_K   0x4B
 
#define AEVK_L   0x4C
 
#define AEVK_M   0x4D
 
#define AEVK_N   0x4E
 
#define AEVK_O   0x4F
 
#define AEVK_P   0x50
 
#define AEVK_Q   0x51
 
#define AEVK_R   0x52
 
#define AEVK_S   0x53
 
#define AEVK_T   0x54
 
#define AEVK_U   0x55
 
#define AEVK_V   0x56
 
#define AEVK_W   0x57
 
#define AEVK_X   0x58
 
#define AEVK_Y   0x59
 
#define AEVK_Z   0x5A
 
#define AEVK_NUMPAD0   VK_NUMPAD0
 
#define AEVK_NUMPAD1   VK_NUMPAD1
 
#define AEVK_NUMPAD2   VK_NUMPAD2
 
#define AEVK_NUMPAD3   VK_NUMPAD3
 
#define AEVK_NUMPAD4   VK_NUMPAD4
 
#define AEVK_NUMPAD5   VK_NUMPAD5
 
#define AEVK_NUMPAD6   VK_NUMPAD6
 
#define AEVK_NUMPAD7   VK_NUMPAD7
 
#define AEVK_NUMPAD8   VK_NUMPAD8
 
#define AEVK_NUMPAD9   VK_NUMPAD9
 
#define AEVK_NUM_MULTIPLY   VK_MULTIPLY
 
#define AEVK_NUM_PLUS   VK_ADD
 
#define AEVK_NUM_MINUS   VK_SUBTRACT
 
#define AEVK_NUM_PERIOD   VK_DECIMAL
 
#define AEVK_NUM_DIVIDE   VK_DIVIDE
 
#define AEVK_NUMLOCK   VK_NUMLOCK
 
#define AEVK_F1   VK_F1
 
#define AEVK_F2   VK_F2
 
#define AEVK_F3   VK_F3
 
#define AEVK_F4   VK_F4
 
#define AEVK_F5   VK_F5
 
#define AEVK_F6   VK_F6
 
#define AEVK_F7   VK_F7
 
#define AEVK_F8   VK_F8
 
#define AEVK_F9   VK_F9
 
#define AEVK_F10   VK_F10
 
#define AEVK_F11   VK_F11
 
#define AEVK_F12   VK_F12
 
#define AEVK_SEMICOLON   VK_OEM_1
 ; : More...
 
#define AEVK_SLASH   VK_OEM_2
 / ? More...
 
#define AEVK_BACKQUOTE   VK_OEM_3
 ` ~ More...
 
#define AEVK_LBRACKET   VK_OEM_4
 [ { More...
 
#define AEVK_BACKSLASH   VK_OEM_5
 \ | More...
 
#define AEVK_RBRACKET   VK_OEM_6
 ] } More...
 
#define AEVK_QUOTE   VK_OEM_7
 ' " More...
 
#define AEVK_EQUAL   VK_OEM_PLUS
 = + More...
 
#define AEVK_MINUS   VK_OEM_MINUS
 
#define AEVK_PERIOD   VK_OEM_PERIOD
 . > More...
 
#define AEVK_COMMA   VK_OEM_COMMA
 , < More...
 

Functions

s32 AEInputInit ()
 Initialize AEInput. More...
 
void AEInputReset ()
 Reset AEInput. More...
 
void AEInputUpdate ()
 Update AEInput. More...
 
void AEInputExit ()
 Free AEInput. More...
 
u8 AEInputCheckCurr (u8 key)
 Check if a keyboard button is being pressed. More...
 
u8 AEInputCheckPrev (u8 key)
 Check if a keyboard button was pressed recently. More...
 
u8 AEInputCheckTriggered (u8 key)
 Check if a keyboard button was triggered. More...
 
u8 AEInputCheckReleased (u8 key)
 Check if a keyboard button was released. More...
 
void AEInputGetCursorPosition (s32 *pX, s32 *pY)
 Get the current position of the cursor, in screen coordinates. More...
 
void AEInputGetCursorPositionDelta (s32 *pDeltaX, s32 *pDeltaY)
 Get the change in position of the cursor since the last update, in screen coordinates. More...
 
void AEInputShowCursor (s32 Show)
 Set if mouse cursor is showned. More...
 

Detailed Description

Header file for the input library.

Project: Alpha Engine
Author
Sun Tjen Fam
Date
January 31, 2008
Copyright
Copyright (C) 2013 DigiPen Institute of Technology. Reproduction or disclosure of this file or its contents without the prior written consent of DigiPen Institute of Technology is prohibited.

Definition in file AEInput.h.

Macro Definition Documentation

#define AEVK_0   0x30

Definition at line 59 of file AEInput.h.

#define AEVK_1   0x31

Definition at line 60 of file AEInput.h.

#define AEVK_2   0x32

Definition at line 61 of file AEInput.h.

#define AEVK_3   0x33

Definition at line 62 of file AEInput.h.

#define AEVK_4   0x34

Definition at line 63 of file AEInput.h.

#define AEVK_5   0x35

Definition at line 64 of file AEInput.h.

#define AEVK_6   0x36

Definition at line 65 of file AEInput.h.

#define AEVK_7   0x37

Definition at line 66 of file AEInput.h.

#define AEVK_8   0x38

Definition at line 67 of file AEInput.h.

#define AEVK_9   0x39

Definition at line 68 of file AEInput.h.

#define AEVK_A   0x41

Definition at line 70 of file AEInput.h.

#define AEVK_B   0x42

Definition at line 71 of file AEInput.h.

#define AEVK_BACK   VK_BACK

Backspace.

Definition at line 31 of file AEInput.h.

#define AEVK_BACKQUOTE   VK_OEM_3

` ~

Definition at line 130 of file AEInput.h.

#define AEVK_BACKSLASH   VK_OEM_5

\ |

Definition at line 132 of file AEInput.h.

#define AEVK_C   0x43

Definition at line 72 of file AEInput.h.

#define AEVK_CAPSLOCK   VK_CAPITAL

Definition at line 43 of file AEInput.h.

#define AEVK_COMMA   VK_OEM_COMMA

, <

Definition at line 139 of file AEInput.h.

#define AEVK_D   0x44

Definition at line 73 of file AEInput.h.

#define AEVK_DELETE   VK_DELETE

Definition at line 57 of file AEInput.h.

#define AEVK_DOWN   VK_DOWN

Definition at line 55 of file AEInput.h.

#define AEVK_E   0x45

Definition at line 74 of file AEInput.h.

#define AEVK_END   VK_END

Definition at line 50 of file AEInput.h.

#define AEVK_EQUAL   VK_OEM_PLUS

= +

Definition at line 136 of file AEInput.h.

#define AEVK_ESCAPE   VK_ESCAPE

Definition at line 45 of file AEInput.h.

#define AEVK_F   0x46

Definition at line 75 of file AEInput.h.

#define AEVK_F1   VK_F1

Definition at line 115 of file AEInput.h.

#define AEVK_F10   VK_F10

Definition at line 124 of file AEInput.h.

#define AEVK_F11   VK_F11

Definition at line 125 of file AEInput.h.

#define AEVK_F12   VK_F12

Definition at line 126 of file AEInput.h.

#define AEVK_F2   VK_F2

Definition at line 116 of file AEInput.h.

#define AEVK_F3   VK_F3

Definition at line 117 of file AEInput.h.

#define AEVK_F4   VK_F4

Definition at line 118 of file AEInput.h.

#define AEVK_F5   VK_F5

Definition at line 119 of file AEInput.h.

#define AEVK_F6   VK_F6

Definition at line 120 of file AEInput.h.

#define AEVK_F7   VK_F7

Definition at line 121 of file AEInput.h.

#define AEVK_F8   VK_F8

Definition at line 122 of file AEInput.h.

#define AEVK_F9   VK_F9

Definition at line 123 of file AEInput.h.

#define AEVK_G   0x47

Definition at line 76 of file AEInput.h.

#define AEVK_H   0x48

Definition at line 77 of file AEInput.h.

#define AEVK_HOME   VK_HOME

Definition at line 51 of file AEInput.h.

#define AEVK_I   0x49

Definition at line 78 of file AEInput.h.

#define AEVK_INSERT   VK_INSERT

Definition at line 56 of file AEInput.h.

#define AEVK_J   0x4A

Definition at line 79 of file AEInput.h.

#define AEVK_K   0x4B

Definition at line 80 of file AEInput.h.

#define AEVK_L   0x4C

Definition at line 81 of file AEInput.h.

#define AEVK_LALT   VK_LMENU

Definition at line 38 of file AEInput.h.

#define AEVK_LBRACKET   VK_OEM_4

[ {

Definition at line 131 of file AEInput.h.

#define AEVK_LBUTTON   VK_LBUTTON

Left mouse button.

Definition at line 27 of file AEInput.h.

#define AEVK_LCTRL   VK_LCONTROL

Definition at line 36 of file AEInput.h.

#define AEVK_LEFT   VK_LEFT

Definition at line 52 of file AEInput.h.

#define AEVK_LSHIFT   VK_LSHIFT

Definition at line 34 of file AEInput.h.

#define AEVK_M   0x4D

Definition at line 82 of file AEInput.h.

#define AEVK_MBUTTON   VK_MBUTTON

Middle mouse button.

Definition at line 29 of file AEInput.h.

#define AEVK_MINUS   VK_OEM_MINUS
  • _

Definition at line 137 of file AEInput.h.

#define AEVK_N   0x4E

Definition at line 83 of file AEInput.h.

#define AEVK_NUM_DIVIDE   VK_DIVIDE

Definition at line 112 of file AEInput.h.

#define AEVK_NUM_MINUS   VK_SUBTRACT

Definition at line 110 of file AEInput.h.

#define AEVK_NUM_MULTIPLY   VK_MULTIPLY

Definition at line 108 of file AEInput.h.

#define AEVK_NUM_PERIOD   VK_DECIMAL

Definition at line 111 of file AEInput.h.

#define AEVK_NUM_PLUS   VK_ADD

Definition at line 109 of file AEInput.h.

#define AEVK_NUMLOCK   VK_NUMLOCK

Definition at line 113 of file AEInput.h.

#define AEVK_NUMPAD0   VK_NUMPAD0

Definition at line 97 of file AEInput.h.

#define AEVK_NUMPAD1   VK_NUMPAD1

Definition at line 98 of file AEInput.h.

#define AEVK_NUMPAD2   VK_NUMPAD2

Definition at line 99 of file AEInput.h.

#define AEVK_NUMPAD3   VK_NUMPAD3

Definition at line 100 of file AEInput.h.

#define AEVK_NUMPAD4   VK_NUMPAD4

Definition at line 101 of file AEInput.h.

#define AEVK_NUMPAD5   VK_NUMPAD5

Definition at line 102 of file AEInput.h.

#define AEVK_NUMPAD6   VK_NUMPAD6

Definition at line 103 of file AEInput.h.

#define AEVK_NUMPAD7   VK_NUMPAD7

Definition at line 104 of file AEInput.h.

#define AEVK_NUMPAD8   VK_NUMPAD8

Definition at line 105 of file AEInput.h.

#define AEVK_NUMPAD9   VK_NUMPAD9

Definition at line 106 of file AEInput.h.

#define AEVK_O   0x4F

Definition at line 84 of file AEInput.h.

#define AEVK_P   0x50

Definition at line 85 of file AEInput.h.

#define AEVK_PAGEDOWN   VK_NEXT

Definition at line 49 of file AEInput.h.

#define AEVK_PAGEUP   VK_PRIOR

Definition at line 48 of file AEInput.h.

#define AEVK_PAUSE   VK_PAUSE

Definition at line 42 of file AEInput.h.

#define AEVK_PERIOD   VK_OEM_PERIOD

. >

Definition at line 138 of file AEInput.h.

#define AEVK_PRINTSCREEN   VK_SNAPSHOT

Definition at line 40 of file AEInput.h.

#define AEVK_Q   0x51

Definition at line 86 of file AEInput.h.

#define AEVK_QUOTE   VK_OEM_7

' "

Definition at line 134 of file AEInput.h.

#define AEVK_R   0x52

Definition at line 87 of file AEInput.h.

#define AEVK_RALT   VK_RMENU

Definition at line 39 of file AEInput.h.

#define AEVK_RBRACKET   VK_OEM_6

] }

Definition at line 133 of file AEInput.h.

#define AEVK_RBUTTON   VK_RBUTTON

Right mouse button.

Definition at line 28 of file AEInput.h.

#define AEVK_RCTRL   VK_RCONTROL

Definition at line 37 of file AEInput.h.

#define AEVK_RETURN   VK_RETURN

Definition at line 33 of file AEInput.h.

#define AEVK_RIGHT   VK_RIGHT

Definition at line 54 of file AEInput.h.

#define AEVK_RSHIFT   VK_RSHIFT

Definition at line 35 of file AEInput.h.

#define AEVK_S   0x53

Definition at line 88 of file AEInput.h.

#define AEVK_SCROLLLOCK   VK_SCROLL

Definition at line 41 of file AEInput.h.

#define AEVK_SEMICOLON   VK_OEM_1

; :

Definition at line 128 of file AEInput.h.

#define AEVK_SLASH   VK_OEM_2

/ ?

Definition at line 129 of file AEInput.h.

#define AEVK_SPACE   VK_SPACE

Definition at line 47 of file AEInput.h.

#define AEVK_T   0x54

Definition at line 89 of file AEInput.h.

#define AEVK_TAB   VK_TAB

Definition at line 32 of file AEInput.h.

#define AEVK_U   0x55

Definition at line 90 of file AEInput.h.

#define AEVK_UP   VK_UP

Definition at line 53 of file AEInput.h.

#define AEVK_V   0x56

Definition at line 91 of file AEInput.h.

#define AEVK_W   0x57

Definition at line 92 of file AEInput.h.

#define AEVK_X   0x58

Definition at line 93 of file AEInput.h.

#define AEVK_Y   0x59

Definition at line 94 of file AEInput.h.

#define AEVK_Z   0x5A

Definition at line 95 of file AEInput.h.

Function Documentation

u8 AEInputCheckCurr ( u8  key)

Check if a keyboard button is being pressed.

Check if keyboard button given by key is currently being pressed.

Parameters
[in]keyValue corresponding to the keyboard button that is being checked for.
Return values
u8Return true if keyboard button is being pressed. Else return false.
u8 AEInputCheckPrev ( u8  key)

Check if a keyboard button was pressed recently.

Check if keyboard button given by key was pressed in the previous update.

Parameters
[in]keyValue corresponding to the keyboard button that is being checked for.
Return values
u8Return true if keyboard button was pressed. Else return false.
u8 AEInputCheckReleased ( u8  key)

Check if a keyboard button was released.

Check if the keyboard button given by key was recently released.

Parameters
[in]keyValue corresponding to the keyboard button that is being checked for.
Return values
u8Return true if keyboard button was pressed. Else return false.
u8 AEInputCheckTriggered ( u8  key)

Check if a keyboard button was triggered.

Check if the keyboard button given by key was recently triggerd (pressed and then quickly released).

Parameters
[in]keyValue corresponding to the keyboard button that is being checked for.
Return values
u8Return true if keyboard button was pressed. Else return false.
void AEInputExit ( )

Free AEInput.

Warning
This function is already called in AESysExit.
Return values
voidNo return.
void AEInputGetCursorPosition ( s32 pX,
s32 pY 
)

Get the current position of the cursor, in screen coordinates.

Parameters
[out]pXPointer to s32 where the X value will be stored.
[out]pYPointer to s32 where the Y value will be stored.
Return values
voidNo return.
void AEInputGetCursorPositionDelta ( s32 pDeltaX,
s32 pDeltaY 
)

Get the change in position of the cursor since the last update, in screen coordinates.

Parameters
[out]pDeltaXPointer to s32 where the X value will be stored.
[out]pDeltaYPointer to s32 where the Y value will be stored.
Return values
voidNo return.
s32 AEInputInit ( )

Initialize AEInput.

Warning
This function is already called in AESysInit.
Return values
s32Return 1 if initialization is successful. Else return 0.
void AEInputReset ( )

Reset AEInput.

Warning
This function is already called in AESysReset.
Return values
voidNo return.
void AEInputShowCursor ( s32  Show)

Set if mouse cursor is showned.

Setting true will allow mouse cursor to be rendered on screen. Setting false will hide the mouse cursor.

Parameters
[in]ShowSet if mouse cursor is showned or not.
Return values
voidNo return.
void AEInputUpdate ( )

Update AEInput.

Warning
This function is already called in AESysUpdate.
Return values
voidNo return.
Generated on Sat Jan 4 2014 02:06:22 for Alpha Engine by   doxygen 1.8.5