diff options
Diffstat (limited to 'libgui/inc/gfx.h')
-rw-r--r-- | libgui/inc/gfx.h | 9 |
1 files changed, 5 insertions, 4 deletions
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 <def.h> +#include <msg.h> #include <sys.h> #include <vesa.h> +#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 |