Skip to content

Commit 93615f0

Browse files
Update keyboard.c
1 parent dce95dd commit 93615f0

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

code/logic/keyboard.c

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,28 @@
2929
#endif
3030

3131
#define MAX_KEYBINDS 256
32+
#define MAX_TOUCHBINDS 256
33+
#define MAX_MOUSEBINDS 256
3234

33-
static fossil_io_touch_manager_t touch_manager;
34-
static fossil_io_mouse_manager_t mouse_manager;
35+
typedef struct {
36+
fossil_io_mouse_event_t event;
37+
fossil_io_mouse_callback_t callback;
38+
} fossil_io_mouse_binding_t;
39+
40+
typedef struct {
41+
fossil_io_mouse_binding_t bindings[MAX_MOUSEBINDS];
42+
size_t count;
43+
} fossil_io_mouse_manager_t;
44+
45+
typedef struct {
46+
fossil_io_touch_event_t event;
47+
fossil_io_touch_callback_t callback;
48+
} fossil_io_touch_binding_t;
49+
50+
typedef struct {
51+
fossil_io_touch_binding_t bindings[MAX_TOUCHBINDS];
52+
size_t count;
53+
} fossil_io_touch_manager_t;
3554

3655
typedef struct {
3756
fossil_io_keyboard_event_t event;
@@ -44,6 +63,9 @@ typedef struct {
4463
} fossil_io_keyboard_manager_t;
4564

4665
static fossil_io_keyboard_manager_t keyboard_manager = { .count = 0 };
66+
static fossil_io_touch_manager_t touch_manager;
67+
static fossil_io_mouse_manager_t mouse_manager;
68+
4769

4870
#if defined(_WIN32) || defined(_WIN64)
4971

0 commit comments

Comments
 (0)