kernl API
    Preparing search index...

    Interface WindowManager

    Where windows are, which one has the person's attention, and what the guard is told about each.

    A shell draws from state$ and calls the methods from its own events. One obligation is fixed for every implementation: visibilityOf and the reports sent to each attached target must be true. A window the person cannot see is not visible, and a window they are not working in is not focused. The guard holds a hidden applet's requests and gives an unfocused one a smaller budget on the strength of these reports. Everything else is the implementation's choice.

    interface WindowManager {
        state$: Observable<WindowManagerState>;
        attach(id: string, target: VisibilityTarget): void;
        blur(): void;
        close(id: string): void;
        destroy(): void;
        focus(id: string): void;
        layouts(): readonly LayoutChoice[];
        minimise(id: string): void;
        move(id: string, rect: Rect): void;
        open(id: string): void;
        setArea(area: Rect): void;
        setLayout(id: string): void;
        setPageVisible(visible: boolean): void;
        snapshot(): WindowManagerState;
        stop(id: string): void;
        visibilityOf(id: string): WindowVisibility;
    }
    Index
    state$: Observable<WindowManagerState>

    The current state, then every state after it.

    • Report this window's visibility to target, now and after every change. Called once per window, when its applet is mounted.

      Parameters

      Returns void

    • The person is working in the shell itself; no window is focused.

      Returns void

    • Remove a window and stop reporting to it.

      Parameters

      • id: string

      Returns void

    • Stop reporting and complete state$.

      Returns void

    • Bring a window to the front and give it the person's attention. Shows it if it was minimised.

      Parameters

      • id: string

      Returns void

    • Hide a window without closing it.

      Parameters

      • id: string

      Returns void

    • Move or resize a window. Ignored unless the state is freeform.

      Parameters

      • id: string
      • rect: Rect

      Returns void

    • Add a window in front, focused. Opening an id that is already open brings that window to the front.

      Parameters

      • id: string

      Returns void

    • Set the rectangle windows are laid out in.

      Parameters

      Returns void

    • Switch layout.

      Parameters

      • id: string

      Returns void

      invalid:unknown-layout when no layout has this id.

    • Tell the manager whether the page itself can be seen. A hidden page hides every window.

      Parameters

      • visible: boolean

      Returns void

    • Mark a window's applet as stopped: it loses focus, is no longer reported to, and waits to be closed.

      Parameters

      • id: string

      Returns void

    • What the guard is told about a window when it asks. An unknown window is neither visible nor focused.

      Parameters

      • id: string

      Returns WindowVisibility