Modular status panel for X11 and Wayland, inspired by https://github.com/jaagr/polybar
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
516 B

#include "module.h"
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
struct module *
module_common_new(void)
{
struct module *mod = calloc(1, sizeof(*mod));
mtx_init(&mod->lock, mtx_plain);
mod->destroy = &module_default_destroy;
return mod;
}
void
module_default_destroy(struct module *mod)
{
mtx_destroy(&mod->lock);
free(mod);
}
struct exposable *
module_begin_expose(struct module *mod)
{
struct exposable *e = mod->content(mod);
e->begin_expose(e);
return e;
}