27 lines
681 B
C
27 lines
681 B
C
|
// This file is part of noxos and licensed under the MIT open source license
|
||
|
|
||
|
#ifndef NOXOS_TTY_H
|
||
|
#define NOXOS_TTY_H
|
||
|
|
||
|
#include "drivers/graphics/renderer.h"
|
||
|
#include "utils/stream.h"
|
||
|
|
||
|
#define TTY_STD_STREAM_SIZE 0x800 // 2048 bytes
|
||
|
|
||
|
typedef struct {
|
||
|
graphics_buffer_T* graphics_buffer;
|
||
|
stream_T* stream;
|
||
|
position_T cursor;
|
||
|
color_argb_T color;
|
||
|
} tty_T;
|
||
|
|
||
|
void tty_init ();
|
||
|
tty_T* tty_get_active ();
|
||
|
|
||
|
tty_T* tty_alloc (uint32_t stream_size);
|
||
|
void tty_destruct (tty_T* tty);
|
||
|
void tty_update (tty_T* tty);
|
||
|
uint32_t tty_write (tty_T* tty, string_t string);
|
||
|
|
||
|
#endif //NOXOS_TTY_H
|