Loading...
Searching...
No Matches
keyboard.h
Go to the documentation of this file.
#ifndef ARC_GRAPHICS_KEYBOARD_H_
#define ARC_GRAPHICS_KEYBOARD_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
/**
* @brief predefien ARC_Input so as not to get circular reference
*/
typedef struct ARC_Input ARC_Input;
typedef struct ARC_Keyboard ARC_Keyboard;
typedef struct ARC_KeyboardInfo ARC_KeyboardInfo;
typedef enum ARC_KeyboardState {
ARC_KEY_NONE,
ARC_KEY_PRESSED,
ARC_KEY_RELEASED
} ARC_KeyboardState;
#define ARC_KEYBOARD_BUTTON_NUM 239
void ARC_Keyboard_CreateWithInput(ARC_Keyboard **keyboard, ARC_Input *input);
void ARC_Keyboard_Destroy(ARC_Keyboard *keyboard);
void ARC_Keyboard_Update(ARC_Keyboard *keyboard);
typedef enum ARC_KeyboardKey {
ARC_KEY_A,
ARC_KEY_B,
ARC_KEY_C,
ARC_KEY_D,
ARC_KEY_E,
ARC_KEY_F,
ARC_KEY_G,
ARC_KEY_H,
ARC_KEY_I,
ARC_KEY_J,
ARC_KEY_K,
ARC_KEY_L,
ARC_KEY_M,
ARC_KEY_N,
ARC_KEY_O,
ARC_KEY_P,
ARC_KEY_Q,
ARC_KEY_R,
ARC_KEY_S,
ARC_KEY_T,
ARC_KEY_U,
ARC_KEY_V,
ARC_KEY_W,
ARC_KEY_X,
ARC_KEY_Y,
ARC_KEY_Z,
ARC_KEY_0,
ARC_KEY_1,
ARC_KEY_2,
ARC_KEY_3,
ARC_KEY_4,
ARC_KEY_5,
ARC_KEY_6,
ARC_KEY_7,
ARC_KEY_8,
ARC_KEY_9,
ARC_KEY_SPACE,
ARC_KEY_ESC,
ARC_KEY_ENTER,
} ARC_Keyboard_Key;
ARC_KeyboardState ARC_Keyboard_GetState(ARC_Keyboard *keyboard, enum ARC_KeyboardKey key);
#ifdef __cplusplus
}
#endif
#endif // !ARC_GRAPHICS_KEYBOARD_H_
ARC_Input
struct ARC_Input ARC_Input
predefien ARC_Input so as not to get circular reference
Definition input.h:17
ARC_KeyboardInfo
struct ARC_KeyboardInfo ARC_KeyboardInfo
Definition keyboard.h:17
ARC_KeyboardKey
ARC_KeyboardKey
Definition keyboard.h:32
ARC_KEY_F
@ ARC_KEY_F
Definition keyboard.h:38
ARC_KEY_4
@ ARC_KEY_4
Definition keyboard.h:64
ARC_KEY_2
@ ARC_KEY_2
Definition keyboard.h:62
ARC_KEY_0
@ ARC_KEY_0
Definition keyboard.h:60
ARC_KEY_M
@ ARC_KEY_M
Definition keyboard.h:45
ARC_KEY_K
@ ARC_KEY_K
Definition keyboard.h:43
ARC_KEY_P
@ ARC_KEY_P
Definition keyboard.h:48
ARC_KEY_E
@ ARC_KEY_E
Definition keyboard.h:37
ARC_KEY_8
@ ARC_KEY_8
Definition keyboard.h:68
ARC_KEY_T
@ ARC_KEY_T
Definition keyboard.h:52
ARC_KEY_Z
@ ARC_KEY_Z
Definition keyboard.h:58
ARC_KEY_A
@ ARC_KEY_A
Definition keyboard.h:33
ARC_KEY_Y
@ ARC_KEY_Y
Definition keyboard.h:57
ARC_KEY_9
@ ARC_KEY_9
Definition keyboard.h:69
ARC_KEY_ESC
@ ARC_KEY_ESC
Definition keyboard.h:72
ARC_KEY_W
@ ARC_KEY_W
Definition keyboard.h:55
ARC_KEY_5
@ ARC_KEY_5
Definition keyboard.h:65
ARC_KEY_3
@ ARC_KEY_3
Definition keyboard.h:63
ARC_KEY_J
@ ARC_KEY_J
Definition keyboard.h:42
ARC_KEY_N
@ ARC_KEY_N
Definition keyboard.h:46
ARC_KEY_O
@ ARC_KEY_O
Definition keyboard.h:47
ARC_KEY_L
@ ARC_KEY_L
Definition keyboard.h:44
ARC_KEY_R
@ ARC_KEY_R
Definition keyboard.h:50
ARC_KEY_C
@ ARC_KEY_C
Definition keyboard.h:35
ARC_KEY_6
@ ARC_KEY_6
Definition keyboard.h:66
ARC_KEY_X
@ ARC_KEY_X
Definition keyboard.h:56
ARC_KEY_I
@ ARC_KEY_I
Definition keyboard.h:41
ARC_KEY_1
@ ARC_KEY_1
Definition keyboard.h:61
ARC_KEY_7
@ ARC_KEY_7
Definition keyboard.h:67
ARC_KEY_ENTER
@ ARC_KEY_ENTER
Definition keyboard.h:73
ARC_KEY_Q
@ ARC_KEY_Q
Definition keyboard.h:49
ARC_KEY_SPACE
@ ARC_KEY_SPACE
Definition keyboard.h:71
ARC_KEY_U
@ ARC_KEY_U
Definition keyboard.h:53
ARC_KEY_V
@ ARC_KEY_V
Definition keyboard.h:54
ARC_KEY_B
@ ARC_KEY_B
Definition keyboard.h:34
ARC_KEY_D
@ ARC_KEY_D
Definition keyboard.h:36
ARC_KEY_G
@ ARC_KEY_G
Definition keyboard.h:39
ARC_KEY_S
@ ARC_KEY_S
Definition keyboard.h:51
ARC_KEY_H
@ ARC_KEY_H
Definition keyboard.h:40
ARC_Keyboard_Update
void ARC_Keyboard_Update(ARC_Keyboard *keyboard)
ARC_KeyboardState
ARC_KeyboardState
Definition keyboard.h:19
ARC_KEY_RELEASED
@ ARC_KEY_RELEASED
Definition keyboard.h:22
ARC_KEY_PRESSED
@ ARC_KEY_PRESSED
Definition keyboard.h:21
ARC_KEY_NONE
@ ARC_KEY_NONE
Definition keyboard.h:20
ARC_Keyboard_CreateWithInput
void ARC_Keyboard_CreateWithInput(ARC_Keyboard **keyboard, ARC_Input *input)
ARC_Keyboard_Key
enum ARC_KeyboardKey ARC_Keyboard_Key
ARC_Keyboard_Destroy
void ARC_Keyboard_Destroy(ARC_Keyboard *keyboard)
ARC_Keyboard
struct ARC_Keyboard ARC_Keyboard
Definition keyboard.h:15
ARC_Keyboard_GetState
ARC_KeyboardState ARC_Keyboard_GetState(ARC_Keyboard *keyboard, enum ARC_KeyboardKey key)