aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mgl/mgl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/mgl/mgl.h b/include/mgl/mgl.h
index e314e03..c5d1f2d 100644
--- a/include/mgl/mgl.h
+++ b/include/mgl/mgl.h
@@ -2,6 +2,7 @@
#define MGL_MGL_H
#include "gl.h"
+#include <stdbool.h>
/* Display* on x11 */
typedef void* mgl_connection;
@@ -38,5 +39,13 @@ int mgl_init(void);
void mgl_deinit(void);
mgl_context* mgl_get_context(void);
+/* Returns true is mgl_init has been setup successfully and the connection to the display server hasn't been severed */
+bool mgl_is_connected_to_display_server(void);
+/*
+ This can be used when no window has been created to update the connection status to the display server.
+ If the connection to the display server has been severed and mgl_ping_display_server has been called then
+ |mgl_is_connected_to_display_server| will return false.
+*/
+void mgl_ping_display_server(void);
#endif /* MGL_MGL_H */