X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/e0ee3d449aacd33a84cb1f58961e55f9f06acb46..f6ab9c9ababa2cf6e5c723b83ffb9362094054e8:/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 b470fdc..96fe485 100644 --- a/lunaix-os/includes/lunaix/tty/tty.h +++ b/lunaix-os/includes/lunaix/tty/tty.h @@ -1,4 +1,9 @@ -typedef unsigned short vga_atrributes; +#ifndef __LUNAIX_TTY_H +#define __LUNAIX_TTY_H + +#include + +typedef unsigned short vga_attribute; #define VGA_COLOR_BLACK 0 #define VGA_COLOR_BLUE 1 @@ -7,8 +12,8 @@ typedef unsigned short vga_atrributes; #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,8 +22,25 @@ typedef unsigned short vga_atrributes; #define VGA_COLOR_LIGHT_BROWN 14 #define VGA_COLOR_WHITE 15 -void tty_set_theme(vga_atrributes fg, vga_atrributes bg); -void tty_put_char(char chr); -void tty_put_str(char* str); -void tty_scroll_up(); -void tty_clear(); \ No newline at end of file +#define TTY_WIDTH 80 +#define TTY_HEIGHT 25 + +void +tty_init(void* vga_buf); + +void +tty_set_theme(vga_attribute fg, vga_attribute bg); + +vga_attribute +tty_get_theme(); + +void +tty_flush_buffer(struct fifo_buf* buf); + +void +tty_clear_line(int line_num); + +void +tty_put_str_at(char* str, int x, int y); + +#endif /* __LUNAIX_TTY_H */