aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mgl/window/event.h12
-rw-r--r--include/mgl/window/key.h3
2 files changed, 15 insertions, 0 deletions
diff --git a/include/mgl/window/event.h b/include/mgl/window/event.h
index 4813154..ab7ce35 100644
--- a/include/mgl/window/event.h
+++ b/include/mgl/window/event.h
@@ -60,6 +60,16 @@ typedef struct {
} mgl_monitor_disconnected_event;
typedef enum {
+ MGL_MAPPING_NOTIFY_MODIFIER,
+ MGL_MAPPING_NOTIFY_KEYBOARD,
+ MGL_MAPPING_NOTIFY_POINTER
+} mgl_mapping_notify_type;
+
+typedef struct {
+ int notify_type; /* mgl_mapping_notify_type */
+} mgl_mapping_notify_event;
+
+typedef enum {
MGL_EVENT_UNKNOWN,
MGL_EVENT_CLOSED, /* Window closed */
MGL_EVENT_RESIZED, /* Window resized */
@@ -75,6 +85,7 @@ typedef enum {
MGL_EVENT_MONITOR_CONNECTED,
MGL_EVENT_MONITOR_DISCONNECTED,
MGL_EVENT_MONITOR_PROPERTY_CHANGED,
+ MGL_EVENT_MAPPING_NOTIFY
} mgl_event_type;
struct mgl_event {
@@ -89,6 +100,7 @@ struct mgl_event {
mgl_monitor_connected_event monitor_connected;
mgl_monitor_disconnected_event monitor_disconnected;
mgl_monitor_property_changed_event monitor_property_changed;
+ mgl_mapping_notify_event mapping_notify;
};
};
diff --git a/include/mgl/window/key.h b/include/mgl/window/key.h
index c58fbcd..6863256 100644
--- a/include/mgl/window/key.h
+++ b/include/mgl/window/key.h
@@ -1,6 +1,8 @@
#ifndef _MGL_KEY_H_
#define _MGL_KEY_H_
+#include <stdbool.h>
+
typedef enum {
MGL_KEY_UNKNOWN,
MGL_KEY_A,
@@ -111,5 +113,6 @@ typedef enum {
/* Return NULL if unknown key */
const char* mgl_key_to_string(mgl_key key);
+bool mgl_key_is_modifier(mgl_key key);
#endif /* _MGL_KEY_H_ */