author | unc0rr |
Mon, 30 Nov 2015 23:25:18 +0300 | |
branch | qmlfrontend |
changeset 11434 | 23912c93935a |
parent 11433 | bca9afcc3a72 |
child 11437 | 6e641b5453f9 |
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 { |
11434 | 11 |
MSG_RENDERINGPREVIEW |
12 |
, MSG_PREVIEW |
|
10444
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10440
diff
changeset
|
13 |
, MSG_ADDPLAYINGTEAM |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10440
diff
changeset
|
14 |
, MSG_REMOVEPLAYINGTEAM |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10440
diff
changeset
|
15 |
, MSG_ADDTEAM |
47a6231f1fc1
Teams widget now allows to add and remove teams (basic implementation, no checks performed, no colors, no hedgehogs)
unc0rr
parents:
10440
diff
changeset
|
16 |
, MSG_REMOVETEAM |
10452
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
17 |
, MSG_TEAMCOLOR |
10951
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
10896
diff
changeset
|
18 |
, MSG_NETDATA |
11434 | 19 |
, MSG_FLIBEVENT |
11415 | 20 |
, MSG_CONNECTED |
21 |
, MSG_DISCONNECTED |
|
22 |
, MSG_ADDLOBBYCLIENT |
|
23 |
, MSG_REMOVELOBBYCLIENT |
|
24 |
, MSG_LOBBYCHATLINE |
|
11424 | 25 |
, MSG_ADDROOMCLIENT |
26 |
, MSG_REMOVEROOMCLIENT |
|
27 |
, MSG_ROOMCHATLINE |
|
11418 | 28 |
, MSG_ADDROOM |
29 |
, MSG_UPDATEROOM |
|
30 |
, MSG_REMOVEROOM |
|
11423 | 31 |
, MSG_ERROR |
32 |
, MSG_WARNING |
|
11424 | 33 |
, MSG_MOVETOLOBBY |
34 |
, MSG_MOVETOROOM |
|
11430 | 35 |
, MSG_NICKNAME |
11431 | 36 |
, MSG_SEED |
37 |
, MSG_THEME |
|
38 |
, MSG_SCRIPT |
|
11433 | 39 |
, MSG_FEATURESIZE |
40 |
, MSG_MAPGEN |
|
41 |
, MSG_MAP |
|
42 |
, MSG_MAZESIZE |
|
43 |
, MSG_TEMPLATE |
|
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
44 |
}; |
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
45 |
|
10416 | 46 |
typedef union string255_ |
47 |
{ |
|
48 |
struct { |
|
49 |
unsigned char s[256]; |
|
50 |
}; |
|
51 |
struct { |
|
52 |
unsigned char len; |
|
53 |
unsigned char str[255]; |
|
54 |
}; |
|
55 |
} string255; |
|
56 |
||
10418
091d2c0216c3
Move away from passing shortstrings into C code, now IPC works
unc0rr
parents:
10416
diff
changeset
|
57 |
typedef void RunEngine_t(int argc, const char ** argv); |
10951
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
10896
diff
changeset
|
58 |
typedef void registerUIMessagesCallback_t(void * context, void (*)(void * context, MessageType mt, const char * msg, uint32_t len)); |
10430 | 59 |
typedef void getPreview_t(); |
10432 | 60 |
typedef void runQuickGame_t(); |
10448 | 61 |
typedef void runLocalGame_t(); |
10450 | 62 |
typedef void resetGameConfig_t(); |
10430 | 63 |
typedef void setSeed_t(const char * seed); |
64 |
typedef char *getSeed_t(); |
|
10612 | 65 |
typedef void setTheme_t(const char * themeName); |
66 |
typedef void setScript_t(const char * scriptName); |
|
10819
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10616
diff
changeset
|
67 |
typedef void setScheme_t(const char * schemeName); |
10888 | 68 |
typedef void setAmmo_t(const char * ammoName); |
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10420
diff
changeset
|
69 |
typedef void flibInit_t(const char * localPrefix, const char * userPrefix); |
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10420
diff
changeset
|
70 |
typedef void flibFree_t(); |
10951
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
10896
diff
changeset
|
71 |
typedef void passNetData_t(const char * data); |
11434 | 72 |
typedef void passFlibEvent_t(const char * data); |
11416 | 73 |
typedef void sendChatLine_t(const char * msg); |
11423 | 74 |
typedef void joinRoom_t(const char * roomName); |
11424 | 75 |
typedef void partRoom_t(const char * message); |
10416 | 76 |
|
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
77 |
typedef char **getThemesList_t(); |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
78 |
typedef void freeThemesList_t(char **list); |
10436 | 79 |
typedef uint32_t getThemeIcon_t(char * theme, char * buffer, uint32_t size); |
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
80 |
|
10517 | 81 |
typedef char **getScriptsList_t(); |
10616 | 82 |
typedef char **getSchemesList_t(); |
10888 | 83 |
typedef char **getAmmosList_t(); |
10517 | 84 |
|
10440 | 85 |
typedef char **getTeamsList_t(); |
10452
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
86 |
typedef void tryAddTeam_t(const char * teamName); |
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
87 |
typedef void tryRemoveTeam_t(const char * teamName); |
03519fd9f98d
Show team color in teams list widget, also allow to change it on mouse click
unc0rr
parents:
10450
diff
changeset
|
88 |
typedef void changeTeamColor_t(const char * teamName, int32_t dir); |
10440 | 89 |
|
10896
5a74923120d5
Start network support: only setting up a connection for now
unc0rr
parents:
10888
diff
changeset
|
90 |
typedef void connectOfficialServer_t(); |
5a74923120d5
Start network support: only setting up a connection for now
unc0rr
parents:
10888
diff
changeset
|
91 |
|
10416 | 92 |
#ifdef __cplusplus |
93 |
} |
|
94 |
#endif |
|
95 |
||
96 |
#endif // FLIB_H |