summaryrefslogtreecommitdiff
path: root/kernel/src/tty/term.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/src/tty/term.h')
-rw-r--r--kernel/src/tty/term.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/kernel/src/tty/term.h b/kernel/src/tty/term.h
new file mode 100644
index 0000000..f6eb555
--- /dev/null
+++ b/kernel/src/tty/term.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include <stdint.h>
+#include <stddef.h>
+
+#include "color.h"
+
+#define TERM_W 80
+#define TERM_H 25
+
+void term_init(void);
+
+void term_reset(void);
+void term_setfg(enum VGAColor color);
+void term_setbg(enum VGAColor color);
+
+void term_clear(void);
+void term_scroll(int lines);
+void term_setpos(uint8_t x, uint8_t y);
+
+uint32_t term_save(void);
+void term_load(uint32_t state);
+
+uint16_t term_save_col(void);
+void term_load_col(uint16_t color);
+
+bool term_newline(void);