summaryrefslogtreecommitdiff
path: root/src/vga.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vga.h')
-rw-r--r--src/vga.h68
1 files changed, 0 insertions, 68 deletions
diff --git a/src/vga.h b/src/vga.h
deleted file mode 100644
index 695c228..0000000
--- a/src/vga.h
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef VGA_H
-#define VGA_H
-
-#include <stdbool.h>
-
-#include "port.h"
-
-enum {
- VGA_DEFAULT_RES_X = 80,
- VGA_DEFAULT_RES_Y = 25
-};
-
-typedef enum {
- VGA_COLOR_BLACK = 0,
- VGA_COLOR_BLUE = 1,
- VGA_COLOR_GREEN = 2,
- VGA_COLOR_CYAN = 3,
- VGA_COLOR_RED = 4,
- VGA_COLOR_MAGENTA = 5,
- VGA_COLOR_BROWN = 6,
- VGA_COLOR_LIGHT_GREY = 7,
- VGA_COLOR_DARK_GREY = 8,
- VGA_COLOR_LIGHT_BLUE = 9,
- VGA_COLOR_LIGHT_GREEN = 10,
- VGA_COLOR_LIGHT_CYAN = 11,
- VGA_COLOR_LIGHT_RED = 12,
- VGA_COLOR_LIGHT_MAGENTA = 13,
- VGA_COLOR_LIGHT_BROWN = 14,
- VGA_COLOR_WHITE = 15
-} vga_color_t;
-
-typedef struct {
- int res_x; // resolution, default 80
- int res_y; // resolution, default 25
- int cursor_x; // current cursor position X
- int cursor_y; // current cursor position Y
- vga_color_t color;
- vga_color_t background_color;
- port8_t crtc_misc_port;
- port8_t crtc_index_port;
- port8_t crtc_data_port;
- bool show_mouse_cursor;
- int mouse_cursor_x;
- int mouse_cursor_y;
-} vga_t;
-
-void vga_init( vga_t *vga );
-void vga_clear_screen( vga_t *vga );
-void vga_set_cursor( vga_t *vga, const int x, const int y );
-void vga_set_cursor_from_hardware( vga_t *vga );
-void vga_set_cursor_on_hardware( vga_t *vga );
-int vga_get_cursor_x( vga_t *vga );
-int vga_get_cursor_y( vga_t *vga );
-void vga_set_color( vga_t *vga, const vga_color_t color );
-void vga_set_background_color( vga_t *vga, const vga_color_t color );
-void vga_put_char_at( vga_t *vga, const int x, const int y, const char c );
-void vga_put_string_at( vga_t *vga, const int x, const int y, const char *s );
-void vga_put_char( vga_t *vga, const char c );
-void vga_put_string( vga_t *vga, const char *s );
-void vga_put_newline( vga_t *vga );
-void vga_set_background_color_at( vga_t *vga, const int x, const int y, vga_color_t color );
-vga_color_t vga_get_background_color_at( vga_t *vga, const int x, const int y );
-void vga_inverse_colors_at( vga_t *vga, const int x, const int y );
-void vga_show_mouse_cursor( vga_t *vga );
-void vga_move_mouse_cursor( vga_t *vga, const int x, const int y );
-void vga_hide_mouse_cursor( vga_t *vga );
-
-#endif /* VGA_H */