-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinput.h
More file actions
30 lines (24 loc) · 679 Bytes
/
input.h
File metadata and controls
30 lines (24 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef __INPUT_H__
#define __INPUT_H__
#include <stdint.h>
typedef enum {
#include "input_keys.inc"
KEY_CODE_COUNT = 73
} key_code_t;
typedef enum {
BUTTON_MOUSE_LEFT = 0,
BUTTON_MOUSE_RIGHT = 1,
} button_code_t;
void input_init();
void input_pre_update();
void input_update();
int input_get_key_down(key_code_t key);
int input_get_key_up(key_code_t key);
int input_get_key(key_code_t key);
int input_get_button_down(button_code_t button);
int input_get_button_up(button_code_t button);
int input_get_button(button_code_t button);
void input_get_mouse_pos(int32_t* out_x, int32_t* out_y);
int input_get_char(char* ch);
uint64_t input_keys_get(int idx);
#endif