From 2b6da9d9fdfcad942a8f1b1f366787f4f26a5abd Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 17 Sep 2019 08:04:54 +0900 Subject: [PATCH] Change return value type of the appcore_ui_base_group_add function The return value type of appcore_ui_base_group_add() is changed to integer. Change-Id: Ie803a56ce9d7e9d45c957a6182b11c8fef0b8e5b Signed-off-by: Hwankyu Jhun --- include/appcore_ui_base.h | 2 +- src/ui_base/appcore_ui_base.c | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/include/appcore_ui_base.h b/include/appcore_ui_base.h index fd55cf1..1eddefa 100644 --- a/include/appcore_ui_base.h +++ b/include/appcore_ui_base.h @@ -71,7 +71,7 @@ void appcore_ui_base_pause(void); void appcore_ui_base_resume(void); bool appcore_ui_base_is_resumed(void); void appcore_ui_base_exit(void); -void appcore_ui_base_group_add(); +int appcore_ui_base_group_add(); void appcore_ui_base_group_remove(); unsigned int appcore_ui_base_get_main_window(void); unsigned int appcore_ui_base_get_main_surface(void); diff --git a/src/ui_base/appcore_ui_base.c b/src/ui_base/appcore_ui_base.c index e53466b..e3a545b 100644 --- a/src/ui_base/appcore_ui_base.c +++ b/src/ui_base/appcore_ui_base.c @@ -800,22 +800,29 @@ static void __group_lower() appcore_ui_base_group_remove(); } -EXPORT_API void appcore_ui_base_group_add() +EXPORT_API int appcore_ui_base_group_add() { static bool attached = false; + int ret; _DBG("__group_attach"); if (attached) - return; + return 0; int wid = __get_main_surface(); if (wid == 0) { _ERR("window wasn't ready"); - return; + return -1; + } + + ret = aul_app_group_set_window(wid); + if (ret < 0) { + _ERR("Failed to set app group window. error(%d)", ret); + return ret; } - aul_app_group_set_window(wid); attached = true; + return 0; } EXPORT_API void appcore_ui_base_group_remove() -- 2.7.4