added ncurses based display system (minimal and still full of bugs) :o
[my-code/ivac.git] / src / display.c
diff --git a/src/display.c b/src/display.c
new file mode 100644 (file)
index 0000000..9390fbc
--- /dev/null
@@ -0,0 +1,37 @@
+/* display.c -- display management stuff
+ *
+ * hackbard@hackdaworld.dyndns.org
+ *
+ */
+
+#include "display.h"
+
+int display_init(t_display *display) {
+
+  puts("[display] initializing display ...");
+
+  initscr();
+  raw();
+  noecho();
+  keypad(stdscr,TRUE);
+  getmaxyx(stdscr,display->max_y,display->max_x);
+
+  return D_SUCCESS;
+}
+
+int display_refresh(t_display *display) {
+
+  getmaxyx(stdscr,display->max_y,display->max_x);
+
+  return D_SUCCESS;
+}
+
+int display_shutdown(t_display *display) {
+
+  noraw();
+  echo();
+
+  puts("[display] shutdown");
+
+  return D_SUCCESS;
+}