X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fwindows.h;h=28239961c2d713aa337b9b313733fd1a740347bf;hb=7815e738f77aad4e918c84a89aa21f7ae683ebab;hp=2c8c19e5f86aed983a79842b98397f98777be64c;hpb=111279ad59a25bc548c47d38c1a52c3036eff87a;p=plomrogue diff --git a/src/windows.h b/src/windows.h index 2c8c19e..2823996 100644 --- a/src/windows.h +++ b/src/windows.h @@ -88,17 +88,20 @@ extern struct WinMeta init_win_meta(WINDOW * screen); -/* Create a window below inside "wmeta" titled "title" and appointing "func"() - * to interpret and draw the content stored at "data" if the window is visible. +/* Create a window below inside "wmeta" titled "title" of "height" and "width" + * and appointing "func"() to interpret and draw the content stored at "data" + * if the window is visible. * - * The start size for the Frame will be a width of 20 cells and a height one - * less than the height of the virtual screen (so as to fit the title bar on top - * of the window). Other values will be initialized to 0. The window will stay - * invisible until appended to the chain of visible windows via append_win(). + * A value for "width" <1 will trigger a fallback to width=1. A "height" <1 or + * larger than the maximum window height possible within the virtual screen will + * trigger a fallback to the maximum height possible (i.e. pass a "height" of 0 + * to initialize the window to its largest possible height). * - * TODO: Why default start widths/heights instead of passing start values? + * Other values of the Win struct will be initialized to 0. The window will stay + * invisible until appended to the chain of visible windows via append_win(). */ extern struct Win init_win(struct WinMeta * wmeta, char * title, + uint16_t height, uint16_t widtht, void * data, void * func);