qmlfrontend/flib.h
author unc0rr
Sun, 07 Jan 2018 09:48:26 +0100
branchqmlfrontend
changeset 12884 66171ce586cc
parent 12883 adb1fccc706a
child 12890 9c259fb4d405
permissions -rw-r--r--
Fix referencing missing item
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_PREVIEW,
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    12
    MSG_PREVIEWHOGCOUNT,
12860
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12859
diff changeset
    13
    MSG_TONET,
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12859
diff changeset
    14
    MSG_GAMEFINISHED,
10428
7c25297720f1 More refactoring: move PoC preview getting code into flib
unc0rr
parents: 10426
diff changeset
    15
};
7c25297720f1 More refactoring: move PoC preview getting code into flib
unc0rr
parents: 10426
diff changeset
    16
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    17
typedef union string255_ {
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    18
    struct {
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    19
        unsigned char s[256];
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    20
    };
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    21
    struct {
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    22
        unsigned char len;
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    23
        unsigned char str[255];
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    24
    };
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    25
} string255;
10416
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    26
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    27
typedef void RunEngine_t(int argc, const char** argv);
12876
b544bbbd0696 Break engine completely and make it render in frontend window (no actual rendering yet, just white screen)
unc0rr
parents: 12861
diff changeset
    28
typedef void GameTick_t(uint32_t time_delta);
12883
adb1fccc706a - ResizeWindow function to pass engine new window size
unc0rr
parents: 12876
diff changeset
    29
typedef void ResizeWindow_t(uint32_t width, uint32_t height);
12859
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    30
typedef void ipcToEngineRaw_t(const char* msg, uint32_t len);
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    31
typedef void ipcSetEngineBarrier_t();
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    32
typedef void ipcRemoveBarrierFromEngineQueue_t();
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    33
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    34
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
    35
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
    36
typedef void flibFree_t();
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12857
diff changeset
    37
typedef void passFlibEvent_t(const char* data);
10896
5a74923120d5 Start network support: only setting up a connection for now
unc0rr
parents: 10888
diff changeset
    38
10416
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    39
#ifdef __cplusplus
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    40
}
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    41
#endif
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    42
1c301054694d - Remove --port command
unc0rr
parents:
diff changeset
    43
#endif // FLIB_H