Enum in ldk_system.h

LDKBuiltinSystemId

IDs of builtin systems.

typedef enum LDKBuiltinSystemId{
  LDK_SYSTEM_ID_SCENEGRAPH=0x1,
  LDK_SYSTEM_ID_USER=0x100
}LDKBuiltinSystemId;
Enum in ldk_system.h

LDKSystemBucket

Execution bucket for a system update callback. UPDATE is zero intentionally so a zero-initialized descriptor gets the normal/default gameplay bucket.

typedef enum LDKSystemBucket{
  LDK_SYSTEM_BUCKET_UPDATE=0,
  LDK_SYSTEM_BUCKET_PRE_UPDATE,
  LDK_SYSTEM_BUCKET_POST_UPDATE,
  LDK_SYSTEM_BUCKET_RENDER,
  LDK_SYSTEM_BUCKET_COUNT
}LDKSystemBucket;
Enum in ldk_system.h

LDKSystemFlags

typedef enum LDKSystemFlags{
  LDK_SYSTEM_FLAG_NONE=0,
  LDK_SYSTEM_FLAG_ENABLED=1<<0,
  LDK_SYSTEM_FLAG_ENGINE_NATIVE=1<<1,
  LDK_SYSTEM_FLAG_RUN_WHEN_PAUSED=1<<2
}LDKSystemFlags;
Struct in ldk_system.h

LDKEntityGroup

Stable read-only view of the entity membership bound to a system. The view is valid for the duration of a system update callback. Structural ECS changes performed by a callback are reflected before the next system callback executes. A grouping_id of 0 identifies the empty, unbound group.

typedef struct LDKEntityGroup{
  u64 grouping_id;
  const LDKEntity *entities;
  u32 count;
}LDKEntityGroup;
Typedef in ldk_system.h

LDKSystemCallbackSyncFn

Callback used to synchronize with system execution.

typedef bool(*LDKSystemCallbackSyncFn)(void *user);

Parameters

user
Opaque caller-supplied data passed to the callback.

Returns

True if the operation succeeds; false otherwise.

Typedef in ldk_system.h

LDKSystemInitializeFn

Callback called during ECS system initialization.

typedef int(*LDKSystemInitializeFn)(void *data);

Parameters

data
Source data or system-owned context for this operation.

Returns

The resulting integer value.

Typedef in ldk_system.h

LDKSystemUpdateFn

Callback called when an ECS system updates a group.

typedef void(*LDKSystemUpdateFn)(void *data, const LDKEntityGroup *group, float dt);

Parameters

data
Source data or system-owned context for this operation.
group
Entity group used for this system update.
dt
Elapsed time since the preceding update, in seconds.
Typedef in ldk_system.h

LDKSystemTerminateFn

Callback called during ECS system termination.

typedef void(*LDKSystemTerminateFn)(void *data);

Parameters

data
Source data or system-owned context for this operation.
Struct in ldk_system.h

LDKSystemRegistry

typedef struct LDKSystemRegistry{
  void *internal;
  struct LDKRoot *root;
  u8 is_initialized;
  u8 is_started;
  u8 is_paused;
}LDKSystemRegistry;
Function in ldk_system.h

ldk_engine_system_descriptor_count

Descriptors for systems implemented by the engine. Games own registration.

LDK_API u32 ldk_engine_system_descriptor_count(void);

Returns

Number of matching entries.

Function in ldk_system.h

ldk_engine_system_descriptor_get

Get the engine system descriptor.

LDK_API bool ldk_engine_system_descriptor_get(
 u32 index,
 LDKSystemDesc *out
);

Parameters

u32 index
Zero-based index of the selected item.
LDKSystemDesc *out
Output object or buffer receiving the result.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_initialize

Initialize the system registry.

LDK_API bool ldk_system_registry_initialize(LDKSystemRegistry *registry);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_register

Register the system registry.

LDK_API bool ldk_system_registry_register(
 LDKSystemRegistry *registry,
 const LDKSystemDesc *desc
);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.
const LDKSystemDesc *desc
Description or configuration for this operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_unregister

Unregister the system registry.

LDK_API bool ldk_system_registry_unregister(
 LDKSystemRegistry *registry,
 u64 id
);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.
u64 id
Identifier of the target object.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_find_by_id

Find a registered system by its stable ID.

LDK_API bool ldk_system_registry_find_by_id(
 LDKSystemRegistry *registry,
 u64 id,
 LDKSystemDesc *out
);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.
u64 id
Identifier of the target object.
LDKSystemDesc *out
Output object or buffer receiving the result.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_count

Count registered systems.

LDK_API u32 ldk_system_registry_count(const LDKSystemRegistry *registry);

Parameters

const LDKSystemRegistry *registry
Registry on which the operation is performed.

Returns

Number of matching entries.

Function in ldk_system.h

ldk_system_registry_at

Get a system registered at a particular index.

LDK_API bool ldk_system_registry_at(
 const LDKSystemRegistry *registry,
 u32 index,
 LDKSystemDesc *out
);

Parameters

const LDKSystemRegistry *registry
Registry on which the operation is performed.
u32 index
Zero-based index of the selected item.
LDKSystemDesc *out
Output object or buffer receiving the result.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_clear

Clear the state of the system registry.

