# window
# blur M
# blur(): Promise<void>
Removes focus from the window.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().blur();
# center M
# center(display?: IDisplay): Promise<void>
Moves window to the center of the screen it's currently on. If a display is specified it will center on that display.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().center();
# close M
# close(): Promise<void>
Try to close the window. This has the same effect as a user manually clicking the close button of the window. The web page may cancel the close though.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().close();
# flashFrame M
# flashFrame(flash: boolean): Promise<void>
Starts or stops flashing the window to attract user's attention.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().flashFrame(true);
# focus M
# focus(): Promise<void>
Focuses on the window.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().focus();
# getBounds M
# getBounds(): Promise<IRectangle>
Retrieves the bounds of the window.
import { window } from "@reactivemarkets/desktop-sdk";
const { x, y, width, height } = await window.current().getBounds();
# getMinimumSize M
# getMinimumSize(): Promise<number[]>
Retrieves the bounds of the window.
import { window } from "@reactivemarkets/desktop-sdk";
const [width, height] = await window.current().getMinimumSize();
# hide M
# hide(): Promise<void>
Hides the window.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().hide();
# isAlwaysOnTop M
# isAlwaysOnTop(): Promise<boolean>
Whether the window is always on top of other windows.
import { window } from "@reactivemarkets/desktop-sdk";
const onTop = await window.current().isAlwaysOnTop();
# isCloseable M
# isCloseable(): Promise<boolean>
Whether the window can be manually closed by user.
import { window } from "@reactivemarkets/desktop-sdk";
const closeable = await window.current().isCloseable();
# isEnabled M
# isEnabled(): Promise<boolean>
Whether the window is enabled.
import { window } from "@reactivemarkets/desktop-sdk";
const enabled = await window.current().isEnabled();
# isFocused M
# isFocused(): Promise<boolean>
Whether the window is focused.
import { window } from "@reactivemarkets/desktop-sdk";
const focused = await window.current().isFocused();
# isFullscreen M
# isFullscreen(): Promise<boolean>
Whether the window is in fullscreen mode.
import { window } from "@reactivemarkets/desktop-sdk";
const fullscreen = await window.current().isFullscreen();
# isFullscreenable M
# isFullscreenable(): Promise<boolean>
Whether the maximize/zoom window button toggles fullscreen mode or maximizes the window.
import { window } from "@reactivemarkets/desktop-sdk";
const fullscreenable = await window.current().isFullscreenable();
# isKiosk M
# isKiosk(): Promise<boolean>
Whether the window is in kiosk mode.
import { window } from "@reactivemarkets/desktop-sdk";
const kiosk = await window.current().isKiosk();
# isMaximizable M
# isMaximizable(): Promise<boolean>
Whether the window can be manually maximized by user.
import { window } from "@reactivemarkets/desktop-sdk";
const maximizable = await window.current().isMaximizable();
# isMaximized M
# isMaximized(): Promise<boolean>
Whether the window is maximized.
import { window } from "@reactivemarkets/desktop-sdk";
const maximized = await window.current().isMaximized();
# isMenuBarAutoHide M
# isMenuBarAutoHide(): Promise<boolean>
Whether menu bar automatically hides itself.
import { window } from "@reactivemarkets/desktop-sdk";
const autoHide = await window.current().isMenuBarAutoHide();
# isMenuBarVisible M
# isMenuBarVisible(): Promise<boolean>
Whether the menu bar is visible.
import { window } from "@reactivemarkets/desktop-sdk";
const visible = await window.current().isMenuBarVisible();
# isMinimizable M
# isMinimizable(): Promise<boolean>
Whether the window can be manually minimized by the user.
import { window } from "@reactivemarkets/desktop-sdk";
const minimizable = await window.current().isMinimizable();
# isMinimized M
# isMinimized(): Promise<boolean>
Whether the window is minimized.
import { window } from "@reactivemarkets/desktop-sdk";
const minimized = await window.current().isMinimized();
# isModal M
# isModal(): Promise<boolean>
Whether current window is a modal window.
import { window } from "@reactivemarkets/desktop-sdk";
const modal = await window.current().isModal();
# isMovable M
# isMovable(): Promise<boolean>
Whether the window can be moved by user.
import { window } from "@reactivemarkets/desktop-sdk";
const movable = await window.current().isMovable();
# isResizable M
# isResizable(): Promise<boolean>
Whether the window can be manually resized by the user.
import { window } from "@reactivemarkets/desktop-sdk";
const resizable = await window.current().isResizable();
# isVisible M
# isVisible(): Promise<boolean>
Whether the window is visible to the user.
import { window } from "@reactivemarkets/desktop-sdk";
const resizable = await window.current().isVisible();
# maximize M
# maximize(): Promise<void>
Maximizes the window. This will also show (but not focus) the window if it isn't being displayed already.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().maximize();
# minimize M
# minimize(): Promise<void>
Minimizes the window.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().minimize();
# moveTop M
# moveTop(): Promise<void>
Moves window to top(z-order) regardless of focus.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().moveTop();
# off M
# off(event: WindowEvents, listener: () => void): void
Removes a listener to Window Events from the window.
import { window } from "@reactivemarkets/desktop-sdk";
const listener = () => {
// trigger an action
};
window.current().off("blur", listener);
# on M
# on(event: WindowEvents, listener: () => void): void
Adds a listener to Window Events from the window.
import { window } from "@reactivemarkets/desktop-sdk";
const listener = () => {
// trigger an action
};
window.current().on("blur", listener);
# reload M
# reload(): Promise<void>
Reloads the current web page.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().reload();
# restore M
# restore(): Promise<void>
Restores the window from minimized state to its previous state.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().restore();
# setAlwaysOnTop M
# setAlwaysOnTop(flag: boolean): Promise<void>
Sets whether the window should show always on top of other windows. After setting this, the window is still a normal window, not a toolbox window which can not be focused on.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().setAlwaysOnTop(true);
# setBounds M
# setBounds(bounds: Partial<IRectangle>, animate?: boolean): Promise<void>
Resizes and moves the window to the supplied bounds. Any properties that are not supplied will default to their current values.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().setBounds({
width: 400,
});
# setFullScreen M
# setFullScreen(flag: boolean): Promise<void>
Sets whether the window should be in fullscreen mode.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().setFullScreen(true);
# setKiosk M
# setKiosk(flag: boolean): Promise<void>
Enters or leaves kiosk mode.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().setKiosk(true);
# show M
# show(): Promise<void>
Shows and gives focus to the window.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().show();
# unmaximize M
# unmaximize(): Promise<void>
Unmaximizes the window.
import { window } from "@reactivemarkets/desktop-sdk";
await window.current().unmaximize();
# Window Events
Event | Description |
---|---|
always-on-top-changed | Emitted when the window is set or unset to show always on top of other windows. |
blur | Emitted when the window loses focus. |
close | Emitted when the window is going to be closed. |
enter-full-screen | Emitted when the window enters a full-screen state. |
enter-html-full-screen | Emitted when the window enters a full-screen state triggered by HTML API. |
focus | Emitted when the window gains focus. |
hide | Emitted when the window is hidden. |
leave-full-screen | Emitted when the window leaves a full-screen state. |
leave-html-full-screen | Emitted when the window leaves a full-screen state triggered by HTML API. |
maximize | Emitted when window is maximized. |
minimize | Emitted when the window is minimized. |
move | Emitted when the window is being moved to a new position. |
moved | Emitted once when the window is moved to a new position. |
page-title-updated | Emitted when the document changed its title. |
resize | Emitted after the window has been resized. |
restore | Emitted when the window is restored from a minimized state. |
show | Emitted when the window is shown. |
unmaximize | Emitted when the window exits from a maximized state. |
will-move | Emitted before the window is moved. |
will-resize | Emitted before the window is resized. |
← screen