forked from external/yambar
module: re-order function pointer declarations
This commit is contained in:
parent
4d173326e4
commit
acda1a4b21
1 changed files with 15 additions and 10 deletions
25
module.h
25
module.h
|
@ -30,6 +30,20 @@ struct module {
|
||||||
int (*run)(struct module_run_context *ctx);
|
int (*run)(struct module_run_context *ctx);
|
||||||
void (*destroy)(struct module *module);
|
void (*destroy)(struct module *module);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Called by module_default_begin_expose(). Should return an
|
||||||
|
* exposable (an instantiated particle).
|
||||||
|
*
|
||||||
|
* You may also choose to implement begin_expose(), expose() and
|
||||||
|
* end_expose() yourself, in which case you do *not* have to
|
||||||
|
* implement content().
|
||||||
|
*/
|
||||||
|
struct exposable *(*content)(struct module *mod);
|
||||||
|
|
||||||
|
/* refresh_in() should schedule a module content refresh after the
|
||||||
|
* specified number of milliseconds */
|
||||||
|
bool (*refresh_in)(struct module *mod, long milli_seconds);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called by bar when it needs to refresh
|
* Called by bar when it needs to refresh
|
||||||
*
|
*
|
||||||
|
@ -44,7 +58,7 @@ struct module {
|
||||||
*
|
*
|
||||||
* Note that for most modules, using the default implementations
|
* Note that for most modules, using the default implementations
|
||||||
* (module_default_*) is good enough. In this case, implement
|
* (module_default_*) is good enough. In this case, implement
|
||||||
* 'content()' instead (see below).
|
* 'content()' instead (see above).
|
||||||
*/
|
*/
|
||||||
struct module_expose_context (*begin_expose)(struct module *mod, cairo_t *cr);
|
struct module_expose_context (*begin_expose)(struct module *mod, cairo_t *cr);
|
||||||
void (*expose)(const struct module *mod,
|
void (*expose)(const struct module *mod,
|
||||||
|
@ -52,15 +66,6 @@ struct module {
|
||||||
cairo_t *cr, int x, int y, int height);
|
cairo_t *cr, int x, int y, int height);
|
||||||
void (*end_expose)(const struct module *mod, struct module_expose_context *ctx);
|
void (*end_expose)(const struct module *mod, struct module_expose_context *ctx);
|
||||||
|
|
||||||
/*
|
|
||||||
* Called by module_default_begin_expose(). Should return an
|
|
||||||
* exposable (an instantiated particle).
|
|
||||||
*/
|
|
||||||
struct exposable *(*content)(struct module *mod);
|
|
||||||
|
|
||||||
/* refresh_in() should schedule a module content refresh after the
|
|
||||||
* specified number of milliseconds */
|
|
||||||
bool (*refresh_in)(struct module *mod, long milli_seconds);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct module *module_common_new(void);
|
struct module *module_common_new(void);
|
||||||
|
|
Loading…
Add table
Reference in a new issue