mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
initial commit: wip
This commit is contained in:
commit
8bf8a398b9
30 changed files with 2921 additions and 0 deletions
27
module.c
Normal file
27
module.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
#include "module.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
struct module_expose_context
|
||||
module_default_begin_expose(const struct module *mod, cairo_t *cr)
|
||||
{
|
||||
struct exposable *e = mod->content(mod);
|
||||
return (struct module_expose_context){
|
||||
.exposable = e,
|
||||
.width = e->begin_expose(e, cr),
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
module_default_expose(const struct module *mod,
|
||||
const struct module_expose_context *ctx, cairo_t *cr,
|
||||
int x, int y, int height)
|
||||
{
|
||||
ctx->exposable->expose(ctx->exposable, cr, x, y, height);
|
||||
}
|
||||
|
||||
void
|
||||
module_default_end_expose(const struct module *mod,
|
||||
struct module_expose_context *ctx)
|
||||
{
|
||||
ctx->exposable->destroy(ctx->exposable);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue