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