Daniel Eklöf
7754ef3661
decorations: are now plugins
2019-01-13 17:43:25 +01:00
Daniel Eklöf
4eee71eaf4
particles: cmake: header files have been removed
2019-01-13 17:41:48 +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
f952347c84
module/backlight: don't divide by zero
2019-01-13 17:40:17 +01:00
Daniel Eklöf
bc62843c91
modules: get rid of struct module_info
...
Since this struct only contained function pointers, make all modules
export those functions directly.
The plugin manager now defines a module interface struct, and fills it
it by dlsym:ing the functions that used to be in module_info.
2019-01-13 17:09:11 +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
d35695e98a
particle: we no longer count the attributes
...
Since the attribute lists are now NULL-terminated.
2019-01-13 16:50:16 +01:00
Daniel Eklöf
74b0722d2f
particles: remove header files
2019-01-13 16:49:46 +01:00
Daniel Eklöf
8d26ff7de2
module: module->begin_expose() have been removed
2019-01-13 16:45:35 +01:00
Daniel Eklöf
76d135e257
module: remove module_run_context
...
Store abort_fd directly in the module struct instead. This then allows
us to pass the module pointer as-is to the modules' run functions.
2019-01-13 15:34:59 +01:00
Daniel Eklöf
acdeff3b6e
module: remove ready_fd
...
All modules are expected to handle a call to content() after having
been instantiated.
I.e. modules *cannot* even expect run() to have started running.
2019-01-13 15:25:39 +01:00
Daniel Eklöf
65cfcfb2de
module/battery: initialize state in constructor
2019-01-13 15:08:09 +01:00
Daniel Eklöf
f04ff31d0f
module/xkb: lock in content, and handle no layout available
2019-01-13 15:04:18 +01:00
Daniel Eklöf
825b0a16f8
module: remove module->begin_expose()
...
Replace with module_begin_expose()
2019-01-13 14:58:30 +01:00
Daniel Eklöf
4c577766d1
module: remove module->expose() and module->end_expose()
...
Bar now calls exposable->expose() and exposable->destroy() directly
2019-01-13 14:55:21 +01:00
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
7776135454
particles: caller of from_conf() must provide base particle instance
2019-01-13 13:25:14 +01:00
Daniel Eklöf
770f2a0e7c
font: allow font_destroy() to be called with a NULL pointer
2019-01-13 13:24:56 +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
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
e471c2357d
cmake: set _GNU_SOURCE globally, and only once
2019-01-13 11:40:09 +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
2df419efc2
plugin: remove TODO
2019-01-13 11:29:10 +01:00
Daniel Eklöf
f066ba055e
Merge branch 'particles-as-plugins'
2019-01-13 11:28:06 +01:00
Daniel Eklöf
45280416ff
modules, particles: type-specific filename prefix
...
Instead of naming the shared libraries libfoo.so, add a type-specific
prefix: module_foo.so, or particle_foo.so
2019-01-13 11:26:31 +01:00
Daniel Eklöf
ec4a47e5db
modules: rename module_info -> plugin_info
...
This is the same name used by particles.
2019-01-13 11:18:32 +01:00
Daniel Eklöf
307a1f5ec8
particles: all particles can have a decoration
2019-01-13 11:16:52 +01:00
Daniel Eklöf
311193751c
particles: install target
2019-01-13 11:14:57 +01:00
Daniel Eklöf
47018104da
particles: compile as shared libraries (plugins)
2019-01-13 11:13:47 +01:00
Daniel Eklöf
7b98ea2b7c
particle/string: expose info through the new struct particle_info struct
2019-01-13 10:49:10 +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
21e28315e3
particle/progress-bar: expose info through the new struct particle_info struct
2019-01-13 10:38:25 +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
6379b1939f
particle/list: expose info through the new struct particle_info struct
2019-01-12 22:56:00 +01:00
Daniel Eklöf
0f8f21510a
particle/empty: expose info through the new struct particle_info struct
2019-01-12 22:48:23 +01:00
Daniel Eklöf
c2db518a4f
particle: fix from_conf() function pointer prototype
...
and add macro for common attributes (shared by all particles)
2019-01-12 22:47:46 +01:00
Daniel Eklöf
72edcf608c
plugin: include plugin type in log messages
2019-01-12 22:47:36 +01:00
Daniel Eklöf
0fa7906e99
plugin: add plugin_load_particle() function
2019-01-12 22:36:45 +01:00
Daniel Eklöf
f34a341c33
particle: add struct particle_info definition
2019-01-12 22:36:26 +01:00
Daniel Eklöf
297ff512b3
Merge branch 'modules-as-plugins'
2019-01-12 22:24:10 +01:00
Daniel Eklöf
dea5055e37
cmake: cleanup
2019-01-12 22:23:49 +01:00
Daniel Eklöf
42104db1ca
modules: move files back to a common directory (again)
2019-01-12 21:24:20 +01:00
Daniel Eklöf
e7e7284cba
modules: remove header files
2019-01-12 21:20:52 +01:00
Daniel Eklöf
9fa37f0d98
plugin: 'libs' -> 'plugins'
2019-01-12 21:17:12 +01:00
Daniel Eklöf
aa4fede306
plugin: use tll_free_and_free() to free the global plugin list
2019-01-12 21:16:13 +01:00
Daniel Eklöf
aa6ea602ca
plugin: remove linked-list items as we
2019-01-12 21:13:50 +01:00
Daniel Eklöf
f7fd305821
build: install targets for f00bar binary + module plugins
...
Module plugins are (still) built in <build-dir>/modules.
When installing, f00bar binary is installed to <install-dir>/bin, and
the module plugins to <install-dir>/lib/f00bar.
For this to work, we now also set RPATH correctly. Since the installed
module plugins end up in a different location then when building,
different settings is required for BUILD_RPATH and INSTALL_RPATH.
2019-01-12 21:07:48 +01:00