diff options
author | 3gg <3gg@shellblade.net> | 2024-07-13 10:52:24 -0700 |
---|---|---|
committer | 3gg <3gg@shellblade.net> | 2024-07-13 10:52:24 -0700 |
commit | a4294e4a94189dffb1fdf99c9a60d87d77272926 (patch) | |
tree | 2e92f7c95116861bc39f4dae1d0ab5d388550000 /src/event.c | |
parent | cf9579d7546c04dbc708bd8719e3f935a28088bd (diff) |
Restructure project.
Diffstat (limited to 'src/event.c')
-rw-r--r-- | src/event.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/event.c b/src/event.c new file mode 100644 index 0000000..9b98ee6 --- /dev/null +++ b/src/event.c | |||
@@ -0,0 +1,23 @@ | |||
1 | #include "event.h" | ||
2 | |||
3 | #include "constants.h" | ||
4 | #include "uiLibrary.h" | ||
5 | |||
6 | #include <cassert.h> | ||
7 | |||
8 | void PushWidgetEvent(uiWidgetEvent* event) { | ||
9 | assert(event); | ||
10 | assert(g_ui.num_widget_events < MaxWidgetEvents); | ||
11 | |||
12 | g_ui.widget_events[g_ui.num_widget_events++] = *event; | ||
13 | } | ||
14 | |||
15 | int uiGetEvents(uiWidgetEvent const** ppWidgetEvents) { | ||
16 | assert(ppWidgetEvents); | ||
17 | |||
18 | const int count = g_ui.num_widget_events; | ||
19 | g_ui.num_widget_events = 0; | ||
20 | |||
21 | *ppWidgetEvents = g_ui.widget_events; | ||
22 | return count; | ||
23 | } | ||