diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-10-10 10:59:43 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-10-10 10:59:43 +0200 |
commit | e57daa001cc74682cdb905d8e0c6c8c3a2c29372 (patch) | |
tree | c057e00453a3d46df494d75882285ef35a47825a /include/mgl/mgl.h |
Initial commit, skeleton
Diffstat (limited to 'include/mgl/mgl.h')
-rw-r--r-- | include/mgl/mgl.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/mgl/mgl.h b/include/mgl/mgl.h new file mode 100644 index 0000000..d896497 --- /dev/null +++ b/include/mgl/mgl.h @@ -0,0 +1,29 @@ +#ifndef MGL_MGL_H +#define MGL_MGL_H + +#include "glx.h" + +/* Display* on x11 */ +typedef void* mgl_connection; + +typedef struct { + mgl_connection connection; + mgl_glx glx; +} mgl_context; + +/* + Safe to call multiple times, but will only be initialized the first time called. + Returns non-0 value on failure. + Note: not thread safe. +*/ +int mgl_init(void); + +/* + Safe to call multiple times, but will only be deinitialized the last time called. + Note: not thread safe. +*/ +void mgl_deinit(void); + +mgl_context* mgl_get_context(void); + +#endif /* MGL_MGL_H */ |