Skip to content

Class WindowsManager

Source: windowsManager.ts

Manages the states of windows

Accessors

windowIds

Get Signature

get windowIds(): string[]

Returns

string[]

Constructors

Constructor

new WindowsManager(systemManager: SystemManager, trackingManager: TrackingManager): WindowsManager

Parameters

systemManager

SystemManager

trackingManager

TrackingManager

Returns

WindowsManager

Methods

close()

close(windowId: string): void

Close a window

Parameters

windowId

string

Returns

void


focus()

focus(windowId: string): void

Focus on a specific window

Parameters

windowId

string

Returns

void


getAppWindowId()

getAppWindowId(appId: string): string | null

Get an opened window of a certain app

Parameters

appId

string

Returns

string | null


isAnyFocused()

isAnyFocused(): boolean

Check if any window is focused

Returns

boolean


isAppActive()

isAppActive(appId: string): boolean

Check if an app has an open window

Parameters

appId

string

Returns

boolean


isFocused()

isFocused(windowId: string): boolean | undefined

Check whether a window is focused

Parameters

windowId

string

Returns

boolean | undefined


minimizeAll()

minimizeAll(): void

Minimize all windows

Returns

void


open()

open(appId: string, options?: WindowOptions | null): object | null

Opens a window for an application

Parameters

appId

string

The ID of the app

options?

WindowOptions | null

Returns

object | null


openFile()

openFile(file: VirtualFile, options: object): object | null

Opens a file with the associated app or by a method specified by the file scheme

Parameters

file

VirtualFile

options

object = {}

Returns

object | null

Opened window


setMinimized()

setMinimized(windowId: string, minimized?: boolean): void

Change the minimized state of a window

Parameters

windowId

string

minimized?

boolean

Leave as undefined to toggle the window's minimization state

Returns

void


setUpdateWindows()

setUpdateWindows(updateWindows: (window: {[id: string]: WindowOptions; }) => void): void

Parameters

updateWindows

(window: {[id: string]: WindowOptions; }) => void

Returns

void


startup()

startup(appIds: string[], options: Record<string, unknown>): void

Parameters

appIds

string[]

options

Record<string, unknown>

Returns

void

Properties

startupComplete

startupComplete: boolean


updateWindows()

updateWindows: (window: {[id: string]: WindowOptions; }) => void

Function that handles changes to the open windows

Parameters

window

Returns

void


windows

windows: {[id: string]: WindowOptions; }

Index Signature

[id: string]: WindowOptions

Built by Prozilla