foo
[eightysix] / kern / src / vid.h
diff --git a/kern/src/vid.h b/kern/src/vid.h
new file mode 100644 (file)
index 0000000..6b3d678
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef VID_H_
+#define VID_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 { VID_UNK, VID_MDA, VID_CGA, VID_EGA, VID_PGA, VID_MCGA, VID_VGA };
+
+#define VID_ATTR(fg, bg)       (((uint8_t)(bg) << 4) | ((uint8_t)(fg)))
+
+extern struct console con_vid;
+int vid_type;
+
+void vid_init(void);
+void vid_reset(void);
+
+void vid_clearline(int row);
+void vid_clear(void);
+void vid_scroll(int line);
+
+void vid_setcursor(int x, int y);
+void vid_fgcolor(int color);
+void vid_bgcolor(int color);
+
+void vid_glyph(int x, int y, int c, int attr);
+void vid_text(int x, int y, const char *s, int attr);
+
+#endif /* VID_H_ */