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
@@ -817,6 +817,11 @@ pub fn publish_power(screen_off : Int, suspend : Int) -> Unit {
c_host_set_int(6, suspend)
}
///| Publish current display backlight brightness percentage (0..100, or -1 if none).
pub fn publish_brightness(percent : Int) -> Unit {
c_host_set_int(10, percent)
}
///| Publish the battery (the `battery` capability): percent (-1: none), charge-state index,
/// seconds left (0: unknown).
pub fn publish_battery(percent : Int, state : Int, secs_left : Int) -> Unit {
@@ -846,6 +851,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.
@@ -906,6 +912,7 @@ pub fn next_request() -> HostRequest? {
}
18 => Some(Shortcut(c_host_req_int()))
19 => Some(DefaultApp(c_host_req_int()))
20 => Some(SetBrightness(c_host_req_int()))
40 => Some(SetDesktop(c_host_req_int()))
44 => Some(FaceUnlock(c_host_req_int()))
45 => {