summaryrefslogtreecommitdiff
path: root/libterm/term_io.h
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2016-05-10 22:42:11 +0100
committerFreeArtMan <dos21h@gmail.com>2016-05-10 22:42:11 +0100
commit44dedb90f005bb0de9bddbd592a5c78f28bc67d1 (patch)
tree274b9cea44df3f96a965c564e26cdac42d3af94f /libterm/term_io.h
parentbb426577c85f6d97cc28ab677e98e2b1f73eadac (diff)
downloadihe-44dedb90f005bb0de9bddbd592a5c78f28bc67d1.tar.gz
ihe-44dedb90f005bb0de9bddbd592a5c78f28bc67d1.zip
Replace cmd first part
Diffstat (limited to 'libterm/term_io.h')
-rw-r--r--libterm/term_io.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/libterm/term_io.h b/libterm/term_io.h
new file mode 100644
index 0000000..48deb67
--- /dev/null
+++ b/libterm/term_io.h
@@ -0,0 +1,32 @@
+#ifndef __LIBTERM_PRINT_UTILS_H
+#define __LIBTERM_PRINT_UTILS_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdint.h>
+
+#include "screen_modes.h"
+#include "term.h"
+
+#define READLINE_NONE 0 //none
+#define READLINE_ALPHA 1 //isalpsha
+#define READLINE_TEXT 2 //[a-zA-Z0-9] + ispunct
+#define READLINE_HIDDEN 3 //[a-zA-Z]
+#define READLINE_NUMBER 4 //[0-9]
+#define READLINE_SYMBOL 5 //not yet
+#define READLINE_ALPHANUM 6 //not yet
+
+
+int term_fprint( screen_mode_e mode, FILE *f );
+int term_print( term_screen *ts, const char *s, size_t n );
+int term_print_xy( term_screen *ts, const char *buf, size_t size,
+ int init_column, int init_row);
+int term_draw_hline( term_screen *ts, int pc, int pr, int sz, char ch );
+int term_getc( term_screen *ts );
+int64_t term_getb( term_screen *ts );
+int term_putc( term_screen *ts, char c );
+int term_readline( term_screen *ts, char *str, size_t str_size, int flag );
+int term_printf( term_screen *ts, const char *format, ...);
+
+#endif