X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/05b7549a0f980efa33265a091a5174a78851ce05..baca54322c66983205edecd2ebb00d997878be50:/lunaix-os/includes/lunaix/tty/tty.h diff --git a/lunaix-os/includes/lunaix/tty/tty.h b/lunaix-os/includes/lunaix/tty/tty.h index 28ad83d..b4a847a 100644 --- a/lunaix-os/includes/lunaix/tty/tty.h +++ b/lunaix-os/includes/lunaix/tty/tty.h @@ -1,5 +1,8 @@ #ifndef __LUNAIX_TTY_H #define __LUNAIX_TTY_H + +#include + typedef unsigned short vga_attribute; #define VGA_COLOR_BLACK 0 @@ -9,8 +12,8 @@ typedef unsigned short vga_attribute; #define VGA_COLOR_RED 4 #define VGA_COLOR_MAGENTA 5 #define VGA_COLOR_BROWN 6 -#define VGA_COLOR_LIGHT_GREY 7 #define VGA_COLOR_DARK_GREY 8 +#define VGA_COLOR_LIGHT_GREY 7 #define VGA_COLOR_LIGHT_BLUE 9 #define VGA_COLOR_LIGHT_GREEN 10 #define VGA_COLOR_LIGHT_CYAN 11 @@ -19,38 +22,28 @@ typedef unsigned short vga_attribute; #define VGA_COLOR_LIGHT_BROWN 14 #define VGA_COLOR_WHITE 15 -void -tty_init(void* vga_buf); +#define TTY_WIDTH 80 +#define TTY_HEIGHT 25 void -tty_set_buffer(void* vga_buf); +tty_init(void* vga_buf); void tty_set_theme(vga_attribute fg, vga_attribute bg); -void -tty_put_char(char chr); - -void -tty_put_str(char* str); +vga_attribute +tty_get_theme(); void -tty_scroll_up(); +tty_flush_buffer(struct fifo_buf* buf); void -tty_clear(); - -void -tty_clear_line(unsigned int y); +tty_clear_line(int line_num); void -tty_set_cpos(unsigned int x, unsigned int y); +tty_put_str_at(char* str, int x, int y); void -tty_get_cpos(unsigned int* x, unsigned int* y); - -vga_attribute -tty_get_theme(); - +tty_set_cursor(u8_t x, u8_t y); #endif /* __LUNAIX_TTY_H */