diff options
author | Marvin Borner | 2020-08-16 00:44:53 +0200 |
---|---|---|
committer | Marvin Borner | 2020-08-16 00:44:53 +0200 |
commit | c4a0bc2571162ad83fc51eb823f1c535336041bf (patch) | |
tree | cba1169a027fea8884e882be601bf3cbaeaab654 /kernel/inc | |
parent | 9a827eb5f6ff58bf801bc98bcb653876428ebe69 (diff) |
Added psf/gui to libgui
...and some other things
Diffstat (limited to 'kernel/inc')
-rw-r--r-- | kernel/inc/gui.h | 22 | ||||
-rw-r--r-- | kernel/inc/psf.h | 48 |
2 files changed, 0 insertions, 70 deletions
diff --git a/kernel/inc/gui.h b/kernel/inc/gui.h deleted file mode 100644 index 760bcb9..0000000 --- a/kernel/inc/gui.h +++ /dev/null @@ -1,22 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner -// Some GUI functions - -#ifndef GUI_H -#define GUI_H - -#include <def.h> - -// 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_term_write_char(char ch); -void gui_term_write(char *text); -void gui_init(char *font_path); - -#endif diff --git a/kernel/inc/psf.h b/kernel/inc/psf.h deleted file mode 100644 index 63a3d1e..0000000 --- a/kernel/inc/psf.h +++ /dev/null @@ -1,48 +0,0 @@ -// MIT License, Copyright (c) 2020 Marvin Borner -// PSF parser - -#ifndef PSF_H -#define PSF_H - -#include <def.h> - -/** - * PSF version 1 - */ - -#define PSF1_MAGIC_0 0x36 -#define PSF1_MAGIC_1 0x04 -#define PSF1_MODE_256 0 -#define PSF1_MODE_512 1 -#define PSF1_MODE_256_UNICODE 2 -#define PSF1_MODE_512_UNICODE 3 - -struct psf1_header { - u8 magic[2]; - u8 mode; - u8 char_size; -}; - -/** - * PSF version 2 - */ - -#define PSF2_MAGIC_0 0x72 -#define PSF2_MAGIC_1 0xb5 -#define PSF2_MAGIC_2 0x4a -#define PSF2_MAGIC_3 0x86 - -struct psf2_header { - u8 magic[4]; - u32 version; - u32 size; - u32 flags; - u32 glyph_count; - u32 char_size; - u32 height; - u32 width; -}; - -struct font *psf_parse(char *data); - -#endif |