+static void *
+petri_init (Display *dpy, Window win)
+{
+ struct state *st = (struct state *) calloc (1, sizeof(*st));
+ st->dpy = dpy;
+ st->window = win;
+
+ st->delay = get_integer_resource (st->dpy, "delay", "Delay");
+ st->orthlim = 1;
+
+ setup_display (st);
+ setup_arr (st);
+ randblip (st, 1);
+
+ return st;
+}
+
+static unsigned long
+petri_draw (Display *dpy, Window window, void *closure)
+{
+ struct state *st = (struct state *) closure;
+ update (st);
+ return st->delay;
+}
+
+static void
+petri_reshape (Display *dpy, Window window, void *closure,
+ unsigned int w, unsigned int h)
+{
+}
+
+static Bool
+petri_event (Display *dpy, Window window, void *closure, XEvent *event)
+{
+ return False;
+}
+
+static void
+petri_free (Display *dpy, Window window, void *closure)
+{
+ struct state *st = (struct state *) closure;
+ free (st);
+}
+
+