qmlfrontend/flib.h
branchqmlfrontend
changeset 12857 90f927b4b9e1
parent 11842 93e6c401cc3d
child 12858 0c6fb706f747
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qmlfrontend/flib.h	Fri Dec 22 23:59:03 2017 +0100
@@ -0,0 +1,72 @@
+#ifndef FLIB_H
+#define FLIB_H
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum MessageType {
+    MSG_RENDERINGPREVIEW
+    , MSG_PREVIEW
+    , MSG_PREVIEWHOGCOUNT
+    , MSG_ADDPLAYINGTEAM
+    , MSG_REMOVEPLAYINGTEAM
+    , MSG_ADDTEAM
+    , MSG_REMOVETEAM
+    , MSG_TEAMCOLOR
+    , MSG_HEDGEHOGSNUMBER
+    , MSG_NETDATA
+    , MSG_TONET
+    , MSG_FLIBEVENT
+    , MSG_CONNECTED
+    , MSG_DISCONNECTED
+    , MSG_ADDLOBBYCLIENT
+    , MSG_REMOVELOBBYCLIENT
+    , MSG_LOBBYCHATLINE
+    , MSG_ADDROOMCLIENT
+    , MSG_REMOVEROOMCLIENT
+    , MSG_ROOMCHATLINE
+    , MSG_ADDROOM
+    , MSG_UPDATEROOM
+    , MSG_REMOVEROOM
+    , MSG_ERROR
+    , MSG_WARNING
+    , MSG_MOVETOLOBBY
+    , MSG_MOVETOROOM
+    , MSG_NICKNAME
+    , MSG_SEED
+    , MSG_THEME
+    , MSG_SCRIPT
+    , MSG_FEATURESIZE
+    , MSG_MAPGEN
+    , MSG_MAP
+    , MSG_MAZESIZE
+    , MSG_TEMPLATE
+    , MSG_AMMO
+    , MSG_SCHEME
+};
+
+typedef union string255_
+    {
+        struct {
+            unsigned char s[256];
+        };
+        struct {
+            unsigned char len;
+            unsigned char str[255];
+        };
+    } string255;
+
+typedef void RunEngine_t(int argc, const char ** argv);
+typedef void registerUIMessagesCallback_t(void * context, void (*)(void * context, MessageType mt, const char * msg, uint32_t len));
+typedef void flibInit_t(const char * localPrefix, const char * userPrefix);
+typedef void flibFree_t();
+typedef void passFlibEvent_t(const char * data);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // FLIB_H