LDK_API bool ldk_system_registry_clear(LDKSystemRegistry *registry);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_start

Prepare the bucket lists without initializing individual systems.

LDK_API bool ldk_system_registry_start(LDKSystemRegistry *registry);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_stop

Terminate all active systems in reverse registration order and unprepare.

LDK_API bool ldk_system_registry_stop(LDKSystemRegistry *registry);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_system_start

Start/stop a registered system without changing the bucket lists. Repeated start/stop calls succeed without repeating callbacks. A failed initialize callback is followed by terminate so partially initialized state can be released. A failed start leaves other systems unchanged. Stateful systems (data_size > 0) must have data bound before start.

LDK_API bool ldk_system_registry_system_start(
 LDKSystemRegistry *registry,
 u64 id
);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.
u64 id
Identifier of the target object.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_system_stop

Stop the system registry system.

LDK_API bool ldk_system_registry_system_stop(
 LDKSystemRegistry *registry,
 u64 id
);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.
u64 id
Identifier of the target object.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_system_is_started

Check whether the system registry system is started.

LDK_API bool ldk_system_registry_system_is_started(
 const LDKSystemRegistry *registry,
 u64 id
);

Parameters

const LDKSystemRegistry *registry
Registry on which the operation is performed.
u64 id
Identifier of the target object.

Returns

True when the queried condition holds; false otherwise.

Function in ldk_system.h

ldk_system_registry_is_busy

True while a bucket or a system lifecycle callback is executing.

LDK_API bool ldk_system_registry_is_busy(const LDKSystemRegistry *registry);

Parameters

const LDKSystemRegistry *registry
Registry on which the operation is performed.

Returns

True when the queried condition holds; false otherwise.

Function in ldk_system.h

ldk_system_registry_system_data_set

Bind scene-owned system instance data. The registry never allocates or frees this pointer. Data cannot be replaced while the system is initialized. Passing NULL unbinds the current instance.

LDK_API bool ldk_system_registry_system_data_set(
 LDKSystemRegistry *registry,
 u64 id,
 void *data
);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.
u64 id
Identifier of the target object.
void *data
Source data or system-owned context for this operation.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_system_data_get

Get the system registry system data.

LDK_API void * ldk_system_registry_system_data_get(
 const LDKSystemRegistry *registry,
 u64 id
);

Parameters

const LDKSystemRegistry *registry
Registry on which the operation is performed.
u64 id
Identifier of the target object.

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_system.h

ldk_system_registry_system_group_set

Change the entity group delivered to a registered system's update callback. Engine-internal binding, resolved by the ECS from LDKSystemDesc requirements. Scene start/stop must preserve it. Game code should use the ECS facade. Passing NULL binds the system to the empty group.

LDK_API bool ldk_system_registry_system_group_set(
 LDKSystemRegistry *registry,
 u64 id,
 const LDKEntityGroup *group
);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.
u64 id
Identifier of the target object.
const LDKEntityGroup *group
Entity group used for this system update.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_system_group_get

Get the system registry system group.

LDK_API const LDKEntityGroup * ldk_system_registry_system_group_get(
 const LDKSystemRegistry *registry,
 u64 id
);

Parameters

const LDKSystemRegistry *registry
Registry on which the operation is performed.
u64 id
Identifier of the target object.

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_system.h

ldk_system_registry_callback_sync_set

Install an engine-side synchronization point invoked after each executed update callback. The system registry does not interpret the callback; the ECS uses it to commit deferred grouping membership changes safely between systems. Passing NULL clears the handler.

LDK_API bool ldk_system_registry_callback_sync_set(
 LDKSystemRegistry *registry,
 LDKSystemCallbackSyncFn fn,
 void *user
);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.
LDKSystemCallbackSyncFn fn
Callback invoked by this operation.
void *user
Opaque caller-supplied data passed to the callback.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_pause

Suspend/resume execution without terminating individual systems.

LDK_API bool ldk_system_registry_pause(LDKSystemRegistry *registry);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_resume

Resume the system registry.

LDK_API bool ldk_system_registry_resume(LDKSystemRegistry *registry);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_is_paused

Check whether the system registry is paused.

LDK_API bool ldk_system_registry_is_paused(const LDKSystemRegistry *registry);

Parameters

const LDKSystemRegistry *registry
Registry on which the operation is performed.

Returns

True when the queried condition holds; false otherwise.

Function in ldk_system.h

ldk_system_registry_run_bucket

Run initialized, enabled systems whose single update callback belongs to the requested bucket. While paused, only systems with RUN_WHEN_PAUSED execute. Structural and lifecycle changes are forbidden during update and lifecycle callbacks.

LDK_API bool ldk_system_registry_run_bucket(
 LDKSystemRegistry *registry,
 LDKSystemBucket bucket,
 float dt
);

Parameters

LDKSystemRegistry *registry
Registry on which the operation is performed.
LDKSystemBucket bucket
Bucket used by this operation.
float dt
Elapsed time since the preceding update, in seconds.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_system.h

ldk_system_registry_has

Check whether a system ID is registered.

LDK_API bool ldk_system_registry_has(
 const LDKSystemRegistry *registry,
 u64 id
);

Parameters

const LDKSystemRegistry *registry
Registry on which the operation is performed.
u64 id
Identifier of the target object.

Returns

True when the queried condition holds; false otherwise.