aboutsummaryrefslogtreecommitdiff
path: root/apps/window.c
blob: da84effd1dd070ee72a4a4072fdef54878a4727f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// MIT License, Copyright (c) 2021 Marvin Borner

#include <assert.h>
#include <gui.h>
#include <print.h>

int main()
{
	struct gui_window win = { 0 };
	assert(gui_new_window(&win) > 0);
	gfx_fill(win.ctx, COLOR_GREEN);
	// Professional testing
	for (int i = 0; i < 12; i++) {
		gfx_write(win.ctx, vec2(0, i * gfx_font_height(FONT_32)), FONT_32, COLOR_BLACK,
			  "Hallo, wie geht es Ihnen denn heute?");
	}
	assert(gui_redraw_window(win.id) > 0);
	log("%d\n", win.ctx->size.x);
	return 0;
}