author | unc0rr |
Sun, 07 Jan 2018 09:48:26 +0100 | |
branch | qmlfrontend |
changeset 12884 | 66171ce586cc |
parent 12883 | adb1fccc706a |
child 12890 | 9c259fb4d405 |
permissions | -rw-r--r-- |
10416 | 1 |
#ifndef FLIB_H |
2 |
#define FLIB_H |
|
3 |
||
4 |
#include <stdint.h> |
|
5 |
||
6 |
#ifdef __cplusplus |
|
7 |
extern "C" { |
|
8 |
#endif |
|
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 | 13 |
MSG_TONET, |
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 | 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 | 30 |
typedef void ipcToEngineRaw_t(const char* msg, uint32_t len); |
31 |
typedef void ipcSetEngineBarrier_t(); |
|
32 |
typedef void ipcRemoveBarrierFromEngineQueue_t(); |
|
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 | 39 |
#ifdef __cplusplus |
40 |
} |
|
41 |
#endif |
|
42 |
||
43 |
#endif // FLIB_H |