From 0ff95a565280241a4b9cc03840d8756180860b25 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 13 Sep 2020 12:10:45 +0200 Subject: Maaany wm features --- apps/window.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'apps/window.c') diff --git a/apps/window.c b/apps/window.c index 0d503de..f20bab3 100644 --- a/apps/window.c +++ b/apps/window.c @@ -12,14 +12,18 @@ int main() print("[test window loaded]\n"); struct window win = { 0 }; + win.height = 200; + win.width = 300; + win.x = 50; + win.y = 50; gui_new_window(&win); - gui_fill(&win, BG_COLOR); - gui_border(&win, FG_COLOR, 2); + gui_fill(&win, COLOR_BG); + gui_border(&win, COLOR_FG, 2); gui_init("/font/spleen-12x24.psfu"); char *hello = "Hello, world!"; - gui_write(&win, win.width / 2 - (strlen(hello) * 12) / 2, 5, FG_COLOR, hello); + gui_write(&win, win.width / 2 - (strlen(hello) * 12) / 2, 5, COLOR_GREEN, hello); event_register(EVENT_KEYBOARD); struct message *msg; @@ -45,7 +49,8 @@ int main() char_x = 0; char_y++; } else if (KEY_ALPHABETIC(key)) { - gui_write_char(&win, 12 * char_x++, 24 * char_y + 5, FG_COLOR, 'a'); + gui_write_char(&win, 12 * char_x++, 24 * char_y + 5, COLOR_CYAN, + 'a'); } break; -- cgit v1.2.3