diff -r 302971e8599b -r 9dd76cbd6c90 src/ascension/window.h --- a/src/ascension/window.h Wed Nov 01 20:09:49 2023 +0100 +++ b/src/ascension/window.h Wed Nov 01 21:00:33 2023 +0100 @@ -30,7 +30,13 @@ #include -#include "core.h" +#include "datatypes.h" + +#ifndef ASC_MAX_WINDOWS +/** The maximum number of windows that can exist simultaneously. */ +#define ASC_MAX_WINDOWS 4 +#endif // ASC_MAX_WINDOWS + #ifdef __cplusplus extern "C" { @@ -71,10 +77,14 @@ /** * Creates and initializes a new window and a corresponding OpenGL context. * - * @param window the window structure + * The index specified must not be in use by another window already. + * The maximum number of windows is defined by #ASC_MAX_WINDOWS. + * + * @param index the index of the new window * @param settings the settings to be used for initialization + * @return a pointer to the window data or \c NULL if initialization failed */ -void asc_window_initialize(AscWindow* window, AscWindowSettings const* settings); +AscWindow *asc_window_initialize(unsigned int index, AscWindowSettings const* settings); /** * Destroys the window and its OpenGL context.