mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-25 16:52:29 +00:00
feat(gui): Implement complete Graphical Desktop Environment, SUB-WM, and apps
- Create separate feature branch 'feat/gui-desktop' - Implement double-buffered 2D graphics engine with alpha blending, gradients, rounded rects, and font rasterization in gui/gui_gfx.c and include/gui/gui_gfx.h - Implement alpha-blended mouse pointer overlay in gui/gui_cursor.c and include/gui/gui_cursor.h - Implement SUB-WM Window Manager with draggable titlebars, close/minimize buttons, drop shadows, and event routing in gui/gui_wm.c and include/gui/gui_wm.h - Implement Cyberpunk/Nord desktop environment with wallpaper, taskbar, start menu popup, and system tray in gui/gui_desktop.c and include/gui/gui_desktop.h - Implement built-in GUI apps: System Performance Monitor, GUI Terminal Emulator, File Explorer, Calculator, Paint Studio, and About dialog in gui/gui_apps.c and include/gui/gui_apps.h - Add 'startx', 'gui', and 'desktop' applets in LazyBox suite - Verified multi-architecture compilation across x86_64, AArch64, and ARMv8i
This commit is contained in:
1 parent
492045b24d
commit
109472816c
16 files changed
+1545
-2
No files matched your search
@@ -0,0 +1,40 @@
|
||||
#ifndef _GUI_GFX_H
|
||||
#define _GUI_GFX_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <gui/gui_theme.h>
|
||||
|
||||
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);
|
||||
|
||||
void gui_gfx_draw_char(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_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_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
|
||||
Reference in new issue
Block a user