From: Igor Olshevskyi Date: Tue, 5 Apr 2016 09:38:40 +0000 (+0300) Subject: TizenRefApp-6050 [Call UI] Implement window type change feature according to propose X-Git-Tag: accepted/tizen/mobile/20160408.004433~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F64785%2F1;p=profile%2Fmobile%2Fapps%2Fnative%2Fcall-ui.git TizenRefApp-6050 [Call UI] Implement window type change feature according to propose Change-Id: I100f90d90a6e9be78c0fd201de1d46c680a39169 --- diff --git a/inc/callui-common.h b/inc/callui-common.h index 3c29802..3d3d517 100644 --- a/inc/callui-common.h +++ b/inc/callui-common.h @@ -78,11 +78,11 @@ int _callui_common_unlock_swipe_lock(void); /** * @brief Set notification type * - * @param[in] person_id Person id - * @param[in] bwin_noti win type + * @param[in] person_id Person id + * @param[in] win_noti defines if window must be notification type * */ -void _callui_common_win_set_noti_type(void *appdata, int bwin_noti); +void _callui_common_win_set_noti_type(void *appdata, bool win_noti); /** * @brief Launch contacts application diff --git a/src/callui-common.c b/src/callui-common.c index 9b98670..838eca2 100755 --- a/src/callui-common.c +++ b/src/callui-common.c @@ -32,8 +32,6 @@ #include #include #include -// TODO: needed for functionality of switch window types that currently does not work -//#include #include "callui-common.h" #include "callui-debug.h" @@ -166,24 +164,18 @@ int _callui_common_unlock_swipe_lock(void) return 0; } -void _callui_common_win_set_noti_type(void *appdata, int bwin_noti) +void _callui_common_win_set_noti_type(void *appdata, bool win_noti) { - dbg("_callui_common_win_set_noti_type"); - // TODO: commented until functionality of switch window types will be fixed -// callui_app_data_t *ad = (callui_app_data_t *)appdata; -// -// Ecore_Wl_Window *win = elm_win_wl_window_get(ad->win); -// if (bwin_noti == EINA_FALSE) { -// dbg("window type: NORMAL"); -// /* Set Normal window */ -// ecore_wl_window_type_set(win, ECORE_WL_WINDOW_TYPE_TOPLEVEL); -// } else { -// dbg("window type: NOTI-HIGH"); -// /* Set Notification window */ -// ecore_wl_window_type_set(win, ECORE_WL_WINDOW_TYPE_NOTIFICATION); -// /* Set Notification's priority to LEVEL_HIGH */ -// efl_util_set_notification_window_level(ad->win, EFL_UTIL_NOTIFICATION_LEVEL_TOP); -// } + CALLUI_RETURN_IF_FAIL(appdata); + + callui_app_data_t *ad = appdata; + if (win_noti) { + dbg("window type: NOTIFICATION"); + efl_util_set_notification_window_level(ad->win, EFL_UTIL_NOTIFICATION_LEVEL_TOP); + } else { + dbg("window type: NORMAL"); + efl_util_set_notification_window_level(ad->win, EFL_UTIL_NOTIFICATION_LEVEL_NONE); + } } void _callui_common_launch_contacts(void *appdata) @@ -194,7 +186,7 @@ void _callui_common_launch_contacts(void *appdata) _callui_lock_manager_stop(ad->lock_handle); ad->start_lock_manager_on_resume = true; - _callui_common_win_set_noti_type(appdata, EINA_FALSE); + _callui_common_win_set_noti_type(appdata, false); int ret = app_control_create(&service); if (ret < 0) { @@ -221,7 +213,7 @@ void _callui_common_launch_bt_app(void *appdata) _callui_lock_manager_stop(ad->lock_handle); ad->start_lock_manager_on_resume = true; - _callui_common_win_set_noti_type(appdata, EINA_FALSE); + _callui_common_win_set_noti_type(appdata, false); int ret = app_control_create(&service); if (ret < 0) { @@ -250,7 +242,7 @@ void _callui_common_launch_dialer(void *appdata) _callui_lock_manager_stop(ad->lock_handle); ad->start_lock_manager_on_resume = true; - _callui_common_win_set_noti_type(appdata, EINA_FALSE); + _callui_common_win_set_noti_type(appdata, false); ret = app_control_create(&service); if (ret < 0) { @@ -295,7 +287,7 @@ void _callui_common_launch_msg_composer(void *appdata, const char *number) _callui_lock_manager_stop(ad->lock_handle); ad->start_lock_manager_on_resume = true; - _callui_common_win_set_noti_type(appdata, EINA_FALSE); + _callui_common_win_set_noti_type(appdata, false); ret = app_control_create(&service); if (ret != APP_CONTROL_ERROR_NONE) { @@ -631,9 +623,9 @@ static void __callui_common_lock_state_cb (system_settings_key_e key, void *user { callui_app_data_t *ad = _callui_get_app_data(); if (_callui_common_get_idle_lock_type() == LOCK_TYPE_UNLOCK) { - _callui_common_win_set_noti_type(ad, EINA_FALSE); + _callui_common_win_set_noti_type(ad, false); } else { - _callui_common_win_set_noti_type(ad, EINA_TRUE); + _callui_common_win_set_noti_type(ad, true); } } diff --git a/src/callui-view-callend.c b/src/callui-view-callend.c index 0d719f9..5db07ac 100644 --- a/src/callui-view-callend.c +++ b/src/callui-view-callend.c @@ -100,7 +100,7 @@ static callui_result_e __callui_view_callend_oncreate(call_view_data_base_t *vie vd->base_view.ad = ad; - _callui_common_win_set_noti_type(vd->base_view.ad, EINA_TRUE); + _callui_common_win_set_noti_type(vd->base_view.ad, true); callui_result_e res = __create_main_content(vd); CALLUI_RETURN_VALUE_IF_FAIL(res == CALLUI_RESULT_OK, res); diff --git a/src/callui-view-incoming-call-noti.c b/src/callui-view-incoming-call-noti.c index 76b8e10..bbac5c7 100644 --- a/src/callui-view-incoming-call-noti.c +++ b/src/callui-view-incoming-call-noti.c @@ -100,7 +100,7 @@ static callui_result_e __callui_view_incoming_call_noti_oncreate(call_view_data_ // TODO: need to remove this logic from here evas_object_resize(ad->win, ad->root_w, ELM_SCALE_SIZE(MTLOCK_ACTIVE_NOTI_CALL_HEIGHT)); - _callui_common_win_set_noti_type(ad, EINA_TRUE); + _callui_common_win_set_noti_type(ad, true); if (elm_win_keygrab_set(ad->win, CALLUI_KEY_SELECT, 0, 0, 0, ELM_WIN_KEYGRAB_TOPMOST)) { dbg("KEY_SELECT key grab failed"); @@ -136,7 +136,7 @@ static callui_result_e __callui_view_incoming_call_noti_ondestroy(call_view_data DELETE_EVAS_OBJECT(vd->base_view.contents); - _callui_common_win_set_noti_type(ad, EINA_FALSE); + _callui_common_win_set_noti_type(ad, false); evas_object_resize(ad->win, ad->root_w, ad->root_h); diff --git a/src/callui-view-incoming-call.c b/src/callui-view-incoming-call.c index 6651dc0..dc6578b 100644 --- a/src/callui-view-incoming-call.c +++ b/src/callui-view-incoming-call.c @@ -118,7 +118,7 @@ static callui_result_e __callui_view_incoming_call_oncreate(call_view_data_base_ } evas_object_resize(ad->win, ad->root_w, ad->root_h); - _callui_common_win_set_noti_type(ad, EINA_TRUE); + _callui_common_win_set_noti_type(ad, true); evas_object_pointer_mode_set(ad->win, EVAS_OBJECT_POINTER_MODE_NOGRAB); @@ -158,7 +158,7 @@ static callui_result_e __callui_view_incoming_call_ondestroy(call_view_data_base DELETE_EVAS_OBJECT(vd->base_view.contents); - _callui_common_win_set_noti_type(ad, EINA_FALSE); + _callui_common_win_set_noti_type(ad, false); elm_win_keygrab_unset(ad->win, CALLUI_KEY_SELECT, 0, 0); diff --git a/src/callui.c b/src/callui.c index fa4d34f..e68d416 100755 --- a/src/callui.c +++ b/src/callui.c @@ -702,7 +702,7 @@ static Eina_Bool __callui_app_win_hard_key_up_cb(void *data, int type, void *eve //Ecore_X_Window focus_win = ecore_x_window_focus_get(); //if (ad->win != NULL && focus_win == elm_win_xwindow_get(ad->win)) { /* ToDo: Use lock-screen interface to raise the home screen */ - _callui_common_win_set_noti_type(ad, EINA_FALSE); + _callui_common_win_set_noti_type(ad, false); _callui_lock_manager_stop(ad->lock_handle); ad->on_background = true; //}