aboutsummaryrefslogtreecommitdiff
path: root/include/mgl/window/event.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mgl/window/event.h')
-rw-r--r--include/mgl/window/event.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mgl/window/event.h b/include/mgl/window/event.h
index c928d0e..0836098 100644
--- a/include/mgl/window/event.h
+++ b/include/mgl/window/event.h
@@ -3,6 +3,7 @@
#include "key.h"
#include <stdbool.h>
+#include <stdint.h>
typedef struct mgl_event mgl_event;
@@ -12,6 +13,10 @@ typedef struct {
} mgl_size_event;
typedef struct {
+ uint32_t codepoint;
+} mgl_text_event;
+
+typedef struct {
int code; /* mgl_key */
bool alt;
bool control;
@@ -43,6 +48,7 @@ typedef enum {
MGL_EVENT_UNKNOWN,
MGL_EVENT_CLOSED, /* Window closed */
MGL_EVENT_RESIZED, /* Window resized */
+ MGL_EVENT_TEXT_ENTERED,
MGL_EVENT_KEY_PRESSED,
MGL_EVENT_KEY_RELEASED,
MGL_EVENT_MOUSE_BUTTON_PRESSED,
@@ -54,6 +60,7 @@ struct mgl_event {
int type; /* mgl_event_type */
union {
mgl_size_event size;
+ mgl_text_event text;
mgl_key_event key;
mgl_mouse_button_event mouse_button;
mgl_mouse_move_event mouse_move;