mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
module: remove module_expose_context
This commit is contained in:
parent
9276724113
commit
33cba8b0ba
3 changed files with 65 additions and 83 deletions
20
module.c
20
module.c
|
@ -37,29 +37,23 @@ module_signal_ready(struct module_run_context *ctx)
|
|||
write(ctx->ready_fd, &(uint64_t){1}, sizeof(uint64_t));
|
||||
}
|
||||
|
||||
struct module_expose_context
|
||||
struct exposable *
|
||||
module_default_begin_expose(struct module *mod)
|
||||
{
|
||||
struct exposable *e = mod->content(mod);
|
||||
e->begin_expose(e);
|
||||
|
||||
return (struct module_expose_context){
|
||||
.exposable = e,
|
||||
.private = NULL,
|
||||
};
|
||||
return e;
|
||||
}
|
||||
|
||||
void
|
||||
module_default_expose(const struct module *mod,
|
||||
const struct module_expose_context *ctx, cairo_t *cr,
|
||||
int x, int y, int height)
|
||||
module_default_expose(const struct module *mod, const struct exposable *exposable,
|
||||
cairo_t *cr, int x, int y, int height)
|
||||
{
|
||||
ctx->exposable->expose(ctx->exposable, cr, x, y, height);
|
||||
exposable->expose(exposable, cr, x, y, height);
|
||||
}
|
||||
|
||||
void
|
||||
module_default_end_expose(const struct module *mod,
|
||||
struct module_expose_context *ctx)
|
||||
module_default_end_expose(const struct module *mod, struct exposable *exposable)
|
||||
{
|
||||
ctx->exposable->destroy(ctx->exposable);
|
||||
exposable->destroy(exposable);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue