aspect_ratio_retained -> aspect_fixed
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 6 Jan 2012 05:55:51 +0000 (05:55 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 6 Jan 2012 05:55:51 +0000 (05:55 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@66926 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

doc/examples.dox
src/examples/image_example_01.c
src/lib/elm_image.c
src/lib/elm_image.h
src/lib/elm_photo.c
src/lib/els_icon.c
src/lib/els_icon.h

index bf4598c..37a73b6 100644 (file)
   * elm_image_orient_set() is used to flip the image around the (1, 0) (0, 1)
   * diagonal.
   *
-  * elm_image_aspect_ratio_retained_set() is used to keep the original aspect
+  * elm_image_aspect_fixed_set() is used to keep the original aspect
   * ratio of the image, even when the window is resized to another aspect ratio.
   *
   * elm_image_fill_outside_set() is used to ensure that the image will fill the
index 26321bf..95f371a 100644 (file)
@@ -39,7 +39,7 @@ elm_main(int argc __UNUSED__, char **argv __UNUSED__)
    elm_image_scale_set(image, EINA_FALSE, EINA_TRUE);
    elm_image_smooth_set(image, EINA_FALSE);
    elm_image_orient_set(image, ELM_IMAGE_FLIP_HORIZONTAL);
-   elm_image_aspect_ratio_retained_set(image, EINA_TRUE);
+   elm_image_aspect_fixed_set(image, EINA_TRUE);
    elm_image_fill_outside_set(image, EINA_TRUE);
    elm_image_editable_set(image, EINA_TRUE);
 
index 333fd29..40e50fc 100644 (file)
@@ -322,21 +322,21 @@ elm_image_object_get(const Evas_Object *obj)
 }
 
 EAPI void
-elm_image_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained)
+elm_image_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   return _els_smart_icon_aspect_ratio_retained_set(wd->img, retained);
+   return _els_smart_icon_aspect_fixed_set(wd->img, fixed);
 }
 
 EAPI Eina_Bool
