[elementary] change API name from _scale_set to _resizable_set in
authorWooHyun Jung <woohyun0705@gmail.com>
Mon, 5 Mar 2012 13:36:01 +0000 (13:36 +0000)
committerWooHyun Jung <woohyun0705@gmail.com>
Mon, 5 Mar 2012 13:36:01 +0000 (13:36 +0000)
elm_image + elm_icon.

SVN revision: 68719

src/lib/elc_hoversel.c
src/lib/elm_deprecated.h
src/lib/elm_diskselector.h
src/lib/elm_icon.c
src/lib/elm_icon.h
src/lib/elm_image.c
src/lib/elm_image.h
src/lib/elm_list.h
src/lib/elm_map.c
src/lib/elm_segment_control.h
src/lib/elm_store.c

index cd5743d..779fb24 100644 (file)
@@ -201,7 +201,7 @@ _activate(Evas_Object *obj)
         if (item->icon_file)
           {
              ic = elm_icon_add(obj);
-             elm_icon_scale_set(ic, 0, 1);
+             elm_icon_resizable_set(ic, EINA_FALSE, EINA_TRUE);
              if (item->icon_type == ELM_ICON_FILE)
                elm_icon_file_set(ic, item->icon_file, item->icon_group);
              else if (item->icon_type == ELM_ICON_STANDARD)
index 5a9add8..4eeae63 100644 (file)
@@ -4785,5 +4785,72 @@ EINA_DEPRECATED EAPI void             elm_theme_all_set(const char *theme);
 EINA_DEPRECATED EAPI Evas_Object                 *elm_conformant_content_area_get(const Evas_Object *obj);
 
 /**
+ * Set if the object is (up/down) resizeable.
+ *
+ * @param obj The image object
+ * @param scale_up A bool to set if the object is resizeable up. Default is
+ * @c EINA_TRUE.
+ * @param scale_down A bool to set if the object is resizeable down. Default
+ * is @c EINA_TRUE.
+ *
+ * This function limits the image resize ability. If @p scale_up is set to
+ * @c EINA_FALSE, the object can't have its height or width resized to a value
+ * higher than the original image size. Same is valid for @p scale_down.
+ *
+ * @see elm_image_scale_get()
+ * @deprecated Please use elm_image_resizable_set()
+ *
+ * @ingroup Image
+ */
+EINA_DEPRECATED EAPI void             elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down);
+
+/**
+ * Get if the object is (up/down) resizeable.
+ *
+ * @param obj The image object
+ * @param scale_up A bool to set if the object is resizeable up
+ * @param scale_down A bool to set if the object is resizeable down
+ *
+ * @see elm_image_scale_set()
+ * @deprecated Please use elm_image_resizable_get()
+ *
+ * @ingroup Image
+ */
+EINA_DEPRECATED EAPI void             elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down);
+
+/**
+ * Set if the object is (up/down) resizeable.
+ *
+ * @param obj The icon object
+ * @param scale_up A bool to set if the object is resizeable up. Default is
+ * @c EINA_TRUE.
+ * @param scale_down A bool to set if the object is resizeable down. Default
+ * is @c EINA_TRUE.
+ *
+ * This function limits the icon object resize ability. If @p scale_up is set to
+ * @c EINA_FALSE, the object can't have its height or width resized to a value
+ * higher than the original icon size. Same is valid for @p scale_down.
+ *
+ * @see elm_icon_scale_get()
+ * @deprecated Please use elm_icon_resizable_set()
+ *
+ * @ingroup Icon
+ */
+EINA_DEPRECATED EAPI void                  elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down);
+
+/**
+ * Get if the object is (up/down) resizeable.
+ *
+ * @param obj The icon object
+ * @param scale_up A bool to set if the object is resizeable up
+ * @param scale_down A bool to set if the object is resizeable down
+ *
+ * @see elm_icon_scale_set()
+ * @deprecated Please use elm_icon_resizable_get()
+ *
+ * @ingroup Icon
+ */
+EINA_DEPRECATED EAPI void                  elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down);
+/**
  * @}
  */
index adfa256..2522dec 100644 (file)
@@ -286,7 +286,7 @@ EAPI const Eina_List       *elm_diskselector_items_get(const Evas_Object *obj);
  * disk = elm_diskselector_add(win);
  * ic = elm_icon_add(win);
  * elm_icon_file_set(ic, "path/to/image", NULL);
- * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE);
+ * elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
  * elm_diskselector_item_append(disk, "label", ic, NULL, NULL);
  * @endcode
  *
index 75bdfc7..d34fd04 100644 (file)
@@ -891,26 +891,38 @@ elm_icon_no_scale_get(const Evas_Object *obj)
    return wd->no_scale;
 }
 
-EAPI void
+EINA_DEPRECATED EAPI void
 elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down)
 {
+   elm_icon_resizable_set(obj, scale_up, scale_down);
+}
+
+EINA_DEPRECATED EAPI void
+elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down)
+{
+   elm_icon_resizable_get(obj, scale_up, scale_down);
+}
+
+EAPI void
+elm_icon_resizable_set(Evas_Object *obj, Eina_Bool size_up, Eina_Bool size_down)
+{
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
 
    if (!wd) return;
-   wd->scale_up = scale_up;
-   wd->scale_down = scale_down;
+   wd->scale_up = size_up;
+   wd->scale_down = size_down;
    if (!wd->in_eval) _sizing_eval(obj);
 }
 
 EAPI void
-elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down)
+elm_icon_resizable_get(const Evas_Object *obj, Eina_Bool *size_up, Eina_Bool *size_down)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if (scale_up) *scale_up = wd->scale_up;
-   if (scale_down) *scale_down = wd->scale_down;
+   if (size_up) *size_up = wd->scale_up;
+   if (size_down) *size_down = wd->scale_down;
 }
 
 EAPI void
index 8abdba2..0e835ed 100644 (file)
@@ -271,10 +271,10 @@ EAPI Eina_Bool             elm_icon_smooth_get(const Evas_Object *obj);
  * This function disables scaling of the icon object through the function
  * elm_object_scale_set(). However, this does not affect the object
  * size/resize in any way. For that effect, take a look at
- * elm_icon_scale_set().
+ * elm_icon_resizable_set().
  *
  * @see elm_icon_no_scale_get()
- * @see elm_icon_scale_set()
+ * @see elm_icon_resizable_set()
  * @see elm_object_scale_set()
  *
  * @ingroup Icon
@@ -297,33 +297,33 @@ EAPI Eina_Bool             elm_icon_no_scale_get(const Evas_Object *obj);
  * Set if the object is (up/down) resizeable.
  *
  * @param obj The icon object
- * @param scale_up A bool to set if the object is resizeable up. Default is
+ * @param size_up A bool to set if the object is resizeable up. Default is
  * @c EINA_TRUE.
- * @param scale_down A bool to set if the object is resizeable down. Default
+ * @param size_down A bool to set if the object is resizeable down. Default
  * is @c EINA_TRUE.
  *
- * This function limits the icon object resize ability. If @p scale_up is set to
+ * This function limits the icon object resize ability. If @p size_up is set to
  * @c EINA_FALSE, the object can't have its height or width resized to a value
- * higher than the original icon size. Same is valid for @p scale_down.
+ * higher than the original icon size. Same is valid for @p size_down.
  *
- * @see elm_icon_scale_get()
+ * @see elm_icon_resizable_get()
  *
  * @ingroup Icon
  */
-EAPI void                  elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down);
+EAPI void                  elm_icon_resizable_set(Evas_Object *obj, Eina_Bool size_up, Eina_Bool size_down);
 
 /**
  * Get if the object is (up/down) resizeable.
  *
  * @param obj The icon object
- * @param scale_up A bool to set if the object is resizeable up
- * @param scale_down A bool to set if the object is resizeable down
+ * @param size_up A bool to set if the object is resizeable up
+ * @param size_down A bool to set if the object is resizeable down
  *
- * @see elm_icon_scale_set()
+ * @see elm_icon_resizable_set()
  *
  * @ingroup Icon
  */
-EAPI void                  elm_icon_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down);
+EAPI void                  elm_icon_resizable_get(const Evas_Object *obj, Eina_Bool *size_up, Eina_Bool *size_down);
 
 /**
  * Get the object's image size
index 18bdc80..d586d92 100644 (file)
@@ -211,26 +211,38 @@ elm_image_no_scale_get(const Evas_Object *obj)
    return wd->no_scale;
 }
 
-EAPI void
+EINA_DEPRECATED EAPI void
 elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down)
 {
+   elm_image_resizable_set(obj, scale_up, scale_down);
+}
+
+EINA_DEPRECATED EAPI void
+elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down)
+{
+   elm_image_resizable_get(obj, scale_up, scale_down);
+}
+
+EAPI void
+elm_image_resizable_set(Evas_Object *obj, Eina_Bool size_up, Eina_Bool size_down)
+{
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
 
    if (!wd) return;
-   wd->scale_up = scale_up;
-   wd->scale_down = scale_down;
+   wd->scale_up = size_up;
+   wd->scale_down = size_down;
    _sizing_eval(obj);
 }
 
 EAPI void
-elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down)
+elm_image_resizable_get(const Evas_Object *obj, Eina_Bool *size_up, Eina_Bool *size_down)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if (scale_up) *scale_up = wd->scale_up;
-   if (scale_down) *scale_down = wd->scale_down;
+   if (size_up) *size_up = wd->scale_up;
+   if (size_down) *size_down = wd->scale_down;
 }
 
 EAPI void
index c8a0c69..fe37a88 100644 (file)
@@ -148,10 +148,10 @@ EAPI void             elm_image_object_size_get(const Evas_Object *obj, int *w,
  * This function disables scaling of the elm_image widget through the
  * function elm_object_scale_set(). However, this does not affect the widget
  * size/resize in any way. For that effect, take a look at
- * elm_image_scale_set().
+ * elm_image_resizable_set().
  *
  * @see elm_image_no_scale_get()
- * @see elm_image_scale_set()
+ * @see elm_image_resizable_set()
  * @see elm_object_scale_set()
  *
  * @ingroup Image
@@ -174,35 +174,33 @@ EAPI Eina_Bool        elm_image_no_scale_get(const Evas_Object *obj);
  * Set if the object is (up/down) resizeable.
  *
  * @param obj The image object
- * @param scale_up A bool to set if the object is resizeable up. Default is
+ * @param size_up A bool to set if the object is resizeable up. Default is
  * @c EINA_TRUE.
- * @param scale_down A bool to set if the object is resizeable down. Default
+ * @param size_down A bool to set if the object is resizeable down. Default
  * is @c EINA_TRUE.
  *
- * This function limits the image resize ability. If @p scale_up is set to
+ * This function limits the image resize ability. If @p size_up is set to
  * @c EINA_FALSE, the object can't have its height or width resized to a value
- * higher than the original image size. Same is valid for @p scale_down.
+ * higher than the original image size. Same is valid for @p size_down.
  *
- * @see elm_image_scale_get()
+ * @see elm_image_resizable_get()
  *
  * @ingroup Image
  */
