feat(theme): per-app accent: pm gives window manifest accent before app runs (display ACCENT, refused after BUFFER); theme::with_accent keeps hue, shifts lightness until contrast passes, else theme accent; tally pink

This commit is contained in:
2026-10-28 13:40:38 +01:00
parent 6827e1455d
commit 2b82f052ae
14 changed files with 158 additions and 16 deletions

View File

@@ -108,6 +108,11 @@ pub mod window {
/// the default) is now in use; `MALFORMED` if there is none by that
/// name.
pub const SET_THEME: usize = 11;
/// Through a window, before anyone has asked for its buffer (so by
/// its launcher, before the app runs) and once: word 1 the app's
/// accent, `0xrrggbb`. The theme the window is handed carries it where
/// it passes contrast (`theme::with_accent`).
pub const ACCENT: usize = 12;
/// The event (in place of an input event's tag) every window gets when
/// the theme changes: ask for it again.
pub const THEME_CHANGED: usize = 16;