aboutsummaryrefslogtreecommitdiff
path: root/libgui/inc/gfx.h
diff options
context:
space:
mode:
Diffstat (limited to 'libgui/inc/gfx.h')
-rw-r--r--libgui/inc/gfx.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/libgui/inc/gfx.h b/libgui/inc/gfx.h
index 2ce588c..5010650 100644
--- a/libgui/inc/gfx.h
+++ b/libgui/inc/gfx.h
@@ -5,7 +5,6 @@
#define GFX_H
#include <def.h>
-#include <gui.h>
#include <sys.h>
#include <vesa.h>
@@ -39,7 +38,9 @@
#define WF_NO_RESIZE (1 << 2)
#define WF_RELATIVE (1 << 3)
-enum message_type { GFX_NEW_CONTEXT = EVENT_MAX + 1, GFX_REDRAW };
+enum font_type { FONT_8, FONT_12, FONT_16, FONT_24, FONT_32, FONT_64 };
+
+enum message_type { GFX_NEW_CONTEXT = EVENT_MAX + 1, GFX_REDRAW, GFX_MAX };
// Generalized font struct
struct font {
@@ -61,8 +62,9 @@ struct context {
int flags;
};
-void gfx_write_char(struct context *ctx, int x, int y, u32 c, char ch);
-void gfx_write(struct context *ctx, int x, int y, u32 c, char *text);
+struct font *gfx_resolve_font(enum font_type font_type);
+void gfx_write_char(struct context *ctx, int x, int y, enum font_type font_type, u32 c, char ch);
+void gfx_write(struct context *ctx, int x, int y, enum font_type font_type, u32 c, char *text);
void gfx_load_image(struct context *ctx, char *path, int x, int y);
void gfx_load_wallpaper(struct context *ctx, char *path);
void gfx_copy(struct context *dest, struct context *src, int x, int y, u32 width, u32 height);
@@ -70,10 +72,9 @@ void gfx_ctx_on_ctx(struct context *dest, struct context *src, int x, int y);
void gfx_draw_rectangle(struct context *ctx, int x1, int y1, int x2, int y2, u32 c);
void gfx_fill(struct context *ctx, u32 c);
void gfx_border(struct context *ctx, u32 c, u32 width);
-void gfx_init(char *font_path);
-int gfx_font_height();
-int gfx_font_width();
+int gfx_font_height(enum font_type);
+int gfx_font_width(enum font_type);
/**
* Wrappers