aboutsummaryrefslogtreecommitdiff
path: root/src/userspace/libgui/gui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/userspace/libgui/gui.h')
-rw-r--r--src/userspace/libgui/gui.h44
1 files changed, 43 insertions, 1 deletions
diff --git a/src/userspace/libgui/gui.h b/src/userspace/libgui/gui.h
index b056dea..d210999 100644
--- a/src/userspace/libgui/gui.h
+++ b/src/userspace/libgui/gui.h
@@ -3,6 +3,16 @@
#include <stdint.h>
+struct vbe_mode_info {
+ u16 attributes;
+ u16 pitch;
+ u16 width;
+ u16 height;
+ u8 bpp;
+ u8 memory_model;
+ u32 framebuffer;
+};
+
struct font {
u16 font_32[758][32];
u16 font_24[758][24];
@@ -11,12 +21,44 @@ struct font {
};
struct pointers {
- u8 *fb;
+ struct vbe_mode_info *mode_info;
struct font *font;
};
+u32 terminal_color[3];
+u32 terminal_background[3];
+enum gui_color {
+ gui_black = 0x1d1f24,
+ gui_red = 0xE06C75,
+ gui_green = 0x98C379,
+ gui_yellow = 0xE5C07B,
+ gui_blue = 0x61AFEF,
+ gui_magenta = 0xC678DD,
+ gui_cyan = 0x56B6C2,
+ gui_white = 0xABB2BF,
+ gui_dark_black = 0x3E4452,
+ gui_dark_red = 0xBE5046,
+ gui_dark_green = 0x98C379,
+ gui_dark_yellow = 0xD19A66,
+ gui_dark_blue = 0x61AFEF,
+ gui_dark_magenta = 0xC678DD,
+ gui_dark_cyan = 0x56B6C2,
+ gui_dark_white = 0x5C6370,
+};
+
+u8 *fb;
+int vbe_width;
+int vbe_height;
+int vbe_pitch;
+int vbe_bpl;
+
struct pointers *pointers;
void gui_init();
+void gui_draw_rectangle(int x1, int y1, int x2, int y2, const u32 color[3]);
+void gui_screen_clear();
+
+void gui_convert_color(u32 *color_array, u32 color);
+
#endif \ No newline at end of file