+
+static unsigned long
+deco_draw (Display *dpy, Window window, void *closure)
+{
+ struct state *st = (struct state *) closure;
+ XFillRectangle (dpy, window, st->bgc, 0, 0, st->xgwa.width, st->xgwa.height);
+ deco (dpy, window, st, 0, 0, st->xgwa.width, st->xgwa.height, 0);
+ return 1000000 * st->delay;
+}
+
+static void
+deco_reshape (Display *dpy, Window window, void *closure,
+ unsigned int w, unsigned int h)
+{
+ struct state *st = (struct state *) closure;
+ st->xgwa.width = w;
+ st->xgwa.height = h;
+}
+
+static Bool
+deco_event (Display *dpy, Window window, void *closure, XEvent *event)
+{
+ return False;
+}
+
+static void
+deco_free (Display *dpy, Window window, void *closure)
+{
+ struct state *st = (struct state *) closure;
+ free (st);
+}
+
+\f
+static const char *deco_defaults [] = {
+ ".background: black",
+ ".foreground: white",
+ "*maxDepth: 12",
+ "*minWidth: 20",
+ "*minHeight: 20",
+ "*delay: 5",
+ "*ncolors: 64",
+ 0
+};
+
+static XrmOptionDescRec deco_options [] = {
+ { "-max-depth", ".maxDepth", XrmoptionSepArg, 0 },
+ { "-min-width", ".minWidth", XrmoptionSepArg, 0 },
+ { "-min-height", ".minHeight", XrmoptionSepArg, 0 },
+ { "-delay", ".delay", XrmoptionSepArg, 0 },
+ { "-ncolors", ".ncolors", XrmoptionSepArg, 0 },
+ { 0, 0, 0, 0 }
+};
+
+XSCREENSAVER_MODULE ("Deco", deco)