about summary refs log tree commit diff stats
path: root/console_win.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-02-08 23:55:11 +0000
committerJames Booth <boothj5@gmail.com>2012-02-08 23:55:11 +0000
commitc8bf654e2cd234bfd35ca97d6994b078b1b9b5ba (patch)
tree068ab93e8a581829237357a01d254dacf8a94dfb /console_win.c
parenta7190ed7e483c6791e8f05fd3564d31bd17c8cfa (diff)
downloadprofani-tty-c8bf654e2cd234bfd35ca97d6994b078b1b9b5ba.tar.gz
Added seperate window modules
Diffstat (limited to 'console_win.c')
-rw-r--r--console_win.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/console_win.c b/console_win.c
new file mode 100644
index 00000000..b303d0e3
--- /dev/null
+++ b/console_win.c
@@ -0,0 +1,18 @@
+#include <ncurses.h>
+#include "windows.h"
+
+static WINDOW *cons_win;
+
+void create_console_window(void)
+{
+    int rows, cols;
+    getmaxyx(stdscr, rows, cols);
+
+    cons_win = newwin(rows-3, cols, 1, 0);
+    scrollok(cons_win, TRUE);
+
+    waddstr(cons_win, "Welcome to Profanity.\n");
+    touchwin(cons_win);
+    wrefresh(cons_win);
+}
+