diff options
author | 2020-04-09 17:23:47 +0300 | |
---|---|---|
committer | 2020-04-21 22:42:01 +0300 | |
commit | 9e76cf1b66b40a0e502c667dbbf53164261956b5 (patch) | |
tree | 975eac2f31516b63374dd8652da04341f58bd7b7 /app/eventhandler.cpp | |
parent | d53b7647a82fb3a8e42c191e2a325767e75a9062 (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 'app/eventhandler.cpp')
-rw-r--r-- | app/eventhandler.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/app/eventhandler.cpp b/app/eventhandler.cpp index ff8617d..9ffd6bb 100644 --- a/app/eventhandler.cpp +++ b/app/eventhandler.cpp @@ -39,24 +39,19 @@ void* EventHandler::myThis = 0; EventHandler::EventHandler(QObject *parent) : QObject(parent), - mp_hs(nullptr), - mp_wm(nullptr), m_dsp_sts(false) { } EventHandler::~EventHandler() { - if (mp_hs != nullptr) { - delete mp_hs; - } - if (mp_wm != nullptr) { - delete mp_wm; - } } void EventHandler::init(int port, const char *token) { + (void) port; + (void) token; +#if 0 myThis = this; mp_wm = new QLibWindowmanager(); mp_wm->init(port, token); @@ -147,8 +142,10 @@ void EventHandler::init(int port, const char *token) }); HMI_DEBUG(APP_ID, "LayoutHander::init() finished."); +#endif } +#if 0 void EventHandler::onRep_static(struct json_object* reply_contents) { static_cast<EventHandler*>(EventHandler::myThis)->onRep(reply_contents); @@ -159,15 +156,21 @@ void EventHandler::onRep(struct json_object* reply_contents) const char* str = json_object_to_json_string(reply_contents); HMI_DEBUG(APP_ID, "EventHandler::onReply %s", str); } +#endif void EventHandler::activateWindow(const char *role, const char *area) { +#if 0 HMI_DEBUG(APP_ID, "EventHandler::activateWindow()"); mp_wm->activateWindow(role, area); +#endif + fprintf(stdout, "EventHandler::activateWindow() role %s, area %s\n", + role, area); } void EventHandler::deactivateWindow() { +#if 0 HMI_DEBUG(APP_ID, "EventHandler::deactivateWindow()"); if(getDisplayStatus() == SWAPPING) { setDisplayStatus(SHOWING); @@ -179,10 +182,15 @@ void EventHandler::deactivateWindow() this->setDisplayStatus(HIDING); mp_wm->deactivateWindow(_myrole); } +#endif + int display_status = getDisplayStatus(); + fprintf(stdout, "EventHandler::deactivateWindow(), " + "display_status %d\n", display_status); } void EventHandler::onScreenReply(const QString &ons_title, const QString &btn_name) { +#if 0 HMI_DEBUG(APP_ID, "ons_title=%s btn_name=%s", ons_title.toStdString().c_str(), btn_name.toStdString().c_str()); emit this->hideOnScreen(); @@ -190,4 +198,7 @@ void EventHandler::onScreenReply(const QString &ons_title, const QString &btn_na json_object_object_add(j_param, _onscreen_title, json_object_new_string(ons_title.toStdString().c_str())); json_object_object_add(j_param, _button_name, json_object_new_string(btn_name.toStdString().c_str())); mp_hs->replyShowWindow(m_dsp.first.toStdString().c_str(), j_param); +#endif + fprintf(stdout, "EventHandler::onScreenReply with ons_title %s, btn_name %s\n", + ons_title.toStdString().c_str(), btn_name.toStdString().c_str()); } |