initial commit

This commit is contained in:
nova
2025-02-20 23:05:23 +01:00
commit bac8f5e564
4 changed files with 125 additions and 0 deletions

25
main.c Normal file
View File

@ -0,0 +1,25 @@
#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;
}