Support for configuring screen backlight

Operating Systems / Haiku - Adrien Destugues [pulkomandy.tk] - 21 November 2017 08:12 EST

Accelerant interface: Introduce new hooks B_SET_BRIGHTNESS and B_GET_BRIGHTNESS. Brightness is a float in the 0..1 range.

App_server: Forward brightness things between BScreen and the accelerant.

intel_extreme: Implement the hooks. Note that this only works for laptop panels, but the driver will pretend to support it in other cases as well.

Screen preferences: If the accelerant supports the B_GET_BRIGHTNESS hook, allow to set brightness with a slider. Otherwise, the slidere is hidden and these changes aren't visible.

3a2b67b5ae Support for configuring screen backlight
headers/os/add-ons/graphics/Accelerant.h | 5 +++
headers/os/interface/Screen.h | 3 ++
headers/private/app/ServerProtocol.h | 3 ++
.../private/graphics/intel_extreme/intel_extreme.h | 5 +++
headers/private/interface/PrivateScreen.h | 3 ++
.../accelerants/intel_extreme/accelerant_protos.h | 2 ++
src/add-ons/accelerants/intel_extreme/hooks.cpp | 4 +++
src/add-ons/accelerants/intel_extreme/mode.cpp | 31 ++++++++++++++++++
src/kits/interface/PrivateScreen.cpp | 33 +++++++++++++++++++
src/kits/interface/Screen.cpp | 18 ++++++++++
src/preferences/screen/Constants.h | 1 +
src/preferences/screen/ScreenWindow.cpp | 38 +++++++++++++++++++++-
src/preferences/screen/ScreenWindow.h | 4 +++
src/servers/app/ProfileMessageSupport.cpp | 3 ++
src/servers/app/ServerApp.cpp | 31 ++++++++++++++++++
src/servers/app/drawing/BitmapHWInterface.cpp | 14 ++++++++
src/servers/app/drawing/BitmapHWInterface.h | 3 ++
src/servers/app/drawing/DWindowHWInterface.cpp | 18 ++++++++++
src/servers/app/drawing/DWindowHWInterface.h | 3 ++
src/servers/app/drawing/HWInterface.h | 3 ++
src/servers/app/drawing/ViewHWInterface.cpp | 18 ++++++++++
src/servers/app/drawing/ViewHWInterface.h | 3 ++
.../drawing/interface/html5/HTML5HWInterface.cpp | 14 ++++++++
.../app/drawing/interface/html5/HTML5HWInterface.h | 3 ++
.../interface/local/AccelerantHWInterface.cpp | 32 ++++++++++++++++++
.../interface/local/AccelerantHWInterface.h | 7 ++++
.../drawing/interface/remote/RemoteHWInterface.cpp | 14 ++++++++
.../drawing/interface/remote/RemoteHWInterface.h | 3 ++
28 files changed, 318 insertions(+), 1 deletion(-)

Upstream: cgit.haiku-os.org


  • Share