summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Lima Chaves <glima@profusion.mobi>2011-07-01 13:51:44 +0000
committerGustavo Lima Chaves <glima@profusion.mobi>2011-07-01 13:51:44 +0000
commitf6e14ae8bf2f887ecde4e9e8c567613fed91f2ba (patch)
treefcfaf23198ee1aea3ddd044ebe10aef3849fb2e3
parent538e2af88601089ab03a77ba17d9d37382e09fc7 (diff)
[evas] Documenting the following.
- evas_object_image_content_hint_get - evas_object_image_content_hint_set - evas_object_image_data_copy_set - evas_object_image_data_get - evas_object_image_data_set - evas_object_image_data_update_add SVN revision: 60918
-rw-r--r--legacy/evas/doc/examples.dox8
-rw-r--r--legacy/evas/src/examples/Makefile.am2
-rw-r--r--legacy/evas/src/examples/evas-images2.c8
-rw-r--r--legacy/evas/src/lib/Evas.h64
4 files changed, 53 insertions, 29 deletions
diff --git a/legacy/evas/doc/examples.dox b/legacy/evas/doc/examples.dox
index c0276ad52d..545f463a58 100644
--- a/legacy/evas/doc/examples.dox
+++ b/legacy/evas/doc/examples.dox
@@ -128,9 +128,11 @@
128 * @skip noise_img = 128 * @skip noise_img =
129 * @until show 129 * @until show
130 * Since we are creating the data for its pixel buffer ourselves, we 130 * Since we are creating the data for its pixel buffer ourselves, we
131 * have to set its size with @c evas_object_image_size_set. There's a 131 * have to set its size with evas_object_image_size_set(), first. We
132 * last command to print it's @b stride value. Since its created with 132 * set our data with the function evas_object_image_data_set(),
133 * one quarter of the canvas's original width 133 * whose second argument is a buffer with random data. There's a last
134 * command to print it's @b stride value. Since its created with one
135 * quarter of the canvas's original width
134 * @dontinclude evas-images2.c 136 * @dontinclude evas-images2.c
135 * @skip define WIDTH 137 * @skip define WIDTH
136 * @until define HEIGHT 138 * @until define HEIGHT
diff --git a/legacy/evas/src/examples/Makefile.am b/legacy/evas/src/examples/Makefile.am
index 8afa04f8d4..4d6a19943b 100644
--- a/legacy/evas/src/examples/Makefile.am
+++ b/legacy/evas/src/examples/Makefile.am
@@ -99,6 +99,7 @@ files_DATA += \
99 $(srcdir)/evas-buffer-simple.c \ 99 $(srcdir)/evas-buffer-simple.c \
100 $(srcdir)/evas-init-shutdown.c \ 100 $(srcdir)/evas-init-shutdown.c \
101 $(srcdir)/evas-images.c \ 101 $(srcdir)/evas-images.c \
102 $(srcdir)/evas-images2.c \
102 $(srcdir)/evas-object-manipulation.c \ 103 $(srcdir)/evas-object-manipulation.c \
103 $(srcdir)/evas-events.c \ 104 $(srcdir)/evas-events.c \
104 $(srcdir)/evas-aspect-hints.c \ 105 $(srcdir)/evas-aspect-hints.c \
@@ -110,6 +111,7 @@ EXTRA_DIST = $(EDCS) \
110 $(srcdir)/evas-buffer-simple.c \ 111 $(srcdir)/evas-buffer-simple.c \
111 $(srcdir)/evas-init-shutdown.c \ 112 $(srcdir)/evas-init-shutdown.c \
112 $(srcdir)/evas-images.c \ 113 $(srcdir)/evas-images.c \
114 $(srcdir)/evas-images2.c \
113 $(srcdir)/evas-object-manipulation.c \ 115 $(srcdir)/evas-object-manipulation.c \
114 $(srcdir)/evas-events.c \ 116 $(srcdir)/evas-events.c \
115 $(srcdir)/evas-aspect-hints.c \ 117 $(srcdir)/evas-aspect-hints.c \
diff --git a/legacy/evas/src/examples/evas-images2.c b/legacy/evas/src/examples/evas-images2.c
index df9b8f844b..ba7766c3ef 100644
--- a/legacy/evas/src/examples/evas-images2.c
+++ b/legacy/evas/src/examples/evas-images2.c
@@ -6,13 +6,18 @@
6 * for output. 6 * for output.
7 * 7 *
8 * @verbatim 8 * @verbatim
9 * gcc -o evas-images3 evas-images3.c `pkg-config --libs --cflags ecore-evas` 9 * gcc -o evas-images2 evas-images2.c `pkg-config --libs --cflags evas ecore ecore-evas`
10 * @endverbatim 10 * @endverbatim
11 */ 11 */
12 12
13#ifdef HAVE_CONFIG_H 13#ifdef HAVE_CONFIG_H
14 14
15#include "config.h" 15#include "config.h"
16#else
17
18#define PACKAGE_EXAMPLES_DIR "."
19#define __UNUSED__
20
16#endif 21#endif
17 22
18#include <Ecore.h> 23#include <Ecore.h>
@@ -161,7 +166,6 @@ main(void)
161 evas_object_image_preload(d.logo, EINA_TRUE); 166 evas_object_image_preload(d.logo, EINA_TRUE);
162 167
163 evas_object_image_file_set(d.logo, img_path, NULL); 168 evas_object_image_file_set(d.logo, img_path, NULL);
164 evas_object_image_fill_set(d.logo, 0, 0, WIDTH / 2, HEIGHT / 2);
165 evas_object_resize(d.logo, WIDTH / 2, HEIGHT / 2); 169 evas_object_resize(d.logo, WIDTH / 2, HEIGHT / 2);
166 evas_object_show(d.logo); 170 evas_object_show(d.logo);
167 171
diff --git a/legacy/evas/src/lib/Evas.h b/legacy/evas/src/lib/Evas.h
index d98e74908e..48ae28b35e 100644
--- a/legacy/evas/src/lib/Evas.h
+++ b/legacy/evas/src/lib/Evas.h
@@ -689,7 +689,7 @@ typedef enum _Evas_Border_Fill_Mode
689 EVAS_BORDER_FILL_NONE = 0, /**< Image's center region is @b not to be rendered */ 689 EVAS_BORDER_FILL_NONE = 0, /**< Image's center region is @b not to be rendered */
690 EVAS_BORDER_FILL_DEFAULT = 1, /**< Image's center region is to be @b blended with objects underneath it, if it has transparency. This is the default behavior for image objects */ 690 EVAS_BORDER_FILL_DEFAULT = 1, /**< Image's center region is to be @b blended with objects underneath it, if it has transparency. This is the default behavior for image objects */
691 EVAS_BORDER_FILL_SOLID = 2 /**< Image's center region is to be made solid, even if it has transparency on it */ 691 EVAS_BORDER_FILL_SOLID = 2 /**< Image's center region is to be made solid, even if it has transparency on it */
692} Evas_Border_Fill_Mode; /**< How a image's center region (the complement to the border region) should be rendered by Evas */ 692} Evas_Border_Fill_Mode; /**< How an image's center region (the complement to the border region) should be rendered by Evas */
693 693
694typedef enum _Evas_Image_Scale_Hint 694typedef enum _Evas_Image_Scale_Hint
695{ 695{
@@ -706,10 +706,10 @@ typedef enum _Evas_Engine_Render_Mode
706 706
707typedef enum _Evas_Image_Content_Hint 707typedef enum _Evas_Image_Content_Hint
708{ 708{
709 EVAS_IMAGE_CONTENT_HINT_NONE = 0, 709 EVAS_IMAGE_CONTENT_HINT_NONE = 0, /**< No hint at all */
710 EVAS_IMAGE_CONTENT_HINT_DYNAMIC = 1, 710 EVAS_IMAGE_CONTENT_HINT_DYNAMIC = 1, /**< The contents will change on time */
711 EVAS_IMAGE_CONTENT_HINT_STATIC = 2 711 EVAS_IMAGE_CONTENT_HINT_STATIC = 2 /**< The contents won't change on time */
712} Evas_Image_Content_Hint; 712} Evas_Image_Content_Hint; /**< How an image's data is to be treated by Evas, for optimization */
713 713
714struct _Evas_Engine_Info /** Generic engine information. Generic info is useless */ 714struct _Evas_Engine_Info /** Generic engine information. Generic info is useless */
715{ 715{
@@ -5770,11 +5770,15 @@ EAPI Evas_Load_Error evas_object_image_load_error_get (const Ev
5770/** 5770/**
5771 * Sets the raw image data of the given image object. 5771 * Sets the raw image data of the given image object.
5772 * 5772 *
5773 * Note that the raw data must be of the same size and colorspace of
5774 * the image. If data is NULL the current image data will be freed.
5775 *
5776 * @param obj The given image object. 5773 * @param obj The given image object.
5777 * @param data The raw data, or @c NULL. 5774 * @param data The raw data, or @c NULL.
5775 *
5776 * Note that the raw data must be of the same size (see
5777 * evas_object_image_size_set()) and colorspace (see
5778 * evas_object_image_colorspace_set()) of the image. If data is @c
5779 * NULL, the current image data will be freed.
5780 *
5781 * @see evas_object_image_data_get()
5778 */ 5782 */
5779EAPI void evas_object_image_data_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1); 5783EAPI void evas_object_image_data_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
5780 5784
@@ -5799,25 +5803,31 @@ EAPI void *evas_object_image_data_convert (Evas_Obj
5799/** 5803/**
5800 * Get a pointer to the raw image data of the given image object. 5804 * Get a pointer to the raw image data of the given image object.
5801 * 5805 *
5806 * @param obj The given image object.
5807 * @param for_writing Whether the data being retrieved will be
5808 * modified (@c EINA_TRUE) or not (@c EINA_FALSE).
5809 * @return The raw image data.
5810 *
5802 * This function returns a pointer to an image object's internal pixel 5811 * This function returns a pointer to an image object's internal pixel
5803 * buffer, for reading only or read/write. If you request it for 5812 * buffer, for reading only or read/write. If you request it for
5804 * writing, the image will be marked dirty so that it gets redrawn at 5813 * writing, the image will be marked dirty so that it gets redrawn at
5805 * the next update. 5814 * the next update.
5806 * 5815 *
5807 * This is best suited when you want to modify an existing image, 5816 * This is best suited for when you want to modify an existing image,
5808 * without changing its dimensions. 5817 * without changing its dimensions.
5809 * 5818 *
5810 * @param obj The given image object. 5819 * @see evas_object_image_data_set()
5811 * @param for_writing Whether the data being retrieved will be modified.
5812 * @return The raw image data.
5813 */ 5820 */
5814EAPI void *evas_object_image_data_get (const Evas_Object *obj, Eina_Bool for_writing) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 5821EAPI void *evas_object_image_data_get (const Evas_Object *obj, Eina_Bool for_writing) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5815 5822
5816/** 5823/**
5817 * Replaces the raw image data of the given image object. 5824 * Replaces the raw image data of the given image object.
5818 * 5825 *
5826 * @param obj The given image object.
5827 * @param data The raw data to replace.
5828 *
5819 * This function lets the application replace an image object's 5829 * This function lets the application replace an image object's
5820 * internal pixel buffer with a user-allocated one. For best results, 5830 * internal pixel buffer with an user-allocated one. For best results,
5821 * you should generally first call evas_object_image_size_set() with 5831 * you should generally first call evas_object_image_size_set() with
5822 * the width and height for the new buffer. 5832 * the width and height for the new buffer.
5823 * 5833 *
@@ -5830,24 +5840,22 @@ EAPI void *evas_object_image_data_get (const Ev
5830 * finished with it, as user-set image data will not be automatically 5840 * finished with it, as user-set image data will not be automatically
5831 * freed when the image object is deleted. 5841 * freed when the image object is deleted.
5832 * 5842 *
5833 * See @ref evas_object_image_data_get for more details. 5843 * See @ref evas_object_image_data_get() for more details.
5834 * 5844 *
5835 * @param obj The given image object.
5836 * @param data The raw data.
5837 */ 5845 */
5838EAPI void evas_object_image_data_copy_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1); 5846EAPI void evas_object_image_data_copy_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
5839 5847
5840/** 5848/**
5841 * Mark a sub-region of the given image object to be redrawn. 5849 * Mark a sub-region of the given image object to be redrawn.
5842 * 5850 *
5843 * This function schedules a particular rectangular region of an image
5844 * object to be updated (redrawn) at the next render.
5845 *
5846 * @param obj The given image object. 5851 * @param obj The given image object.
5847 * @param x X-offset of the region to be updated. 5852 * @param x X-offset of the region to be updated.
5848 * @param y Y-offset of the region to be updated. 5853 * @param y Y-offset of the region to be updated.
5849 * @param w Width of the region to be updated. 5854 * @param w Width of the region to be updated.
5850 * @param h Height of the region to be updated. 5855 * @param h Height of the region to be updated.
5856 *
5857 * This function schedules a particular rectangular region of an image
5858 * object to be updated (redrawn) at the next rendering cycle.
5851 */ 5859 */
5852EAPI void evas_object_image_data_update_add (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1); 5860EAPI void evas_object_image_data_update_add (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
5853 5861
@@ -6160,23 +6168,31 @@ EAPI void evas_object_image_scale_hint_set (Evas_Obj
6160EAPI Evas_Image_Scale_Hint evas_object_image_scale_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 6168EAPI Evas_Image_Scale_Hint evas_object_image_scale_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
6161 6169
6162/** 6170/**
6163 * Set the content hint of a given image of the canvas. 6171 * Set the content hint setting of a given image object of the canvas.
6164 * 6172 *
6165 * @param obj The given canvas pointer. 6173 * @param obj The given canvas pointer.
6166 * @param hint The content hint value. 6174 * @param hint The content hint value, one of the
6175 * #Evas_Image_Content_Hint ones.
6167 * 6176 *
6168 * This function sets the content hint value of the given image of the canvas. 6177 * This function sets the content hint value of the given image of the
6178 * canvas.
6169 * 6179 *
6180 * @see evas_object_image_content_hint_get()
6170 */ 6181 */
6171EAPI void evas_object_image_content_hint_set (Evas_Object *obj, Evas_Image_Content_Hint hint) EINA_ARG_NONNULL(1); 6182EAPI void evas_object_image_content_hint_set (Evas_Object *obj, Evas_Image_Content_Hint hint) EINA_ARG_NONNULL(1);
6172 6183
6173/** 6184/**
6174 * Get the content hint of a given image of the canvas. 6185 * Get the content hint setting of a given image object of the canvas.
6175 * 6186 *
6176 * @param obj The given canvas pointer. 6187 * @param obj The given canvas pointer.
6188 * @return hint The content hint value set on it, one of the
6189 * #Evas_Image_Content_Hint ones (#EVAS_IMAGE_CONTENT_HINT_NONE means
6190 * an error).
6177 * 6191 *
6178 * This function returns the content hint value of the given image of the canvas. 6192 * This function returns the content hint value of the given image of
6193 * the canvas.
6179 * 6194 *
6195 * @see evas_object_image_content_hint_set()
6180 */ 6196 */
6181EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; 6197EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
6182 6198