Merge "[Slideshow] Applying Open source patch r72492 to fix Switching in slideshow...
[framework/uifw/elementary.git] / src / lib / elm_image.h
index c24aa8f..59a904f 100644 (file)
@@ -1,5 +1,6 @@
 /**
  * @defgroup Image Image
+ * @ingroup Elementary
  *
  * @image html img/widget/image/preview-00.png
  * @image latex img/widget/image/preview-00.eps
@@ -31,9 +32,6 @@
  */
 
 /**
- * @enum _Elm_Image_Orient
- * @typedef Elm_Image_Orient
- *
  * Possible orientation options for elm_image_orient_set().
  *
  * @image html elm_image_orient_set.png
  *
  * @ingroup Image
  */
-typedef enum _Elm_Image_Orient
+typedef enum
 {
    ELM_IMAGE_ORIENT_NONE = 0, /**< no orientation change */
    ELM_IMAGE_ORIENT_0 = 0, /**< no orientation change */
    ELM_IMAGE_ROTATE_90 = 1, /**< rotate 90 degrees clockwise */
    ELM_IMAGE_ROTATE_180 = 2, /**< rotate 180 degrees clockwise */
    ELM_IMAGE_ROTATE_270 = 3, /**< rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise) */
-   // XXX: remove
-   /*EINA_DEPRECATED */ ELM_IMAGE_ROTATE_90_CW = 1,
-   /**< rotate 90 degrees clockwise */
-   // XXX: remove
-   /*EINA_DEPRECATED */ ELM_IMAGE_ROTATE_180_CW = 2,
-   /**< rotate 180 degrees clockwise */
-   // XXX: remove
-   /*EINA_DEPRECATED */ ELM_IMAGE_ROTATE_90_CCW = 3,
-   /**< rotate 90 degrees counter-clockwise (i.e. 270 degrees clockwise) */
    ELM_IMAGE_FLIP_HORIZONTAL = 4, /**< flip image horizontally */
    ELM_IMAGE_FLIP_VERTICAL = 5, /**< flip image vertically */
    ELM_IMAGE_FLIP_TRANSPOSE = 6, /**< flip the image along the y = (width - x) line (bottom-left to top-right) */
@@ -73,9 +62,7 @@ typedef enum _Elm_Image_Orient
  *
  * @ingroup Image
  */
-EAPI Evas_Object *
-                      elm_image_add(Evas_Object *parent)
-EINA_ARG_NONNULL(1);
+EAPI Evas_Object     *elm_image_add(Evas_Object *parent);
 
 /**
  * Set the file that will be used as image.
@@ -91,7 +78,7 @@ EINA_ARG_NONNULL(1);
  *
  * @ingroup Image
  */
-EAPI Eina_Bool        elm_image_file_set(Evas_Object *obj, const char *file, const char *group) EINA_ARG_NONNULL(1, 2);
+EAPI Eina_Bool        elm_image_file_set(Evas_Object *obj, const char *file, const char *group);
 
 /**
  * Get the file that will be used as image.
@@ -104,7 +91,7 @@ EAPI Eina_Bool        elm_image_file_set(Evas_Object *obj, const char *file, con
  *
  * @ingroup Image
  */
-EAPI void             elm_image_file_get(const Evas_Object *obj, const char **file, const char **group) EINA_ARG_NONNULL(1);
+EAPI void             elm_image_file_get(const Evas_Object *obj, const char **file, const char **group);
 
 /**
  * Set the smooth effect for an image.
@@ -125,7 +112,7 @@ EAPI void             elm_image_file_get(const Evas_Object *obj, const char **fi
  *
  * @ingroup Image
  */
-EAPI void             elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth) EINA_ARG_NONNULL(1);
+EAPI void             elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth);
 
 /**
  * Get the smooth effect for an image.
@@ -137,7 +124,7 @@ EAPI void             elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth) E
  *
  * @ingroup Image
  */
-EAPI Eina_Bool        elm_image_smooth_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+EAPI Eina_Bool        elm_image_smooth_get(const Evas_Object *obj);
 
 /**
  * Gets the current size of the image.
@@ -148,11 +135,9 @@ EAPI Eina_Bool        elm_image_smooth_get(const Evas_Object *obj) EINA_ARG_NONN
  *
  * This is the real size of the image, not the size of the object.
  *
- * On error, neither w and h will be fileld with 0.
- *
  * @ingroup Image
  */
-EAPI void             elm_image_object_size_get(const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
+EAPI void             elm_image_object_size_get(const Evas_Object *obj, int *w, int *h);
 
 /**
  * Disable scaling of this object.
@@ -164,15 +149,15 @@ 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
  */
-EAPI void             elm_image_no_scale_set(Evas_Object *obj, Eina_Bool no_scale) EINA_ARG_NONNULL(1);
+EAPI void             elm_image_no_scale_set(Evas_Object *obj, Eina_Bool no_scale);
 
 /**
  * Get whether scaling is disabled on the object.
@@ -184,39 +169,39 @@ EAPI void             elm_image_no_scale_set(Evas_Object *obj, Eina_Bool no_scal
  *
  * @ingroup Image
  */
-EAPI Eina_Bool        elm_image_no_scale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+EAPI Eina_Bool        elm_image_no_scale_get(const Evas_Object *obj);
 
 /**
  * Set if the object is (up/down) resizable.
  *
  * @param obj The image object
- * @param scale_up A bool to set if the object is resizable up. Default is
+ * @param size_up A bool to set if the object is resizable up. Default is
  * @c EINA_TRUE.
- * @param scale_down A bool to set if the object is resizable down. Default
+ * @param size_down A bool to set if the object is resizable 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
  */
-EAPI void             elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down) EINA_ARG_NONNULL(1);
+EAPI void             elm_image_resizable_set(Evas_Object *obj, Eina_Bool size_up, Eina_Bool size_down);
 
 /**
  * Get if the object is (up/down) resizable.
  *
  * @param obj The image object
- * @param scale_up A bool to set if the object is resizable up
- * @param scale_down A bool to set if the object is resizable down
+ * @param size_up A bool to set if the object is resizable up
+ * @param size_down A bool to set if the object is resizable down
  *
- * @see elm_image_scale_set()
+ * @see elm_image_resizable_set()
  *
  * @ingroup Image
  */
-EAPI void             elm_image_scale_get(const Evas_Object *obj, Eina_Bool *scale_up, Eina_Bool *scale_down) EINA_ARG_NONNULL(1);
+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.
@@ -232,14 +217,14 @@ 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
  */
-EAPI void             elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside) EINA_ARG_NONNULL(1);
+EAPI void             elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside);
 
 /**
  * Get if the object is filled outside
@@ -251,7 +236,16 @@ EAPI void             elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fil
  *
  * @ingroup Image
  */
-EAPI Eina_Bool        elm_image_fill_outside_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+EAPI Eina_Bool        elm_image_fill_outside_get(const Evas_Object *obj);
+
+/**
+ * Enable or disable preloading of the image
+ *
+ * @param obj The image object
+ * @param disabled If EINA_TRUE, preloading will be disabled
+ * @ingroup Icon
+ */
+EAPI void                  elm_image_preload_disabled_set(Evas_Object *obj, Eina_Bool disabled);
 
 /**
  * Set the prescale size for the image
@@ -275,7 +269,7 @@ EAPI Eina_Bool        elm_image_fill_outside_get(const Evas_Object *obj) EINA_AR
  *
  * @ingroup Image
  */
-EAPI void             elm_image_prescale_set(Evas_Object *obj, int size) EINA_ARG_NONNULL(1);
+EAPI void             elm_image_prescale_set(Evas_Object *obj, int size);
 
 /**
  * Get the prescale size for the image
@@ -287,7 +281,7 @@ EAPI void             elm_image_prescale_set(Evas_Object *obj, int size) EINA_AR
  *
  * @ingroup Image
  */
-EAPI int              elm_image_prescale_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+EAPI int              elm_image_prescale_get(const Evas_Object *obj);
 
 /**
  * Set the image orientation.
@@ -303,7 +297,7 @@ EAPI int              elm_image_prescale_get(const Evas_Object *obj) EINA_ARG_NO
  *
  * @ingroup Image
  */
-EAPI void             elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient) EINA_ARG_NONNULL(1);
+EAPI void             elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient);
 
 /**
  * Get the image orientation.
@@ -316,7 +310,7 @@ EAPI void             elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient or
  *
  * @ingroup Image
  */
-EAPI Elm_Image_Orient elm_image_orient_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+EAPI Elm_Image_Orient elm_image_orient_get(const Evas_Object *obj);
 
 /**
  * Make the image 'editable'.
@@ -329,10 +323,10 @@ EAPI Elm_Image_Orient elm_image_orient_get(const Evas_Object *obj) EINA_ARG_NONN
  *
  * @ingroup Image
  */
-EAPI void             elm_image_editable_set(Evas_Object *obj, Eina_Bool set) EINA_ARG_NONNULL(1);
+EAPI void             elm_image_editable_set(Evas_Object *obj, Eina_Bool set);
 
 /**
- * Check if the image 'editable'.
+ * Check if the image is 'editable'.
  *
  * @param obj Image object.
  * @return Editability.
@@ -342,10 +336,10 @@ EAPI void             elm_image_editable_set(Evas_Object *obj, Eina_Bool set) EI
  *
  * @ingroup Image
  */
-EAPI Eina_Bool        elm_image_editable_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+EAPI Eina_Bool        elm_image_editable_get(const Evas_Object *obj);
 
 /**
- * Get the basic Evas_Image object from this object (widget).
+ * Get the inlined image object of the image widget.
  *
  * @param obj The image object to get the inlined image from
  * @return The inlined image object, or NULL if none exists
@@ -359,13 +353,13 @@ EAPI Eina_Bool        elm_image_editable_get(const Evas_Object *obj) EINA_ARG_NO
  *
  * @ingroup Image
  */
-EAPI Evas_Object     *elm_image_object_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+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
@@ -373,12 +367,12 @@ EAPI Evas_Object     *elm_image_object_get(const Evas_Object *obj) EINA_ARG_NONN
  * 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) EINA_ARG_NONNULL(1);
+EAPI void             elm_image_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed);
 
 /**
  * Get if the object retains the original aspect ratio.
@@ -389,7 +383,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) EINA_ARG_NONNULL(1);
+EAPI Eina_Bool        elm_image_aspect_fixed_get(const Evas_Object *obj);
 
 /**
  * @}