diff options
author | Louie S <louie@example.com> | 2023-06-30 10:57:04 -0700 |
---|---|---|
committer | Louie S <louie@example.com> | 2023-06-30 10:57:04 -0700 |
commit | 33e27b2c2796aa98fb7e48079187b01a2e59d72a (patch) | |
tree | d93fec7bc0e0c84716792217de456137901205f9 /src/draw.c | |
parent | 4333cd2b11cc32fe75fa1ef31627c667bcc71327 (diff) |
draw skeleton
Diffstat (limited to 'src/draw.c')
-rw-r--r-- | src/draw.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/draw.c b/src/draw.c new file mode 100644 index 0000000..75d4dbe --- /dev/null +++ b/src/draw.c @@ -0,0 +1,23 @@ +#include <curses.h> +#include <signal.h> + +#include "draw.h" + +void tui_init() { + int input; // capture user input + + // set an interrupt to end cleanly + signal(SIGINT, tui_end); + + // init and set options + initscr(); + keypad(stdscr, TRUE); // enable arrow keys and other function keys + cbreak(); // set for interactive curses applications + + input = getch(); + tui_end(); +} + +void tui_end() { + endwin(); +} |