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
Daniel Eklöf
7f2501334d
modules: use the same name for the module_info in all modules
2019-01-12 20:34:43 +01:00
Daniel Eklöf
45eb2b85f0
plugin: cache module_info symbol as well
2019-01-12 19:44:24 +01:00
Daniel Eklöf
962252467f
plugins: only dlopen() each plugin once. dlcose() in destructor
2019-01-12 19:38:06 +01:00
Daniel Eklöf
64b77a0efc
config: dlopen() modules on-demand
...
TODO: optimizations and proper cleanup
* We currently reload the shared library for each *instance* of the
module, and we do it twice; once when verifying, and once when
instantiating.
* The shared libraries are never dlclosed()
2019-01-12 19:03:49 +01:00
Daniel Eklöf
731ab848e1
config: fix: attributes always use dash, not underscore
2019-01-12 13:56:02 +01:00
Daniel Eklöf
650e152091
config: verify: no old-style modules left
2019-01-12 13:04:42 +01:00
Daniel Eklöf
6f9e48698e
module/xwindow: export module info through the new module_info struct type
2019-01-12 13:03:41 +01:00
Daniel Eklöf
905f289659
module/xkb: export module info through the new module_info struct type
2019-01-12 13:01:24 +01:00
Daniel Eklöf
87640339e1
module/removables: export module info through the new module_info struct type
2019-01-12 12:59:21 +01:00
Daniel Eklöf
697e613b2e
module/network: export module info through the new module_info struct type
2019-01-12 12:56:54 +01:00
Daniel Eklöf
a16e2f5a53
module/mpd: export module info through the new module_info struct type
2019-01-12 12:52:42 +01:00
Daniel Eklöf
fb9f07dcad
module/label: export module info through the new module_info struct type
2019-01-12 12:52:36 +01:00
Daniel Eklöf
f3721d9d80
module/i3: export module info through the new module_info struct type
2019-01-12 12:12:14 +01:00
Daniel Eklöf
d2af5b2c84
config: verify: break out err_prefix(), and rename
2019-01-12 12:11:59 +01:00
Daniel Eklöf
550d4ad534
module/clock: export module info through the new module_info struct type
2019-01-12 12:05:39 +01:00
Daniel Eklöf
e24923e7cc
module/battery: export module info through the new module_info struct type
2019-01-12 12:02:41 +01:00
Daniel Eklöf
3d36735f88
module/backlight: export module info through the new module_info struct type
2019-01-12 11:59:01 +01:00
Daniel Eklöf
e536391df6
module/alsa: export module info through the new module_info struct type
2019-01-12 11:58:57 +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
4dd1a24af6
config: sort includes, add comment
2019-01-12 11:47:30 +01:00
Daniel Eklöf
3c870f759a
config: verify: config_verify_bar() -> conf_verify_bar()
2019-01-12 11:47:01 +01:00
Daniel Eklöf
d44db1a6a8
config: verify: expose verification primitives
2019-01-12 11:46:26 +01:00
Daniel Eklöf
6cb2f52328
config: conf_particle_from() -> conf_to_particle()
2019-01-12 11:28:20 +01:00
Daniel Eklöf
8809cbb481
Put each module in its own subdirectory
2019-01-12 11:19:57 +01:00
Daniel Eklöf
75bdd2ad3c
config: use dashes, '-', instead of underscores, '_' in attribute names
2019-01-12 10:32:52 +01:00
Daniel Eklöf
b0705578b0
config: remove asserts
...
Since the config is now fully verified, before we start loading
anything, there's no longer any need to assert on thing.
2019-01-12 10:27:02 +01:00
Daniel Eklöf
d03565a545
config: verify: fix a number of incorrect nodes passed to err_prefix()
2019-01-11 23:20:51 +01:00
Daniel Eklöf
a1e0ce2f87
config: verify: err_prefix(): include line/column info in message
2019-01-11 23:20:23 +01:00