th/main.c
2025-02-20 23:05:23 +01:00

26 lines
713 B
C

#include <curses.h>
#include "window.h"
unsigned int terminal_height;
unsigned int terminal_width;
int main() {
initscr(); //start ncurses
unsigned int ch;
getmaxyx(stdscr, terminal_height, terminal_width);
WINDOW *win_m = newwin(terminal_height, terminal_width/3, 0, 0);
WINDOW *win_l = newwin(terminal_height, terminal_width/3, terminal_height, (terminal_width/3));
WINDOW *win_r = newwin(terminal_height, terminal_width/3, terminal_height, ((terminal_width/3)*2));
while((ch = wgetch(win_m)) != 'q'){
getmaxyx(stdscr, terminal_height, terminal_width);
window_left(win_l,0,0);
window_main(win_m,0,(terminal_width/3));
window_right(win_r,0,((terminal_width/3)*2));
}
endwin();
return 0;
}