summaryrefslogtreecommitdiffstats
path: root/console.h
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2023-07-02 08:18:23 -0400
committerMalfurious <m@lfurio.us>2023-07-02 08:18:23 -0400
commitcb6993e4d31086411c1dd147ec820d37cbc2d01c (patch)
tree982f43703fac39ca75d0daeb35cb2e9c6f5d3ee6 /console.h
parent7e89874f23e0423a4c9476cba8b566809685cfb9 (diff)
downloadmisplays-cb6993e4d31086411c1dd147ec820d37cbc2d01c.tar.gz
misplays-cb6993e4d31086411c1dd147ec820d37cbc2d01c.zip
Add basic pty console
This is good enough for early testing of the debugger functionality, but should be improved in the future. Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'console.h')
-rw-r--r--console.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/console.h b/console.h
new file mode 100644
index 0000000..054b768
--- /dev/null
+++ b/console.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include <panel.h>
+
+struct console {
+ int master;
+ int isesc;
+};
+
+extern int console_init(struct console *cons);
+extern int console_deinit(struct console *cons);
+extern void console_enter(struct console *cons, PANEL *pan);
+extern void console_leave(struct console *cons, PANEL *pan);
+extern void console_update(struct console *cons, PANEL *pan);
+extern void console_input(struct console *cons, int ch);
+
+extern int console_configslave(struct console *cons);