[icon] Fix API names to conform to upstream, add compat code
authorMike McCormack <mj.mccormack@samsung.com>
Mon, 7 Nov 2011 07:39:20 +0000 (16:39 +0900)
committerMike McCormack <mj.mccormack@samsung.com>
Mon, 7 Nov 2011 07:43:50 +0000 (16:43 +0900)
src/lib/Elementary.h.in
src/lib/elm_icon.c

index b95715f..6e04294 100644 (file)
@@ -4938,7 +4938,7 @@ extern "C" {
     * elm_icon_animated_XXX APIs won't work.
     * @ingroup Icon
     */
-   EAPI Eina_Bool             elm_icon_anim_available_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EAPI Eina_Bool           elm_icon_animated_available_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
    /**
     * Set animation mode of the icon.
     *
@@ -4953,7 +4953,7 @@ extern "C" {
     * Set it to EINA_TRUE when the icon needs to be animated.
     * @ingroup Icon
     */
-   EAPI void                  elm_icon_anim_set(Evas_Object *obj, Eina_Bool anim) EINA_ARG_NONNULL(1);
+   EAPI void                elm_icon_animated_set(Evas_Object *obj, Eina_Bool animated) EINA_ARG_NONNULL(1);
    /**
     * Get animation mode of the icon.
     *
@@ -4962,7 +4962,7 @@ extern "C" {
     * @see elm_icon_animated_set
     * @ingroup Icon
     */
-   EAPI Eina_Bool             elm_icon_anim_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EAPI Eina_Bool           elm_icon_animated_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
    /**
     * Set animation play mode of the icon.
     *
@@ -4979,7 +4979,7 @@ extern "C" {
     *    Then animation will be stopped and vice versa
     * @ingroup Icon
     */
-   EAPI void                  elm_icon_anim_play_set(Evas_Object *obj, Eina_Bool play) EINA_ARG_NONNULL(1);
+   EAPI void                elm_icon_animated_play_set(Evas_Object *obj, Eina_Bool play) EINA_ARG_NONNULL(1);
    /**
     * Get animation play mode of the icon.
     *
@@ -4989,7 +4989,28 @@ extern "C" {
     * @see elm_icon_animated_play_get
     * @ingroup Icon
     */
-   EAPI Eina_Bool             elm_icon_anim_play_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+   EAPI Eina_Bool           elm_icon_animated_play_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+   /* compatibility code to avoid API and ABI breaks */
+   EINA_DEPRECATED EAPI extern inline void elm_icon_anim_set(Evas_Object *obj, Eina_Bool animated)
+     {
+        elm_icon_animated_set(obj, animated);
+     }
+
+   EINA_DEPRECATED EAPI extern inline Eina_Bool elm_icon_anim_get(const Evas_Object *obj)
+     {
+        return elm_icon_animated_get(obj);
+     }
+
+   EINA_DEPRECATED EAPI extern inline void elm_icon_anim_play_set(Evas_Object *obj, Eina_Bool play)
+     {
+        elm_icon_animated_play_set(obj, play);
+     }
+
+   EINA_DEPRECATED EAPI extern inline Eina_Bool elm_icon_anim_play_get(const Evas_Object *obj)
+     {
+        return elm_icon_animated_play_get(obj);
+     }
 
    /**
     * @}
index f65c763..2cb18e5 100644 (file)
@@ -604,17 +604,8 @@ elm_icon_thumb_set(Evas_Object *obj, const char *file, const char *group)
 #endif
 }
 
-/**
- * Get the flag related with elm icon can support animation
- *
- * @param obj The icon object
- * @return The flag of animation available
- *
- *
- * @ingroup Icon
- */
 EAPI Eina_Bool
-elm_icon_anim_available_get(const Evas_Object *obj)
+elm_icon_animated_available_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    Evas_Object *img_obj ;
@@ -626,17 +617,8 @@ elm_icon_anim_available_get(const Evas_Object *obj)
    return evas_object_image_animated_get(img_obj);
 }
 
-/**
- * Set animation mode of the icon.
- *
- * @param obj The icon object
- * @param anim @c EINA_TRUE if the object do animation job,
- * @c EINA_FALSE otherwise. Default is @c EINA_FALSE.
- *
- * @ingroup Icon
- */
 EAPI void
-elm_icon_anim_set(Evas_Object *obj, Eina_Bool anim)
+elm_icon_animated_set(Evas_Object *obj, Eina_Bool anim)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Evas_Object *img_obj ;
@@ -663,16 +645,8 @@ elm_icon_anim_set(Evas_Object *obj, Eina_Bool anim)
    return;
 }
 
-/**
- * Get animation mode of the icon.
- *
- * @param obj The icon object
- * @return The animation mode of the icon object
- *
- * @ingroup Icon
- */
 EAPI Eina_Bool
-elm_icon_anim_get(const Evas_Object *obj)
+elm_icon_animated_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -680,17 +654,8 @@ elm_icon_anim_get(const Evas_Object *obj)
    return wd->anim;
 }
 
-/**
- * Set animation play mode of the icon.
- *
- * @param obj The icon object
- * @param play @c EINA_TRUE the object play animation images,
- * @c EINA_FALSE otherwise. Default is @c EINA_FALSE.
- *
- * @ingroup Icon
- */
 EAPI void
-elm_icon_anim_play_set(Evas_Object *obj, Eina_Bool play)
+elm_icon_animated_play_set(Evas_Object *obj, Eina_Bool play)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -714,16 +679,8 @@ elm_icon_anim_play_set(Evas_Object *obj, Eina_Bool play)
 
 }
 
-/**
- * Get animation play mode of the icon.
- *
- * @param obj The icon object
- * @return The play mode of the icon object
- *
- * @ingroup Icon
- */
 EAPI Eina_Bool
-elm_icon_anim_play_get(const Evas_Object *obj)
+elm_icon_animated_play_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -731,6 +688,37 @@ elm_icon_anim_play_get(const Evas_Object *obj)
    return wd->play;
 }
 
+/* compatibility code to prevent ABI break */
+EAPI Eina_Bool
+elm_icon_anim_available_get(const Evas_Object *obj)
+{
+  return elm_icon_animated_available_get(obj);
+}
+
+EAPI void
+elm_icon_anim_set(Evas_Object *obj, Eina_Bool anim)
+{
+  elm_icon_animated_set(obj, anim);
+}
+
+EAPI Eina_Bool
+elm_icon_anim_get(const Evas_Object *obj)
+{
+  return elm_icon_animated_get(obj);
+}
+
+EAPI void
+elm_icon_anim_play_set(Evas_Object *obj, Eina_Bool play)
+{
+  elm_icon_animated_play_set(obj, play);
+}
+
+EAPI Eina_Bool
+elm_icon_anim_play_get(const Evas_Object *obj)
+{
+  return elm_icon_animated_play_get(obj);
+}
+
 static Eina_Bool
 _icon_standard_set(Widget_Data *wd, Evas_Object *obj, const char *name)
 {