aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-01-21 19:45:50 +0100
committerdec05eba <dec05eba@protonmail.com>2025-01-21 19:45:50 +0100
commit627be8149bece18caa9f22f84e6c1c75de8f9003 (patch)
tree04422f293ca0d9bbd75fa577b46428f3cc4de13f /include
parent101013207f1dde35d67910b0555054d127c26aec (diff)
Add mapping notify event
Diffstat (limited to 'include')
-rw-r--r--include/mglpp/window/Event.hpp12
-rw-r--r--include/mglpp/window/Keyboard.hpp1
2 files changed, 13 insertions, 0 deletions
diff --git a/include/mglpp/window/Event.hpp b/include/mglpp/window/Event.hpp
index bcd1e91..a013289 100644
--- a/include/mglpp/window/Event.hpp
+++ b/include/mglpp/window/Event.hpp
@@ -63,6 +63,16 @@ namespace mgl {
int id;
};
+ enum class MappingNotifyType {
+ MODIFIER,
+ KEYBOARD,
+ POINTER
+ };
+
+ struct MappingNotifyEvent {
+ int notify_type; // MappingNotifyType
+ };
+
enum Type : int {
Unknown,
Closed, /* Window closed */
@@ -79,6 +89,7 @@ namespace mgl {
MonitorConnected,
MonitorDisconnected,
MonitorPropertyChanged,
+ MappingNotify
};
Type type;
@@ -93,6 +104,7 @@ namespace mgl {
MonitorConnectedEvent monitor_connected;
MonitorDisconnectedEvent monitor_disconnected;
MonitorPropertyChangedEvent monitor_property_changed;
+ MappingNotifyEvent mapping_notify;
};
};
}
diff --git a/include/mglpp/window/Keyboard.hpp b/include/mglpp/window/Keyboard.hpp
index df2db20..a7eb36e 100644
--- a/include/mglpp/window/Keyboard.hpp
+++ b/include/mglpp/window/Keyboard.hpp
@@ -115,6 +115,7 @@ namespace mgl {
/* Returns nullptr if unknown key */
static const char* key_to_string(Key key);
+ static bool key_is_modifier(Key key);
};
}