Refactor UPower backend
Purpose: prepare for per-monitor screen brightness control.
Changes:
BackendInterface
- Add an addition
device
argument to brightness related methods to let user specify what brightness control they want to work with - Add addition methods to let use query brightness control type and device label associate with it.
- Replace
BrightnessControlsList
with list and map for easily lookup.
PowerDevilUPowerBackend
- Implement changes from
BackendInterface
. - Copy backlight device detection code from
BacklightHelper
. - Detect and support control of both backlight devices and DDCUtil devices.
- Add necessary codes to support multiple brightness devices.
- Cleanup.
Actions: Update to new BackendInterface
Edited by Quang Ngô