Documentation
    Preparing search index...

    Interface WmService

    Minimal shell-facing window-manager service contract.

    interface WmService {
        state: {
            get(): { activeWorkspace: WorkspaceId; focusedWindowId: string | null };
        };
        window: {
            close(id: string): void;
            create(
                opts: { class: string; iframeSrc?: string; title: string },
            ): string | null;
            focus(id: string): void;
            move(id: string, toWorkspace: WorkspaceId): void;
        };
        workspace: {
            list(): { id: WorkspaceId; windowCount: number }[];
            switch(id: WorkspaceId): void;
        };
        destroy(): void;
    }
    Index

    Properties

    Methods

    Properties

    state: {
        get(): { activeWorkspace: WorkspaceId; focusedWindowId: string | null };
    }

    Read-only service state accessors.

    Type Declaration

    • get: function
      • Get focused-window and active-workspace state.

        Returns { activeWorkspace: WorkspaceId; focusedWindowId: string | null }

    window: {
        close(id: string): void;
        create(
            opts: { class: string; iframeSrc?: string; title: string },
        ): string | null;
        focus(id: string): void;
        move(id: string, toWorkspace: WorkspaceId): void;
    }

    Window lifecycle and focus operations.

    Type Declaration

    • close: function
      • Close a window.

        Parameters

        • id: string

        Returns void

    • create: function
      • Create a new window and return its id, or null when the host rejects it.

        Parameters

        • opts: { class: string; iframeSrc?: string; title: string }

        Returns string | null

    • focus: function
      • Focus a window.

        Parameters

        • id: string

        Returns void

    • move: function
    workspace: {
        list(): { id: WorkspaceId; windowCount: number }[];
        switch(id: WorkspaceId): void;
    }

    Workspace operations.

    Type Declaration

    Methods

    • Release service state held by this instance.

      Returns void