+
+ check_for_leaks();
+ return st->delay;
+}
+
+static void
+piecewise_reshape (Display *dpy, Window window, void *closure,
+ unsigned int w, unsigned int h)
+{
+ struct state *st = (struct state *) closure;
+ XGetWindowAttributes(st->dpy, st->window, &st->xgwa);
+}
+
+static Bool
+piecewise_event (Display *dpy, Window window, void *closure, XEvent *event)
+{
+ return False;
+}
+
+static void
+piecewise_free (Display *dpy, Window window, void *closure)
+{
+ struct state *st = (struct state *) closure;
+ free (st);
+}
+
+
+
+static const char *piecewise_defaults [] = {
+ ".background: black",
+ ".foreground: white",
+ "*delay: 10000",
+ "*speed: 15",
+ "*ncolors: 256",
+ ".colorspeed: 10",
+
+ ".count: 32",
+ ".minradius: 0.05",
+ ".maxradius: 0.2",
+
+ "*doubleBuffer: True",
+#ifdef HAVE_DOUBLE_BUFFER_EXTENSION
+ "*useDBE: True",
+#endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
+ 0
+ };
+
+static XrmOptionDescRec piecewise_options [] = {
+ { "-delay", ".delay", XrmoptionSepArg, 0 },
+ { "-ncolors", ".ncolors", XrmoptionSepArg, 0 },
+ { "-speed", ".speed", XrmoptionSepArg, 0 },
+ { "-colorspeed", ".colorspeed", XrmoptionSepArg, 0 },
+
+ { "-count", ".count", XrmoptionSepArg, 0 },
+ { "-minradius", ".minradius", XrmoptionSepArg, 0 },
+ { "-maxradius", ".maxradius", XrmoptionSepArg, 0 },
+
+ { "-db", ".doubleBuffer", XrmoptionNoArg, "True" },
+ { "-no-db", ".doubleBuffer", XrmoptionNoArg, "False" },
+ { 0, 0, 0, 0 }
+ };
+
+
+XSCREENSAVER_MODULE ("Piecewise", piecewise)