BaseWindowOptions
Options for creating a BaseWindow.
Example
import { BaseWindow } from '@mobrowser/api';
const win = new BaseWindow({
title: 'Toolbox',
size: { width: 480, height: 360 },
minimumSize: { width: 320, height: 240 },
windowTitlebarVisible: false
})
win.centerWindow()
win.show()
Properties
title
readonly title?: string;
The title of the window.
size
readonly size?: Size;
The initial size of the window.
minimumSize
readonly minimumSize?: Size;
The minimum size of the window.
position
readonly position?: Point;
The initial position of the window.
bounds
readonly bounds?: Rect;
The initial bounds of the window.
resizable
readonly resizable?: boolean;
Whether the window is resizable.
alwaysOnTop
readonly alwaysOnTop?: boolean;
Whether the window should be always on top.
transparentBackground
readonly transparentBackground?: boolean;
Whether the window background should be transparent on macOS.
opacity
readonly opacity?: number;
The opacity of the window. Values outside the [0, 1] range are clamped.
hasShadow
readonly hasShadow?: boolean;
Whether the window should have a shadow on macOS.
windowTitleVisible
readonly windowTitleVisible?: boolean;
Whether the window title is visible.
windowTitlebarVisible
readonly windowTitlebarVisible?: boolean;
Whether the window titlebar is visible.
windowButtonVisible
readonly windowButtonVisible?: {
close?: boolean;
minimize?: boolean;
maximize?: boolean;
zoom?: boolean;
};
Whether the window buttons are visible.
windowDisplayPolicy
readonly windowDisplayPolicy?: WindowDisplayPolicy;
The display policy of the window across multiple desktops.
windowAnimationEnabled
readonly windowAnimationEnabled?: boolean;
Whether window animation is enabled when showing the window on macOS.
activationIndependenceEnabled
readonly activationIndependenceEnabled?: boolean;
Whether the always-on-top window can be interacted with without activating the app on macOS.
vibrancyEffect
readonly vibrancyEffect?: VibrancyEffect;
The vibrancy effect of the window on macOS.
windowButtonPosition
readonly windowButtonPosition?: Point;
The position of the traffic light buttons on the window titlebar on macOS.