EAPI Eina_Bool evas_object_image_source_visible_get(const Evas_Object *obj);
/**
+ * @brief Mark whether the given image object is dirty and needs to request its
+ * pixels.
+ *
+ * This function will only properly work if a pixels get callback has been set.
+ *
+ * @warning Use this function if you really know what you are doing.
+ *
+ * @param[in] dirty Whether the image is dirty.
+ */
+EAPI void evas_object_image_pixels_dirty_set(Evas_Object *obj, Eina_Bool dirty);
+
+/**
+ * @brief Retrieves whether the given image object is dirty (needs to be
+ * redrawn).
+ *
+ * @return Whether the image is dirty.
+ */
+EAPI Eina_Bool evas_object_image_pixels_dirty_get(const Evas_Object *obj);
+
+/**
+ * @brief Set the callback function to get pixels from a canvas' image.
+ *
+ * This functions sets a function to be the callback function that get pixels
+ * from a image of the canvas.
+ *
+ * @param[in] func The callback function.
+ * @param[in] data The data pointer to be passed to @c func.
+ */
+EAPI void evas_object_image_pixels_get_callback_set(Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data) EINA_ARG_NONNULL(2);
+
+
+/**
* @typedef Evas_Video_Surface
*
* A generic datatype for video specific surface information
/* Legacy is implement inside Efl.Canvas.Image */
legacy_prefix: evas_object_image;
eo_prefix: null;
- methods {
- /* GL View */
- @property pixels_dirty {
- set {
- [[Mark whether the given image object is dirty and needs to
- request its pixels.
-
- This function will only properly work if a pixels get
- callback has been set.
-
- Warning: Use this function if you really know what you are
- doing.
- ]]
- }
- get {
- [[Retrieves whether the given image object is dirty (needs to
- be redrawn).
- ]]
- }
- values {
- dirty: bool; [[Whether the image is dirty.]]
- }
- }
- @property pixels_get_callback {
- set {
- [[Set the callback function to get pixels from a canvas' image.
-
- This functions sets a function to be the callback function
- that get pixels from a image of the canvas.
- ]]
- }
- values {
- func: Evas_Object_Image_Pixels_Get_Cb @nonull; [[The callback function.]]
- data: void *; [[The data pointer to be passed to $func.]]
- }
- }
- }
implements {
Eo.Base.constructor;
Eo.Base.destructor;
}
EAPI void
+evas_object_image_pixels_get_callback_set(Eo *eo_obj, Evas_Object_Image_Pixels_Get_Cb func, void *data)
+{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
+
+ evas_object_async_block(obj);
+ EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write)
+ {
+ pixi_write->func.get_pixels = func;
+ pixi_write->func.get_pixels_data = data;
+ }
+ EINA_COW_PIXEL_WRITE_END(o, pixi_write);
+}
+
+EAPI void
+evas_object_image_pixels_dirty_set(Eo *eo_obj, Eina_Bool dirty)
+{
+ Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
+ Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
+
+ evas_object_async_block(obj);
+ if (dirty) o->dirty_pixels = EINA_TRUE;
+ else o->dirty_pixels = EINA_FALSE;
+ o->changed = EINA_TRUE;
+ evas_object_change(eo_obj, obj);
+}
+
+EAPI Eina_Bool
+evas_object_image_pixels_dirty_get(const Eo *eo_obj)
+{
+ Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
+
+ return (o->dirty_pixels ? 1 : 0);
+}
+
+EAPI void
evas_object_image_data_set(Eo *eo_obj, void *data)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
return ok;
}
-EOLIAN static void
-_evas_image_pixels_get_callback_set(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, Evas_Object_Image_Pixels_Get_Cb func, void *data)
-{
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
- evas_object_async_block(obj);
- EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write)
- {
- pixi_write->func.get_pixels = func;
- pixi_write->func.get_pixels_data = data;
- }
- EINA_COW_PIXEL_WRITE_END(o, pixi_write);
-}
-
-EOLIAN static void
-_evas_image_pixels_dirty_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool dirty)
-{
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
- evas_object_async_block(obj);
- if (dirty) o->dirty_pixels = EINA_TRUE;
- else o->dirty_pixels = EINA_FALSE;
- o->changed = EINA_TRUE;
- evas_object_change(eo_obj, obj);
-}
-
-EOLIAN static Eina_Bool
-_evas_image_pixels_dirty_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
-{
- return (o->dirty_pixels ? 1 : 0);
-}
-
EOLIAN static Efl_Gfx_Colorspace
_evas_image_efl_gfx_buffer_colorspace_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
{