leds: Separate single color from multicolor leds
Turn the FbdDevLed
into a class and allow FbdDevMulticolor
to derive form it.
This avoids special cases for the later.
The order of things is as follows:
- move
FbdDevLed
to a separate file - encapsulte
FbdDevLed
attributes until we can make the struct opaque - turn
FbdDevLed
intoGObject
- Make
FbdDevLed
aGInitable
so initialization can fail without having all infbd_dev_led_new ()
(thus making things harder for derived classes) - Add a minimal set of class methods with a default implementation (that still doesn't change the way things work)
- Extract multicolor specific bits into a derived class thus making the default implementations simpler
I haven't yet tested the multicolor bits on a multicolor led system but single color still works as expected. I'll give this a second pass to cleanup some details but wanted to get this out so !100 (merged) can move forward.
Edited by Guido Gunther