app: Remove libhomescreen and windowmanger callbacks 27/24827/2
authorMarius Vlad <marius.vlad@collabora.com>
Wed, 22 Jan 2020 18:30:28 +0000 (20:30 +0200)
committerMarius Vlad <marius.vlad@collabora.com>
Wed, 24 Jun 2020 14:08:51 +0000 (17:08 +0300)
Bug-AGL: SPEC-3447

Removes also depedencies from config.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I1e455a81a06f5d7d712d09621de585459122edd7

app/app.pri
app/app.pro
app/main.cpp
package/config.xml

index c3b1fd1..399d71f 100644 (file)
@@ -1,13 +1,4 @@
 TEMPLATE = app
 QMAKE_LFLAGS += "-Wl,--hash-style=gnu -Wl,--as-needed"
 
-load(configure)
-qtCompileTest(libhomescreen)
-
-config_libhomescreen {
-    CONFIG += link_pkgconfig
-    PKGCONFIG += homescreen
-    DEFINES += HAVE_LIBHOMESCREEN
-}
-
 DESTDIR = $${OUT_PWD}/../package/root/bin
index b0fea14..dc30c85 100644 (file)
@@ -4,7 +4,7 @@ QT = quickcontrols2 websockets
 SOURCES = main.cpp
 
 CONFIG += link_pkgconfig
-PKGCONFIG += libhomescreen qlibwindowmanager qtappfw-mediaplayer
+PKGCONFIG += libhomescreen qtappfw-mediaplayer
 
 CONFIG(release, debug|release) {
     QMAKE_POST_LINK = $(STRIP) --strip-unneeded $(TARGET)
index e40cf98..d72c492 100644 (file)
@@ -26,8 +26,7 @@
 #include <QtQml/qqml.h>
 #include <QtQuickControls2/QQuickStyle>
 #include <QQuickWindow>
-#include <libhomescreen.hpp>
-#include <qlibwindowmanager.h>
+
 #include <mediaplayer.h>
 
 #include <unistd.h>
@@ -63,42 +62,11 @@ int main(int argc, char *argv[])
         query.addQueryItem(QStringLiteral("token"), secret);
         bindingAddress.setQuery(query);
         context->setContextProperty(QStringLiteral("bindingAddress"), bindingAddress);
-        std::string token = secret.toStdString();
-        LibHomeScreen* hs = new LibHomeScreen();
-        QLibWindowmanager* qwm = new QLibWindowmanager();
-
-        // WindowManager
-        if(qwm->init(port,secret) != 0){
-            exit(EXIT_FAILURE);
-        }
-        AGLScreenInfo screenInfo(qwm->get_scale_factor());
-        // Request a surface as described in layers.json windowmanager’s file
-        if (qwm->requestSurface(graphic_role) != 0) {
-            exit(EXIT_FAILURE);
-        }
-        // Create an event callback against an event type. Here a lambda is called when SyncDraw event occurs
-        qwm->set_event_handler(QLibWindowmanager::Event_SyncDraw, [qwm, &graphic_role](json_object *object) {
-            fprintf(stderr, "Surface got syncDraw!\n");
-            qwm->endDraw(graphic_role);
-        });
-
-        // HomeScreen
-        hs->init(port, token.c_str());
-        // Set the event handler for Event_ShowWindow which will activate the surface for windowmanager
-        hs->set_event_handler(LibHomeScreen::Event_ShowWindow, [qwm, &graphic_role](json_object *object){
-            qDebug("Surface %s got showWindow\n", graphic_role.toStdString().c_str());
-            qwm->activateWindow(graphic_role);
-        });
 
         context->setContextProperty("AlbumArt", "");
         context->setContextProperty("mediaplayer", new Mediaplayer(bindingAddress, context));
-        context->setContextProperty(QStringLiteral("screenInfo"), &screenInfo);
 
         engine.load(QUrl(QStringLiteral("qrc:/MediaPlayer.qml")));
-        QObject *root = engine.rootObjects().first();
-        QQuickWindow *window = qobject_cast<QQuickWindow *>(root);
-        QObject::connect(window, SIGNAL(frameSwapped()), qwm, SLOT(slotActivateWindow()
-        ));
     }
     return app.exec();
 }
index 3a25a0d..239edff 100644 (file)
@@ -7,8 +7,6 @@
   <author>Tasuku Suzuki &lt;tasuku.suzuki@qt.io&gt;</author>
   <license>APL 2.0</license>
   <feature name="urn:AGL:widget:required-api">
-    <param name="windowmanager" value="ws" />
-    <param name="homescreen" value="ws" />
     <param name="mediaplayer" value="ws" />
   </feature>
   <feature name="urn:AGL:widget:required-permission">