summaryrefslogtreecommitdiff
path: root/framebuffer.h
diff options
context:
space:
mode:
authorKirill Petrashin <kirill8201@yandex.ru>2026-06-29 16:44:27 +0300
committerKirill Petrashin <kirill8201@yandex.ru>2026-06-29 16:44:27 +0300
commit948720fba656b25b255297b2142dfaf5fc952e1f (patch)
tree0041bb427fc7b131ae2f48ffe9d14ba2ba0942a2 /framebuffer.h
parent94e918612723f8d3ef480f158839febf07376a44 (diff)
downloadwafflestone-948720fba656b25b255297b2142dfaf5fc952e1f.tar.xz
Add functions to output text
Diffstat (limited to 'framebuffer.h')
-rw-r--r--framebuffer.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/framebuffer.h b/framebuffer.h
index 7571294..6191f2c 100644
--- a/framebuffer.h
+++ b/framebuffer.h
@@ -65,6 +65,13 @@ void fb_put(Framebuffer fb, size_t row, size_t col, Pixel pixel);
/* Draws a vertical line to fb on col x, from y1 to y2 */
void fb_vert_line(Framebuffer fb, size_t x, size_t y1, size_t y2, Pixel pixel);
+/* Puts s onto fb in position (x, y) with given colour. s has to be null-terminated.
+ * x is of type long to handle text 'origin' being lefter than the left edge when x < 0 */
+void fb_text(Framebuffer fb, long x, size_t y, char *s, Colour fg, Colour bg);
+
+/* Same as above, but the background is 'transparent' */
+void fb_text_no_bg(Framebuffer fb, long x, size_t y, char *s, Colour fg);
+
/* Initializes the terminal and sets TERM_WIDTH and TERM_HEIGHT */
void term_init(void);