Commit graph

23 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
9f8000b047 particle/ramp: expose info through the new struct particle_info struct 2019-01-13 10:40:47 +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
3eebdbb5b0 particle/ramp: 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:18:07 +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
a3322b0a8a particle/ramp: 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:50:23 +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
ce85ccda56 particle/ramp: call particle_default_destroy() 2018-12-26 21:35:24 +01:00
Daniel Eklöf
052513c736 particle/ramp: don't use floating point arithmetic 2018-12-26 12:44:26 +01:00
Daniel Eklöf
a588c78e57 particle/ramp: use log framework 2018-12-18 19:37:37 +01:00
Daniel Eklöf
a9681dd19c cleanup 2018-12-16 17:08:38 +01:00
Daniel Eklöf
47b36bdd35 particle/ramp: new particle, selects one particle from a list
The ramp particle is configured with a tag name and a list of
particles.

At instantiation time, a single particle is selected from the list,
depending on the tag value and it's minimum and maximum values.

I.e. this particle acts kind of like a progress bar.
2018-12-16 16:20:45 +01:00