#include "headers/render.h"
+#include <string.h>
#include "config.h"
int init_tscolors(void);
{
initscr();
cbreak();
- noecho();
- curs_set(0);
+ curs_off();
keypad(stdscr, TRUE);
/* need to error check this */
return 0;
}
+/* cursor */
+int
+curs_on(void)
+{
+ echo();
+ curs_set(1);
+ return 0;
+}
+
+int
+curs_off(void)
+{
+ noecho();
+ curs_set(0);
+ return 0;
+}
+
/* wins */
int
create_todowin(void)
return 0;
}
+int
+ungetstr(char* str)
+{
+ // ignore null character (it's fine even if strlen = 0)
+ for (int i = strlen(str)-1; i >= 0; i--) {
+ ungetch(str[i]);
+ }
+
+ return 0;
+}
+