#include "screenhack.h"
#include "glx/rotator.h"
+#include "colorbars.h"
+#include "erase.h"
#include <assert.h>
#include <errno.h>
mode_images,
mode_copy,
mode_preserve,
+ mode_erase,
mode_count
};
Pixmap preserve[2];
+ eraser_state *erase;
+
rotator *rot;
};
}
+static void
+colorbars (struct testx11 *st)
+{
+ draw_colorbars (st->xgwa.screen, st->xgwa.visual, st->win,
+ st->xgwa.colormap, 0, 0, st->xgwa.width, st->xgwa.height);
+}
+
+
static void *
testx11_init (Display *dpy, Window win)
{
{
static const char text[] = "Welcome from testx11_init().";
- XClearWindow (dpy, win);
+ colorbars (st);
XDrawString (dpy, win, st->copy_gc, 16, 16, text, countof (text) - 1);
}
preserve_size, preserve_size,
w - preserve_size / 2, preserve_size);
break;
+
+ case mode_erase:
+ if (!st->erase)
+ colorbars (st);
+ st->erase = erase_window(st->dpy, st->win, st->erase);
+ break;
}
/* Mode toggle buttons */