KROYSDOCS
HomeWhat's newv0.1.0
C/C++ SDK / C ABI · Editor / KroysOperationCallbacks

KroysOperationCallbacks

Progress and result of a long-running editor operation (editor->StartOperation, 2.2). Every callback runs on the main thread.

Kindstruct
Headerkroys/kroys_plugin.h
Members6
Functions3
DECLARATION

Declaration

Declared in kroys/kroys_plugin.h.

kroys_plugin.h
typedef struct KroysOperationCallbacks { ... } KroysOperationCallbacks;
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.

field
#uint32_t reserved;

Padding reserved for later use; leave it 0.

field
#void* userData;

Plugin-owned pointer passed back unchanged to every callback of this table; the host never dereferences it.

field
Functions
#void (KROYS_CALL* Progress)(void* userData, float fraction, const char* stage);

Progress: fraction 0..1 (negative: unknown) and the current stage text. Optional.

function pointer
#void (KROYS_CALL* Complete)(void* userData, int32_t succeeded, const char* message, const char* output);

Exactly once at the end: succeeded (nonzero), a one-line summary and the operation's full text output (compiler or packager output; may be ""). Strings are valid during the call.

function pointer
#void (KROYS_CALL* Release)(void* userData);

After Complete (or when the operation never started): free per-operation state. Optional.

function pointer
Members
uint32_t structSize;
uint32_t reserved;
void* userData;
void (KROYS_CALL* Progress)(void* userData, float fraction, const char* stage);
void (KROYS_CALL* Complete)(void* userData, int32_t succeeded, const char* message, const char* output);
void (KROYS_CALL* Release)(void* userData);

KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.