efl_eolian_legacy_files = \
lib/efl/interfaces/efl_gfx_fill.eo \
lib/efl/interfaces/efl_gfx_base.eo \
+ lib/efl/interfaces/efl_image.eo \
lib/efl/interfaces/efl_image_animated.eo \
$(NULL)
efl_eolian_files = \
lib/efl/interfaces/efl_control.eo \
lib/efl/interfaces/efl_file.eo \
- lib/efl/interfaces/efl_image.eo \
lib/efl/interfaces/efl_image_load.eo \
lib/efl/interfaces/efl_player.eo \
lib/efl/interfaces/efl_text.eo \
#include "interfaces/efl_gfx_types.eot.h"
#include "interfaces/efl_gfx_fill.eo.legacy.h"
#include "interfaces/efl_gfx_base.eo.legacy.h"
+#include "interfaces/efl_image.eo.legacy.h"
#include "interfaces/efl_image_animated.eo.legacy.h"
#endif
+enum Efl.Image.Content_Hint
+{
+ [[How an image's data is to be treated by EFL, for optimization.]]
+ none = 0, [[No hint on the content (default).]]
+ dynamic = 1, [[The content will change over time.]]
+ static = 2 [[The content won't change over time.]]
+}
+
+enum Efl.Image.Scale_Hint
+{
+ /* FIXME: Legacy is in Emile, where it does not belong. */
+ [[How an image's data is to be treated by EFL, with regard to scaling cache.]]
+ none = 0, [[No hint on the scaling (default).]]
+ dynamic = 1, [[Image will be re-scaled over time, thus turning scaling cache OFF for its data.]]
+ static = 2 [[Image will not be re-scaled over time, thus turning scaling cache ON for its data.]]
+}
+
interface Efl.Image ()
{
[[Common APIs for all 2D images that can be rendered on the canvas.]]
fill: Efl.Gfx.Border_Fill_Mode; [[Fill mode of the center region.]]
}
}
+
+ /* Note: those are obscure features of evas image. Expose in Efl.Image? */
+ @property content_hint {
+ set {
+ [[Set the content hint setting of a given image object of the
+ canvas.
+
+ This function sets the content hint value of the given image
+ of the canvas. For example, if you're on the GL engine and
+ your driver implementation supports it, setting this hint to
+ #EVAS_IMAGE_CONTENT_HINT_DYNAMIC will make it need zero copies
+ at texture upload time, which is an "expensive" operation.
+ ]]
+ }
+ get {
+ [[Get the content hint setting of a given image object of the
+ canvas.
+
+ This returns #EVAS_IMAGE_CONTENT_HINT_NONE on error.
+ ]]
+ }
+ values {
+ hint: Efl.Image.Content_Hint; [[Dynamic or static content hint,
+ see @Efl.Image.Content_Hint]]
+ }
+ }
+ @property scale_hint {
+ set {
+ [[Set the scale hint of a given image of the canvas.
+
+ This function sets the scale hint value of the given image
+ object in the canvas, which will affect how Evas is to cache
+ scaled versions of its original source image.
+ ]]
+ }
+ get {
+ [[Get the scale hint of a given image of the canvas.
+
+ This function returns the scale hint value of the given image
+ object of the canvas.
+ ]]
+ }
+ values {
+ hint: Efl.Image.Scale_Hint; [[Scalable or static size hint,
+ see @Efl.Image.Scale_Hint]]
+ }
+ }
}
}
typedef struct _Evas_Event_Render_Post Evas_Event_Render_Post; /**< Event structure that may come with #EVAS_CALLBACK_RENDER_POST event callbacks @since 1.8 */
typedef struct _Evas_Event_Axis_Update Evas_Event_Axis_Update; /**< Event structure for #EVAS_CALLBACK_AXIS_UPDATE event callbacks @since 1.13 */
+typedef Efl_Image_Content_Hint Evas_Image_Content_Hint;
+#define EVAS_IMAGE_CONTENT_HINT_NONE EFL_IMAGE_CONTENT_HINT_NONE
+#define EVAS_IMAGE_CONTENT_HINT_DYNAMIC EFL_IMAGE_CONTENT_HINT_DYNAMIC
+#define EVAS_IMAGE_CONTENT_HINT_STATIC EFL_IMAGE_CONTENT_HINT_STATIC
+
typedef enum _Evas_Alloc_Error
{
EVAS_ALLOC_ERROR_NONE = 0, /**< No allocation error */
EAPI Evas_Image_Orient evas_object_image_orient_get(const Evas_Object *obj);
/**
+ * @brief Set the content hint setting of a given image object of the canvas.
+ *
+ * This function sets the content hint value of the given image of the canvas.
+ * For example, if you're on the GL engine and your driver implementation
+ * supports it, setting this hint to #EVAS_IMAGE_CONTENT_HINT_DYNAMIC will make
+ * it need zero copies at texture upload time, which is an "expensive"
+ * operation.
+ *
+ * @param[in] hint The content hint value, one of the
+ * @ref Evas_Image_Content_Hint ones.
+ */
+EAPI void evas_object_image_content_hint_set(Evas_Object *obj, Evas_Image_Content_Hint hint);
+
+/**
+ * @brief Get the content hint setting of a given image object of the canvas.
+ *
+ * This returns #EVAS_IMAGE_CONTENT_HINT_NONE on error.
+ *
+ * @return The content hint value, one of the @ref Evas_Image_Content_Hint
+ * ones.
+ */
+EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get(const Evas_Object *obj);
+
+/**
+ * @brief Set the scale hint of a given image of the canvas.
+ *
+ * This function sets the scale hint value of the given image object in the
+ * canvas, which will affect how Evas is to cache scaled versions of its
+ * original source image.
+ *
+ * @param[in] hint The scale hint, a value in @ref Evas_Image_Scale_Hint.
+ *
+ * @ingroup Evas_Image
+ */
+EAPI void evas_object_image_scale_hint_set(Evas_Object *obj, Evas_Image_Scale_Hint hint);
+
+/**
+ * @brief Get the scale hint of a given image of the canvas.
+ *
+ * This function returns the scale hint value of the given image object of the
+ * canvas.
+ *
+ * @return The scale hint, a value in @ref Evas_Image_Scale_Hint.
+ *
+ * @ingroup Evas_Image
+ */
+EAPI Evas_Image_Scale_Hint evas_object_image_scale_hint_get(const Evas_Object *obj);
+
+/**
*
* Sets the size of the given image object.
*
lo.scale_load.dst_w = dst_w;
lo.scale_load.dst_h = dst_h;
lo.scale_load.smooth = smooth;
- lo.scale_load.scale_hint = im->scale_hint;
+ lo.scale_load.scale_hint = (Emile_Image_Scale_Hint) im->scale_hint;
evas_cache2_image_cache_key_create(hkey, im->file, pathlen,
im->key, keylen, &lo);
legacy_prefix: evas_object_image;
eo_prefix: evas_obj_image;
methods {
- /* weird stuff - hints */
- @property content_hint {
- set {
- [[Set the content hint setting of a given image object of the
- canvas.
-
- This function sets the content hint value of the given image
- of the canvas. For example, if you're on the GL engine and
- your driver implementation supports it, setting this hint to
- #EVAS_IMAGE_CONTENT_HINT_DYNAMIC will make it need zero copies
- at texture upload time, which is an "expensive" operation.
- ]]
- }
- get {
- [[Get the content hint setting of a given image object of the
- canvas.
-
- This returns #EVAS_IMAGE_CONTENT_HINT_NONE on error.
- ]]
- }
- values {
- hint: Evas.Image_Content_Hint; [[The content hint value, one of
- the @Evas.Image_Content_Hint ones.]]
- }
- }
- @property scale_hint {
- set {
- [[Set the scale hint of a given image of the canvas.
-
- This function sets the scale hint value of the given image
- object in the canvas, which will affect how Evas is to cache
- scaled versions of its original source image.
- ]]
- }
- get {
- [[Get the scale hint of a given image of the canvas.
-
- This function returns the scale hint value of the given image
- object of the canvas.
- ]]
- }
- values {
- hint: Evas.Image_Scale_Hint; [[The scale hint, a value in
- @Evas.Image_Scale_Hint.]]
- }
- }
-
/* GL View */
@property pixels_dirty {
set {
Efl.Image.border_scale.set;
Efl.Image.border_center_fill.get;
Efl.Image.border_center_fill.set;
+ Efl.Image.scale_hint.get;
+ Efl.Image.scale_hint.set;
+ Efl.Image.content_hint.get;
+ Efl.Image.content_hint.set;
Efl.Image_Animated.animated.get;
Efl.Image_Animated.animated_frame.get;
Efl.Image_Animated.animated_frame.set;
int pixels_checked_out;
int load_error;
- Evas_Image_Scale_Hint scale_hint;
- Evas_Image_Content_Hint content_hint;
+ Efl_Image_Scale_Hint scale_hint;
+ Efl_Image_Content_Hint content_hint;
Eina_Bool changed : 1;
Eina_Bool dirty_pixels : 1;
# define EINA_COW_IMAGE_STATE_WRITE_END(Obj, Write) \
EINA_COW_WRITE_END(evas_object_image_state_cow, Obj->cur, Write)
+#define FRAME_MAX 1024
+
#endif // EVAS_IMAGE_PRIVATE_H
}
EOLIAN static void
-_evas_image_scale_hint_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Scale_Hint hint)
+_evas_image_efl_image_scale_hint_set(Eo *eo_obj, Evas_Image_Data *o, Efl_Image_Scale_Hint hint)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
}
}
-EOLIAN static Evas_Image_Scale_Hint
-_evas_image_scale_hint_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
+EOLIAN static Efl_Image_Scale_Hint
+_evas_image_efl_image_scale_hint_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
{
- return o->scale_hint;;
+ return o->scale_hint;
}
EOLIAN static void
-_evas_image_content_hint_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Content_Hint hint)
+_evas_image_efl_image_content_hint_set(Eo *eo_obj, Evas_Image_Data *o, Efl_Image_Content_Hint hint)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
evas_object_async_block(obj);
}
}
-#define FRAME_MAX 1024
-EOLIAN static Evas_Image_Content_Hint
-_evas_image_content_hint_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
+EOLIAN static Efl_Image_Content_Hint
+_evas_image_efl_image_content_hint_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
{
return o->content_hint;
}
}
EAPI void
+evas_object_image_content_hint_set(Evas_Object *obj, Evas_Image_Content_Hint hint)
+{
+ return efl_image_content_hint_set(obj, hint);
+}
+
+EAPI Evas_Image_Content_Hint
+evas_object_image_content_hint_get(const Evas_Object *obj)
+{
+ return efl_image_content_hint_get(obj);
+}
+
+EAPI void
+evas_object_image_scale_hint_set(Evas_Object *obj, Evas_Image_Scale_Hint hint)
+{
+ return efl_image_scale_hint_set(obj, (Efl_Image_Scale_Hint) hint);
+}
+
+EAPI Evas_Image_Scale_Hint
+evas_object_image_scale_hint_get(const Evas_Object *obj)
+{
+ return (Evas_Image_Scale_Hint) efl_image_scale_hint_get(obj);
+}
+
+EAPI void
evas_object_image_source_visible_set(Evas_Object *eo, Eina_Bool visible)
{
/* FIXME: I'd love to remove this feature and replace by no_render.
type @extern Evas.Load_Error: int; /* FIXME: Need to migrate emile. */
-type @extern Evas.Image_Scale_Hint: int; /* FIXME: Need to migrate emile. */
struct @extern Evas.Video_Surface; /* FIXME: The structure is full of the unsupported func pointers. */
/* FIXME: Unsupported annonymous structures inside */
last [[kept as last element/sentinel -- not really an event]]
}
-enum Evas.Image_Content_Hint
-{
- [[How an image's data is to be treated by Evas, for optimization]]
- none = 0, [[No hint at all]]
- dynamic = 1, [[The contents will change over time]]
- static = 2 [[The contents won't change over time]]
-}
-
enum Evas.Image_Orient
{
[[Possible orientation options for evas_object_image_orient_set().