src/ascension/window.h

changeset 7
9dd76cbd6c90
parent 6
302971e8599b
child 9
6ad1a4213954
     1.1 --- a/src/ascension/window.h	Wed Nov 01 20:09:49 2023 +0100
     1.2 +++ b/src/ascension/window.h	Wed Nov 01 21:00:33 2023 +0100
     1.3 @@ -30,7 +30,13 @@
     1.4  
     1.5  #include <SDL2/SDL.h>
     1.6  
     1.7 -#include "core.h"
     1.8 +#include "datatypes.h"
     1.9 +
    1.10 +#ifndef ASC_MAX_WINDOWS
    1.11 +/** The maximum number of windows that can exist simultaneously. */
    1.12 +#define ASC_MAX_WINDOWS 4
    1.13 +#endif // ASC_MAX_WINDOWS
    1.14 +
    1.15  
    1.16  #ifdef __cplusplus
    1.17  extern "C" {
    1.18 @@ -71,10 +77,14 @@
    1.19  /**
    1.20   * Creates and initializes a new window and a corresponding OpenGL context.
    1.21   *
    1.22 - * @param window the window structure
    1.23 + * The index specified must not be in use by another window already.
    1.24 + * The maximum number of windows is defined by #ASC_MAX_WINDOWS.
    1.25 + *
    1.26 + * @param index the index of the new window
    1.27   * @param settings the settings to be used for initialization
    1.28 + * @return a pointer to the window data or \c NULL if initialization failed
    1.29   */
    1.30 -void asc_window_initialize(AscWindow* window, AscWindowSettings const* settings);
    1.31 +AscWindow *asc_window_initialize(unsigned int index, AscWindowSettings const* settings);
    1.32  
    1.33  /**
    1.34   * Destroys the window and its OpenGL context.

mercurial