-//XXX: elm_image_resizable_set
-EAPI void             elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down);
+EAPI void             elm_image_resizable_set(Evas_Object *obj, Eina_Bool size_up, Eina_Bool size_down);
 
 /**
  * Get if the object is (up/down) resizeable.
  *
  * @param obj The image object
- * @param scale_up A bool to set if the object is resizeable up
- * @param scale_down A bool to set if the object is resizeable down
+ * @param size_up A bool to set if the object is resizeable up
+ * @param size_down A bool to set if the object is resizeable down
  *
- * @see elm_image_scale_set()
+ * @see elm_image_resizable_set()
  *
  * @ingroup Image
  */
-//XXX: elm_image_resizable_get
-EAPI void             elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down);
+EAPI void             elm_image_resizable_get(const Evas_Object *obj, Eina_Bool *size_up, Eina_Bool *size_down);
 
 /**
  * Set if the image fills the entire object area, when keeping the aspect ratio.
index b348b2b..43f23be 100644 (file)
@@ -363,7 +363,7 @@ EAPI void                         elm_list_scroller_policy_get(const Evas_Object
  * li = elm_list_add(win);
  * ic = elm_icon_add(win);
  * elm_icon_file_set(ic, "path/to/image", NULL);
- * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE);
+ * elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
  * elm_list_item_append(li, "label", ic, NULL, NULL, NULL);
  * elm_list_go(li);
  * evas_object_show(li);
index 0c90c6d..bc46a7a 100644 (file)
@@ -1974,7 +1974,7 @@ _icon_dup(Evas_Object *icon, Evas_Object *parent)
    if (!icon || !parent) return NULL;
    // Evas_Object do not support object duplication??
    const char *file = NULL, *group = NULL;
-   Eina_Bool scale_up, scale_down;
+   Eina_Bool size_up, size_down;
 
    Evas_Object *dup = elm_icon_add(parent);
    elm_icon_file_get(icon, &file, &group);
@@ -1984,8 +1984,8 @@ _icon_dup(Evas_Object *icon, Evas_Object *parent)
    elm_icon_standard_set(dup, elm_icon_standard_get(icon));
    elm_icon_order_lookup_set(dup, elm_icon_order_lookup_get(icon));
    elm_icon_no_scale_set(dup, elm_icon_no_scale_get(icon));
-   elm_icon_scale_get(icon, &scale_up, &scale_down);
-   elm_icon_scale_set(dup, scale_up, scale_down);
+   elm_icon_resizable_get(icon, &size_up, &size_down);
+   elm_icon_resizable_set(dup, size_up, size_down);
    elm_icon_fill_outside_set(dup, elm_icon_fill_outside_get(icon));
    elm_icon_prescale_set(dup, elm_icon_prescale_get(icon));
    elm_icon_aspect_fixed_set(dup, elm_icon_aspect_fixed_get(icon));
index e7e6953..45f5c6f 100644 (file)
@@ -96,7 +96,7 @@ EAPI Evas_Object      *elm_segment_control_add(Evas_Object *parent);
  * sc = elm_segment_control_add(win);
  * ic = elm_icon_add(win);
  * elm_icon_file_set(ic, "path/to/image", NULL);
- * elm_icon_scale_set(ic, EINA_TRUE, EINA_TRUE);
+ * elm_icon_resizable_set(ic, EINA_TRUE, EINA_TRUE);
  * elm_segment_control_item_add(sc, ic, "label");
  * evas_object_show(sc);
  * @endcode
index 61e1548..720056b 100644 (file)
@@ -315,7 +315,7 @@ _store_item_content_get(void *data, Evas_Object *obj, const char *part)
                                                     m->details.icon.h);
                    elm_icon_smooth_set(ic, m->details.icon.smooth);
                    elm_icon_no_scale_set(ic, m->details.icon.no_scale);
-                   elm_icon_scale_set(ic,
+                   elm_icon_resizable_set(ic,
                                       m->details.icon.scale_up,
                                       m->details.icon.scale_down);
                    if (s)