<aside> 🔌 The Windows API enables the management and manipulation of window objects within an EXT extension, providing control over properties such as size, position, appearance, and state, as well as the ability to listen for and respond to various window-related events, including creation, removal, focus changes, visibility changes, and user interactions with menus and controls.
</aside>
Current version: 1.1.0
ext.windows.get(
windowId: string,
)
Gets the window with the given ID.
PARAMETERS
windowId: string
The ID of the window to get.
RETURNS
Promise<ExtWindow>
The promise resolves with the window object if it exists.
ext.windows.query(
filter?: Partial<ExtWindow>,
)
Queries windows based on the provided filter.
PARAMETERS
filter?: Partial<ExtWindow>
The filter criteria to match windows.
RETURNS
Promise<ExtWindow[]>
The promise resolves with an array of windows that match the filter.
ext.windows.create(
properties?: ExtWindowProperties,
)
Creates a new window with the given properties.
PARAMETERS
properties?: ExtWindowProperties
The properties for the new window.
RETURNS
Promise<ExtWindow>
The promise resolves with the created window object.
ext.windows.remove(
windowIds: string | string[],
)
Removes the specified windows.
PARAMETERS
windowIds: string | string[]
The IDs of the windows to remove.
RETURNS
Promise<void>
The promise resolves when the window is removed.
ext.windows.update(
windowIds: string | string[],
properties?: ExtWindowUpdate,
)
Updates the specified windows with the given properties.
PARAMETERS
windowIds: string | string[]
The IDs of the windows to update.
properties?: ExtWindowUpdate
The properties to update the windows with.
RETURNS
Promise<void>
The promise resolves when the windows are updated.
ext.windows.focus(
windowId: string,
)
Focuses the specified window.
PARAMETERS
windowId: string
The ID of the window to focus.
RETURNS
Promise<void>
The promise resolves when the window is focused.
ext.windows.unfocus(
windowId: string,
)
Unfocuses the specified window.
PARAMETERS
windowId: string
The ID of the window to unfocus.
RETURNS
Promise<void>
The promise resolves when the window is updated.
ext.windows.isFocused(
windowId: string,
)
Checks if the specified window is focused.
PARAMETERS
windowId: string
The ID of the window to check.
RETURNS
Promise<boolean>
The promise resolves with a boolean indicating if the window is focused.
ext.windows.show(
windowId: string,
focus?: boolean,
)
Shows the specified window.
PARAMETERS
windowId: string
The ID of the window to show.
focus: boolean
Optional parameter to focus the window when shown.
RETURNS
Promise<void>
The promise resolves when the window is updated.
ext.windows.hide(
windowId: string,
)
Hides the specified window.
PARAMETERS
windowId: string
The ID of the window to hide.
RETURNS
Promise<void>
The promise resolves when the window is updated.
ext.windows.isVisible(
windowId: string,
)
Checks if the specified window is visible.
PARAMETERS
windowId: string
RETURNS
Promise<boolean>
ext.windows.maximize(
windowId: string,
)
Maximizes the specified window.
PARAMETERS
windowId: string