import { IDimension } from "../../../base/browser/dom.js"; import { Event } from "../../../base/common/event.js"; import { DisposableStore } from "../../../base/common/lifecycle.js"; import { ILayoutOffsetInfo } from "./layoutService.js"; export declare const ILayoutService: import("../../instantiation/common/instantiation.js").ServiceIdentifier; export interface ILayoutService { readonly _serviceBrand: undefined; /** * An event that is emitted when the main container is layed out. */ readonly onDidLayoutMainContainer: Event; /** * An event that is emitted when any container is layed out. */ readonly onDidLayoutContainer: Event<{ readonly container: HTMLElement; readonly dimension: IDimension; }>; /** * An event that is emitted when the active container is layed out. */ readonly onDidLayoutActiveContainer: Event; /** * An event that is emitted when a new container is added. This * can happen in multi-window environments. */ readonly onDidAddContainer: Event<{ readonly container: HTMLElement; readonly disposables: DisposableStore; }>; /** * An event that is emitted when the active container changes. */ readonly onDidChangeActiveContainer: Event; /** * The dimensions of the main container. */ readonly mainContainerDimension: IDimension; /** * The dimensions of the active container. */ readonly activeContainerDimension: IDimension; /** * Main container of the application. */ readonly mainContainer: HTMLElement; /** * Active container of the application. When multiple windows are opened, will return * the container of the active, focused window. */ readonly activeContainer: HTMLElement; /** * All the containers of the application. There can be one container per window. */ readonly containers: Iterable; /** * Get the container for the given window. */ getContainer(window: Window): HTMLElement; /** * Ensures that the styles for the container associated * to the window have loaded. For the main window, this * will resolve instantly, but for floating windows, this * will resolve once the styles have been loaded and helps * for when certain layout assumptions are made. */ whenContainerStylesLoaded(window: Window): Promise | undefined; /** * An offset to use for positioning elements inside the main container. */ readonly mainContainerOffset: ILayoutOffsetInfo; /** * An offset to use for positioning elements inside the container. */ readonly activeContainerOffset: ILayoutOffsetInfo; /** * Focus the primary component of the active container. */ focus(): void; }