(UNDER CONSTRUCTION) cursetree is now a non-binary tree yippiegit add .

also abstracted ncurses WINDOW into the ct_surface structure. and added ct_bounds to complement ct_dims.
This commit is contained in:
Emile Clark-Boman 2025-09-13 23:45:56 +10:00
parent b04f0b4aa3
commit 759920a9cc
9 changed files with 476 additions and 193 deletions

View file

@ -68,6 +68,10 @@ void init_ncurses(void) {
curs_set(0); // hide cursor
}
void end_ncurses(void) {
endwin();
}
/* Initialise (with default IO configuration) a new ncurses WINDOW.
*/
WINDOW *new_window(const int x, const int y, const int width,
@ -105,7 +109,7 @@ struct ct_dims *windims(WINDOW *win) {
* NOTE: Failure occurs if width or height <= 0,
* NOTE: or if the x,y coordinate is outside the screen bounds.
*/
int resizemv_window(const int x, const int y, const int width, const int height,
WINDOW *const win) {
int resizemv_window(WINDOW *const win, const int x, const int y,
const int width, const int height) {
return wresize(win, height, width) || mvwin(win, y, x);
}