aboutsummaryrefslogtreecommitdiff
path: root/libgui/inc
diff options
context:
space:
mode:
authorMarvin Borner2020-10-31 20:42:35 +0100
committerMarvin Borner2020-10-31 20:42:35 +0100
commit66779122ad298b27315b435339ca83960c6c2d41 (patch)
treebbeebd1f7503ff7efad239c553a0870d6344e10c /libgui/inc
parent72010e198d1a5841b27a42e50a58a86142eb5cd7 (diff)
Some performance improvements
Diffstat (limited to 'libgui/inc')
-rw-r--r--libgui/inc/gfx.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgui/inc/gfx.h b/libgui/inc/gfx.h
index c8e5a29..0b37d84 100644
--- a/libgui/inc/gfx.h
+++ b/libgui/inc/gfx.h
@@ -42,7 +42,7 @@
enum font_type { FONT_8, FONT_12, FONT_16, FONT_24, FONT_32, FONT_64 };
-enum message_type { GFX_NEW_CONTEXT = EVENT_MAX + 1, GFX_REDRAW, GFX_MAX };
+enum message_type { GFX_NEW_CONTEXT = EVENT_MAX + 1, GFX_REDRAW, GFX_REDRAW_FOCUSED, GFX_MAX };
// Generalized font struct
struct font {
@@ -85,5 +85,6 @@ int gfx_font_width(enum font_type);
#define gfx_new_ctx(ctx) \
(msg_send(2, GFX_NEW_CONTEXT, (ctx)), (struct context *)msg_receive_loop()->data)
#define gfx_redraw() (msg_send(2, GFX_REDRAW, NULL)) // TODO: Partial redraw (optimization)
+#define gfx_redraw_focused() (msg_send(2, GFX_REDRAW_FOCUSED, NULL))
#endif