diff options
| author | onelin <oscar@nelin.dk> | 2025-12-18 20:52:13 +0000 |
|---|---|---|
| committer | onelin <oscar@nelin.dk> | 2025-12-18 21:14:22 +0000 |
| commit | e1b0ea16142beb29d2fbfdf4f02524eb117aee6d (patch) | |
| tree | 0a169977d5c13390ef48406b3c76083324cb7dce /src/include | |
| parent | 1901282ae8899cb290e7216829407b8938327279 (diff) | |
Add instance to window_init
And make a mess in the meantime:(
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/daw/platform_glfw.h | 4 | ||||
| -rw-r--r-- | src/include/daw/window.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/include/daw/platform_glfw.h b/src/include/daw/platform_glfw.h index 8311c5a..a877261 100644 --- a/src/include/daw/platform_glfw.h +++ b/src/include/daw/platform_glfw.h @@ -10,7 +10,9 @@ extern "C" { #include <daw/types.h> #include <daw/window.h> -Window* window_init_glfw(const char *restrict windowtitle, ivec2 windowsize, const u32 flags); +struct Instance; + +Window* window_init_glfw(struct Instance *restrict instance, const char *restrict windowtitle, ivec2 windowsize, const u32 flags); void window_destroy_glfw(Window *restrict w); void window_resize_glfw(Window *restrict window, int width, int height); void window_size_glfw(Window *restrict w, ivec2 *restrict dst); diff --git a/src/include/daw/window.h b/src/include/daw/window.h index 3a4d1b0..3fe432d 100644 --- a/src/include/daw/window.h +++ b/src/include/daw/window.h @@ -16,6 +16,8 @@ extern "C" { #define DAW_WINDOW_FULLSCREEN (1 << 1) #define DAW_WINDOW_RESIZEABLE (1 << 2) +struct Instance; + typedef enum { WINDOW_FRAMEWORK_NONE = 0, WINDOW_FRAMEWORK_GLFW, @@ -67,7 +69,7 @@ struct Platform { * Returns: * A pointer to a struct Window, NULL on error. */ - Window* (*window_init)(const char *restrict title, ivec2 windowsize, const u32 flags); + Window* (*window_init)(struct Instance *restrict instance, const char *restrict title, ivec2 windowsize, const u32 flags); /* Destroy, close, and free up resources related to the window and the * platform library specific resources. |
