remove old code 51/43951/2
authorjunkyu.han <junkyu.han@samsung.com>
Wed, 15 Jul 2015 13:01:00 +0000 (22:01 +0900)
committerjunkyu.han <junkyu.han@samsung.com>
Thu, 16 Jul 2015 05:13:39 +0000 (14:13 +0900)
Change-Id: I7fa2bbe05a979e29a4d11e68331c296bdef792f2

src/control.c
src/main.c
src/view.c

index ccdc752..4978f40 100755 (executable)
@@ -459,37 +459,18 @@ volume_error_e volume_control_hide_view(void)
 
        _D("Start closing volume view");
 
+       int ret = 0;
+       int ret1 = 0;
        int i = 0;
        int count_grabed = volume_key_event_count_grabed_get();
 
-       //Ecore_X_Window input_win = volume_key_event_input_window_get();
-       //retv_if(!input_win, VOLUME_ERROR_FAIL);
-
        control_info.is_deleting = EINA_TRUE;
 
-       /* unregister outer event handler */
-       /*if(VOLUME_ERROR_OK != volume_x_input_event_unregister())
-       {
-               _E("Failed to unregister x input event handler");
-//             control_info.is_deleting = EINA_FALSE;
-//             return VOLUME_ERROR_FAIL;
-       }*/
-
-       /*for (i = 0; i < count_grabed; i++) {
-               if (VOLUME_ERROR_OK != volume_key_event_key_ungrab()) {
-                       _E("Failed to ungrab key");
-                       continue;
-               }
-               _D("ungrab key : %d/%d", i+1, count_grabed);
-       }*/
-       //elm_win_keygrab_unset(volume_view_win_get(), KEY_VOLUMEUP, 0, 0);
-       //elm_win_keygrab_unset(volume_view_win_get(), KEY_VOLUMEDOWN, 0, 0);
+       elm_win_keygrab_unset(volume_view_win_get(), KEY_VOLUMEUP, 0, 0);
+       elm_win_keygrab_unset(volume_view_win_get(), KEY_VOLUMEDOWN, 0, 0);
        volume_key_event_count_grabed_set(0);
-       /*if (VOLUME_ERROR_OK != volume_key_event_key_grab(input_win, SHARED_GRAB)) {
-               _E("Failed to grab key : SHARED_GRAB");
-       }*/
-       //elm_win_keygrab_set(volume_view_win_get(), KEY_VOLUMEUP, 0, 0, 0, ELM_WIN_KEYGRAB_SHARED);
-       //elm_win_keygrab_set(volume_view_win_get(), KEY_VOLUMEDOWN, 0, 0, 0, ELM_WIN_KEYGRAB_SHARED);
+       ret = elm_win_keygrab_set(volume_view_win_get(), KEY_VOLUMEUP, 0, 0, 0, ELM_WIN_KEYGRAB_SHARED);
+       ret1 = elm_win_keygrab_set(volume_view_win_get(), KEY_VOLUMEDOWN, 0, 0, 0, ELM_WIN_KEYGRAB_SHARED);
 
        volume_timer_del(TYPE_TIMER_SU);
        volume_timer_del(TYPE_TIMER_SD);
@@ -637,12 +618,6 @@ volume_error_e volume_control_initialize(void)
        Evas_Object *win = volume_view_window_create();
        retv_if(!win, VOLUME_ERROR_FAIL);
 
-       /* Create input_window */
-       /*if(VOLUME_ERROR_OK != volume_key_event_input_window_create()) {
-               _E("Failed to create input window");
-               return VOLUME_ERROR_FAIL;
-       }*/
-
        /* Create volume layout */
        if(VOLUME_ERROR_OK != volume_view_layout_create(win)) {
                _E("Failed to create volume layout");
@@ -725,7 +700,7 @@ static void _rotate_changed_cb(void *data, Evas_Object *obj, void *event_info)
                        break;
                }
 
-               //volume_x_input_event_shape(obj, control_info.is_warning_visible);
+               //volume_x_input_eddddent_shape(obj, control_info.is_warning_visible);
        }
 }
 
@@ -748,9 +723,14 @@ static void _control_set_window_rotation(Evas_Object *win)
 
 static Eina_Bool _idler_top_position_grab(void *data)
 {
-       //volume_key_event_key_grab(-1, TOP_POSITION_GRAB);
-       elm_win_keygrab_set(volume_view_win_get(), KEY_VOLUMEUP, 0, 0, 0, ELM_WIN_KEYGRAB_TOPMOST);
-       elm_win_keygrab_set(volume_view_win_get(), KEY_VOLUMEDOWN, 0, 0, 0, ELM_WIN_KEYGRAB_TOPMOST);
+       Evas_Object *win = NULL;
+       _D("Unset shared keygrab");
+
+       win = volume_view_win_get();
+       elm_win_keygrab_unset(win, KEY_VOLUMEUP, 0, 0);
+       elm_win_keygrab_unset(win, KEY_VOLUMEDOWN, 0, 0);
+       elm_win_keygrab_set(win, KEY_VOLUMEUP, 0, 0, 0, ELM_WIN_KEYGRAB_TOPMOST);
+       elm_win_keygrab_set(win, KEY_VOLUMEDOWN, 0, 0, 0, ELM_WIN_KEYGRAB_TOPMOST);
 
        return ECORE_CALLBACK_CANCEL;
 }
