remove __elm_product_theme_is_loaded 97/230297/1
authorHyukSoon Choi <hs619.choi@samsung.com>
Thu, 9 Apr 2020 07:40:58 +0000 (16:40 +0900)
committerHyukSoon Choi <hs619.choi@samsung.com>
Thu, 9 Apr 2020 07:41:02 +0000 (16:41 +0900)
Change-Id: I0035760aa080fa44e000b2f3f96b603099fe4624
Signed-off-by: HyukSoon Choi <hs619.choi@samsung.com>
src/wearable/circle/efl_extension_circle_object_genlist.c
src/wearable/circle/efl_extension_circle_object_scroller.c

index d1e660f30459704e97c7bdadae0c29a1d9b296ce..a1dae81be5aca65a00199703de2313741a460739 100644 (file)
@@ -119,7 +119,6 @@ static void _eext_circle_object_genlist_index_drag_cb(void *data,
 static void _eext_circle_object_genlist_scrollbar_show(Eext_Circle_Object *circle_obj);
 static Eina_Bool _eext_circle_object_genlist_change_flag_cb(void *);
 static Eina_Bool _eext_circle_object_genlist_scrollbar_first_show_cb(void *);
-extern Eina_Bool __elm_product_theme_is_loaded(void);
 
 static Evas_Event_Flags _index_layout_lines_end(void *data, void *event_info);
 static Evas_Event_Flags _index_layout_tap_end(void *data, void *event_info);
@@ -186,8 +185,6 @@ _eext_circle_object_genlist_index_hide(Eext_Circle_Object *circle_obj)
         EINA_LIST_FREE(widget_data->rotary_times, rotary_time)
           free(rotary_time);
 
-        if (!__elm_product_theme_is_loaded())
-          widget_data->index_selected_item = NULL;
         widget_data->rotary_count = 0;
         widget_data->current_phase = 0;
      }
@@ -574,8 +571,7 @@ _rotary_changed_cb(void *data,
         return EINA_TRUE;
      }
    //ONEUI1.5(04July2019): Support different color with bezel
-   if (__elm_product_theme_is_loaded())
-     widget_data->bezel_on = EINA_TRUE;
+   widget_data->bezel_on = EINA_TRUE;
    //
 
    if (obj == circle_obj->main_obj)
