home · contact · privacy
Heavily re-structured initialization of windows and how individual windows are identi...
[plomrogue] / src / wincontrol.h
index 017c18b677e7224b8c87d4fb80a849ce823dd61e..5c9c4b57d7b4ff52ec6448a8723a04f0a124a3be 100644 (file)
@@ -16,9 +16,42 @@ struct World;
 
 
 
+/* Puts an identifier on each window, interfaces to its config file data. */
+struct WinConf
+{
+    char id;
+    struct Win * win;
+    char * title;
+    int16_t height;
+    int16_t width;
+    void (* draw) (struct Win *);
+};
+
+
+
+/* Create/initialize (from config files)/free Winconf / Win structs. */
+extern void create_winconfs(struct World * world);
+extern void init_winconfs(struct World * world);
+extern void free_winconfs(struct World * world);
+extern void init_wins(struct World * world);
+extern void free_wins(struct World * world);
+
+
+
+/* Reload windows in order and sizes defined in win config. */
+extern void reload_win_config(struct World * world);
+
+
+
+/* Get WinConf identified by winconf->id == "id", or that winconf's ->win. */
+extern struct WinConf * get_winconf_by_id(struct World * world, char id);
+extern struct Win * get_win_by_id(struct World * world, char id);
+
+
+
 /* Toggle windows in world->wins in the order desribed by the first line of
- * config/toggled_win_order, wherein each character may correspond to one
- * hardcoded window.
+ * config/windows/toggled_win_order, wherein each character may correspond to
+ * one hardcoded window.
  */
 extern void sorted_wintoggle(struct World * world);