From 5a155d1a8dc3e4a1635e1b0a4a51efc5912b6c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 17 Nov 2018 17:14:53 +0100 Subject: [PATCH] module: add a 'private' member to expose context This allows modules that override begin/end_context to supply their own auxiliary data. --- module.c | 1 + module.h | 1 + 2 files changed, 2 insertions(+) diff --git a/module.c b/module.c index 1ff828a..7f0a8e6 100644 --- a/module.c +++ b/module.c @@ -8,6 +8,7 @@ module_default_begin_expose(const struct module *mod, cairo_t *cr) return (struct module_expose_context){ .exposable = e, .width = e->begin_expose(e, cr), + .private = NULL, }; } diff --git a/module.h b/module.h index 2805649..55e4db4 100644 --- a/module.h +++ b/module.h @@ -16,6 +16,7 @@ struct module_run_context { struct module_expose_context { struct exposable *exposable; int width; + void *private; }; struct module {