With D5928 I've introduced Night Color in KWin. It was designed in a way to be fully configurable (while safe checking values) via DBus. Also it is supposed to get updated location data from workspace. To ease the configuration and provide the updated location data this library was written.
- Abstracts away the DBus part and provides a generic adaptor to the compositor as QML object for that
- Allows to stage values and send them at once as needed for KWin's atomic config changes
- Informs about configuration changes
- Provides also QML objects for other often used functionality in this context (sun calculator and a locator, i.e. an encapsulated connection to the location data service).
- For automatic location updates the library provides a KDE Daemon Module, which gets the current location via such a locator object and sends it to KWin.
- The library is named and structured in a way, such that it later can be extended with functionality to configure gamma values in general (normal color correction), i.e. as soon as the support for that has landed in KWin.
In theory the library could be used with other compositors as well, if they use a somewhat similar mechanism as KWin. In this case though the CompositorAdaptor class would need to be rewritten in parts, probably subclassed. A KCM in Plasma Desktop, which uses this library to configure KWin, is already written and its Diff will be uploaded soon.