initial commit
This commit is contained in:
25
main.c
Normal file
25
main.c
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user