X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=app%2Feventhandler.h;fp=app%2Feventhandler.h;h=612e3de062c6e54502b4c8ffd83daf199c3bca98;hb=5ba4327b148f81852c6e2a53bc51ab07b238602e;hp=58f694d6c1052abc81a9891e04630f2ba359d824;hpb=e79d82c88e350e6b882158624363b82fe3e2d91a;p=apps%2Fonscreenapp.git diff --git a/app/eventhandler.h b/app/eventhandler.h index 58f694d..612e3de 100644 --- a/app/eventhandler.h +++ b/app/eventhandler.h @@ -22,15 +22,14 @@ #include #include #include - #include #include #include "hmi-debug.h" -#define ROLE_NAME "on_screen.app" +#define ROLE_NAME "on_screen" #define APP_ID "onscreenapp" -class QQuickWindow; +class QQmlApplicationEngine; class EventHandler : public QObject { @@ -38,34 +37,29 @@ class EventHandler : public QObject public: explicit EventHandler(QObject *parent = 0); ~EventHandler(); + EventHandler(const EventHandler&) = delete; + EventHandler& operator=(const EventHandler&) = delete; void init(int port, const char* token); - void setQuickWindow(QQuickWindow *qw); - void onRep(struct json_object* reply_contents); static void* myThis; static void onRep_static(struct json_object* reply_contents); - void activateWindow(QString &role); - Q_INVOKABLE void deactivateWindow(QString &role); - Q_INVOKABLE void onScreenReply(const QString &btn_name); + void activateWindow(const char *role, const char *area = "normal"); + Q_INVOKABLE void deactivateWindow(); + Q_INVOKABLE void onScreenReply(const QString &btn_name, + const QString &press_mode = QString("shortPress"), + const QString &press_state = QString("release")); signals: void signalLoader(QVariant url); void signalOnScreenParameter(QVariant text); private: - LibHomeScreen *mp_hs; QLibWindowmanager* mp_wm; - - QQuickWindow *mp_qw; - QMap> m_req; QString m_dspreq; - QString my_id; - QString my_role; }; - #endif // HOMESCREENHANDLER_H