summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/main.c b/main.c
index 4662ae3..8142abf 100644
--- a/main.c
+++ b/main.c
@@ -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;
}