Class WindowsManager
Source: windowsManager.ts
Manages the states of windows.
Constructors
Constructor
new WindowsManager(
systemManager:SystemManager,trackingManager:TrackingManager):WindowsManager
Parameters
systemManager
trackingManager
Returns
WindowsManager
Properties
windows
windows: {[
id:string]:WindowOptions; }
Index Signature
[id: string]: WindowOptions
updateWindows()
updateWindows: (
window: {[id:string]:WindowOptions; }) =>void
Function that handles changes to the open windows.
Parameters
window
Returns
void
startupComplete
startupComplete:
boolean
Methods
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
options
object = {}
Returns
object | null
Opened window.
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
isFocused()
isFocused(
windowId:string):boolean|undefined
Check whether a window is focused.
Parameters
windowId
string
Returns
boolean | undefined
isAnyFocused()
isAnyFocused():
boolean
Check if any window is focused.
Returns
boolean
setMinimized()
setMinimized(
windowId:string,minimized?:boolean):void
Change the minimized state of a window.
Parameters
windowId
string
The ID of the window.
minimized?
boolean
Leave as undefined to toggle the window's minimization state.
Returns
void
minimizeAll()
minimizeAll():
void
Minimize all windows.
Returns
void
isAppActive()
isAppActive(
appId:string):boolean
Check if an app has an open window.
Parameters
appId
string
Returns
boolean
getAppWindowId()
getAppWindowId(
appId:string):string|null
Get an opened window of a certain app.
Parameters
appId
string
Returns
string | null
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
Accessors
windowIds
Get Signature
get windowIds():
string[]
Returns
string[]