@@ -807,13 +787,13 @@ static void _idle_lock_state_vconf_changed_cb(keynode_t *key, void *data)
        }
        _D("idle lock state : %d", lock);
 
-       /*if(lock == VCONFKEY_IDLE_LAUNCHING_LOCK)
+       if(lock == VCONFKEY_IDLE_LAUNCHING_LOCK)
        {
                if(VOLUME_ERROR_OK != volume_view_window_hide())
                {
                        _E("Failed to hide window");
                }
-       }*/
+       }
 }
 
 static void _notify_pm_lcdoff_cb(keynode_t * node, void *data)
index 0235549..31515d8 100755 (executable)
@@ -38,7 +38,6 @@ static void _changed_language(app_event_info_h event_info, void *user_data);
 
 int main(int argc, char *argv[])
 {
-       _D(">>>>>>>>>>>>>>>>>>>>>>>>>> main >>>>>>>>>>>>>>>>");
        int ret = 0;
 
        ui_app_lifecycle_callback_s lifecycle_callback = {0,};
@@ -65,7 +64,6 @@ int main(int argc, char *argv[])
 
 static bool _create_app(void *user_data)
 {
-       _D(">>>>>>>>>>>>>>>>>>>>>>>>> create app >>>>>>>>>>>>>>>>>>>>");
        elm_app_base_scale_set(1.8);
        /* Initialize feedback */
        //feedback_initialize();
index 867cec0..ead8ced 100755 (executable)
@@ -292,8 +292,9 @@ Evas_Object *add_slider(Evas_Object *parent, int min, int max, int val)
 
 volume_error_e volume_view_window_show(void)
 {
+       _D("Volume view window SHOW");
        evas_object_show(view_info.win);
-       elm_object_signal_emit(view_info.ly_outer, "show_effect", "clipper");
+       elm_win_iconified_set(view_info.win, EINA_FALSE);
        volume_view_setting_icon_callback_add();
 
        return VOLUME_ERROR_OK;
@@ -301,7 +302,8 @@ volume_error_e volume_view_window_show(void)
 
 volume_error_e volume_view_window_hide(void)
 {
-       elm_object_signal_emit(view_info.ly_outer, "hide_effect", "clipper");
+       _D("Volume view window HIDE");
+       elm_win_iconified_set(view_info.win, EINA_TRUE);
        volume_view_setting_icon_callback_del();
 
        return VOLUME_ERROR_OK;
@@ -365,7 +367,6 @@ volume_error_e volume_view_layout_create(Evas_Object *win)
 
 Evas_Object *add_volume_window(const char *name)
 {
-       _D(">>>>>>>>>>>>>>>>>>>>>>>>>> add volume window >>>>>>>>>>>>>>>>>>");
        Evas_Object *eo = NULL;
        Evas *evas = NULL;
        int x, y, w, h = 0;
@@ -390,13 +391,16 @@ Evas_Object *add_volume_window(const char *name)
 
 Evas_Object *volume_view_window_create(void)
 {
-       _D(">>>>>>>>>>>>>>>>>>>>>>>>>>> view win create >>>>>>>>>>>>>>>>>>>");
+       int ret = 0;
+       int ret1 = 0;
        Evas_Object *win = add_volume_window(PACKAGE);
        retv_if(!win, NULL);
 
        view_info.win = win;
-       elm_win_keygrab_set(win, KEY_VOLUMEUP, 0, 0, 0, ELM_WIN_KEYGRAB_SHARED);
-       elm_win_keygrab_set(win, KEY_VOLUMEDOWN, 0, 0, 0, ELM_WIN_KEYGRAB_SHARED);
+       ret = elm_win_keygrab_set(win, KEY_VOLUMEUP, 0, 0, 0, ELM_WIN_KEYGRAB_SHARED);
+       ret1 = elm_win_keygrab_set(win, KEY_VOLUMEDOWN, 0, 0, 0, ELM_WIN_KEYGRAB_SHARED);
+       _D("keygrab ret: %d, ret1: %d", ret, ret1);
+       elm_win_iconified_set(win, EINA_TRUE);
 
        return win;
 }