src/ascension/window.h

changeset 65
9c44c55d327a
parent 64
f18dc427f86f
     1.1 --- a/src/ascension/window.h	Thu Apr 18 21:53:53 2024 +0200
     1.2 +++ b/src/ascension/window.h	Thu Apr 18 22:53:55 2024 +0200
     1.3 @@ -56,12 +56,6 @@
     1.4  } AscWindow;
     1.5  
     1.6  /**
     1.7 - * The currently active window in the context.
     1.8 - * @see asc_window_activate()
     1.9 - */
    1.10 -#define asc_window_active asc_context.active_window
    1.11 -
    1.12 -/**
    1.13   * Initializes the settings structure with default values.
    1.14   *
    1.15   * @param settings an uninitialized settings object
    1.16 @@ -78,31 +72,33 @@
    1.17   *
    1.18   * @param index the index of the new window
    1.19   * @param settings the settings to be used for initialization
    1.20 - * @return a pointer to the window data or \c NULL if initialization failed
    1.21   */
    1.22 -AscWindow *asc_window_initialize(unsigned int index, AscWindowSettings const* settings);
    1.23 +void asc_window_initialize(unsigned int index, AscWindowSettings const* settings);
    1.24  
    1.25  /**
    1.26   * Destroys the window and its OpenGL context.
    1.27   *
    1.28 - * When this window is currently active, there will be \em no active window afterwards.
    1.29 + * When this window is currently active, there
    1.30 + * will be \em no active window afterwards.
    1.31   *
    1.32   * Still alive windows will also be destroyed by asc_context_destroy()
    1.33   * automatically.
    1.34   *
    1.35 - * @param window the window
    1.36 + * @param index the index of the window
    1.37   */
    1.38 -void asc_window_destroy(AscWindow* window);
    1.39 +void asc_window_destroy(unsigned int index);
    1.40  
    1.41  /**
    1.42   * Swaps buffers and adjusts the viewport to the current window size.
    1.43   *
    1.44 - * This function is automatically invoked for all initialized windows
    1.45 - * by asc_loop_next(). You usually do not need to call this function manually.
    1.46 + * This function is automatically invoked by asc_loop_next().
    1.47 + * You usually should not call this function manually.
    1.48   *
    1.49 - * @param window the window
    1.50 + * If this function is invoked on a non-initialized window, nothing happens.
    1.51 + *
    1.52 + * @param index the index of the window
    1.53   */
    1.54 -void asc_window_sync(AscWindow *window);
    1.55 +void asc_window_sync(unsigned int index);
    1.56  
    1.57  /**
    1.58   * Switches the active window.
    1.59 @@ -110,9 +106,9 @@
    1.60   * In particular that makes the corresponding OpenGL context "current".
    1.61   * When you only want to draw into one window, you'll never need this.
    1.62   *
    1.63 - * @param the window to activate
    1.64 + * @param index the index of the window
    1.65   */
    1.66 -void asc_window_activate(AscWindow *window);
    1.67 +void asc_window_activate(unsigned int index);
    1.68  
    1.69  #endif /* ASCENSION_WINDOW_H */
    1.70  

mercurial