aboutsummaryrefslogtreecommitdiff
path: root/apps/window.c
diff options
context:
space:
mode:
authorMarvin Borner2020-09-13 12:10:45 +0200
committerMarvin Borner2020-09-13 12:10:45 +0200
commit0ff95a565280241a4b9cc03840d8756180860b25 (patch)
tree89280d9ed98b549e54c69a3ac74d03eca5aebc11 /apps/window.c
parente55f8e9039b5be5f3750639dad0ae5058adc8449 (diff)
Maaany wm features
Diffstat (limited to 'apps/window.c')
-rw-r--r--apps/window.c13
1 files changed, 9 insertions, 4 deletions
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;