SessionTheme
classin packageklyn.gui.windows.themes
public class SessionTheme
SessionTheme

Per-user Klyn session appearance, shared across independent GUI processes. Publishers atomically replace a small versioned preference file. One GUI timer per process observes it every 50 ms, compares bytes (not coarse timestamps), and refreshes subscribed windows on their GUI thread. No widget is rebuilt. KlynOS uses per-user RAMFS state until persistent user storage is available; hosts use ~/.config/klyn/gui/session-theme.json. I/O errors preserve the last accepted appearance and are available in lastError; publication throws.

Example

SessionTheme.follow(window); SessionTheme.setMode("dark")

Properties
Modifier and Type Member Description
public static readonly property accent
accent as String
No summary.
public static readonly property file
file as FilePath
Actual preference path, useful for diagnostics and explicit deployment.
public static readonly property highContrast
highContrast as Boolean
No summary.
public static readonly property isActive
isActive as Boolean
No summary.
public static readonly property lastError
lastError as String = ""
No summary.
public static readonly property mode
mode as String
No summary.
public static readonly property palette
palette as SessionPalette
No summary.
Methods
Modifier and Type Member Description
public static applyColors
applyColors(style as ThemeStyle, widget as Widget) as Void
Applies canonical KSS colors while retaining application layout metrics.
public static configureStore
configureStore(file as FilePath) as Void
Selects an isolated preference store before any subscriber is attached.
public static follow
follow(window as Window) as Void
Subscribes a window; closing the last subscriber stops the shared timer.
public static setAppearance
setAppearance(mode as String, accent as String = "", highContrast as Boolean = false) as Void
Publishes session colors and refreshes local subscribers synchronously.
public static setMode
setMode(mode as String) as Void
Changes mode while retaining the current session accent and contrast.
public static synchronize
synchronize() as Boolean
Observes an external publication immediately; normally called by the timer.