Commit graph

26 commits

Author SHA1 Message Date
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
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
d44db1a6a8 config: verify: expose verification primitives 2019-01-12 11:46:26 +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
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
Daniel Eklöf
3f578d30eb config: bar: no need to check for NULL on required attributes 2019-01-11 22:51:01 +01:00
Daniel Eklöf
61a2f84651 config: verify: particles and decorations 2019-01-11 22:44:40 +01:00
Daniel Eklöf
a0cb4aef38 config: verify: make dictionary verifiers data driven 2019-01-11 21:17:11 +01:00
Daniel Eklöf
3d22b30c87 module/network: make module verification data driven
This is done by implementing a generic verify_dict() function, that
takes an array of attribute metadata.

The attribute metadata consists of the attribute name, whether it's
required or optional, and a verify callback function.
2019-01-11 21:01:03 +01:00
Daniel Eklöf
7fc9749c28 module/clock: user can now specify the date/time format strings 2019-01-09 18:50:26 +01:00
Daniel Eklöf
f6977417e0 font: use font-config to load font
This allows us to a) move away from cairo's "toy" API, and b) let the
user specify font options in a single font "name" string:

  Serif:size=10:weight=bold:slant=italic

This also allows us to simplify the font code significantly (except
for the fontconfig parts...); the font no longer sets itself in a
cairo surface - font users do that; the font simply returns a
cairo_scaled_font_t.

Furthermore, font_clone() has now been simplified to basically just
refcount the scaled font. I.e. there's no need to run the full
constructor and lookup and instantiate the cairo scaled font again.
2019-01-09 18:50:16 +01:00
Daniel Eklöf
aa38063e37 wip: verify configuration
We now verify the configuration (currently down to module level, but
not including particles) that are present are of the expected type.
2019-01-06 20:04:01 +01:00