author | unc0rr |
Wed, 02 Dec 2015 22:21:23 +0300 | |
branch | qmlfrontend |
changeset 11445 | 330c14f4ba69 |
parent 11442 | 6e641b5453f9 |
child 11448 | 5182d44fb733 |
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 { |
11439 | 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 |
11439 | 19 |
, MSG_FLIBEVENT |
11420 | 20 |
, MSG_CONNECTED |
21 |
, MSG_DISCONNECTED |
|
22 |
, MSG_ADDLOBBYCLIENT |
|
23 |
, MSG_REMOVELOBBYCLIENT |
|
24 |
, MSG_LOBBYCHATLINE |
|
11429 | 25 |
, MSG_ADDROOMCLIENT |
26 |
, MSG_REMOVEROOMCLIENT |
|
27 |
, MSG_ROOMCHATLINE |
|
11423 | 28 |
, MSG_ADDROOM |
29 |
, MSG_UPDATEROOM |
|
30 |
, MSG_REMOVEROOM |
|
11428 | 31 |
, MSG_ERROR |
32 |
, MSG_WARNING |
|
11429 | 33 |
, MSG_MOVETOLOBBY |
34 |
, MSG_MOVETOROOM |
|
11435 | 35 |
, MSG_NICKNAME |
11436 | 36 |
, MSG_SEED |
37 |
, MSG_THEME |
|
38 |
, MSG_SCRIPT |
|
11438 | 39 |
, MSG_FEATURESIZE |
40 |
, MSG_MAPGEN |
|
41 |
, MSG_MAP |
|
42 |
, MSG_MAZESIZE |
|
43 |
, MSG_TEMPLATE |
|
11442 | 44 |
, MSG_AMMO |
11445 | 45 |
, MSG_SCHEME |
10428
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
46 |
}; |
7c25297720f1
More refactoring: move PoC preview getting code into flib
unc0rr
parents:
10426
diff
changeset
|
47 |
|
10416 | 48 |
typedef union string255_ |
49 |
{ |
|
50 |
struct { |
|
51 |
unsigned char s[256]; |
|
52 |
}; |
|
53 |
struct { |
|
54 |
unsigned char len; |
|
55 |
unsigned char str[255]; |
|
56 |
}; |
|
57 |
} string255; |
|
58 |
||
10418
091d2c0216c3
Move away from passing shortstrings into C code, now IPC works
unc0rr
parents:
10416
diff
changeset
|
59 |
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
|
60 |
typedef void registerUIMessagesCallback_t(void * context, void (*)(void * context, MessageType mt, const char * msg, uint32_t len)); |
10430 | 61 |
typedef void getPreview_t(); |
10432 | 62 |
typedef void runQuickGame_t(); |
10448 | 63 |
typedef void runLocalGame_t(); |
10450 | 64 |
typedef void resetGameConfig_t(); |
10430 | 65 |
typedef void setSeed_t(const char * seed); |
66 |
typedef char *getSeed_t(); |
|
10612 | 67 |
typedef void setTheme_t(const char * themeName); |
68 |
typedef void setScript_t(const char * scriptName); |
|
10819
57e21f7621b0
Send selected scheme config on engine initialization (WIP)
unc0rr
parents:
10616
diff
changeset
|
69 |
typedef void setScheme_t(const char * schemeName); |
10888 | 70 |
typedef void setAmmo_t(const char * ammoName); |
10424
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10420
diff
changeset
|
71 |
typedef void flibInit_t(const char * localPrefix, const char * userPrefix); |
4be6cd55f1cf
- Get rid of engine's PathPrefix and UserPathPrefix
unc0rr
parents:
10420
diff
changeset
|
72 |
typedef void flibFree_t(); |
10951
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
10896
diff
changeset
|
73 |
typedef void passNetData_t(const char * data); |
11439 | 74 |
typedef void passFlibEvent_t(const char * data); |
11421 | 75 |
typedef void sendChatLine_t(const char * msg); |
11428 | 76 |
typedef void joinRoom_t(const char * roomName); |
11429 | 77 |
typedef void partRoom_t(const char * message); |
10416 | 78 |
|
10434
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
79 |
typedef char **getThemesList_t(); |
1614b13ad35e
Themes model, also add some files I forgot to add previously
unc0rr
parents:
10432
diff
changeset
|
80 |
typedef void freeThemesList_t(char **list); |
10436 | 81 |
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
|
82 |
|
10517 | 83 |
typedef char **getScriptsList_t(); |
10616 | 84 |
typedef char **getSchemesList_t(); |
10888 | 85 |
typedef char **getAmmosList_t(); |
10517 | 86 |
|
10440 | 87 |
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
|
88 |
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
|
89 |
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
|
90 |
typedef void changeTeamColor_t(const char * teamName, int32_t dir); |
10440 | 91 |
|
10896
5a74923120d5
Start network support: only setting up a connection for now
unc0rr
parents:
10888
diff
changeset
|
92 |
typedef void connectOfficialServer_t(); |
5a74923120d5
Start network support: only setting up a connection for now
unc0rr
parents:
10888
diff
changeset
|
93 |
|
10416 | 94 |
#ifdef __cplusplus |
95 |
} |
|
96 |
#endif |
|
97 |
||
98 |
#endif // FLIB_H |