Skip to content

API Reference ​

This reference is generated from the SDK's type declarations, types/desktop-engine.d.ts, which describe only the APIs the runtime really provides. desktopengine create copies the same declarations into a project's types/, for completion and type checking in editors. For how to use these APIs, see the guide.

The global DesktopEngine ​

DesktopEngine is where the runtime starts:

MemberDescription
launchOptionsLaunch options: the display, position, option values, language and permissions, see Launch Options
apiVersionThe runtime's API version, see API versions
preferredFramesPerSecondThe frame rate the content wants, see Frame rate
WindowA native window, the root of the content, see Windows
CanvasA canvas component: 2D, WebGL and WebGL 2
CanvasImageAn image to draw on canvases
Component, Image, VideoThe other components of a window, styled with ComponentStyle
systemThe system's appearance, CPU and memory usage
ScreenManagerThe displays
fsPackage files and the content's own files, see Storage and Files

All the types are in the DesktopEngine namespace.

Web standard APIs ​

The runtime also has these globals, which behave as in browsers; the differences are in their descriptions:

See all declarations for the full list.

The SDK is released under the Apache License 2.0