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

KroysFileJob

A file conversion running on a worker thread (import or export).

Kindstruct
Headerkroys/kroys_plugin.h
Members9
Functions4
DECLARATION

Declaration

Declared in kroys/kroys_plugin.h.

kroys_plugin.h
typedef struct KroysFileJob { ... } KroysFileJob;
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
#const char* sourcePath;

The file to convert.

field
#const char* outputPath;

write the result here

field
#void* jobContext;

Host-owned job pointer; pass it unchanged to the job's functions.

field
Functions
#int32_t (KROYS_CALL* IsCancelled)(void* jobContext);

Thread-safe: nonzero when the user cancelled the job.

function pointer
#void (KROYS_CALL* SetProgress)(void* jobContext, float fraction);

Thread-safe: progress 0..1.

function pointer
#void (KROYS_CALL* Warning)(void* jobContext, const char* message);

Thread-safe: a warning in the task's diagnostics.

function pointer
#void (KROYS_CALL* Error)(void* jobContext, const char* message);

Thread-safe: fails the job with a message.

function pointer
Members
uint32_t structSize;
uint32_t reserved;
const char* sourcePath;
const char* outputPath;
void* jobContext;
int32_t (KROYS_CALL* IsCancelled)(void* jobContext);
void (KROYS_CALL* SetProgress)(void* jobContext, float fraction);
void (KROYS_CALL* Warning)(void* jobContext, const char* message);
void (KROYS_CALL* Error)(void* jobContext, const char* message);

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