Commit graph

16 commits

Author SHA1 Message Date
Daniel Eklöf
33cba8b0ba module: remove module_expose_context 2019-01-13 14:52:28 +01:00
Daniel Eklöf
9276724113 module: remove 'with' from expose-context 2019-01-13 14:33:58 +01:00
Daniel Eklöf
a425378576 config: allow font/foreground attributes on modules too
Previously we allowed it on the bar, and on all particles. Now we also
allow it on all modules.

This allows us to specify a "default" font/foreground on a per-module
basis, having it applied to all the modules particles.
2019-01-13 14:24:44 +01:00
Daniel Eklöf
8dc278aaf2 config: pass a struct with inheritable values
For now, font and foreground color
2019-01-13 14:13:14 +01:00
Daniel Eklöf
9944a8f972 modules: don't assume module content is a dictionary
This is done by having each module implement a top-level verifier
function.
2019-01-13 11:54:57 +01:00
Daniel Eklöf
71515e4079 config: conf_verify_dict() now assumes attr list is NULL-terminated 2019-01-13 11:37:05 +01:00
Daniel Eklöf
eaf061ee57 module: define a struct for module meta data
* Function pointer; instantiates the module from a yml conf node
* Its (top-level) configuration attributes
2019-01-12 11:52:46 +01:00
Daniel Eklöf
558f75a54b module/particle: remove cairo context from begin_expose() 2019-01-09 18:50:26 +01:00
Daniel Eklöf
acda1a4b21 module: re-order function pointer declarations 2018-12-29 12:49:25 +01:00
Daniel Eklöf
5008008079 module: add a refresh_in() interface function
Modules can implement this to allow e.g. particles to force a refresh
after a certain amount of time.
2018-12-28 12:42:08 +01:00
Daniel Eklöf
3413232ed6 module: add new function module_signal_ready() 2018-12-19 20:23:53 +01:00
Daniel Eklöf
a3eb7ebc08 bar: wait for all modules to have started up before continuing
After starting all the module threads, wait for all modules to have
signalled "ready" before continuing.

This will allow modules to do initial setup, and knowing that
content() will *not* be called until they've signalled "ready".
2018-12-19 19:41:25 +01:00
Daniel Eklöf
7f0f096ba4 module: begin_expose() and content() take a non-const module pointer 2018-12-19 19:03:19 +01:00
Daniel Eklöf
edc418b22d module: provide a "common" constructor and destructor
Also, provide a lock for module to use (to ensure run() and content()
doesn't step on each other's toes).
2018-12-18 20:12:04 +01:00
Daniel Eklöf
5a155d1a8d module: add a 'private' member to expose context
This allows modules that override begin/end_context to supply their
own auxiliary data.
2018-11-17 17:14:53 +01:00
Daniel Eklöf
8bf8a398b9 initial commit: wip 2018-11-17 11:30:33 +01:00