summaryrefslogtreecommitdiff
path: root/src/user/include/libterm/terminal.h
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-02-16 20:38:53 -0500
committerBenji Dial <benji6283@gmail.com>2021-02-16 20:38:53 -0500
commit47513bd32c256c4f35e3a8ced7d9fd7e15903530 (patch)
treecafdf75d52a954814726e07445063c41bb6599f9 /src/user/include/libterm/terminal.h
parentbd7facc4b5f53481dc85a15ba123361b2758655b (diff)
downloadportland-os-47513bd32c256c4f35e3a8ced7d9fd7e15903530.tar.gz
terminal application with ipc, shift+pause state dumper, hello world for terminal, meminfo popup program
Diffstat (limited to 'src/user/include/libterm/terminal.h')
-rw-r--r--src/user/include/libterm/terminal.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/user/include/libterm/terminal.h b/src/user/include/libterm/terminal.h
new file mode 100644
index 0000000..19bd517
--- /dev/null
+++ b/src/user/include/libterm/terminal.h
@@ -0,0 +1,35 @@
+#ifndef LIBTERM_TERMINAL_H
+#define LIBTERM_TERMINAL_H
+
+#include <pland/syscall.h>
+
+#include <stdarg.h>
+#include <stdint.h>
+
+void term_set_dimensions(uint32_t width, uint32_t height);
+void term_get_dimensions(uint32_t *width, uint32_t *height);
+
+void term_paint();
+void term_clear();
+
+void term_set_color(uint8_t fg, uint8_t bg);
+void term_set_cursor(uint32_t new_y, uint32_t new_x);
+
+void term_cursor_left();
+void term_cursor_right();
+void term_cursor_up();
+void term_cursor_down();
+
+void term_add_char(char ch);
+void term_add_sn_no_ww(const char *s, uint32_t n);
+void term_add_sz_no_ww(const char *sz);
+void term_add_sz(const char *sz);
+
+void term_addf_no_ww_v(const char *fmt, va_list args);
+void term_addf_no_ww(const char *fmt, ...);
+void term_addf_v(const char *fmt, va_list args);
+void term_addf(const char *fmt, ...);
+
+struct key_packet term_get_key_blocking();
+
+#endif \ No newline at end of file