diff --git a/module.c b/module.c index 1e80c32..da27f65 100644 --- a/module.c +++ b/module.c @@ -20,9 +20,9 @@ module_default_destroy(struct module *mod) } struct exposable * -module_begin_expose(struct module *mod) +module_begin_expose(struct module *mod, cairo_t *cr) { struct exposable *e = mod->content(mod); - e->begin_expose(e); + e->begin_expose(e, cr); return e; } diff --git a/module.h b/module.h index ee2b114..d75dbf4 100644 --- a/module.h +++ b/module.h @@ -30,7 +30,7 @@ struct module { struct module *module_common_new(void); void module_default_destroy(struct module *mod); -struct exposable *module_begin_expose(struct module *mod); +struct exposable *module_begin_expose(struct module *mod, cairo_t *cr); /* List of attributes *all* modules implement */ #define MODULE_COMMON_ATTRS \ diff --git a/particle.h b/particle.h index 210530f..7fbb1f9 100644 --- a/particle.h +++ b/particle.h @@ -36,7 +36,7 @@ struct exposable { char *on_click; void (*destroy)(struct exposable *exposable); - int (*begin_expose)(struct exposable *exposable); + int (*begin_expose)(struct exposable *exposable, cairo_t *cr); void (*expose)(const struct exposable *exposable, cairo_t *cr, int x, int y, int height); diff --git a/particles/dynlist.c b/particles/dynlist.c index e6a3636..289dece 100644 --- a/particles/dynlist.c +++ b/particles/dynlist.c @@ -31,7 +31,7 @@ dynlist_destroy(struct exposable *exposable) } static int -dynlist_begin_expose(struct exposable *exposable) +dynlist_begin_expose(struct exposable *exposable, cairo_t *cr) { const struct private *e = exposable->private; @@ -39,7 +39,7 @@ dynlist_begin_expose(struct exposable *exposable) for (size_t i = 0; i < e->count; i++) { struct exposable *ee = e->exposables[i]; - e->widths[i] = ee->begin_expose(ee); + e->widths[i] = ee->begin_expose(ee, cr); exposable->width += e->left_spacing + e->widths[i] + e->right_spacing; } diff --git a/particles/empty.c b/particles/empty.c index 8b0cb39..c040814 100644 --- a/particles/empty.c +++ b/particles/empty.c @@ -6,7 +6,7 @@ #include "../plugin.h" static int -begin_expose(struct exposable *exposable) +begin_expose(struct exposable *exposable, cairo_t *cr) { exposable->width = exposable->particle->left_margin + exposable->particle->right_margin; diff --git a/particles/list.c b/particles/list.c index a47c468..420cebd 100644 --- a/particles/list.c +++ b/particles/list.c @@ -36,7 +36,7 @@ exposable_destroy(struct exposable *exposable) } static int -begin_expose(struct exposable *exposable) +begin_expose(struct exposable *exposable, cairo_t *cr) { const struct eprivate *e = exposable->private; @@ -44,7 +44,7 @@ begin_expose(struct exposable *exposable) for (size_t i = 0; i < e->count; i++) { struct exposable *ee = e->exposables[i]; - e->widths[i] = ee->begin_expose(ee); + e->widths[i] = ee->begin_expose(ee, cr); exposable->width += e->left_spacing + e->widths[i] + e->right_spacing; } diff --git a/particles/map.c b/particles/map.c index a8895cb..c40632f 100644 --- a/particles/map.c +++ b/particles/map.c @@ -36,13 +36,13 @@ exposable_destroy(struct exposable *exposable) } static int -begin_expose(struct exposable *exposable) +begin_expose(struct exposable *exposable, cairo_t *cr) { struct eprivate *e = exposable->private; exposable->width = ( exposable->particle->left_margin + - e->exposable->begin_expose(e->exposable) + + e->exposable->begin_expose(e->exposable, cr) + exposable->particle->right_margin); return exposable->width; diff --git a/particles/progress-bar.c b/particles/progress-bar.c index 762178e..9c1eb6c 100644 --- a/particles/progress-bar.c +++ b/particles/progress-bar.c @@ -54,7 +54,7 @@ exposable_destroy(struct exposable *exposable) } static int -begin_expose(struct exposable *exposable) +begin_expose(struct exposable *exposable, cairo_t *cr) { struct eprivate *e = exposable->private; @@ -64,7 +64,7 @@ begin_expose(struct exposable *exposable) /* Sub-exposables */ for (size_t i = 0; i < e->count; i++) - exposable->width += e->exposables[i]->begin_expose(e->exposables[i]); + exposable->width += e->exposables[i]->begin_expose(e->exposables[i], cr); return exposable->width; } diff --git a/particles/ramp.c b/particles/ramp.c index 1f8ef11..2e0aebe 100644 --- a/particles/ramp.c +++ b/particles/ramp.c @@ -30,13 +30,13 @@ exposable_destroy(struct exposable *exposable) } static int -begin_expose(struct exposable *exposable) +begin_expose(struct exposable *exposable, cairo_t *cr) { struct eprivate *e = exposable->private; exposable->width = ( exposable->particle->left_margin + - e->exposable->begin_expose(e->exposable) + + e->exposable->begin_expose(e->exposable, cr) + exposable->particle->right_margin); return exposable->width; diff --git a/particles/string.c b/particles/string.c index 58e1984..a4dfef9 100644 --- a/particles/string.c +++ b/particles/string.c @@ -44,7 +44,7 @@ exposable_destroy(struct exposable *exposable) } static int -begin_expose(struct exposable *exposable) +begin_expose(struct exposable *exposable, cairo_t *cr) { struct eprivate *e = exposable->private;