mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-20 11:35:42 +02:00
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:
parent
c5d3e934b4
commit
5a155d1a8d
2 changed files with 2 additions and 0 deletions
1
module.c
1
module.c
|
@ -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,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
module.h
1
module.h
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue