From 33e27b2c2796aa98fb7e48079187b01a2e59d72a Mon Sep 17 00:00:00 2001 From: Louie S Date: Fri, 30 Jun 2023 10:57:04 -0700 Subject: draw skeleton --- src/draw.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/draw.c (limited to 'src/draw.c') 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 +#include + +#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(); +} -- cgit