summaryrefslogtreecommitdiffstats
path: root/sample/simple-egl/src/simple-egl.cpp
diff options
context:
space:
mode:
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2018-11-14 11:14:04 +0800
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>2018-11-21 16:51:10 +0800
commitc0146077906057bf97688a617870228eaad0cf54 (patch)
tree7d7bcc9a8a58c8c1f137be3872b643566c08e78c /sample/simple-egl/src/simple-egl.cpp
parent43452ff8a759da135525678528c159f1e4e68504 (diff)
homescreen-service: add five verbs. 1.showWindow: instead of tap_shortcut and show onscreen. 2.hideWindow: used when want to hide onscreen. 3.replyShowWindow: used when post onscreen reply information to application. 4.showNotification: used by application who want to display notification on homescreen top area. 5.showInformation: used by application who want to display information on homescreen botton area. homescreen: 1.add fullscreen transfer button. 2.display notification and information. Bug-AGL: SPEC-1931 Change-Id: Ie0753fe0656282b1ff8c04dcef625f2a4154edde Signed-off-by: wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
Diffstat (limited to 'sample/simple-egl/src/simple-egl.cpp')
-rw-r--r--sample/simple-egl/src/simple-egl.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/sample/simple-egl/src/simple-egl.cpp b/sample/simple-egl/src/simple-egl.cpp
index 4271a66..aa6ea19 100644
--- a/sample/simple-egl/src/simple-egl.cpp
+++ b/sample/simple-egl/src/simple-egl.cpp
@@ -569,9 +569,17 @@ init_hs(LibHomeScreen* hs){
return -1;
}
- hs->set_event_handler(LibHomeScreen::Event_TapShortcut, [](json_object *object){
- HMI_DEBUG("simple-egl","try to activesurface %s ", app_name.c_str());
- wm->activateWindow(main_role);
+ hs->set_event_handler(LibHomeScreen::Event_ShowWindow, [hs](json_object *object){
+ HMI_DEBUG("simple-egl","try to activeWindow %s ", app_name.c_str());
+
+ struct json_object *param_obj = json_object_object_get(object, hs->_keyParameter);
+ const char *area = json_object_get_string(
+ json_object_object_get(param_obj, hs->_keyArea));
+ // Application should call LibWindowmanager::activateWindow() in showWindow handler
+ if(area == nullptr)
+ wm->activateWindow(main_role, hs->_areaNormal);
+ else
+ wm->activateWindow(main_role, area);
});
return 0;