From 836294b9232c7d63d26db4f87c32cf1420cd856d Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 9 Jan 2021 23:19:53 +0100 Subject: To be continued --- libgui/gfx.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libgui/gfx.c') 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) { -- cgit v1.2.3