module: add a 'private' member to expose context

This allows modules that override begin/end_context to supply their
own auxiliary data.
This commit is contained in:
Daniel Eklöf 2018-11-17 17:14:53 +01:00
parent c5d3e934b4
commit 5a155d1a8d
2 changed files with 2 additions and 0 deletions

View file

@ -8,6 +8,7 @@ module_default_begin_expose(const struct module *mod, cairo_t *cr)
return (struct module_expose_context){ return (struct module_expose_context){
.exposable = e, .exposable = e,
.width = e->begin_expose(e, cr), .width = e->begin_expose(e, cr),
.private = NULL,
}; };
} }

View file

@ -16,6 +16,7 @@ struct module_run_context {
struct module_expose_context { struct module_expose_context {
struct exposable *exposable; struct exposable *exposable;
int width; int width;
void *private;
}; };
struct module { struct module {