jypark pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=44d6506b8a9bc492536f1207fbdc187e879acd88

commit 44d6506b8a9bc492536f1207fbdc187e879acd88
Author: Ji-Youn Park <jy0703.p...@samsung.com>
Date:   Mon Apr 11 21:44:31 2016 +0830

    Elm_icon: move thumb_set API from eo to legacy.
---
 src/lib/elementary/elm_icon.c        | 57 +++++++++++++++++++-----------------
 src/lib/elementary/elm_icon.eo       | 18 ------------
 src/lib/elementary/elm_icon_legacy.h | 15 ++++++++++
 3 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/src/lib/elementary/elm_icon.c b/src/lib/elementary/elm_icon.c
index 466ab9d..d1595b6 100644
--- a/src/lib/elementary/elm_icon.c
+++ b/src/lib/elementary/elm_icon.c
@@ -706,33 +706,6 @@ elm_icon_file_get(const Evas_Object *obj,
    elm_image_file_get(obj, file, group);
 }
 
-EOLIAN static void
-_elm_icon_thumb_set(Eo *obj, Elm_Icon_Data *sd, const char *file, const char 
*group)
-{
-   evas_object_event_callback_del_full
-     (obj, EVAS_CALLBACK_RESIZE, _elm_icon_standard_resize_cb, obj);
-   evas_object_event_callback_del_full
-     (obj, EVAS_CALLBACK_RESIZE, _elm_icon_thumb_resize_cb, obj);
-
-   evas_object_event_callback_add
-     (obj, EVAS_CALLBACK_RESIZE, _elm_icon_thumb_resize_cb, obj);
-
-   eina_stringshare_replace(&sd->thumb.file.path, file);
-   eina_stringshare_replace(&sd->thumb.file.key, group);
-
-   if (elm_thumb_ethumb_client_connected_get())
-     {
-        _icon_thumb_apply(sd);
-        return;
-     }
-
-   if (!sd->thumb.eeh)
-     {
-        sd->thumb.eeh = ecore_event_handler_add
-            (ELM_ECORE_EVENT_ETHUMB_CONNECT, _icon_thumb_apply_cb, obj);
-     }
-}
-
 EAPI Eina_Bool
 elm_icon_animated_available_get(const Evas_Object *obj)
 {
@@ -951,4 +924,34 @@ _elm_icon_class_constructor(Eo_Class *klass)
    evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
 }
 
+EAPI void
+elm_icon_thumb_set(Evas_Object *obj, const char *file, const char *group)
+{
+   ELM_ICON_CHECK(obj);
+   ELM_ICON_DATA_GET(obj, sd)
+
+   evas_object_event_callback_del_full
+     (obj, EVAS_CALLBACK_RESIZE, _elm_icon_standard_resize_cb, obj);
+   evas_object_event_callback_del_full
+     (obj, EVAS_CALLBACK_RESIZE, _elm_icon_thumb_resize_cb, obj);
+
+   evas_object_event_callback_add
+     (obj, EVAS_CALLBACK_RESIZE, _elm_icon_thumb_resize_cb, obj);
+
+   eina_stringshare_replace(&sd->thumb.file.path, file);
+   eina_stringshare_replace(&sd->thumb.file.key, group);
+
+   if (elm_thumb_ethumb_client_connected_get())
+     {
+        _icon_thumb_apply(sd);
+        return;
+     }
+
+   if (!sd->thumb.eeh)
+     {
+        sd->thumb.eeh = ecore_event_handler_add
+            (ELM_ECORE_EVENT_ETHUMB_CONNECT, _icon_thumb_apply_cb, obj);
+     }
+}
+
 #include "elm_icon.eo.c"
diff --git a/src/lib/elementary/elm_icon.eo b/src/lib/elementary/elm_icon.eo
index 421d0d0..146c5b3 100644
--- a/src/lib/elementary/elm_icon.eo
+++ b/src/lib/elementary/elm_icon.eo
@@ -79,24 +79,6 @@ class Elm.Icon (Elm.Image)
             name: const(char)*; [[The icon name]]
          }
       }
-      @property thumb {
-         set {
-            [[Set the file that will be used, but use a generated thumbnail.
-
-              This functions like elm_image_file_set() but requires the Ethumb
-              library support to be enabled successfully with $elm_need_ethumb.
-              When set the file indicated has a thumbnail generated and cached
-              on disk for future use or will directly use an existing cached
-              thumbnail if it is valid.
-            ]]
-         }
-         values {
-            file: const(char)* @nullable; [[The path to file that will be used
-                                            as icon image]]
-            group: const(char)* @optional; [[The group that the icon belongs
-                                             to an edje file]]
-         }
-      }
    }
    implements {
       class.constructor;
diff --git a/src/lib/elementary/elm_icon_legacy.h 
b/src/lib/elementary/elm_icon_legacy.h
index a034a68..5535329 100644
--- a/src/lib/elementary/elm_icon_legacy.h
+++ b/src/lib/elementary/elm_icon_legacy.h
@@ -10,4 +10,19 @@
  */
 EAPI Evas_Object          *elm_icon_add(Evas_Object *parent);
 
+/**
+ * @brief Set the file that will be used, but use a generated thumbnail.
+ *
+ * This functions like elm_image_file_set() but requires the Ethumb library
+ * support to be enabled successfully with @c elm_need_ethumb. When set the
+ * file indicated has a thumbnail generated and cached on disk for future use
+ * or will directly use an existing cached thumbnail if it is valid.
+ *
+ * @param[in] file The path to file that will be used as icon image
+ * @param[in] group The group that the icon belongs to an edje file
+ *
+ * @ingroup Elm_Icon
+ */
+EAPI void elm_icon_thumb_set(Evas_Object *obj, const char *file, const char 
*group);
+
 #include "elm_icon.eo.legacy.h"
\ No newline at end of file

-- 


Reply via email to