diff options
author | Marvin Borner | 2021-02-14 17:07:29 +0100 |
---|---|---|
committer | Marvin Borner | 2021-02-14 17:07:29 +0100 |
commit | 1287f9dfe987f0456e4fb0741385d5f0278ef53b (patch) | |
tree | 64d3da484a4d186a725779f20d339432d51f441a /libgui/inc/gfx.h | |
parent | bc4e62f629a392e1a4cf204665e91c57f4e619b2 (diff) |
Message waiting and more!
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 |