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.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/include/mgl/window/event.h b/include/mgl/window/event.h
index 31af4f1..4813154 100644
--- a/include/mgl/window/event.h
+++ b/include/mgl/window/event.h
@@ -42,6 +42,23 @@ typedef struct {
int y; /* relative to the top of the window */
} mgl_mouse_move_event;
+typedef struct {
+ const char *name; /* This name may only be valid until the next time |mgl_window_poll_event| is called */
+ int id;
+ int x;
+ int y;
+ int width;
+ int height;
+ int refresh_rate; /* 0 if unknown */
+} mgl_monitor_generic_event;
+
+typedef mgl_monitor_generic_event mgl_monitor_connected_event;
+typedef mgl_monitor_generic_event mgl_monitor_property_changed_event;
+
+typedef struct {
+ int id;
+} mgl_monitor_disconnected_event;
+
typedef enum {
MGL_EVENT_UNKNOWN,
MGL_EVENT_CLOSED, /* Window closed */
@@ -54,7 +71,10 @@ typedef enum {
MGL_EVENT_MOUSE_BUTTON_PRESSED,
MGL_EVENT_MOUSE_BUTTON_RELEASED,
MGL_EVENT_MOUSE_WHEEL_SCROLLED,
- MGL_EVENT_MOUSE_MOVED
+ MGL_EVENT_MOUSE_MOVED,
+ MGL_EVENT_MONITOR_CONNECTED,
+ MGL_EVENT_MONITOR_DISCONNECTED,
+ MGL_EVENT_MONITOR_PROPERTY_CHANGED,
} mgl_event_type;
struct mgl_event {
@@ -66,6 +86,9 @@ struct mgl_event {
mgl_mouse_button_event mouse_button;
mgl_mouse_wheel_scroll_event mouse_wheel_scroll;
mgl_mouse_move_event mouse_move;
+ mgl_monitor_connected_event monitor_connected;
+ mgl_monitor_disconnected_event monitor_disconnected;
+ mgl_monitor_property_changed_event monitor_property_changed;
};
};