Skip to content

Interface: LaunchOptions ​

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

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:82

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


displays? ​

ts
optional displays?: LaunchDisplay[];

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

The displays the user runs a wallpaper across, all of them or the ones they chose, the main one first when it's among 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. Draw on these, not on every display in DesktopEngine.ScreenManager.screens


height? ​

ts
optional height?: number;

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

Widget window height (points), see width


instanceId? ​

ts
optional instanceId?: string;

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

ID of this instance: a widget or companion is on the desktop once, a wallpaper runs once on each display it shows on (once in all when it spans)


level? ​

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

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

The level the user chose: pinned to the desktop, or floating above windows (always floating for a companion)


locale? ​

ts
optional locale?: string;

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

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


parameters? ​

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

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

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:106

The permissions the content runs with, each once, in the app and in the web preview alike: the declared ones it gets. Denied ones are missing, and the content still runs without them. audio isn't asked about: it's there when declared. The previews in the app's details pane are silent and don't see other apps' windows, so audio and window-positions are missing there.


position? ​

ts
optional position?: object;

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

Top-left position of the window: where the user last dragged it; for a widget without one, a default computed by the app; a companion without one picks where it starts

x ​

ts
x: number;

y ​

ts
y: number;

size? ​

ts
optional size?: WidgetSizeId;

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

The widget size the user picked, its id (widgets only); one the manifest no longer declares comes as its first


type? ​

ts
optional type?: ContentType;

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

Content type


width? ​

ts
optional width?: number;

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

Widget window width (points): the size picked's, or, for a widget whose manifest declares widget.resize, the width the user or the content last left it in. Fitted into the display's visible frame when that's smaller: scaled down with the height, or, for a widget free to change shape, each edge on its own


windowType? ​

ts
optional windowType?: WindowType;

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

The window type to pass to new DesktopEngine.Window({ type }), the only one the content can make where it is

The SDK is released under the Apache License 2.0