-elm_image_aspect_ratio_retained_get(const Evas_Object *obj)
+elm_image_aspect_fixed_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return EINA_FALSE;
-   return _els_smart_icon_aspect_ratio_retained_get(wd->img);
+   return _els_smart_icon_aspect_fixed_get(wd->img);
 }
 
 /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-3f0^-2{2(0W1st0 :*/
index d673621..bcc13eb 100644 (file)
@@ -218,10 +218,10 @@ EAPI void             elm_image_scale_get(const Evas_Object *obj, Eina_Bool *sca
  * and the image will fill the entire object (@p fill_outside is @c EINA_TRUE).
  *
  * @note This option will have no effect if
- * elm_image_aspect_ratio_retained_set() is set to @c EINA_FALSE.
+ * elm_image_aspect_fixed_set() is set to @c EINA_FALSE.
  *
  * @see elm_image_fill_outside_get()
- * @see elm_image_aspect_ratio_retained_set()
+ * @see elm_image_aspect_fixed_set()
  *
  * @ingroup Image
  */
@@ -351,7 +351,7 @@ EAPI Evas_Object     *elm_image_object_get(const Evas_Object *obj);
  * Set whether the original aspect ratio of the image should be kept on resize.
  *
  * @param obj The image object.
- * @param retained @c EINA_TRUE if the image should retain the aspect,
+ * @param fixed @c EINA_TRUE if the image should retain the aspect,
  * @c EINA_FALSE otherwise.
  *
  * The original aspect ratio (width / height) of the image is usually
@@ -359,12 +359,12 @@ EAPI Evas_Object     *elm_image_object_get(const Evas_Object *obj);
  * this original aspect, and the way that the image is fit into the object's
  * area depends on the option set by elm_image_fill_outside_set().
  *
- * @see elm_image_aspect_ratio_retained_get()
+ * @see elm_image_aspect_fixed_get()
  * @see elm_image_fill_outside_set()
  *
  * @ingroup Image
  */
-EAPI void             elm_image_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained);
+EAPI void             elm_image_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed);
 
 /**
  * Get if the object retains the original aspect ratio.
@@ -375,7 +375,7 @@ EAPI void             elm_image_aspect_ratio_retained_set(Evas_Object *obj, Eina
  *
  * @ingroup Image
  */
-EAPI Eina_Bool        elm_image_aspect_ratio_retained_get(const Evas_Object *obj);
+EAPI Eina_Bool        elm_image_aspect_fixed_get(const Evas_Object *obj);
 
 /**
  * @}
index a1e83bc..841b03a 100644 (file)
@@ -614,7 +614,7 @@ elm_photo_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   return _els_smart_icon_aspect_ratio_retained_set(wd->img, fixed);
+   return _els_smart_icon_aspect_fixed_set(wd->img, fixed);
 }
 
 EAPI Eina_Bool
@@ -623,7 +623,7 @@ elm_photo_aspect_fixed_get(const Evas_Object *obj)
    ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return EINA_FALSE;
-   return _els_smart_icon_aspect_ratio_retained_get(wd->img);
+   return _els_smart_icon_aspect_fixed_get(wd->img);
 }
 
 
index ade438e..2146361 100644 (file)
@@ -24,7 +24,7 @@ struct _Smart_Data
    Eina_Bool show : 1;
    Eina_Bool edit : 1;
    Eina_Bool edje : 1;
-   Eina_Bool aspect_ratio_retained: 1;
+   Eina_Bool aspect_fixed: 1;
    Elm_Image_Orient orient;
 };
 
@@ -489,27 +489,27 @@ _els_smart_icon_edje_get(Evas_Object *obj)
 }
 
 void
-_els_smart_icon_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained)
+_els_smart_icon_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed)
 {
    Smart_Data *sd;
 
    sd = evas_object_smart_data_get(obj);
    if (!sd) return;
 
-   retained = !!retained;
-   if (sd->aspect_ratio_retained == retained) return;
-   sd->aspect_ratio_retained = retained;
+   fixed = !!fixed;
+   if (sd->aspect_fixed == fixed) return;
+   sd->aspect_fixed = fixed;
    _smart_reconfigure(sd);
 }
 
 Eina_Bool
-_els_smart_icon_aspect_ratio_retained_get(const Evas_Object *obj)
+_els_smart_icon_aspect_fixed_get(const Evas_Object *obj)
 {
    Smart_Data *sd;
 
    sd = evas_object_smart_data_get(obj);
    if (!sd) return EINA_FALSE;
-   return sd->aspect_ratio_retained;
+   return sd->aspect_fixed;
 }
 
 /* local subsystem globals */
@@ -547,7 +547,7 @@ _smart_reconfigure(Smart_Data *sd)
         if (iw < 1) iw = 1;
         if (ih < 1) ih = 1;
 
-        if (sd->aspect_ratio_retained)
+        if (sd->aspect_fixed)
           {
              h = ((double)ih * w) / (double)iw;
              if (sd->fill_inside)
@@ -635,7 +635,7 @@ _smart_add(Evas_Object *obj)
    sd->fill_inside = EINA_TRUE;
    sd->scale_up = EINA_TRUE;
    sd->scale_down = EINA_TRUE;
-   sd->aspect_ratio_retained = EINA_TRUE;
+   sd->aspect_fixed = EINA_TRUE;
    sd->size = 64;
    sd->scale = 1.0;
    evas_object_smart_member_add(sd->obj, obj);
index 27baff1..787c5bf 100644 (file)
@@ -22,6 +22,6 @@ Elm_Image_Orient _els_smart_icon_orient_get(const Evas_Object *obj);
 void             _els_smart_icon_edit_set(Evas_Object *obj, Eina_Bool, Evas_Object *parent);
 Eina_Bool        _els_smart_icon_edit_get(const Evas_Object *obj);
 Evas_Object     *_els_smart_icon_edje_get(Evas_Object *obj);
-void             _els_smart_icon_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained);
-Eina_Bool        _els_smart_icon_aspect_ratio_retained_get(const Evas_Object *obj);
+void             _els_smart_icon_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed);
+Eina_Bool        _els_smart_icon_aspect_fixed_get(const Evas_Object *obj);
 void             _els_smart_icon_preload_set(Evas_Object *obj, Eina_Bool disable);