@@ -1462,8 +1458,7 @@ _eext_circle_object_genlist_drag_cb(void *data,
    y = ev->cur.canvas.y;
 
    //ONEUI1.5(04July2019): Support different color with bezel
-   if (__elm_product_theme_is_loaded())
-     widget_data->bezel_on = EINA_FALSE;
+   widget_data->bezel_on = EINA_FALSE;
    //
    if (!widget_data->handler_drag) return;
 
@@ -1800,13 +1795,10 @@ _eext_circle_object_genlist_del_cb(Eext_Circle_Object *circle_obj)
    //ONEUI1.5(19Jun2019): Enable sw/hw bezel
    if (!eext_rotary_event_is_enabled())
      {
-        if (__elm_product_theme_is_loaded())
-          {
-             evas_object_smart_callback_del_full(circle_obj->widget_object, SIG_REALIZED, _eext_circle_object_genlist_index_update_cb, circle_obj);
-             evas_object_smart_callback_del_full(circle_obj->widget_object, SIG_INDEX_SHOW, _eext_circle_object_genlist_index_show_cb, circle_obj);
-          }
+        evas_object_smart_callback_del_full(circle_obj->widget_object, SIG_REALIZED, _eext_circle_object_genlist_index_update_cb, circle_obj);
+        evas_object_smart_callback_del_full(circle_obj->widget_object, SIG_INDEX_SHOW, _eext_circle_object_genlist_index_show_cb, circle_obj);
      }
-
+   //
    edje_object_signal_callback_del(elm_layout_edje_get(circle_obj->widget_object), "color_class,set", widget_data->scrollbar_color_class, _eext_circle_object_genlist_change_color_signal_cb);
    edje_object_signal_callback_del(elm_layout_edje_get(circle_obj->widget_object), "color_class,set", widget_data->scrollbar_bg_color_class, _eext_circle_object_genlist_change_color_signal_cb);
    if (widget_data->scrollbar_color_class) eina_stringshare_del(widget_data->scrollbar_color_class);
@@ -1977,11 +1969,8 @@ _eext_circle_object_genlist_init(Eext_Circle_Object *circle_obj,
    //ONEUI1.5(19Jun2019): Enable sw/hw bezel
    if (!eext_rotary_event_is_enabled())
      {
-        if (__elm_product_theme_is_loaded())
-          {
-             evas_object_smart_callback_add(circle_obj->widget_object, SIG_REALIZED, _eext_circle_object_genlist_index_update_cb, circle_obj);
-             evas_object_smart_callback_add(circle_obj->widget_object, SIG_INDEX_SHOW, _eext_circle_object_genlist_index_show_cb, circle_obj);
-          }
+        evas_object_smart_callback_add(circle_obj->widget_object, SIG_REALIZED, _eext_circle_object_genlist_index_update_cb, circle_obj);
+        evas_object_smart_callback_add(circle_obj->widget_object, SIG_INDEX_SHOW, _eext_circle_object_genlist_index_show_cb, circle_obj);
      }
 
    edje_object_signal_callback_add(elm_layout_edje_get(circle_obj->widget_object), "color_class,set", widget_data->scrollbar_color_class, _eext_circle_object_genlist_change_color_signal_cb, circle_obj);
index 49e2b0a9dac75d55ec5617a1aad0834b9fcbc2ae..4dacb2772fbb32196442175f300fadc39df5f1ec 100644 (file)
@@ -106,12 +106,6 @@ extern Elm_Scrollable_Smart_Interface_Data* __elm_scrollable_smart_interface_dat
 
 #define STR_DUP(x) x ? (char *)eina_stringshare_add(x) : NULL
 
-Eina_Bool
-__elm_product_theme_is_loaded(void)
-{
-   return EINA_FALSE;
-}
-
 static Eina_Bool
 _eext_circle_object_scroller_mirror_mode_get(Eext_Circle_Object *obj)
 {
@@ -122,7 +116,7 @@ _eext_circle_object_scroller_mirror_mode_get(Eext_Circle_Object *obj)
    else if (obj->mirrored_state == EEXT_CIRCLE_MIRRORED_ON)
      is_mirrored = EINA_TRUE;
 
-   if(obj->widget_object)
+   if (obj->widget_object)
      is_mirrored = elm_object_mirrored_get(obj->widget_object);
 
    return is_mirrored;
@@ -634,8 +628,7 @@ _eext_circle_object_scroller_scroll_animatioin_stop_cb(void *data,
    int last_pagenumber_v = 0, last_pagenumber_h = 0;
    //ONEUI1.5(04JUL2019) : Change dot's color on bezel rotation
    Evas_Object *top_widget = NULL;
-   if (__elm_product_theme_is_loaded())
-     top_widget = elm_object_top_widget_get(scroller);
+   top_widget = elm_object_top_widget_get(scroller);
    //
 
    elm_scroller_last_page_get(scroller, &last_pagenumber_h, &last_pagenumber_v);
@@ -651,7 +644,7 @@ _eext_circle_object_scroller_scroll_animatioin_stop_cb(void *data,
                {
                   if ((sid->rotary_animation_info.current_page == 0) && (sid->rotary_animation_info.detent_count < 0))
                      sid->rotary_animation_info.detent_count = 0;
-                  else if((sid->rotary_animation_info.current_page == last_pagenumber_h)  && (sid->rotary_animation_info.detent_count > 0))
+                  else if ((sid->rotary_animation_info.current_page == last_pagenumber_h)  && (sid->rotary_animation_info.detent_count > 0))
                      sid->rotary_animation_info.detent_count = 0;
                   else
                     {
@@ -663,7 +656,7 @@ _eext_circle_object_scroller_scroll_animatioin_stop_cb(void *data,
 
                        if (pagenumber_h + sid->rotary_animation_info.detent_count < 0)
                          sid->rotary_animation_info.detent_count++;
-                       else if(pagenumber_h + sid->rotary_animation_info.detent_count > last_pagenumber_h)
+                       else if (pagenumber_h + sid->rotary_animation_info.detent_count > last_pagenumber_h)
                          sid->rotary_animation_info.detent_count--;
                     }
                }
@@ -699,7 +692,7 @@ _eext_circle_object_scroller_scroll_animatioin_stop_cb(void *data,
 
                        if (pagenumber_v + sid->rotary_animation_info.detent_count < 0)
                          sid->rotary_animation_info.detent_count++;
-                       else if(pagenumber_v + sid->rotary_animation_info.detent_count > last_pagenumber_v)
+                       else if (pagenumber_v + sid->rotary_animation_info.detent_count > last_pagenumber_v)
                          sid->rotary_animation_info.detent_count--;
                     }
                }
@@ -917,18 +910,15 @@ _eext_circle_object_scroller_deactivated_cb(void *data,
                                           Evas_Object *obj,
                                          void *event_info)
 {
-    if (__elm_product_theme_is_loaded())
-      {
-         Eext_Circle_Object *circle_obj = (Eext_Circle_Object *)data;
-         if(!circle_obj) return;
-
-         Evas_Object *scroller = circle_obj->widget_object;
-         if(!scroller) return;
-
-         Evas_Object *top_widget = elm_object_top_widget_get(scroller);
-         if (top_widget)
-           evas_object_data_del(top_widget, BEZEL_SCROLL);
-      }
+    Eext_Circle_Object *circle_obj = (Eext_Circle_Object *)data;
+    if (!circle_obj) return;
+
+    Evas_Object *scroller = circle_obj->widget_object;
+    if (!scroller) return;
+
+    Evas_Object *top_widget = elm_object_top_widget_get(scroller);
+    if (top_widget)
+      evas_object_data_del(top_widget, BEZEL_SCROLL);
 }
 
 static void
@@ -1027,17 +1017,13 @@ _mouse_move_cb(void *data,
    if (circle_obj->disabled) return;
 
    //ONEUI1.5(04July2019): Support different color with bezel
-   if (__elm_product_theme_is_loaded())
-     widget_data->bezel_on = EINA_FALSE;
+   widget_data->bezel_on = EINA_FALSE;
    //
 
    //ONEUI1.5(04JUL2019) : Change dot's color on bezel rotation
-   if (__elm_product_theme_is_loaded())
-     {
-        Evas_Object *top_widget = elm_object_top_widget_get(scroller);
-        if (top_widget)
-          evas_object_data_set(top_widget, BEZEL_SCROLL, (void*)1);
-     }
+   Evas_Object *top_widget = elm_object_top_widget_get(scroller);
+   if (top_widget)
+     evas_object_data_set(top_widget, BEZEL_SCROLL, (void*)1);
    //
    if (!widget_data->handler_drag) return;
 
@@ -1106,8 +1092,7 @@ _eext_circle_object_scroller_rotary_changed_cb(void *data,
    if (obj == circle_obj->main_obj)
      circle_obj->is_propagated = EINA_TRUE;
    //ONEUI1.5(04July2019): Support different color with bezel
-   if (__elm_product_theme_is_loaded())
-     widget_data->bezel_on = EINA_TRUE;
+   widget_data->bezel_on = EINA_TRUE;
    //
 
    if (circle_obj->mirrored_state == EEXT_CIRCLE_MIRRORED_CONFIG)
@@ -1151,12 +1136,11 @@ _eext_circle_object_scroller_rotary_changed_cb(void *data,
                {
                   //ONEUI1.5(04JUL2019) : Change dot's color on bezel rotation
                   Evas_Object *top_widget = NULL;
-                  if (__elm_product_theme_is_loaded())
-                    top_widget = elm_object_top_widget_get(scroller);
+                  top_widget = elm_object_top_widget_get(scroller);
                   //
                   if (!_eext_circle_object_scroller_can_scroll(sid, UP) && d < 0)
                     {
-                       if(!sid->loop_v)
+                       if (!sid->loop_v)
                          {
                             sid->rotary_animation_info.detent_count = 0;
                             edje_object_signal_emit(sid->edje_obj, "elm,edge,top,rotary,detented", "elm");
@@ -1172,7 +1156,7 @@ _eext_circle_object_scroller_rotary_changed_cb(void *data,
                     }
                   else if (!_eext_circle_object_scroller_can_scroll(sid, DOWN) && d > 0)
                     {
-                       if(!sid->loop_v)
+                       if (!sid->loop_v)
                          {
                             sid->rotary_animation_info.detent_count = 0;
                             edje_object_signal_emit(sid->edje_obj, "elm,edge,bottom,rotary,detented", "elm");
@@ -1186,9 +1170,9 @@ _eext_circle_object_scroller_rotary_changed_cb(void *data,
                             elm_scroller_page_bring_in(scroller, 0, pagenumber_v);
                          }
                     }
-                  else if((pagenumber_v >= 0) && (pagenumber_v <= last_pagenumber_v))
+                  else if ((pagenumber_v >= 0) && (pagenumber_v <= last_pagenumber_v))
                     {
-                         if(!sid->loop_v)
+                         if (!sid->loop_v)
                            {
                               sid->rotary_animation_info.detent_count += d;
                               //ONEUI1.5(04JUL2019) : Change dot's color on bezel rotation
@@ -1232,12 +1216,11 @@ _eext_circle_object_scroller_rotary_changed_cb(void *data,
                {
                   //ONEUI1.5(04JUL2019) : Change dot's color on bezel rotation
                   Evas_Object *top_widget = NULL;
-                  if (__elm_product_theme_is_loaded())
-                    top_widget = elm_object_top_widget_get(scroller);
+                  top_widget = elm_object_top_widget_get(scroller);
                   //
                   if (!_eext_circle_object_scroller_can_scroll(sid, LEFT) && mirroed_d < 0)
                     {
-                       if(!sid->loop_h)
+                       if (!sid->loop_h)
                          {
                             sid->rotary_animation_info.detent_count = 0;
                             edje_object_signal_emit(sid->edje_obj, "elm,edge,left,rotary,detented", "elm");
@@ -1253,7 +1236,7 @@ _eext_circle_object_scroller_rotary_changed_cb(void *data,
                     }
                   else if (!_eext_circle_object_scroller_can_scroll(sid, RIGHT) && mirroed_d > 0)
                     {
-                       if(!sid->loop_h)
+                       if (!sid->loop_h)
                          {
                             sid->rotary_animation_info.detent_count = 0;
                             edje_object_signal_emit(sid->edje_obj, "elm,edge,right,rotary,detented", "elm");
@@ -1267,7 +1250,7 @@ _eext_circle_object_scroller_rotary_changed_cb(void *data,
                             elm_scroller_page_bring_in(scroller, pagenumber_h, 0);
                          }
                     }
-                  else if((pagenumber_h >= 0) && (pagenumber_h <= last_pagenumber_h))
+                  else if ((pagenumber_h >= 0) && (pagenumber_h <= last_pagenumber_h))
                     {
                        if (is_mirrored == elm_object_mirrored_get(scroller))
                           sid->rotary_animation_info.detent_count += d;