qmlfrontend/flib.h
author unc0rr
Sun, 24 Dec 2017 16:56:22 +0100
branchqmlfrontend
changeset 12859 a03f245243b0
parent 12858 0c6fb706f747
child 12860 e33bcb9d5e9c
permissions -rw-r--r--
And more refactoring...

#ifndef FLIB_H
#define FLIB_H

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

enum MessageType {
    MSG_RENDERINGPREVIEW,
    MSG_PREVIEW,
    MSG_PREVIEWHOGCOUNT,
};

typedef union string255_ {
    struct {
        unsigned char s[256];
    };
    struct {
        unsigned char len;
        unsigned char str[255];
    };
} string255;

typedef void RunEngine_t(int argc, const char** argv);
typedef void ipcToEngineRaw_t(const char* msg, uint32_t len);
typedef void ipcSetEngineBarrier_t();
typedef void ipcRemoveBarrierFromEngineQueue_t();

typedef void registerUIMessagesCallback_t(void* context, void (*)(void* context, MessageType mt, const char* msg, uint32_t len));
typedef void flibInit_t(const char* localPrefix, const char* userPrefix);
typedef void flibFree_t();
typedef void passFlibEvent_t(const char* data);

#ifdef __cplusplus
}
#endif

#endif // FLIB_H