API
API
C
API reference (Engine) — Alpha (1.14.2)

Defold Learn logo


Engine

Engine instance handles and access to the engine-owned window.

Include: #include <dmsdk/engine/engine.h>
TYPES
HEngine engine instance handle
CONSTANTS
ENGINE_CONTEXT_NAME engine context name
FUNCTIONS
HWindow EngineGetWindow (HEngine engine) get the engine window

Functions

EngineGetWindow

HWindow EngineGetWindow(HEngine engine)

The engine owns the returned window. Do not destroy it or retain it across engine deletion or reboot. Call only on the engine thread with a live engine.

PARAMETERS

HEngine engine live engine instance

RETURNS

HWindow borrowed window, or null if the engine has no window

Constants

ENGINE_CONTEXT_NAME

Engine-owned entry in the extension context registry, containing a borrowed HEngine. Available from engine creation through application finalization, including early events and cleanup after initialization failure. Obtain the registry with ExtensionAppParamsGetContextRegistry or ExtensionParamsGetContextRegistry, then look up this name with ContextRegistryGet. A standalone host may have no registry or no engine entry.


Types

HEngine

void HEngine()

Identifies an engine instance. Extension callbacks borrow the handle for the callback; do not destroy the engine or retain the handle after engine deletion. Engine initialization may be incomplete when handling events during startup or cleanup after an initialization failure. Reboot creates a new instance.

PARAMETERS