From a4294e4a94189dffb1fdf99c9a60d87d77272926 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 13 Jul 2024 10:52:24 -0700 Subject: Restructure project. --- src/event.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/event.c (limited to 'src/event.c') 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 @@ +#include "event.h" + +#include "constants.h" +#include "uiLibrary.h" + +#include + +void PushWidgetEvent(uiWidgetEvent* event) { + assert(event); + assert(g_ui.num_widget_events < MaxWidgetEvents); + + g_ui.widget_events[g_ui.num_widget_events++] = *event; +} + +int uiGetEvents(uiWidgetEvent const** ppWidgetEvents) { + assert(ppWidgetEvents); + + const int count = g_ui.num_widget_events; + g_ui.num_widget_events = 0; + + *ppWidgetEvents = g_ui.widget_events; + return count; +} -- cgit v1.2.3