qmlfrontend/flib.h
author unc0rr
Mon, 25 Dec 2017 00:58:47 +0100
branchqmlfrontend
changeset 12860 e33bcb9d5e9c
parent 12859 a03f245243b0
child 12861 488782d9aba9
permissions -rw-r--r--
Preview rendering seems to work now
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10416
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     1
#ifndef FLIB_H
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     2
#define FLIB_H
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     3
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     4
#include <stdint.h>
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     5
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     6
#ifdef __cplusplus
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     7
extern "C" {
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     8
#endif
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
     9
10428
7c25297720f1 More refactoring: move PoC preview getting code into flib
unc0rr
parents: 10426
diff changeset
    10
enum MessageType {
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    11
    MSG_RENDERINGPREVIEW,
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    12
    MSG_PREVIEW,
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    13
    MSG_PREVIEWHOGCOUNT,
12860
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12859
diff changeset
    14
    MSG_TONET,
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12859
diff changeset
    15
    MSG_GAMEFINISHED,
10428
7c25297720f1 More refactoring: move PoC preview getting code into flib
unc0rr
parents: 10426
diff changeset
    16
};
7c25297720f1 More refactoring: move PoC preview getting code into flib
unc0rr
parents: 10426
diff changeset
    17
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    18
typedef union string255_ {
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    19
    struct {
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    20
        unsigned char s[256];
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    21
    };
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    22
    struct {
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    23
        unsigned char len;
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    24
        unsigned char str[255];
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    25
    };
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    26
} string255;
10416
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    27
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    28
typedef void RunEngine_t(int argc, const char** argv);
12859
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    29
typedef void ipcToEngineRaw_t(const char* msg, uint32_t len);
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    30
typedef void ipcSetEngineBarrier_t();
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    31
typedef void ipcRemoveBarrierFromEngineQueue_t();
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    32
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    33
typedef void registerUIMessagesCallback_t(void* context, void (*)(void* context, MessageType mt, const char* msg, uint32_t len));
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    34
typedef void flibInit_t(const char* localPrefix, const char* userPrefix);
10424
4be6cd55f1cf - Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents: 10420
diff changeset
    35
typedef void flibFree_t();
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    36
typedef void passFlibEvent_t(const char* data);
10896
5a74923120d5 Start network support: only setting up a connection for now
unc0rr
parents: 10888
diff changeset
    37
10416
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    38
#ifdef __cplusplus
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    39
}
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    40
#endif
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    41
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    42
#endif // FLIB_H