mirror of
https://github.com/gbowne1/ClassicOS.git
synced 2026-01-20 04:15:19 -08:00
Update gui.h
Adds gui base header
This commit is contained in:
34
kernel/gui.h
34
kernel/gui.h
@@ -0,0 +1,34 @@
|
|||||||
|
#ifndef GUI_H
|
||||||
|
#define GUI_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#define GUI_WINDOW_WIDTH 80
|
||||||
|
#define GUI_WINDOW_HEIGHT 25
|
||||||
|
#define GUI_BUTTON_WIDTH 10
|
||||||
|
#define GUI_BUTTON_HEIGHT 3
|
||||||
|
|
||||||
|
// Window structure
|
||||||
|
typedef struct {
|
||||||
|
uint32_t x, y;
|
||||||
|
uint32_t width, height;
|
||||||
|
uint32_t color; // Background color
|
||||||
|
const char* title;
|
||||||
|
} gui_window_t;
|
||||||
|
|
||||||
|
// Button structure
|
||||||
|
typedef struct {
|
||||||
|
uint32_t x, y;
|
||||||
|
uint32_t width, height;
|
||||||
|
uint32_t color; // Background color
|
||||||
|
const char* label;
|
||||||
|
} gui_button_t;
|
||||||
|
|
||||||
|
// Function prototypes for GUI elements
|
||||||
|
void gui_init(void);
|
||||||
|
void gui_draw_window(gui_window_t* window);
|
||||||
|
void gui_draw_button(gui_button_t* button);
|
||||||
|
void gui_clear(uint32_t color);
|
||||||
|
|
||||||
|
#endif // GUI_H
|
||||||
|
|||||||
Reference in New Issue
Block a user