Files
SUB-OS/include/gui/gui_gfx.h
T
subhobhai943 4568a9ab4e feat(gui): Upgrade to high-res 800x600, sharp 8x16 font, IRQ12 PS/2 mouse driver, and polished window manager
- Upgrade resolution to 800x600 @ 32bpp TrueColor with Bochs/QEMU VBE LFB
- Implement full 8042 Aux PS/2 mouse controller driver on IRQ 12 (vector 44) with packet decode and bounds clamping
- Add high-definition 8x16 font rasterizer with text drop shadows for sharp typography
- Upgrade to smooth 16x24 anti-aliased cursor with dark slate outline and drop shadow
- Increase titlebars to 24px and taskbar to 32px with modern desktop styling
- Re-architect applications (SysMon, Terminal, Explorer, Calc, Paint, About) for spacious high-res display
2026-08-21 03:18:38 +05:30

48 lines
2.0 KiB
C

#ifndef _GUI_GFX_H
#define _GUI_GFX_H
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include <gui/gui_theme.h>
#define GUI_DEFAULT_WIDTH 800
#define GUI_DEFAULT_HEIGHT 600
typedef struct {
int x;
int y;
int width;
int height;
} gui_rect_t;
void gui_gfx_init(uint32_t* fb, int width, int height);
int gui_gfx_get_width(void);
int gui_gfx_get_height(void);
uint32_t* gui_gfx_get_backbuffer(void);
void gui_gfx_clear(uint32_t color);
void gui_gfx_draw_pixel(int x, int y, uint32_t color);
void gui_gfx_draw_pixel_blend(int x, int y, uint32_t color, uint8_t alpha);
void gui_gfx_draw_line(int x0, int y0, int x1, int y1, uint32_t color);
void gui_gfx_draw_rect(int x, int y, int w, int h, uint32_t color);
void gui_gfx_fill_rect(int x, int y, int w, int h, uint32_t color);
void gui_gfx_fill_rect_blend(int x, int y, int w, int h, uint32_t color, uint8_t alpha);
void gui_gfx_draw_rounded_rect(int x, int y, int w, int h, int r, uint32_t color, bool filled);
void gui_gfx_draw_gradient_v(int x, int y, int w, int h, uint32_t top_col, uint32_t bot_col);
void gui_gfx_draw_gradient_h(int x, int y, int w, int h, uint32_t left_col, uint32_t right_col);
// Sharp Typography & Font Rendering
void gui_gfx_draw_char(int x, int y, char c, uint32_t fg, uint32_t bg, bool transparent_bg);
void gui_gfx_draw_char_16(int x, int y, char c, uint32_t fg, uint32_t bg, bool transparent_bg);
void gui_gfx_draw_string(int x, int y, const char* str, uint32_t fg);
void gui_gfx_draw_string_16(int x, int y, const char* str, uint32_t fg);
void gui_gfx_draw_string_bg(int x, int y, const char* str, uint32_t fg, uint32_t bg);
void gui_gfx_draw_string_shadow(int x, int y, const char* str, uint32_t fg, uint32_t shadow);
void gui_gfx_draw_string_16_shadow(int x, int y, const char* str, uint32_t fg, uint32_t shadow);
void gui_gfx_draw_shadow(int x, int y, int w, int h, int blur);
void gui_gfx_blit(int dx, int dy, int w, int h, const uint32_t* src_buf);
void gui_gfx_present(void);
#endif // _GUI_GFX_H