Documentation
    Preparing search index...

    Interface ThemeService

    A theme service bundle — the ServiceHandler that handles theme.* envelopes, the host-facing publishTheme(theme) handle for theme-change broadcasts, and a getCurrentTheme() accessor for host-side reads.

    interface ThemeService {
        getCurrentTheme: () => Theme;
        handler: ServiceHandler;
        publishTheme: (theme: Theme) => ThemeChangedMessage;
    }
    Index

    Properties

    getCurrentTheme: () => Theme

    Return the current theme. Equivalent to the payload a napplet's theme.get would receive.

    Register this with the runtime via runtime.registerService('theme', handler).

    publishTheme: (theme: Theme) => ThemeChangedMessage

    Publish a theme-change to the shell adapter. Updates the service's internal current theme, invokes options.onBroadcast with a theme.changed envelope, and returns the envelope.

    Type Declaration

      • (theme: Theme): ThemeChangedMessage
      • Parameters

        • theme: Theme

          The new theme payload

        Returns ThemeChangedMessage

        A theme.changed envelope (same one passed to onBroadcast)