From 0de8165d440c549847a1c600558305b04a36a77e Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 26 Jul 2020 13:34:29 +0200 Subject: Added basic gui writer --- src/inc/gui.h | 20 ++++++++++++++++++++ src/inc/psf.h | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 src/inc/gui.h (limited to 'src/inc') diff --git a/src/inc/gui.h b/src/inc/gui.h new file mode 100644 index 0000000..130db8b --- /dev/null +++ b/src/inc/gui.h @@ -0,0 +1,20 @@ +// MIT License, Copyright (c) 2020 Marvin Borner +// Some GUI functions + +#ifndef GUI_H +#define GUI_H + +#include + +// Generalized font struct +struct font { + char *chars; + int height; + int width; + int char_size; +}; + +void gui_write(int x, int y, const u32 c[3], char *text); +void gui_init(char *font_path); + +#endif diff --git a/src/inc/psf.h b/src/inc/psf.h index ced3025..63a3d1e 100644 --- a/src/inc/psf.h +++ b/src/inc/psf.h @@ -43,6 +43,6 @@ struct psf2_header { u32 width; }; -char *psf_parse(char *data); +struct font *psf_parse(char *data); #endif -- cgit v1.2.3