aboutsummaryrefslogtreecommitdiff
path: root/libgui/gfx.c
diff options
context:
space:
mode:
authorMarvin Borner2021-01-09 23:19:53 +0100
committerMarvin Borner2021-01-09 23:19:53 +0100
commit836294b9232c7d63d26db4f87c32cf1420cd856d (patch)
tree54f1b28951c53b38dcde5866a74c082c8ef83b0f /libgui/gfx.c
parentf27a5f8af9fc5a16b80a7d6646e44d718b0efd7d (diff)
To be continued
Diffstat (limited to 'libgui/gfx.c')
-rw-r--r--libgui/gfx.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libgui/gfx.c b/libgui/gfx.c
index 3eb388a..b93ee62 100644
--- a/libgui/gfx.c
+++ b/libgui/gfx.c
@@ -96,6 +96,14 @@ static void draw_rectangle(struct context *ctx, int x1, int y1, int x2, int y2,
}
}
+struct context *gfx_new_ctx(struct context *ctx)
+{
+ struct message msg = { 0 };
+ msg_send(2, GFX_NEW_CONTEXT, ctx);
+ memcpy(ctx, msg_receive_loop(&msg)->data, sizeof(*ctx));
+ return ctx;
+}
+
// On-demand font loading
struct font *gfx_resolve_font(enum font_type font_type)
{