diff options
Diffstat (limited to 'src/sys/include/io/cons/cons.h')
-rw-r--r-- | src/sys/include/io/cons/cons.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/sys/include/io/cons/cons.h b/src/sys/include/io/cons/cons.h index 3f95cc0..7b0543e 100644 --- a/src/sys/include/io/cons/cons.h +++ b/src/sys/include/io/cons/cons.h @@ -32,9 +32,14 @@ #include <sys/types.h> #include <sys/bootvars.h> +#include <os/spinlock.h> struct cons_scr { + struct spinlock lock; struct bootvar_fb fbvars; + size_t text_x; + size_t text_y; + size_t max_col; uint32_t scr_bg; uint32_t scr_fg; }; @@ -51,4 +56,16 @@ extern struct cons_scr g_root_scr; */ int cons_init(void); +/* + * Write a string onto the screen + * + * @scr: Screen to write on + * @str: String to write onto the screen + * @len: Length of string to write + * + * Returns the number of bytes written on success, + * otherwise a less than zero value to indicate failure. + */ +ssize_t cons_putstr(struct cons_scr *scr, const char *str, size_t len); + #endif /* !_CONS_CONS_H_ */ |