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()
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.
This fixes lots of memory leaks detected by valgrind.
Unsure if this is how you're supposed to shutdown cairo. You'd
think (from the documentation) that destroying the surface would (when
the refcount reaches 0) destroy the device too...
Before shutting down and destroying cairo and XCB, make sure the
modules, particles and fonts have been destroyed.
I.e. move module destruction from bar's destroy() to the end of bar's
run()
If the user hasn't specified a specific template for a workspace, try
to lookup a default one (the empty string).
This allows the user to configure a "fallback" template to be used for
"extra", or not-often-used workspaces.
Warn if volume and/or muted state is inconsistent (as we only expose a
single volume/muted state).
Also, don't query for current volume if max == 0 (i.e. typically a
digital output).
Finally, make absolutely sure that volume min is really less (or
equal) to volume max, and that the current volume level is between min
and max.
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.