summaryrefslogtreecommitdiff
path: root/include/glamac_events.h
diff options
context:
space:
mode:
authoradmin <admin@optics-design.com>2025-08-03 16:51:52 +0200
committeradmin <admin@optics-design.com>2025-08-03 16:51:52 +0200
commit9db2f09e80b894e1e04038a37c6dcf769b77347c (patch)
treef9d026fcaca0ed2c7698633cf26a6e32bffeb1d4 /include/glamac_events.h
Initial commit
Diffstat (limited to 'include/glamac_events.h')
-rw-r--r--include/glamac_events.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/glamac_events.h b/include/glamac_events.h
new file mode 100644
index 0000000..c4145c0
--- /dev/null
+++ b/include/glamac_events.h
@@ -0,0 +1,27 @@
+/**
+ * glamac_events.h - header file from glamac_events.c.
+ */
+#ifndef GLAMAC_EVENTS_H
+#define GLAMAC_EVENTS_H
+
+#include <SDL3/SDL.h>
+#include "glamacdef.h"
+#include "glamac_view.h"
+
+// Process key event
+b32 process_key_event(SDL_KeyboardEvent *key, ViewState *view, SDL_Window *window, b32 *quit);
+
+// Process mouse button event
+b32 process_mouse_button(SDL_MouseButtonEvent *button, ViewState *view, i32 *lastMouseX, i32 *lastMouseY, b32 *dragging);
+
+// Process mouse motion event
+b32 process_mouse_motion(SDL_MouseMotionEvent *motion, ViewState *view, i32 *lastMouseX, i32 *lastMouseY, b32 dragging);
+
+// Process window event
+b32 process_window_event(SDL_WindowEvent *window_event, ViewState *view);
+
+// Process all events on queue
+b32 process_events(SDL_Event *event, ViewState *view, SDL_Window *window,
+ i32 *lastMouseX, i32 *lastMouseY, b32 *dragging, b32 *quit);
+
+#endif /* GLAMAC_EVENTS_H */
Back to https://optics-design.com