Add backlight control to the shell and regenerate WIT bindings
CI / test (push) Canceled after 0s

- Add compositor/shell/backlight.mbt for backlight control in the shell
- Update wit/capabilities.wit and wit/host/plasmoids.wit, then regenerate the component and interface ffi.mbt bindings (mostly export reordering)
- Add world/launcher-widget/README.md
This commit is contained in:
nandi committed 2026-11-28 02:16:07 -08:00
1 parent 2e00009c79
commit 74235cb0ca
84 files changed
+1525 -864

No files matched your search

+7
View File
@@ -422,6 +422,11 @@ pub fn publish_power(screen_off : Int, suspend : Int) -> Unit {
@hostpl.publish_power(screen_off.reinterpret_as_uint(), suspend.reinterpret_as_uint())
}
///| Display backlight brightness percentage (0..100, or -1 if none).
pub fn publish_brightness(percent : Int) -> Unit {
@hostpl.publish_brightness(percent)
}
///| The battery (the `battery` capability): percent (-1: none), charge-state index, seconds left.
pub fn publish_battery(percent : Int, state : Int, secs_left : Int) -> Unit {
@hostpl.publish_battery(percent, state.reinterpret_as_uint(), secs_left.reinterpret_as_uint())
@@ -448,6 +453,7 @@ pub(all) enum HostRequest {
/// 1 power off, 2 restart).
SetScreenOff(Int)
SetSuspendAfter(Int)
SetBrightness(Int)
PowerAction(Int)
/// A network module's action (0 scan, 1 disconnect, 2/3 Wi-Fi off/on, 4/5 airplane mode
/// off/on, 6 connect, 7 forget), with the network name and password where it needs them.
@@ -487,6 +493,7 @@ pub fn next_request() -> HostRequest? {
Some(Screenshot(code)) => Some(Screenshot(code))
Some(SetScreenOff(m)) => Some(SetScreenOff(m))
Some(SetSuspendAfter(m)) => Some(SetSuspendAfter(m))
Some(SetBrightness(p)) => Some(SetBrightness(p))
Some(PowerAction(a)) => Some(PowerAction(a))
Some(Network(r)) => Some(Network(r.action, r.ssid, r.password))
Some(Shortcut(code)) => Some(Shortcut(code))