X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=src%2Fwincontrol.h;fp=src%2Fwincontrol.h;h=5c9c4b57d7b4ff52ec6448a8723a04f0a124a3be;hb=db346802082f53faf4d49f234c0ba2cf86221d1e;hp=404ae1b741e967bb974ac90ff8ea31beb17ff15e;hpb=1872b8ed64328ebafec56b0888fa48f60fb4942b;p=plomrogue
diff --git a/src/wincontrol.h b/src/wincontrol.h
index 404ae1b..5c9c4b5 100644
--- a/src/wincontrol.h
+++ b/src/wincontrol.h
@@ -16,18 +16,36 @@ 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);
-/* Wrapper around init_win() that reads the desired window size and title from a
- * file at the path prefixing the provided win name "w_name" with
- * "config/windows/". "f"() is the window drawing function (Win._draw()).
- */
-extern struct Win * init_win_from_file(struct World * world, char * w_name,
- void (* f) (struct Win *));
-
+/* 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);