mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-29 04:55:39 +02:00
initial commit: wip
This commit is contained in:
commit
8bf8a398b9
30 changed files with 2921 additions and 0 deletions
46
module.h
Normal file
46
module.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
#pragma once
|
||||
|
||||
#include <cairo.h>
|
||||
|
||||
#include "particle.h"
|
||||
#include "tag.h"
|
||||
|
||||
struct bar;
|
||||
struct module;
|
||||
|
||||
struct module_run_context {
|
||||
struct module *module;
|
||||
int abort_fd;
|
||||
};
|
||||
|
||||
struct module_expose_context {
|
||||
struct exposable *exposable;
|
||||
int width;
|
||||
};
|
||||
|
||||
struct module {
|
||||
const struct bar *bar;
|
||||
|
||||
void *private;
|
||||
|
||||
int (*run)(struct module_run_context *ctx);
|
||||
void (*destroy)(struct module *module);
|
||||
|
||||
struct exposable *(*content)(const struct module *mod);
|
||||
struct module_expose_context (*begin_expose)(const struct module *mod, cairo_t *cr);
|
||||
void (*expose)(const struct module *mod,
|
||||
const struct module_expose_context *ctx,
|
||||
cairo_t *cr, int x, int y, int height);
|
||||
void (*end_expose)(const struct module *mod, struct module_expose_context *ctx);
|
||||
};
|
||||
|
||||
struct module_expose_context module_default_begin_expose(
|
||||
const struct module *mod, cairo_t *cr);
|
||||
|
||||
void module_default_expose(
|
||||
const struct module *mod,
|
||||
const struct module_expose_context *ctx, cairo_t *cr,
|
||||
int x, int y, int height);
|
||||
|
||||
void module_default_end_expose(
|
||||
const struct module *mod, struct module_expose_context *ctx);
|
Loading…
Add table
Add a link
Reference in a new issue