foo
[eightysix] / kern / src / disp.h
diff --git a/kern/src/disp.h b/kern/src/disp.h
new file mode 100644 (file)
index 0000000..48a4d0a
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef DISP_H_
+#define DISP_H_
+
+#include <inttypes.h>
+#include "con.h"
+
+enum {
+       BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LTGREY,
+       GREY, LTBLUE, LTGREEN, LTCYAN, LTRED, LTMAGENTA, YELLOW, WHITE
+};
+
+enum { DISP_UNK, DISP_MDA, DISP_CGA, DISP_EGA, DISP_PGA, DISP_MCGA, DISP_VGA };
+
+#define DISP_ATTR(fg, bg)      (((uint8_t)(bg) << 4) | ((uint8_t)(fg)))
+
+extern struct console con_disp;
+int disp_type;
+
+void init_disp(void);
+
+void clear_disp(void);
+void scroll_disp(int line);
+
+void set_cursor(int x, int y);
+void set_fgcolor(int color);
+void set_bgcolor(int color);
+
+void draw_glyph(int x, int y, int c, int attr);
+void draw_text(int x, int y, const char *s, int attr);
+
+#endif /* DISP_H_ */