Commit graph

22 commits

Author SHA1 Message Date
Daniel Eklöf
0d591fe5a1 allow plugins to be compiled into the f00bar main binary 2019-01-14 20:57:03 +01:00
Daniel Eklöf
4a26664d8d particles: remove config-verify.h from particle.h 2019-01-13 17:41:39 +01:00
Daniel Eklöf
07b1615a41 particles: get rid of struct particle_info
Since this struct only contained function pointers, make all particles
export those functions directly.

The plugin manager now defines a particle interface struct, and fills
it it by dlsym:ing the functions that used to be in particle_info.
2019-01-13 17:03:35 +01:00
Daniel Eklöf
74b0722d2f particles: remove header files 2019-01-13 16:49:46 +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
7776135454 particles: caller of from_conf() must provide base particle instance 2019-01-13 13:25:14 +01:00
Daniel Eklöf
8bc6a0b783 oarticles: don't assume particle content is a dictionary
This is done by having each particle implement a top-level verifier
function.
2019-01-13 12:47:20 +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
47018104da particles: compile as shared libraries (plugins) 2019-01-13 11:13:47 +01:00
Daniel Eklöf
73b8bf1346 particle/map: expose info through the new struct particle_info struct 2019-01-13 10:34:15 +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
86425fbe48 config: all particles now take a 'on_click_template' argument 2018-12-29 21:23:27 +01:00
Daniel Eklöf
e4fab9a20b particle/map: fix on_mouse() regression
Now that we have a wrapper exposable, we need to implement
on_mouse(). In it, we need to check if we have our own on-click
handler, or else, check if mouse is inside the sub-exposable, or in
the left- or right margin.
2018-12-29 21:17:08 +01:00
Daniel Eklöf
22507ae26c particle: add utility function to render a particle's decoration 2018-12-29 21:00:03 +01:00
Daniel Eklöf
6f5572ff6b particle/map: implement left/right margin
This is done by wrapping the selected particle/exposable in a
ramp-specific exposable. This way, we can add the margins before
delegating begin_expose() and expose() to the selected exposable.
2018-12-29 20:54:41 +01:00
Daniel Eklöf
5fc29f7bbe particles: name private structs and variables consistently 2018-12-29 20:40:25 +01:00
Daniel Eklöf
3135f1d36d particle: all particles now take margin arguments
Ramp and map however, doesn't allow any values other than 0 (yet).
2018-12-29 20:33:38 +01:00
Daniel Eklöf
5164d1d6ea particle: add an 'on_click_template' to base constructor.
This is intended to be a format-like string, with the possibility to
use tag formatters.

The expanded string will later be passed to the system() call.
2018-12-29 14:36:18 +01:00
Daniel Eklöf
4d173326e4 particle: remove 'parent' (it wasn't used anyway) 2018-12-29 12:49:00 +01:00
Daniel Eklöf
20fb0c37b5 particle/map: call particle_default_destroy() 2018-12-26 21:35:05 +01:00
Daniel Eklöf
be6429c852 particle/map: left/right margin on a map doesn't make any sense 2018-12-15 19:16:55 +01:00
Daniel Eklöf
92c9593ff5 particle/map: new particle; maps a tag value to a particle
This particle is basically a dictionary mapping tag values to
particles.
2018-12-13 19:05:52 +01:00