ref: 7e1b3f0d74ca29443d5c28c318a45831d0e6fc46
author: glenda <glenda@9front.local>
date: Sat Jan 2 06:02:56 EST 2021
"init"
binary files /dev/null b/glenda.im differ
--- /dev/null
+++ b/mkfile
@@ -1,0 +1,4 @@
+</$objtype/mkfile
+TARG=test
+OFILES=test.$O
+</sys/src/cmd/mkone
\ No newline at end of file
--- /dev/null
+++ b/test.c
@@ -1,0 +1,37 @@
+#include <u.h>
+#include <libc.h>
+#include <draw.h>
+#include <event.h>
+
+Image *im;
+Image *bg;
+
+void
+eresized(int new)
+{
+ getwindow(display, Refmesg);
+ USED(new);
+ Point p = {100,100};
+ draw(screen, screen->r, bg, 0, ZP);
+ draw(screen, rectaddpt(screen->r, p), im, 0, ZP);
+ flushimage(display, 1);
+}
+
+void
+main()
+{
+ Event e;
+
+ initdraw(0,0,"test");
+ einit(Ekeyboard);
+
+ bg = allocimagemix(display, DRed, DWhite);
+ im = readimage(display, open("glenda.im", OREAD), 0);
+ eresized(0);
+
+ for(;;){
+ eread(Ekeyboard, &e);
+ if(e.kbdc == 'q')
+ exits(0);
+ }
+}
\ No newline at end of file