summaryrefslogtreecommitdiffstats
path: root/sample/app/eventhandler.h
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-04-09 17:23:47 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-04-21 22:42:01 +0300
commit9e76cf1b66b40a0e502c667dbbf53164261956b5 (patch)
tree975eac2f31516b63374dd8652da04341f58bd7b7 /sample/app/eventhandler.h
parentd53b7647a82fb3a8e42c191e2a325767e75a9062 (diff)
onscreenapp, ontestapp: Initial conversion to agl-compositor
Add agl-shell-desktop protocol and the ability to launch apps. Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Diffstat (limited to 'sample/app/eventhandler.h')
-rw-r--r--sample/app/eventhandler.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/sample/app/eventhandler.h b/sample/app/eventhandler.h
index af66644..3a26b42 100644
--- a/sample/app/eventhandler.h
+++ b/sample/app/eventhandler.h
@@ -21,8 +21,14 @@
#include <string>
#include <QVariant>
-#include <qlibhomescreen.h>
-#include <qlibwindowmanager.h>
+#include <wayland-client.h>
+#include "wayland-agl-shell-desktop-client-protocol.h"
+
+#ifndef DEFAULT_AFM_UNIX_SOCK
+#define DEFAULT_AFM_UNIX_SOCK "unix:/run/platform/apis/ws/afm-main"
+#endif
+
+#include "launcher.h"
#include "hmi-debug.h"
#define ROLE_NAME "onstestapp"
@@ -46,14 +52,17 @@ public:
Q_INVOKABLE void showWindow(QString id, QString json);
Q_INVOKABLE void hideWindow(QString id);
+ Q_INVOKABLE int start(const QString &app_id);
+ Q_INVOKABLE bool is_running(const QString &app_id);
+ Q_INVOKABLE void set_window_popup(const QString &app_id, int x, int y);
signals:
void signalOnReplyShowWindow(QVariant val);
private:
- QLibHomeScreen *mp_hs;
- QLibWindowmanager* mp_wm;
- QQuickWindow *mp_qw;
+ struct agl_shell_desktop *shell_desktop = nullptr;
+ Launcher *m_launcher = nullptr;
+ QQuickWindow *mp_qw;
};
#endif // EVENTHANDLER_H