X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/fedfd71f5492177a7c7d7fd2bd1529a832106395..96e23fa3c6eabf8a6efebac24b740c5d4a2a1050:/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 c1a9a92..518d376 100644 --- a/lunaix-os/includes/lunaix/tty/tty.h +++ b/lunaix-os/includes/lunaix/tty/tty.h @@ -1,3 +1,5 @@ +#ifndef __LUNAIX_TTY_H +#define __LUNAIX_TTY_H typedef unsigned short vga_attribute; #define VGA_COLOR_BLACK 0 @@ -7,8 +9,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 @@ -17,17 +19,25 @@ typedef unsigned short vga_attribute; #define VGA_COLOR_LIGHT_BROWN 14 #define VGA_COLOR_WHITE 15 -void -tty_set_theme(vga_attribute fg, vga_attribute bg); +#define TTY_WIDTH 80 +#define TTY_HEIGHT 25 void -tty_put_char(char chr); +tty_init(void* vga_buf); void -tty_put_str(char* str); +tty_set_theme(vga_attribute fg, vga_attribute bg); + +vga_attribute +tty_get_theme(); + +size_t +tty_flush_buffer(char* data, size_t pos, size_t limit, size_t buf_size); void -tty_scroll_up(); +tty_clear_line(int line_num); void -tty_clear(); \ No newline at end of file +tty_put_str_at(char* str, int x, int y); + +#endif /* __LUNAIX_TTY_H */