diff options
author | Søren Sandmann Pedersen <ssp@l3000.localdomain> | 2011-12-07 01:59:02 -0500 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@l3000.localdomain> | 2011-12-07 01:59:02 -0500 |
commit | ab5d6813a4e2d32991c11f4b7778e46680fd5b03 (patch) | |
tree | 9d8a90cc204b7e70a98f66af20397a5aab496661 /main.c | |
parent | e169399547fa6b2809e33a1500cc6ad054d93644 (diff) |
Actually show a window
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -1,8 +1,35 @@ #include <stdio.h> +#include "window.h" int main () { + ws_t *ws = ws_open(); + window_t *window; + pixman_image_t *image; + pixman_color_t color = { 0xffff, 0xabcd, 0x7777, 0x7777 }; + + if (!ws) + { + printf ("could not open display\n"); + return 0; + } + + window = ws_create_window (ws, 10, 10, 200, 200); + + ws_window_show (window); + + image = pixman_image_create_solid_fill (&color); + + while (1) + { + ws_window_copy_from_image (window, image, 0, 0, 0, 0, 200, 200); + + ws_window_finish (&window, 1); + } + printf ("Hello world\n"); + while (1) + ; return 0; } |