summaryrefslogtreecommitdiff
path: root/include/glamac_events.h
diff options
context:
space:
mode:
authoradmin <contact@optics-design.com>2025-04-25 21:19:44 +0200
committeradmin <contact@optics-design.com>2025-04-25 21:19:44 +0200
commit6be3193593d6fe6dc36e584a44ec629a44fc394b (patch)
treeeec627ebb2abc443ce44b8ce8b9180f2225e13ec /include/glamac_events.h
First Commit
Diffstat (limited to 'include/glamac_events.h')
-rw-r--r--include/glamac_events.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/glamac_events.h b/include/glamac_events.h
new file mode 100644
index 0000000..47ecb74
--- /dev/null
+++ b/include/glamac_events.h
@@ -0,0 +1,36 @@
+/**
+ * glamac_events.h - header file from glamac_events.c.
+ *
+ * Copyright (C) 2025 https://optics-design.com
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * See the COPYING file for the full license text.
+ */
+#ifndef GLAMAC_EVENTS_H
+#define GLAMAC_EVENTS_H
+
+#include <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