summaryrefslogtreecommitdiff
path: root/include/core/event.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/event.h')
-rw-r--r--include/core/event.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/include/core/event.h b/include/core/event.h
new file mode 100644
index 0000000..4798775
--- /dev/null
+++ b/include/core/event.h
@@ -0,0 +1,48 @@
+#ifndef RUIM_GUI_EVENT
+#define RUIM_GUI_EVENT
+
+#include "core/types.h"
+#include "internal/utils.h"
+
+struct ruim_eventComponent {
+ u64 sourceID;
+ u64 eventID;
+ void *eventData;
+};
+
+struct ruim_eventKey {
+ uint32_t keycode;
+};
+
+struct ruim_eventMouse {
+ uint32_t keycode;
+ uint16_t x;
+ uint16_t y;
+};
+
+struct ruim_coordinates {
+ uint16_t x;
+ uint16_t y;
+ uint16_t width;
+ uint16_t height;
+};
+
+struct ruim_toplevel {
+ RuimToplevelType type;
+ RuimToplevelBackend *backend;
+
+ void *data;
+};
+
+struct ruim_event {
+ RuimEventType type;
+ union {
+ RuimEventWindow window;
+ RuimEventRedraw redraw;
+ RuimEventKey key;
+ RuimEventMouse mouse;
+ RuimEventComponent component;
+ } data;
+};
+
+#endif