qmlFrontend/hwengine.cpp
branchqmlfrontend
changeset 11439 23912c93935a
parent 11438 bca9afcc3a72
child 11440 28fb618d99c4
--- a/qmlFrontend/hwengine.cpp	Sat Nov 28 00:18:04 2015 +0300
+++ b/qmlFrontend/hwengine.cpp	Mon Nov 30 23:25:18 2015 +0300
@@ -36,6 +36,7 @@
 
     connectOfficialServer_t * flibConnectOfficialServer;
     passNetData_t * flibPassNetData;
+    passFlibEvent_t * flibPassFlibEvent;
     sendChatLine_t * flibSendChatLine;
     joinRoom_t * flibJoinRoom;
     partRoom_t * flibPartRoom;
@@ -85,6 +86,7 @@
 
     flibConnectOfficialServer = (connectOfficialServer_t*) hwlib.resolve("connectOfficialServer");
     flibPassNetData = (passNetData_t*) hwlib.resolve("passNetData");
+    flibPassFlibEvent = (passFlibEvent_t*) hwlib.resolve("passFlibEvent");
     flibSendChatLine = (sendChatLine_t*) hwlib.resolve("sendChatLine");
     flibJoinRoom = (joinRoom_t*) hwlib.resolve("joinRoom");
     flibPartRoom = (partRoom_t*) hwlib.resolve("partRoom");
@@ -141,7 +143,7 @@
     HWEngine * obj = (HWEngine *)context;
     QByteArray b = QByteArray(msg, len);
 
-    //qDebug() << "FLIPC in" << b.size() << b;
+    //qDebug() << "FLIPC in" << mt << " size = " << b.size();
 
     QMetaObject::invokeMethod(obj, "engineMessageHandler", Qt::QueuedConnection, Q_ARG(MessageType, mt), Q_ARG(QByteArray, b));
 }
@@ -150,6 +152,10 @@
 {
     switch(mt)
     {
+    case MSG_RENDERINGPREVIEW: {
+        emit previewIsRendering();
+        break;
+    }
     case MSG_PREVIEW: {
         PreviewImageProvider * preview = (PreviewImageProvider *)m_engine->imageProvider(QLatin1String("preview"));
         preview->setPixmap(msg);
@@ -182,6 +188,10 @@
         flibPassNetData(msg.constData());
         break;
     }
+    case MSG_FLIBEVENT: {
+        flibPassFlibEvent(msg.constData());
+        break;
+    }
     case MSG_CONNECTED: {
         emit netConnected();
         break;