home · contact · privacy
Removed unneeded function; also some minor comment improvmenets.
[plomrogue] / src / windows.h
index 0e3f79bfd63dba060fb15fc3a7b27a9b8aa3c872..4914a27eb49675eb8d76a2261e96b234d6087484 100644 (file)
@@ -95,7 +95,7 @@ struct WinMeta
  * initialized 0, except for the virtual screen (height = that of the terminal
  * screen; width = 1) amd its frame sized to the size of the terminal screen.
  */
-extern uint8_t init_win_meta(WINDOW * screen, struct WinMeta * wmeta);
+extern uint8_t init_win_meta(WINDOW * screen, struct WinMeta ** wmeta);
 
 
 
@@ -104,21 +104,28 @@ extern uint8_t init_win_meta(WINDOW * screen, struct WinMeta * wmeta);
  * the window is visible.
  *
  * Pass 0 for "width" to make the window as wide as the terminal screen. Pass
- * negative values for "width" to make the size so many cells smaller than the
- * terminal screen. Pass 0 for "height" to give the window the maximum allowed
- * height: one cell smaller than the terminal screen. Pass negative values to
- * make the window so many smalls smaller than the terminal screen. The maximum
- * allowed height is also applied for positive values that exceed it or negative
- * values that would reduce the window height < 1 cell.
+ * negative values for "width" to make the width so many cells smaller than that
+ * of the terminal screen. Pass 0 for "height" to give the window the maximum
+ * allowed height: one cell smaller than that of the terminal screen. Pass
+ * negative values to make the window width so many cells smaller than that of
+ * the terminal screen. The maximum allowed height is also applied for positive
+ * values that exceed it or negative values that would reduce the window height
+ * < 1 cell.
  *
  * Other members of the Win struct are initialized to 0.
  */
-extern uint8_t init_win(struct WinMeta * wmeta, struct Win * w, char * title,
+extern uint8_t init_win(struct WinMeta * wmeta, struct Win ** w, char * title,
                         int16_t height, int16_t width,
                         void * data, void * func);
 
 
 
+/* Free allocated memory for an initialized Win / WinMeta struct. */
+extern void free_winmeta(struct WinMeta * wmeta);
+extern void free_win(struct Win * win);
+
+
+
 /* Append/suspend window "w" to/from chain of visible windows below "wmeta".
  * Appended windows will become active. Suspended active windows will move the
  * active window selection to their successor in the window chain or, failing