C/C++ SDK / C ABI · Tasks (editor) / KroysTaskApi
KroysTaskApi
Editor tasks (Tasks panel with progress and Cancel) and posting work to the main thread. Capability tasks; editor target only.
Kindstruct
Headerkroys/kroys_plugin.h
Members5
Functions3
DECLARATION
Declaration
Declared in kroys/kroys_plugin.h.
kroys_plugin.h
typedef struct KroysTaskApi { ... } KroysTaskApi;
REFERENCE
Members
Fields
#uint32_t structSize;Size of this struct as the writer compiled it (sizeof); the reader uses it to detect members appended by later minor versions.
#uint32_t reserved;Padding reserved for later use; leave it 0.
Functions
#KroysResult (KROYS_CALL* Submit)(KroysContext context, const KroysTaskDesc* desc, const KroysTaskCallbacks* callbacks, uint64_t* outTaskId);Queues a task; its id in *outTaskId.
#KroysResult (KROYS_CALL* Cancel)(KroysContext context, uint64_t taskId);Asks a task to stop: its Run sees IsCancelled.
#KroysResult (KROYS_CALL* Post)(KroysContext context, KroysMainThreadFunction function, void* userData);Thread-safe: runs function on the main thread during the next editor update.
Members
uint32_t structSize; uint32_t reserved; KroysResult (KROYS_CALL* Submit)(KroysContext context, const KroysTaskDesc* desc, const KroysTaskCallbacks* callbacks, uint64_t* outTaskId); KroysResult (KROYS_CALL* Cancel)(KroysContext context, uint64_t taskId); KroysResult (KROYS_CALL* Post)(KroysContext context, KroysMainThreadFunction function, void* userData);
KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.