+/*
+ * Call after the widget is resized to update the internal dimensions,
+ * and clear the margins.
+ *
+ * Since the pre-rendered text never changes, this is all that is needed:
+ * existing portions of the window do not need to be redrawn (except when
+ * shrinking the margins over previously-drawn text), and newly-revealed
+ * areas will get expose events to trigger redraw.
+ */
+static inline void xcounter_resize(struct xcounter *xc)
+{
+ xcounter_resize_cb(0, xc, 0);
+}
+
+static inline struct xcounter *xcounter_simple_init(Widget w, char *template)