From 1287f9dfe987f0456e4fb0741385d5f0278ef53b Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 14 Feb 2021 17:07:29 +0100 Subject: Message waiting and more! --- libgui/inc/gfx.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libgui/inc/gfx.h') diff --git a/libgui/inc/gfx.h b/libgui/inc/gfx.h index 4998d30..fd8d4ab 100644 --- a/libgui/inc/gfx.h +++ b/libgui/inc/gfx.h @@ -5,9 +5,12 @@ #define GFX_H #include +#include #include #include +#define WM_PATH "/bin/wm" + #define GET_ALPHA(color) ((color >> 24) & 0x000000FF) #define GET_RED(color) ((color >> 16) & 0x000000FF) #define GET_GREEN(color) ((color >> 8) & 0x000000FF) @@ -42,8 +45,6 @@ enum font_type { FONT_8, FONT_12, FONT_16, FONT_24, FONT_32, FONT_64 }; -enum message_type { GFX_NEW_CONTEXT, GFX_REDRAW, GFX_REDRAW_FOCUSED, GFX_MAX }; - // Generalized font struct struct font { char *chars; @@ -85,7 +86,7 @@ int gfx_font_width(enum font_type); */ #define gfx_redraw() \ - (void)42 //(msg_send(2, GFX_REDRAW, NULL)) // TODO: Partial redraw (optimization) -#define gfx_redraw_focused() (void)42 //(msg_send(2, GFX_REDRAW_FOCUSED, NULL)) + (msg_send(pidof(WM_PATH), GFX_REDRAW, NULL)) // TODO: Partial redraw (optimization) +#define gfx_redraw_focused() (msg_send(pidof(WM_PATH), GFX_REDRAW_FOCUSED, NULL)) #endif -- cgit v1.2.3