Loading...
Searching...
No Matches
key.h
Go to the documentation of this file.
#ifndef ARC_CONSOLE_KEY_H_
#define ARC_CONSOLE_KEY_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "arc/std/bool.h"
#include <stdint.h>
typedef struct ARC_ConsoleKeyType ARC_ConsoleKey;
typedef enum ARC_ConsoleKey_Key {
ARC_CONSOLE_KEY_A,
ARC_CONSOLE_KEY_B,
ARC_CONSOLE_KEY_C,
ARC_CONSOLE_KEY_D,
ARC_CONSOLE_KEY_E,
ARC_CONSOLE_KEY_F,
ARC_CONSOLE_KEY_G,
ARC_CONSOLE_KEY_H,
ARC_CONSOLE_KEY_I,
ARC_CONSOLE_KEY_J,
ARC_CONSOLE_KEY_K,
ARC_CONSOLE_KEY_L,
ARC_CONSOLE_KEY_M,
ARC_CONSOLE_KEY_N,
ARC_CONSOLE_KEY_O,
ARC_CONSOLE_KEY_P,
ARC_CONSOLE_KEY_Q,
ARC_CONSOLE_KEY_R,
ARC_CONSOLE_KEY_S,
ARC_CONSOLE_KEY_T,
ARC_CONSOLE_KEY_U,
ARC_CONSOLE_KEY_V,
ARC_CONSOLE_KEY_W,
ARC_CONSOLE_KEY_X,
ARC_CONSOLE_KEY_Y,
ARC_CONSOLE_KEY_Z,
ARC_CONSOLE_KEY_0,
ARC_CONSOLE_KEY_1,
ARC_CONSOLE_KEY_2,
ARC_CONSOLE_KEY_3,
ARC_CONSOLE_KEY_4,
ARC_CONSOLE_KEY_5,
ARC_CONSOLE_KEY_6,
ARC_CONSOLE_KEY_7,
ARC_CONSOLE_KEY_8,
ARC_CONSOLE_KEY_9,
ARC_CONSOLE_KEY_LEFT,
ARC_CONSOLE_KEY_RIGHT,
ARC_CONSOLE_KEY_DOWN,
ARC_CONSOLE_KEY_UP,
ARC_CONSOLE_KEY_FORWARD_SLASH,
ARC_CONSOLE_KEY_BACKSPACE,
ARC_CONSOLE_KEY_ENTER,
ARC_CONSOLE_KEY_ESC
} ARC_ConsoleKey_Key;
void ARC_ConsoleKey_Create(ARC_ConsoleKey **consoleKey, ARC_ConsoleKey_Key *key);
void ARC_ConsoleKey_Destroy(ARC_ConsoleKey *consoleKey);
ARC_Bool ARC_ConsoleKey_Equals(ARC_ConsoleKey consoleKey, enum ARC_ConsoleKey_Key key);
ARC_Bool ARC_ConsoleKey_EqualsPointer(ARC_ConsoleKey *consoleKey, enum ARC_ConsoleKey_Key key);
ARC_ConsoleKey ARC_Keyboard_GetConsoleKey(enum ARC_ConsoleKey_Key key);
uint8_t ARC_ConsoleKey_GetCharFromKey(ARC_ConsoleKey *consoleKey);
#ifdef __cplusplus
}
#endif
#endif // !ARC_CONSOLE_KEY_H_
bool.h
ARC_Bool
#define ARC_Bool
Definition bool.h:10
ARC_ConsoleKey_Key
ARC_ConsoleKey_Key
Definition key.h:13
ARC_CONSOLE_KEY_K
@ ARC_CONSOLE_KEY_K
Definition key.h:24
ARC_CONSOLE_KEY_8
@ ARC_CONSOLE_KEY_8
Definition key.h:49
ARC_CONSOLE_KEY_L
@ ARC_CONSOLE_KEY_L
Definition key.h:25
ARC_CONSOLE_KEY_B
@ ARC_CONSOLE_KEY_B
Definition key.h:15
ARC_CONSOLE_KEY_X
@ ARC_CONSOLE_KEY_X
Definition key.h:37
ARC_CONSOLE_KEY_7
@ ARC_CONSOLE_KEY_7
Definition key.h:48
ARC_CONSOLE_KEY_Z
@ ARC_CONSOLE_KEY_Z
Definition key.h:39
ARC_CONSOLE_KEY_UP
@ ARC_CONSOLE_KEY_UP
Definition key.h:55
ARC_CONSOLE_KEY_S
@ ARC_CONSOLE_KEY_S
Definition key.h:32
ARC_CONSOLE_KEY_D
@ ARC_CONSOLE_KEY_D
Definition key.h:17
ARC_CONSOLE_KEY_FORWARD_SLASH
@ ARC_CONSOLE_KEY_FORWARD_SLASH
Definition key.h:57
ARC_CONSOLE_KEY_C
@ ARC_CONSOLE_KEY_C
Definition key.h:16
ARC_CONSOLE_KEY_DOWN
@ ARC_CONSOLE_KEY_DOWN
Definition key.h:54
ARC_CONSOLE_KEY_1
@ ARC_CONSOLE_KEY_1
Definition key.h:42
ARC_CONSOLE_KEY_T
@ ARC_CONSOLE_KEY_T
Definition key.h:33
ARC_CONSOLE_KEY_P
@ ARC_CONSOLE_KEY_P
Definition key.h:29
ARC_CONSOLE_KEY_2
@ ARC_CONSOLE_KEY_2
Definition key.h:43
ARC_CONSOLE_KEY_3
@ ARC_CONSOLE_KEY_3
Definition key.h:44
ARC_CONSOLE_KEY_LEFT
@ ARC_CONSOLE_KEY_LEFT
Definition key.h:52
ARC_CONSOLE_KEY_V
@ ARC_CONSOLE_KEY_V
Definition key.h:35
ARC_CONSOLE_KEY_U
@ ARC_CONSOLE_KEY_U
Definition key.h:34
ARC_CONSOLE_KEY_J
@ ARC_CONSOLE_KEY_J
Definition key.h:23
ARC_CONSOLE_KEY_4
@ ARC_CONSOLE_KEY_4
Definition key.h:45
ARC_CONSOLE_KEY_H
@ ARC_CONSOLE_KEY_H
Definition key.h:21
ARC_CONSOLE_KEY_I
@ ARC_CONSOLE_KEY_I
Definition key.h:22
ARC_CONSOLE_KEY_M
@ ARC_CONSOLE_KEY_M
Definition key.h:26
ARC_CONSOLE_KEY_A
@ ARC_CONSOLE_KEY_A
Definition key.h:14
ARC_CONSOLE_KEY_G
@ ARC_CONSOLE_KEY_G
Definition key.h:20
ARC_CONSOLE_KEY_R
@ ARC_CONSOLE_KEY_R
Definition key.h:31
ARC_CONSOLE_KEY_F
@ ARC_CONSOLE_KEY_F
Definition key.h:19
ARC_CONSOLE_KEY_6
@ ARC_CONSOLE_KEY_6
Definition key.h:47
ARC_CONSOLE_KEY_N
@ ARC_CONSOLE_KEY_N
Definition key.h:27
ARC_CONSOLE_KEY_9
@ ARC_CONSOLE_KEY_9
Definition key.h:50
ARC_CONSOLE_KEY_ENTER
@ ARC_CONSOLE_KEY_ENTER
Definition key.h:61
ARC_CONSOLE_KEY_W
@ ARC_CONSOLE_KEY_W
Definition key.h:36
ARC_CONSOLE_KEY_5
@ ARC_CONSOLE_KEY_5
Definition key.h:46
ARC_CONSOLE_KEY_Y
@ ARC_CONSOLE_KEY_Y
Definition key.h:38
ARC_CONSOLE_KEY_RIGHT
@ ARC_CONSOLE_KEY_RIGHT
Definition key.h:53
ARC_CONSOLE_KEY_0
@ ARC_CONSOLE_KEY_0
Definition key.h:41
ARC_CONSOLE_KEY_BACKSPACE
@ ARC_CONSOLE_KEY_BACKSPACE
Definition key.h:59
ARC_CONSOLE_KEY_Q
@ ARC_CONSOLE_KEY_Q
Definition key.h:30
ARC_CONSOLE_KEY_O
@ ARC_CONSOLE_KEY_O
Definition key.h:28
ARC_CONSOLE_KEY_E
@ ARC_CONSOLE_KEY_E
Definition key.h:18
ARC_CONSOLE_KEY_ESC
@ ARC_CONSOLE_KEY_ESC
Definition key.h:63
ARC_ConsoleKey_Equals
ARC_Bool ARC_ConsoleKey_Equals(ARC_ConsoleKey consoleKey, enum ARC_ConsoleKey_Key key)
Definition key.c:20
ARC_Keyboard_GetConsoleKey
ARC_ConsoleKey ARC_Keyboard_GetConsoleKey(enum ARC_ConsoleKey_Key key)
Definition key.c:28
ARC_ConsoleKey_Create
void ARC_ConsoleKey_Create(ARC_ConsoleKey **consoleKey, ARC_ConsoleKey_Key *key)
Definition key.c:7
ARC_ConsoleKey_GetCharFromKey
uint8_t ARC_ConsoleKey_GetCharFromKey(ARC_ConsoleKey *consoleKey)
Definition key.c:169
ARC_ConsoleKey_Destroy
void ARC_ConsoleKey_Destroy(ARC_ConsoleKey *consoleKey)
Definition key.c:16
ARC_ConsoleKey_EqualsPointer
ARC_Bool ARC_ConsoleKey_EqualsPointer(ARC_ConsoleKey *consoleKey, enum ARC_ConsoleKey_Key key)
Definition key.c:24
ARC_ConsoleKeyType
Definition key.h:11
ARC_ConsoleKeyType::key
int32_t key
Definition key.h:12