Skip to content

Interface: LaunchOptions ​

Defined in: types/desktop-engine.d.ts:58

Options passed by the app at launch; all fields are absent when loaded directly from the Develop menu

Properties ​

display? ​

ts
optional display?: LaunchDisplay;

Defined in: types/desktop-engine.d.ts:74

The display that shows the content; absent when a wallpaper spans all displays (displays)


displays? ​

ts
optional displays?: LaunchDisplay[];

Defined in: types/desktop-engine.d.ts:80

Every display, the main one first, when the user runs a wallpaper across all of them; only for wallpapers whose manifest.json declares "wallpaper": { "span": true }. Make a desktop window on each and lay the drawing out in their shared coordinates, so it continues from one display to the next


height? ​

ts
optional height?: number;

Defined in: types/desktop-engine.d.ts:72

Widget window height (points)


instanceId? ​

ts
optional instanceId?: string;

Defined in: types/desktop-engine.d.ts:60

ID of this instance on the desktop; one package can have several instances


level? ​

ts
optional level?: "desktop" | "floating";

Defined in: types/desktop-engine.d.ts:64

The level the user chose: pinned to the desktop, or floating above windows


locale? ​

ts
optional locale?: string;

Defined in: types/desktop-engine.d.ts:90

The user's preferred language, such as "zh-Hans-CN"


parameters? ​

ts
optional parameters?: Record<string, ParameterValue>;

Defined in: types/desktop-engine.d.ts:88

Values of the parameters in manifest.json (the user's value if set, otherwise the default). Current ones: when the user changes them, content that listens to DesktopEngine.system's parameterschange keeps running and finds the new values here too


permissions? ​

ts
optional permissions?: Permission[];

Defined in: types/desktop-engine.d.ts:95

The permissions the content runs with: the ones in manifest.json the user allowed. Denied ones are missing, the content still runs without them. audio isn't asked about, it's there when declared.


position? ​

ts
optional position?: object;

Defined in: types/desktop-engine.d.ts:82

Top-left position of the window: where the user last dragged it, or a default computed by the app

x ​

ts
x: number;

y ​

ts
y: number;

screenSaver? ​

ts
optional screenSaver?: LaunchScreenSaver;

Defined in: types/desktop-engine.d.ts:101

Present when a wallpaper runs as the macOS screen saver instead of on the desktop. The desktop window fills the screen saver; there's no pointer or keyboard input (any input ends the screen saver) and JavaScript runs without the JIT, so keep per-frame work on the GPU.


size? ​

ts
optional size?: WidgetSize;

Defined in: types/desktop-engine.d.ts:68

Widget size (widgets only)


type? ​

ts
optional type?: ContentType;

Defined in: types/desktop-engine.d.ts:62

Content type


width? ​

ts
optional width?: number;

Defined in: types/desktop-engine.d.ts:70

Widget window width (points)


windowType? ​

ts
optional windowType?: "widget" | "overlay";

Defined in: types/desktop-engine.d.ts:66

The window type to pass to new DesktopEngine.Window({ type })

The SDK is released under the Apache License 2.0