From b667ea0fbd26af222f828199e7b9a7e62ad98081 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 22 Aug 2020 23:31:47 +0200 Subject: Some window fb and yield implementation --- libgui/inc/gui.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'libgui/inc') diff --git a/libgui/inc/gui.h b/libgui/inc/gui.h index acef037..5f35372 100644 --- a/libgui/inc/gui.h +++ b/libgui/inc/gui.h @@ -16,12 +16,21 @@ struct font { int char_size; }; -void gui_write(struct vbe *vbe, int x, int y, const u32 c[3], char *text); +struct window { + int x; + int y; + u16 width; + u16 height; + u8 *fb; +}; + void gui_init(char *font_path); /** * Wrappers */ -#define gui_new_window() msg_send(1, MSG_NEW_WINDOW, NULL); + +#define gui_new_window() \ + (msg_send(1, MSG_NEW_WINDOW, NULL), (struct window *)msg_receive_loop()->data) #endif -- cgit v1.2.3