import type { DomicileHost } from "../domicile-host"; import type { AgentReach, BoundShortcut, PortalWallpaper } from "../portal"; import { Capturing, PortalAnswer, PortalRequest } from "../portal"; /** What the portal functions need of the desktop `Shell` is handed. */ export type PortalHost = Pick & { addEventListener: (type: "portalrequests", listener: (event: MessageEvent) => void) => void; removeEventListener: (type: "portalrequests", listener: (event: MessageEvent) => void) => void; }; /** * Call `listener` with every unanswered request, oldest first, on each change. * Returns a function that stops listening. Throws on a request of a known kind * whose body does not parse: the compositor and this SDK disagree. */ export declare const watchPortalRequests: (host: PortalHost, listener: (requests: readonly PortalRequest[]) => void) => (() => void); /** * Call `listener` with every chord applications hold through the * GlobalShortcuts portal, on each push. Returns a function that stops * listening. */ export declare const watchBoundShortcuts: (host: PortalHost, listener: (shortcuts: readonly BoundShortcut[]) => void) => (() => void); /** * Call `listener` with every session that controls or captures input, on each * change. Returns a function that stops listening. */ export declare const watchCapturing: (host: PortalHost, listener: (sessions: readonly Capturing[]) => void) => (() => void); /** * Call `listener` with the pictures applications set through the Wallpaper * portal, on each push. Returns a function that stops listening. */ export declare const watchPortalWallpaper: (host: PortalHost, listener: (wallpaper: PortalWallpaper) => void) => (() => void); /** Answer request `id`. The first answer to reach the compositor wins. */ export declare const answerPortalRequest: (host: PortalHost, id: number, answer: PortalAnswer) => void; /** End capturing session `id`. */ export declare const stopCapturing: (host: PortalHost, id: number) => void; /** Ask the user again what agent session `id` reaches. */ export declare const changeAgent: (host: PortalHost, id: number) => void; /** Pause recording `id`. Its file leaves the pause out. */ export declare const pauseRecording: (host: PortalHost, id: number) => void; /** Resume paused recording `id`. */ export declare const resumeRecording: (host: PortalHost, id: number) => void; /** Stop recording `id` and delete its file. */ export declare const discardRecording: (host: PortalHost, id: number) => void; /** An agent's reach, as the compositor sends it. */ export declare const readAgentReach: (reach: unknown) => AgentReach;