forked from enlightenment/efl
Evas: Rename Evas.Image into Efl.Canvas.Image.Internal
Make it abstract. And add Evas.Image as a legacy-only class.
This commit is contained in:
parent
3bee499503
commit
79abba52c5
|
@ -10,7 +10,7 @@ evas_eolian_pub_files = \
|
|||
lib/evas/canvas/evas_object_smart.eo \
|
||||
lib/evas/canvas/evas_common_interface.eo \
|
||||
lib/evas/canvas/evas_canvas.eo \
|
||||
lib/evas/canvas/evas_image.eo \
|
||||
lib/evas/canvas/efl_canvas_image_internal.eo \
|
||||
lib/evas/canvas/evas_draggable_interface.eo \
|
||||
lib/evas/canvas/evas_clickable_interface.eo \
|
||||
lib/evas/canvas/evas_scrollable_interface.eo \
|
||||
|
@ -56,6 +56,7 @@ evas_eolian_legacy_files = \
|
|||
lib/evas/canvas/evas_out.eo \
|
||||
lib/evas/canvas/evas_text.eo \
|
||||
lib/evas/canvas/evas_textgrid.eo \
|
||||
lib/evas/canvas/evas_image.eo \
|
||||
$(NULL)
|
||||
|
||||
evas_eolian_priv_files = \
|
||||
|
|
|
@ -190,7 +190,7 @@ main(void)
|
|||
evas_object_event_callback_add(
|
||||
d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL);
|
||||
|
||||
d.img = eo_add(EVAS_IMAGE_CLASS, d.canvas);
|
||||
d.img = eo_add(EFL_CANVAS_IMAGE_CLASS, d.canvas);
|
||||
|
||||
/* As soon as 'canvas' object is a parent for 'image' object,
|
||||
* 'canvas' keeps reference to 'image'.
|
||||
|
@ -216,7 +216,7 @@ main(void)
|
|||
}
|
||||
|
||||
/* border on the image's clipper, here just to emphasize its position */
|
||||
d.clipper_border = eo_add(EVAS_IMAGE_CLASS, d.canvas);
|
||||
d.clipper_border = eo_add(EFL_CANVAS_IMAGE_CLASS, d.canvas);
|
||||
efl_file_set(d.clipper_border, border_img_path, NULL);
|
||||
err = efl_image_load_error_get(d.clipper_border);
|
||||
|
||||
|
|
|
@ -3656,7 +3656,7 @@ _edje_map_prop_set(Evas_Map *map, const Edje_Calc_Params *pf,
|
|||
|
||||
if (ep->part->type == EDJE_PART_TYPE_IMAGE ||
|
||||
((ep->part->type == EDJE_PART_TYPE_SWALLOW) &&
|
||||
(eo_isa(mo, EVAS_IMAGE_CLASS) &&
|
||||
(eo_isa(mo, EFL_CANVAS_IMAGE_INTERNAL_CLASS) &&
|
||||
(!evas_object_image_source_get(mo))))
|
||||
)
|
||||
{
|
||||
|
|
|
@ -6490,7 +6490,7 @@ _edje_real_part_swallow(Edje *ed,
|
|||
evas_object_data_set(rp->typedata.swallow->swallowed_object, ".edje", ed);
|
||||
|
||||
//If the map is enabled, uv should be updated when image size is changed.
|
||||
if (eo_isa(rp->typedata.swallow->swallowed_object, EVAS_IMAGE_CLASS))
|
||||
if (eo_isa(rp->typedata.swallow->swallowed_object, EFL_CANVAS_IMAGE_INTERNAL_CLASS))
|
||||
evas_object_event_callback_add(obj_swallow, EVAS_CALLBACK_IMAGE_RESIZE,
|
||||
_edje_object_part_swallow_image_resize_cb,
|
||||
rp);
|
||||
|
@ -6535,7 +6535,7 @@ _edje_real_part_swallow_clear(Edje *ed, Edje_Real_Part *rp)
|
|||
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||
_edje_object_part_swallow_changed_hints_cb,
|
||||
rp);
|
||||
if (eo_isa(rp->typedata.swallow->swallowed_object, EVAS_IMAGE_CLASS))
|
||||
if (eo_isa(rp->typedata.swallow->swallowed_object, EFL_CANVAS_IMAGE_INTERNAL_CLASS))
|
||||
evas_object_event_callback_del_full(rp->typedata.swallow->swallowed_object,
|
||||
EVAS_CALLBACK_IMAGE_RESIZE,
|
||||
_edje_object_part_swallow_image_resize_cb,
|
||||
|
|
|
@ -940,7 +940,7 @@ _map_uv_set(Evas_Object *obj, Evas_Map *map)
|
|||
Evas_Coord x, y, w, h;
|
||||
|
||||
// FIXME: only handles filled obj
|
||||
if (eo_isa(obj, EVAS_IMAGE_CLASS) &&
|
||||
if (eo_isa(obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS) &&
|
||||
!evas_object_image_source_get(obj))
|
||||
{
|
||||
int iw, ih;
|
||||
|
|
|
@ -277,7 +277,7 @@ typedef void (Evas_Canvas3D_Surface_Func)(Evas_Real *out_x,
|
|||
|
||||
#include "canvas/evas_canvas3d_scene.eo.h"
|
||||
|
||||
#include "canvas/evas_image.eo.h"
|
||||
#include "canvas/efl_canvas_image_internal.eo.h"
|
||||
#include "canvas/efl_canvas_image.eo.h"
|
||||
#include "canvas/efl_canvas_snapshot.eo.h"
|
||||
#include "canvas/efl_canvas_proxy.eo.h"
|
||||
|
|
|
@ -7,7 +7,7 @@ Eina_Bool
|
|||
_evas_image_mmap_set(Eo *eo_obj, const Eina_File *f, const char *key)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
Evas_Image_Load_Opts lo;
|
||||
|
||||
if (o->cur->u.f == f)
|
||||
|
@ -36,7 +36,7 @@ _efl_canvas_image_efl_file_mmap_set(Eo *eo_obj, void *_pd EINA_UNUSED EINA_UNUSE
|
|||
void
|
||||
_evas_image_mmap_get(const Eo *eo_obj, const Eina_File **f, const char **key)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (f)
|
||||
*f = o->cur->mmaped_source ? o->cur->u.f : NULL;
|
||||
|
@ -55,7 +55,7 @@ Eina_Bool
|
|||
_evas_image_file_set(Eo *eo_obj, const char *file, const char *key)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
Evas_Image_Load_Opts lo;
|
||||
const char *file2;
|
||||
|
||||
|
@ -95,7 +95,7 @@ _efl_canvas_image_efl_file_file_set(Eo *eo_obj, void *_pd EINA_UNUSED EINA_UNUSE
|
|||
void
|
||||
_evas_image_file_get(const Eo *eo_obj, const char **file, const char **key)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (file)
|
||||
{
|
||||
|
@ -117,7 +117,7 @@ _efl_canvas_image_efl_file_file_get(Eo *eo_obj, void *_pd EINA_UNUSED EINA_UNUSE
|
|||
Efl_Image_Load_Error
|
||||
_evas_image_load_error_get(const Eo *eo_obj)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
return (Efl_Image_Load_Error) o->load_error;
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ void
|
|||
_evas_image_load_async_start(Eo *eo_obj)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
evas_object_async_block(obj);
|
||||
_image_preload_internal(eo_obj, o, EINA_FALSE);
|
||||
|
@ -178,7 +178,7 @@ void
|
|||
_evas_image_load_async_cancel(Eo *eo_obj)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
evas_object_async_block(obj);
|
||||
_image_preload_internal(eo_obj, o, EINA_TRUE);
|
||||
|
@ -194,7 +194,7 @@ void
|
|||
_evas_image_load_dpi_set(Eo *eo_obj, double dpi)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (dpi == o->load_opts->dpi) return;
|
||||
evas_object_async_block(obj);
|
||||
|
@ -221,7 +221,7 @@ _efl_canvas_image_efl_image_load_load_dpi_set(Eo *eo_obj, void *_pd EINA_UNUSED
|
|||
double
|
||||
_evas_image_load_dpi_get(const Eo *eo_obj)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
return o->load_opts->dpi;
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ void
|
|||
_evas_image_load_size_set(Eo *eo_obj, int w, int h)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if ((o->load_opts->w == w) && (o->load_opts->h == h)) return;
|
||||
evas_object_async_block(obj);
|
||||
|
@ -267,7 +267,7 @@ _efl_canvas_image_efl_image_load_load_size_set(Eo *eo_obj, void *_pd EINA_UNUSED
|
|||
void
|
||||
_evas_image_load_size_get(const Eo *eo_obj, int *w, int *h)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (w) *w = o->load_opts->w;
|
||||
if (h) *h = o->load_opts->h;
|
||||
|
@ -283,7 +283,7 @@ void
|
|||
_evas_image_load_scale_down_set(Eo *eo_obj, int scale_down)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (o->load_opts->scale_down_by == scale_down) return;
|
||||
evas_object_async_block(obj);
|
||||
|
@ -310,7 +310,7 @@ _efl_canvas_image_efl_image_load_load_scale_down_set(Eo *eo_obj, void *_pd EINA_
|
|||
int
|
||||
_evas_image_load_scale_down_get(const Eo *eo_obj)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
return o->load_opts->scale_down_by;
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ void
|
|||
_evas_image_load_region_set(Eo *eo_obj, int x, int y, int w, int h)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if ((o->load_opts->region.x == x) && (o->load_opts->region.y == y) &&
|
||||
(o->load_opts->region.w == w) && (o->load_opts->region.h == h)) return;
|
||||
|
@ -358,7 +358,7 @@ _efl_canvas_image_efl_image_load_load_region_set(Eo *eo_obj, void *_pd EINA_UNUS
|
|||
void
|
||||
_evas_image_load_region_get(const Eo *eo_obj, int *x, int *y, int *w, int *h)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (x) *x = o->load_opts->region.x;
|
||||
if (y) *y = o->load_opts->region.y;
|
||||
|
@ -376,7 +376,7 @@ void
|
|||
_evas_image_load_orientation_set(Eo *eo_obj, Eina_Bool enable)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (o->load_opts->orientation == !!enable) return;
|
||||
evas_object_async_block(obj);
|
||||
|
@ -395,7 +395,7 @@ _efl_canvas_image_efl_image_load_load_orientation_set(Eo *eo_obj, void *_pd EINA
|
|||
Eina_Bool
|
||||
_evas_image_load_orientation_get(const Eo *eo_obj)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
return o->load_opts->orientation;
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ Eina_Bool
|
|||
_evas_image_load_region_support_get(const Eo *eo_obj)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
return ENFN->image_can_region_get(ENDT, o->engine_data);
|
||||
}
|
||||
|
@ -426,7 +426,7 @@ Eina_Bool
|
|||
_evas_image_animated_get(const Eo *eo_obj)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (!ENFN->image_animated_get)
|
||||
return EINA_FALSE;
|
||||
|
@ -444,7 +444,7 @@ int
|
|||
_evas_image_animated_frame_count_get(const Eo *eo_obj)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (!ENFN->image_animated_frame_count_get ||
|
||||
!evas_object_image_animated_get(eo_obj))
|
||||
|
@ -464,7 +464,7 @@ Efl_Image_Animated_Loop_Hint
|
|||
_evas_image_animated_loop_type_get(const Eo *eo_obj)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (!ENFN->image_animated_loop_type_get ||
|
||||
!evas_object_image_animated_get(eo_obj))
|
||||
|
@ -483,7 +483,7 @@ int
|
|||
_evas_image_animated_loop_count_get(const Eo *eo_obj)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (!ENFN->image_animated_loop_count_get ||
|
||||
!evas_object_image_animated_get(eo_obj))
|
||||
|
@ -502,7 +502,7 @@ double
|
|||
_evas_image_animated_frame_duration_get(const Eo *eo_obj, int start_frame, int frame_num)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
int frame_count = 0;
|
||||
|
||||
if (!ENFN->image_animated_frame_count_get ||
|
||||
|
@ -526,7 +526,7 @@ Eina_Bool
|
|||
_evas_image_animated_frame_set(Eo *eo_obj, int frame_index)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
int frame_count = 0;
|
||||
|
||||
if (!o->cur->u.file) return EINA_FALSE;
|
||||
|
@ -567,7 +567,7 @@ _efl_canvas_image_efl_image_animated_animated_frame_set(Eo *eo_obj, void *_pd EI
|
|||
int
|
||||
_evas_image_animated_frame_get(const Eo *eo_obj)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (!o->cur->u.file) return EINA_FALSE;
|
||||
if (!evas_object_image_animated_get(eo_obj)) return EINA_FALSE;
|
||||
|
@ -583,7 +583,7 @@ _efl_canvas_image_efl_image_animated_animated_frame_get(Eo *eo_obj, void *_pd EI
|
|||
EOLIAN static void
|
||||
_efl_canvas_image_efl_gfx_buffer_buffer_size_get(Eo *eo_obj, void *_pd EINA_UNUSED EINA_UNUSED, int *w, int *h)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (w) *w = o->cur->image.w;
|
||||
if (h) *h = o->cur->image.h;
|
||||
|
@ -743,7 +743,7 @@ _efl_canvas_image_efl_gfx_buffer_buffer_data_set(Eo *eo_obj, void *_pd EINA_UNUS
|
|||
Efl_Gfx_Colorspace cspace)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
return _image_pixels_set(obj, o, pixels, w, h, stride, cspace, EINA_FALSE);
|
||||
}
|
||||
|
@ -754,7 +754,7 @@ _efl_canvas_image_efl_gfx_buffer_buffer_copy_set(Eo *eo_obj, void *_pd EINA_UNUS
|
|||
Efl_Gfx_Colorspace cspace)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
return _image_pixels_set(obj, o, (void *) pixels, w, h, stride, cspace, EINA_TRUE);
|
||||
}
|
||||
|
@ -763,7 +763,7 @@ EOLIAN static void *
|
|||
_efl_canvas_image_efl_gfx_buffer_buffer_data_get(Eo *eo_obj, void *_pd EINA_UNUSED EINA_UNUSED)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (!o->buffer_data_set || !o->engine_data || !ENFN->image_data_direct)
|
||||
return NULL;
|
||||
|
@ -779,7 +779,7 @@ _efl_canvas_image_efl_gfx_buffer_buffer_map(Eo *eo_obj, void *_pd EINA_UNUSED,
|
|||
Efl_Gfx_Colorspace cspace, int *stride)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
int len = 0, s = 0, width = 0, height = 0;
|
||||
void *data = NULL;
|
||||
|
||||
|
@ -821,7 +821,7 @@ _efl_canvas_image_efl_gfx_buffer_buffer_unmap(Eo *eo_obj, void *_pd EINA_UNUSED,
|
|||
void *data, int length)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (!ENFN->image_data_unmap || !o->engine_data)
|
||||
return EINA_FALSE;
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
abstract Efl.Canvas.Image.Internal (Evas.Object, Evas.Filter,
|
||||
Efl.Image, Efl.Gfx.Buffer,
|
||||
Efl.Gfx.Fill, Efl.Gfx.View,
|
||||
Efl.Orientation, Efl.Flipable,
|
||||
Efl.File)
|
||||
{
|
||||
data: Evas_Image_Data;
|
||||
implements {
|
||||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
Eo.Base.dbg_info_get;
|
||||
Eo.Base.finalize;
|
||||
Efl.File.save;
|
||||
Efl.Orientation.orientation.get;
|
||||
Efl.Orientation.orientation.set;
|
||||
Efl.Flipable.flip.set;
|
||||
Efl.Flipable.flip.get;
|
||||
Efl.Image.smooth_scale.set;
|
||||
Efl.Image.smooth_scale.get;
|
||||
Efl.Image.ratio.get;
|
||||
Efl.Image.border.get;
|
||||
Efl.Image.border.set;
|
||||
Efl.Image.border_scale.get;
|
||||
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.Gfx.Buffer.alpha.get;
|
||||
Efl.Gfx.Buffer.alpha.set;
|
||||
Efl.Gfx.Buffer.buffer_update_add;
|
||||
Efl.Gfx.Buffer.colorspace.get;
|
||||
Efl.Gfx.Fill.fill.set;
|
||||
Efl.Gfx.Fill.fill.get;
|
||||
Efl.Gfx.Fill.fill_auto.get;
|
||||
Efl.Gfx.Fill.fill_auto.set;
|
||||
Efl.Gfx.Filter.filter_program.set;
|
||||
Efl.Gfx.View.view_size.get;
|
||||
Evas.Filter.filter_input_alpha;
|
||||
Evas.Filter.filter_input_render;
|
||||
Evas.Filter.filter_dirty;
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@ Eina_Bool
|
|||
_evas_image_proxy_source_set(Eo *eo_obj, Evas_Object *eo_src)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
if (obj->delete_me && eo_src)
|
||||
{
|
||||
WRN("Setting deleted object %p as image source %p", eo_src, eo_obj);
|
||||
|
@ -65,7 +65,7 @@ _efl_canvas_proxy_source_set(Eo *eo_obj, void *_pd EINA_UNUSED, Evas_Object *eo_
|
|||
Evas_Object *
|
||||
_evas_image_proxy_source_get(const Eo *eo_obj)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
return o->cur->source;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ _evas_image_proxy_source_clip_set(Eo *eo_obj, Eina_Bool source_clip)
|
|||
{
|
||||
Evas_Object_Protected_Data *src_obj;
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
source_clip = !!source_clip;
|
||||
if (o->proxy_src_clip == source_clip) return;
|
||||
|
@ -102,7 +102,7 @@ _efl_canvas_proxy_source_clip_set(Eo *eo_obj, void *_pd EINA_UNUSED, Eina_Bool s
|
|||
Eina_Bool
|
||||
_evas_image_proxy_source_clip_get(const Eo *eo_obj)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
return o->proxy_src_clip;
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ void
|
|||
_evas_image_proxy_source_events_set(Eo *eo_obj, Eina_Bool source_events)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
source_events = !!source_events;
|
||||
if (obj->proxy->src_events == source_events) return;
|
||||
|
@ -152,7 +152,7 @@ _efl_canvas_proxy_source_events_get(Eo *eo_obj, void *_pd EINA_UNUSED)
|
|||
Evas_Object *
|
||||
_evas_object_image_source_get(Evas_Object *eo_obj)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
return o->cur->source;
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ _evas_image_proxy_set(Evas_Object *eo_proxy, Evas_Object *eo_src)
|
|||
{
|
||||
Evas_Object_Protected_Data *src = eo_data_scope_get(eo_src, EVAS_OBJECT_CLASS);
|
||||
Evas_Object_Protected_Data *proxy = eo_data_scope_get(eo_proxy, EVAS_OBJECT_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_proxy, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_proxy, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
_evas_image_file_set(eo_proxy, NULL, NULL);
|
||||
|
||||
|
@ -250,8 +250,8 @@ _proxy_image_get(Evas_Image_Data *o)
|
|||
if (!source)
|
||||
return NULL;
|
||||
|
||||
if (eo_isa(o->cur->source, EVAS_IMAGE_CLASS))
|
||||
source_img = eo_data_scope_get(o->cur->source, EVAS_IMAGE_CLASS);
|
||||
if (eo_isa(o->cur->source, EFL_CANVAS_IMAGE_INTERNAL_CLASS))
|
||||
source_img = eo_data_scope_get(o->cur->source, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (source_img)
|
||||
return source_img->engine_data;
|
||||
|
@ -267,7 +267,7 @@ _efl_canvas_proxy_efl_gfx_buffer_buffer_map(Eo *eo_obj, void *_pd EINA_UNUSED,
|
|||
Efl_Gfx_Colorspace cspace, int *stride)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
int len = 0, s = 0, width = 0, height = 0;
|
||||
void *image, *data = NULL;
|
||||
|
||||
|
@ -316,7 +316,7 @@ _efl_canvas_proxy_efl_gfx_buffer_buffer_unmap(Eo *eo_obj, void *_pd EINA_UNUSED,
|
|||
void *data, int length)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (!ENFN->image_data_unmap || !o->engine_data)
|
||||
return EINA_FALSE;
|
||||
|
@ -334,7 +334,7 @@ void
|
|||
_evas_image_proxy_error(Evas_Object *eo_proxy, void *context, void *output, void *surface,
|
||||
int x, int y, Eina_Bool do_async)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_proxy, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_proxy, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
Evas_Object_Protected_Data *proxy;
|
||||
Evas_Func *func;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ EOLIAN static void
|
|||
_efl_canvas_scene3d_scene3d_set(Eo *eo_obj, void *pd EINA_UNUSED, Evas_Canvas3D_Scene *scene)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
Evas_Image_Load_Opts lo;
|
||||
|
||||
if (o->cur->scene == scene) return;
|
||||
|
@ -24,7 +24,7 @@ _efl_canvas_scene3d_scene3d_set(Eo *eo_obj, void *pd EINA_UNUSED, Evas_Canvas3D_
|
|||
EOLIAN static Evas_Canvas3D_Scene *
|
||||
_efl_canvas_scene3d_scene3d_get(Eo *eo_obj, void *pd EINA_UNUSED)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
return o->cur->scene;
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ void
|
|||
_evas_image_3d_set(Evas_Object *eo_obj, Evas_Canvas3D_Scene *scene)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
Evas_Canvas3D_Scene_Data *pd_scene = eo_data_scope_get(scene,
|
||||
EVAS_CANVAS3D_SCENE_CLASS);
|
||||
EINA_COW_WRITE_BEGIN(evas_object_3d_cow, obj->data_3d, Evas_Object_3D_Data,
|
||||
|
@ -215,7 +215,7 @@ _efl_canvas_scene3d_efl_gfx_buffer_buffer_map(Eo *eo_obj, void *_pd EINA_UNUSED,
|
|||
int x, int y, int w, int h,
|
||||
Efl_Gfx_Colorspace cspace, int *stride EINA_UNUSED)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
Evas_Public_Data *e;
|
||||
Evas_Canvas3D_Object_Data *pd_parent;
|
||||
Evas_Canvas3D_Scene_Data *pd_scene;
|
||||
|
|
|
@ -69,7 +69,7 @@ _texture_proxy_subrender(Evas_Canvas3D_Texture *obj)
|
|||
|
||||
source = eo_data_scope_get(pd->source, EVAS_OBJECT_CLASS);
|
||||
|
||||
is_image = eo_isa(pd->source, EVAS_IMAGE_CLASS);
|
||||
is_image = eo_isa(pd->source, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, source->proxy, Evas_Object_Proxy_Data, proxy_write)
|
||||
{
|
||||
|
|
|
@ -1,50 +1,8 @@
|
|||
type @extern Evas_Object_Image_Pixels_Get_Cb: __undefined_type; /* FIXME: func pointers are not supported. */
|
||||
|
||||
class Evas.Image (Evas.Object, Evas.Filter,
|
||||
Efl.Image, Efl.Gfx.Buffer, Efl.Gfx.Fill, Efl.Gfx.View, Efl.File,
|
||||
Efl.Orientation, Efl.Flipable)
|
||||
class Evas.Image (Efl.Canvas.Image.Internal, Efl.File)
|
||||
{
|
||||
/* Legacy is implement inside Efl.Canvas.Image */
|
||||
legacy_prefix: evas_object_image;
|
||||
eo_prefix: null;
|
||||
[[Internal class for legacy support of Evas Image.]]
|
||||
data: null;
|
||||
implements {
|
||||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
Eo.Base.dbg_info_get;
|
||||
Eo.Base.finalize;
|
||||
Efl.File.save;
|
||||
Efl.Orientation.orientation.get;
|
||||
Efl.Orientation.orientation.set;
|
||||
Efl.Flipable.flip.set;
|
||||
Efl.Flipable.flip.get;
|
||||
Efl.Image.smooth_scale.set;
|
||||
Efl.Image.smooth_scale.get;
|
||||
Efl.Image.ratio.get;
|
||||
Efl.Image.border.get;
|
||||
Efl.Image.border.set;
|
||||
Efl.Image.border_scale.get;
|
||||
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.Gfx.Buffer.alpha.get;
|
||||
Efl.Gfx.Buffer.alpha.set;
|
||||
Efl.Gfx.Buffer.buffer_update_add;
|
||||
Efl.Gfx.Buffer.colorspace.get;
|
||||
Efl.Gfx.Fill.fill.set;
|
||||
Efl.Gfx.Fill.fill.get;
|
||||
Efl.Gfx.Fill.fill_auto.get;
|
||||
Efl.Gfx.Fill.fill_auto.set;
|
||||
Efl.Gfx.Filter.filter_program.set;
|
||||
Efl.Gfx.View.view_size.get;
|
||||
Evas.Filter.filter_input_alpha;
|
||||
Evas.Filter.filter_input_render;
|
||||
Evas.Filter.filter_dirty;
|
||||
|
||||
/* FIXME: Efl.File does not belong here */
|
||||
Efl.File.file.set;
|
||||
Efl.File.file.get;
|
||||
Efl.File.mmap.set;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "evas_image_private.h"
|
||||
#include "evas_image.eo.h"
|
||||
|
||||
#define EVAS_IMAGE_API(_o, ...) do { \
|
||||
if (EINA_UNLIKELY(!eo_isa(_o, EVAS_IMAGE_CLASS))) { \
|
||||
|
@ -47,7 +48,7 @@ evas_object_image_fill_set(Evas_Object *obj,
|
|||
Evas_Coord w, Evas_Coord h)
|
||||
{
|
||||
EVAS_IMAGE_API(obj);
|
||||
_evas_image_fill_set(obj, eo_data_scope_get(obj, EVAS_IMAGE_CLASS), x, y, w, h);
|
||||
_evas_image_fill_set(obj, eo_data_scope_get(obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS), x, y, w, h);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -157,7 +158,7 @@ EAPI int
|
|||
evas_object_image_stride_get(const Evas_Object *obj)
|
||||
{
|
||||
EVAS_IMAGE_API(obj, 0);
|
||||
Evas_Image_Data *o = eo_data_scope_get(obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
return o->cur->image.stride;
|
||||
}
|
||||
|
||||
|
@ -348,7 +349,7 @@ evas_object_image_orient_set(Evas_Object *obj, Evas_Image_Orient orient)
|
|||
{
|
||||
EVAS_IMAGE_API(obj);
|
||||
|
||||
Evas_Image_Data *o = eo_data_scope_get(obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
_evas_image_orientation_set(obj, o, orient);
|
||||
}
|
||||
|
||||
|
@ -357,7 +358,7 @@ evas_object_image_orient_get(const Evas_Object *obj)
|
|||
{
|
||||
EVAS_IMAGE_API(obj, EVAS_IMAGE_ORIENT_NONE);
|
||||
|
||||
Evas_Image_Data *o = eo_data_scope_get(obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
return o->cur->orient;
|
||||
}
|
||||
|
@ -480,7 +481,7 @@ 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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
evas_object_async_block(obj);
|
||||
EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write)
|
||||
|
@ -495,7 +496,7 @@ 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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
evas_object_async_block(obj);
|
||||
if (dirty) o->dirty_pixels = EINA_TRUE;
|
||||
|
@ -507,7 +508,7 @@ evas_object_image_pixels_dirty_set(Eo *eo_obj, Eina_Bool dirty)
|
|||
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);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
return (o->dirty_pixels ? 1 : 0);
|
||||
}
|
||||
|
@ -516,7 +517,7 @@ 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);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
void *p_data;
|
||||
Eina_Bool resize_call = EINA_FALSE;
|
||||
|
||||
|
@ -604,7 +605,7 @@ evas_object_image_data_set(Eo *eo_obj, void *data)
|
|||
EAPI void*
|
||||
evas_object_image_data_get(const Eo *eo_obj, Eina_Bool for_writing)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
int stride = 0;
|
||||
void *pixels;
|
||||
DATA32 *data;
|
||||
|
@ -653,7 +654,7 @@ EAPI void
|
|||
evas_object_image_data_copy_set(Eo *eo_obj, 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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
if (!data) return;
|
||||
evas_object_async_block(obj);
|
||||
|
@ -707,7 +708,7 @@ evas_object_image_size_set(Evas_Object *eo_obj, int w, int h)
|
|||
EVAS_IMAGE_API(eo_obj);
|
||||
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
int stride = 0;
|
||||
|
||||
if (o->cur->scene) return;
|
||||
|
@ -774,7 +775,7 @@ evas_object_image_colorspace_set(Evas_Object *eo_obj, Evas_Colorspace cspace)
|
|||
EVAS_IMAGE_API(eo_obj);
|
||||
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
evas_object_async_block(obj);
|
||||
_evas_image_cleanup(eo_obj, obj, o);
|
||||
|
@ -795,7 +796,7 @@ evas_object_image_video_surface_set(Evas_Object *eo_obj, Evas_Video_Surface *sur
|
|||
EVAS_IMAGE_LEGACY_API(eo_obj);
|
||||
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
evas_object_async_block(obj);
|
||||
|
||||
_evas_image_cleanup(eo_obj, obj, o);
|
||||
|
@ -855,7 +856,7 @@ evas_object_image_video_surface_get(const Evas_Object *eo_obj)
|
|||
{
|
||||
EVAS_IMAGE_LEGACY_API(eo_obj, NULL);
|
||||
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
return (!o->video_surface ? NULL : &o->pixels->video);
|
||||
}
|
||||
|
||||
|
@ -865,7 +866,7 @@ evas_object_image_video_surface_caps_set(Evas_Object *eo_obj, unsigned int caps)
|
|||
EVAS_IMAGE_LEGACY_API(eo_obj);
|
||||
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
evas_object_async_block(obj);
|
||||
|
||||
_evas_image_cleanup(eo_obj, obj, o);
|
||||
|
@ -883,7 +884,7 @@ evas_object_image_video_surface_caps_get(const Evas_Object *eo_obj)
|
|||
{
|
||||
EVAS_IMAGE_LEGACY_API(eo_obj, 0);
|
||||
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
return (!o->video_surface ? 0 : o->pixels->video_caps);
|
||||
}
|
||||
|
||||
|
@ -920,7 +921,7 @@ evas_object_image_source_visible_set(Evas_Object *eo, Eina_Bool visible)
|
|||
Evas_Object_Protected_Data *src_obj;
|
||||
Evas_Image_Data *o;
|
||||
|
||||
o = eo_data_scope_get(eo, EVAS_IMAGE_CLASS);
|
||||
o = eo_data_scope_get(eo, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
if (!o->cur->source) return;
|
||||
|
||||
visible = !!visible;
|
||||
|
@ -952,7 +953,7 @@ evas_object_image_source_visible_get(const Evas_Object *eo)
|
|||
Evas_Image_Data *o;
|
||||
Eina_Bool visible;
|
||||
|
||||
o = eo_data_scope_get(eo, EVAS_IMAGE_CLASS);
|
||||
o = eo_data_scope_get(eo, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
if (!o->cur->source) visible = EINA_FALSE;
|
||||
src_obj = eo_data_scope_get(o->cur->source, EVAS_OBJECT_CLASS);
|
||||
if (src_obj) visible = !src_obj->proxy->src_invisible;
|
||||
|
@ -981,7 +982,7 @@ evas_object_image_data_convert(Evas_Object *eo_obj, Evas_Colorspace to_cspace)
|
|||
}
|
||||
|
||||
evas_object_async_block(obj);
|
||||
o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
if ((o->preloading) && (o->engine_data))
|
||||
{
|
||||
o->preloading = EINA_FALSE;
|
||||
|
@ -1010,7 +1011,7 @@ evas_object_image_reload(Evas_Object *eo_obj)
|
|||
Evas_Image_Data *o;
|
||||
|
||||
evas_object_async_block(obj);
|
||||
o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
if ((o->preloading) && (o->engine_data))
|
||||
{
|
||||
o->preloading = EINA_FALSE;
|
||||
|
@ -1053,7 +1054,7 @@ evas_object_image_pixels_import(Evas_Object *eo_obj, Evas_Pixel_Import_Source *p
|
|||
}
|
||||
|
||||
evas_object_async_block(obj);
|
||||
o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
o = eo_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
_evas_image_cleanup(eo_obj, obj, o);
|
||||
if ((pixels->w != o->cur->image.w) || (pixels->h != o->cur->image.h)) return EINA_FALSE;
|
||||
|
||||
|
@ -1118,3 +1119,40 @@ evas_object_image_alpha_mask_set(Evas_Object *eo_obj EINA_UNUSED, Eina_Bool isma
|
|||
DBG("This function is not implemented, has never been and never will be.");
|
||||
EVAS_IMAGE_LEGACY_API(eo_obj);
|
||||
}
|
||||
|
||||
|
||||
/* FIXME: Temporarily allow efl_file_ APIs on Evas.Image.
|
||||
* They don't belong here, as only Efl.Canvas.Image should support them.
|
||||
* Elm.Image uses them, though, instead of using the legacy APIs...
|
||||
*/
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_image_efl_file_file_set(Eo *obj, void *pd EINA_UNUSED, const char *file, const char *key)
|
||||
{
|
||||
ERR("efl_file_set shouldn't be used on Evas.Image. please switch to Efl.Canvas.Image");
|
||||
return _evas_image_file_set(obj, file, key);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_file_file_get(Eo *obj, void *pd EINA_UNUSED, const char **file, const char **key)
|
||||
{
|
||||
ERR("efl_file_get shouldn't be used on Evas.Image. please switch to Efl.Canvas.Image");
|
||||
_evas_image_file_get(obj, file, key);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_image_efl_file_mmap_set(Eo *obj, void *pd EINA_UNUSED, const Eina_File *f, const char *key)
|
||||
{
|
||||
ERR("efl_file_mmap_set shouldn't be used on Evas.Image. please switch to Efl.Canvas.Image");
|
||||
return _evas_image_mmap_set(obj, f, key);
|
||||
}
|
||||
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_file_mmap_get(Eo *obj, void *pd EINA_UNUSED, const Eina_File **f, const char **key)
|
||||
{
|
||||
ERR("efl_file_mmap_get shouldn't be used on Evas.Image. please switch to Efl.Canvas.Image");
|
||||
_evas_image_mmap_get(obj, f, key);
|
||||
}
|
||||
|
||||
#include "canvas/evas_image.eo.c"
|
||||
|
|
|
@ -736,7 +736,7 @@ _image_data_unset(Evas_Object_Protected_Data *obj, Eina_List **list)
|
|||
FREE; \
|
||||
data->engine_data = NULL;\
|
||||
}
|
||||
CHECK(EVAS_IMAGE_CLASS, Evas_Image_Data,
|
||||
CHECK(EFL_CANVAS_IMAGE_INTERNAL_CLASS, Evas_Image_Data,
|
||||
ENFN->image_free(ENDT, data->engine_data))
|
||||
else CHECK(EVAS_VG_CLASS, Evas_VG_Data,
|
||||
obj->layer->evas->engine.func->ector_free(data->engine_data))
|
||||
|
@ -802,7 +802,7 @@ _image_data_regenerate(Evas_Object *eo_obj)
|
|||
STRUCT *data = eo_data_scope_get(eo_obj, TYPE);\
|
||||
REGEN; \
|
||||
}
|
||||
CHECK(EVAS_IMAGE_CLASS, Evas_Image_Data, _image_image_data_regenerate(eo_obj, obj, data))
|
||||
CHECK(EFL_CANVAS_IMAGE_INTERNAL_CLASS, Evas_Image_Data, _image_image_data_regenerate(eo_obj, obj, data))
|
||||
else CHECK(EFL_CANVAS_IMAGE_CLASS, Evas_Image_Data, _image_image_data_regenerate(eo_obj, obj, data))
|
||||
else CHECK(EFL_CANVAS_SCENE3D_CLASS, Evas_Image_Data, _image_image_data_regenerate(eo_obj, obj, data))
|
||||
//else CHECK(EVAS_VG_CLASS, Evas_VG_Data,)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "evas_image_private.h"
|
||||
|
||||
#define MY_CLASS EVAS_IMAGE_CLASS
|
||||
#define MY_CLASS EFL_CANVAS_IMAGE_INTERNAL_CLASS
|
||||
#define MY_CLASS_NAME "Evas_Image"
|
||||
|
||||
/* private magic number for image objects */
|
||||
|
@ -169,7 +169,7 @@ _init_cow(void)
|
|||
}
|
||||
|
||||
EOLIAN static Eo *
|
||||
_evas_image_eo_base_constructor(Eo *eo_obj, Evas_Image_Data *o)
|
||||
_efl_canvas_image_internal_eo_base_constructor(Eo *eo_obj, Evas_Image_Data *o)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
Evas_Colorspace cspace;
|
||||
|
@ -199,7 +199,7 @@ _evas_image_eo_base_constructor(Eo *eo_obj, Evas_Image_Data *o)
|
|||
}
|
||||
|
||||
EOLIAN static Eo *
|
||||
_evas_image_eo_base_finalize(Eo *eo_obj, Evas_Image_Data *o)
|
||||
_efl_canvas_image_internal_eo_base_finalize(Eo *eo_obj, Evas_Image_Data *o)
|
||||
{
|
||||
if (!o->filled_set)
|
||||
efl_gfx_fill_auto_set(eo_obj, EINA_TRUE);
|
||||
|
@ -429,7 +429,7 @@ _get_image_orient_from_orient_flip(Efl_Orient orient, Efl_Flip flip)
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_orientation_orientation_set(Eo *obj, Evas_Image_Data *o, Efl_Orient dir)
|
||||
_efl_canvas_image_internal_efl_orientation_orientation_set(Eo *obj, Evas_Image_Data *o, Efl_Orient dir)
|
||||
{
|
||||
Evas_Image_Orient orient;
|
||||
|
||||
|
@ -440,13 +440,13 @@ _evas_image_efl_orientation_orientation_set(Eo *obj, Evas_Image_Data *o, Efl_Ori
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Orient
|
||||
_evas_image_efl_orientation_orientation_get(Eo *obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
_efl_canvas_image_internal_efl_orientation_orientation_get(Eo *obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
{
|
||||
return o->orient_value;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_flipable_flip_set(Eo *obj, Evas_Image_Data *o, Efl_Flip flip)
|
||||
_efl_canvas_image_internal_efl_flipable_flip_set(Eo *obj, Evas_Image_Data *o, Efl_Flip flip)
|
||||
{
|
||||
Evas_Image_Orient orient;
|
||||
|
||||
|
@ -457,13 +457,13 @@ _evas_image_efl_flipable_flip_set(Eo *obj, Evas_Image_Data *o, Efl_Flip flip)
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Flip
|
||||
_evas_image_efl_flipable_flip_get(Eo *obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
_efl_canvas_image_internal_efl_flipable_flip_get(Eo *obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
{
|
||||
return o->flip_value;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_eo_base_dbg_info_get(Eo *eo_obj, Evas_Image_Data *o, Eo_Dbg_Info *root)
|
||||
_efl_canvas_image_internal_eo_base_dbg_info_get(Eo *eo_obj, Evas_Image_Data *o, Eo_Dbg_Info *root)
|
||||
{
|
||||
eo_dbg_info_get(eo_super(eo_obj, MY_CLASS), root);
|
||||
Eo_Dbg_Info *group = EO_DBG_INFO_LIST_APPEND(root, MY_CLASS_NAME);
|
||||
|
@ -490,7 +490,7 @@ _evas_image_eo_base_dbg_info_get(Eo *eo_obj, Evas_Image_Data *o, Eo_Dbg_Info *ro
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_image_border_set(Eo *eo_obj, Evas_Image_Data *o, int l, int r, int t, int b)
|
||||
_efl_canvas_image_internal_efl_image_border_set(Eo *eo_obj, Evas_Image_Data *o, int l, int r, int t, int b)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
|
||||
|
@ -517,7 +517,7 @@ _evas_image_efl_image_border_set(Eo *eo_obj, Evas_Image_Data *o, int l, int r, i
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_image_border_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *l, int *r, int *t, int *b)
|
||||
_efl_canvas_image_internal_efl_image_border_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *l, int *r, int *t, int *b)
|
||||
{
|
||||
if (l) *l = o->cur->border.l;
|
||||
if (r) *r = o->cur->border.r;
|
||||
|
@ -526,7 +526,7 @@ _evas_image_efl_image_border_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_image_border_center_fill_set(Eo *eo_obj, Evas_Image_Data *o, Efl_Gfx_Border_Fill_Mode _fill)
|
||||
_efl_canvas_image_internal_efl_image_border_center_fill_set(Eo *eo_obj, Evas_Image_Data *o, Efl_Gfx_Border_Fill_Mode _fill)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
Evas_Border_Fill_Mode fill = (Evas_Border_Fill_Mode) _fill;
|
||||
|
@ -542,13 +542,13 @@ _evas_image_efl_image_border_center_fill_set(Eo *eo_obj, Evas_Image_Data *o, Efl
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Gfx_Border_Fill_Mode
|
||||
_evas_image_efl_image_border_center_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
_efl_canvas_image_internal_efl_image_border_center_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
{
|
||||
return (Efl_Gfx_Border_Fill_Mode) o->cur->border.fill;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_gfx_fill_fill_auto_set(Eo *eo_obj, Evas_Image_Data* o, Eina_Bool setting)
|
||||
_efl_canvas_image_internal_efl_gfx_fill_fill_auto_set(Eo *eo_obj, Evas_Image_Data* o, Eina_Bool setting)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
setting = !!setting;
|
||||
|
@ -574,13 +574,13 @@ _evas_image_efl_gfx_fill_fill_auto_set(Eo *eo_obj, Evas_Image_Data* o, Eina_Bool
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_image_efl_gfx_fill_fill_auto_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
_efl_canvas_image_internal_efl_gfx_fill_fill_auto_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
{
|
||||
return o->filled;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_image_border_scale_set(Eo *eo_obj, Evas_Image_Data *o, double scale)
|
||||
_efl_canvas_image_internal_efl_image_border_scale_set(Eo *eo_obj, Evas_Image_Data *o, double scale)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
|
||||
|
@ -595,7 +595,7 @@ _evas_image_efl_image_border_scale_set(Eo *eo_obj, Evas_Image_Data *o, double sc
|
|||
}
|
||||
|
||||
EOLIAN static double
|
||||
_evas_image_efl_image_border_scale_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
_efl_canvas_image_internal_efl_image_border_scale_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
{
|
||||
return o->cur->border.scale;
|
||||
}
|
||||
|
@ -631,7 +631,7 @@ _evas_image_fill_set(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h)
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_gfx_fill_fill_set(Eo *eo_obj, Evas_Image_Data *o,
|
||||
_efl_canvas_image_internal_efl_gfx_fill_fill_set(Eo *eo_obj, Evas_Image_Data *o,
|
||||
int x, int y, int w, int h)
|
||||
{
|
||||
// Should (0,0,0,0) reset the filled flag to true?
|
||||
|
@ -641,7 +641,7 @@ _evas_image_efl_gfx_fill_fill_set(Eo *eo_obj, Evas_Image_Data *o,
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_gfx_fill_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o,
|
||||
_efl_canvas_image_internal_efl_gfx_fill_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o,
|
||||
int *x, int *y, int *w, int *h)
|
||||
{
|
||||
if (x) *x = o->cur->fill.x;
|
||||
|
@ -651,7 +651,7 @@ _evas_image_efl_gfx_fill_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o,
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_gfx_view_view_size_get(Eo *eo_obj, Evas_Image_Data *o, int *w, int *h)
|
||||
_efl_canvas_image_internal_efl_gfx_view_view_size_get(Eo *eo_obj, Evas_Image_Data *o, int *w, int *h)
|
||||
{
|
||||
int uvw, uvh;
|
||||
Evas_Object_Protected_Data *source = NULL;
|
||||
|
@ -693,7 +693,7 @@ _evas_image_efl_gfx_view_view_size_get(Eo *eo_obj, Evas_Image_Data *o, int *w, i
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_gfx_buffer_buffer_update_add(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h)
|
||||
_efl_canvas_image_internal_efl_gfx_buffer_buffer_update_add(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
Eina_Rectangle *r;
|
||||
|
@ -736,7 +736,7 @@ _evas_image_efl_gfx_buffer_buffer_update_add(Eo *eo_obj, Evas_Image_Data *o, int
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool has_alpha)
|
||||
_efl_canvas_image_internal_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool has_alpha)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
|
||||
|
@ -782,13 +782,13 @@ _evas_image_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool h
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_image_efl_gfx_buffer_alpha_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
_efl_canvas_image_internal_efl_gfx_buffer_alpha_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
{
|
||||
return o->cur->has_alpha;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_image_smooth_scale_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool smooth_scale)
|
||||
_efl_canvas_image_internal_efl_image_smooth_scale_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool smooth_scale)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
|
||||
|
@ -805,20 +805,20 @@ _evas_image_efl_image_smooth_scale_set(Eo *eo_obj, Evas_Image_Data *o, Eina_Bool
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_image_efl_image_smooth_scale_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
_efl_canvas_image_internal_efl_image_smooth_scale_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
{
|
||||
return o->cur->smooth_scale;
|
||||
}
|
||||
|
||||
EOLIAN static double
|
||||
_evas_image_efl_image_ratio_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
_efl_canvas_image_internal_efl_image_ratio_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
{
|
||||
if (!o->cur->image.h) return 1.0;
|
||||
return (double) o->cur->image.w / (double) o->cur->image.h;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_image_efl_file_save(const Eo *eo_obj, Evas_Image_Data *o, const char *file, const char *key, const char *flags)
|
||||
_efl_canvas_image_internal_efl_file_save(const Eo *eo_obj, Evas_Image_Data *o, const char *file, const char *key, const char *flags)
|
||||
{
|
||||
DATA32 *data = NULL;
|
||||
int quality = 80, compress = 9, ok = 0;
|
||||
|
@ -1002,7 +1002,7 @@ _evas_image_efl_file_save(const Eo *eo_obj, Evas_Image_Data *o, const char *file
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Gfx_Colorspace
|
||||
_evas_image_efl_gfx_buffer_colorspace_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
_efl_canvas_image_internal_efl_gfx_buffer_colorspace_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
{
|
||||
return (Efl_Gfx_Colorspace) o->cur->cspace;
|
||||
}
|
||||
|
@ -1016,7 +1016,7 @@ _on_image_native_surface_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_O
|
|||
Eina_Bool
|
||||
_evas_image_native_surface_set(Eo *eo_obj, Evas_Native_Surface *surf)
|
||||
{
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *o = eo_data_scope_get(eo_obj, MY_CLASS);
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
evas_object_async_block(obj);
|
||||
evas_object_event_callback_del_full
|
||||
|
@ -1039,7 +1039,7 @@ Evas_Native_Surface *
|
|||
_evas_image_native_surface_get(const Evas_Object *eo_obj)
|
||||
{
|
||||
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_Image_Data *o = eo_data_scope_get(eo_obj, MY_CLASS);
|
||||
Evas_Native_Surface *surf = NULL;
|
||||
|
||||
if (ENFN->image_native_get)
|
||||
|
@ -1049,7 +1049,7 @@ _evas_image_native_surface_get(const Evas_Object *eo_obj)
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_image_scale_hint_set(Eo *eo_obj, Evas_Image_Data *o, Efl_Image_Scale_Hint hint)
|
||||
_efl_canvas_image_internal_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);
|
||||
|
@ -1076,13 +1076,13 @@ _evas_image_efl_image_scale_hint_set(Eo *eo_obj, Evas_Image_Data *o, Efl_Image_S
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Image_Scale_Hint
|
||||
_evas_image_efl_image_scale_hint_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
_efl_canvas_image_internal_efl_image_scale_hint_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
{
|
||||
return o->scale_hint;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_image_content_hint_set(Eo *eo_obj, Evas_Image_Data *o, Efl_Image_Content_Hint hint)
|
||||
_efl_canvas_image_internal_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);
|
||||
|
@ -1109,7 +1109,7 @@ _evas_image_efl_image_content_hint_set(Eo *eo_obj, Evas_Image_Data *o, Efl_Image
|
|||
}
|
||||
|
||||
EOLIAN static Efl_Image_Content_Hint
|
||||
_evas_image_efl_image_content_hint_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
_efl_canvas_image_internal_efl_image_content_hint_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
|
||||
{
|
||||
return o->content_hint;
|
||||
}
|
||||
|
@ -1365,7 +1365,7 @@ evas_object_image_init(Evas_Object *eo_obj)
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_eo_base_destructor(Eo *eo_obj, Evas_Image_Data *o EINA_UNUSED)
|
||||
_efl_canvas_image_internal_eo_base_destructor(Eo *eo_obj, Evas_Image_Data *o EINA_UNUSED)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
|
||||
|
@ -1380,7 +1380,7 @@ _evas_object_image_free(Evas_Object *obj)
|
|||
{
|
||||
Evas_Image_Data *o;
|
||||
|
||||
EINA_SAFETY_ON_FALSE_RETURN(eo_isa(obj, EVAS_IMAGE_CLASS));
|
||||
EINA_SAFETY_ON_FALSE_RETURN(eo_isa(obj, MY_CLASS));
|
||||
|
||||
o = eo_data_scope_get(obj, MY_CLASS);
|
||||
|
||||
|
@ -1621,7 +1621,7 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj,
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_evas_filter_filter_dirty(Eo *eo_obj, Evas_Image_Data *o)
|
||||
_efl_canvas_image_internal_evas_filter_filter_dirty(Eo *eo_obj, Evas_Image_Data *o)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
|
||||
|
@ -1630,24 +1630,24 @@ _evas_image_evas_filter_filter_dirty(Eo *eo_obj, Evas_Image_Data *o)
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_image_evas_filter_filter_input_alpha(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o EINA_UNUSED)
|
||||
_efl_canvas_image_internal_evas_filter_filter_input_alpha(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o EINA_UNUSED)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_gfx_filter_filter_program_set(Eo *obj, Evas_Image_Data *pd,
|
||||
const char *code, const char *name)
|
||||
_efl_canvas_image_internal_efl_gfx_filter_filter_program_set(Eo *obj, Evas_Image_Data *pd,
|
||||
const char *code, const char *name)
|
||||
{
|
||||
pd->has_filter = (code != NULL);
|
||||
efl_gfx_filter_program_set(eo_super(obj, MY_CLASS), code, name);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_image_evas_filter_filter_input_render(Eo *eo_obj, Evas_Image_Data *o,
|
||||
void *_filter, void *context,
|
||||
int l, int r EINA_UNUSED, int t, int b EINA_UNUSED,
|
||||
Eina_Bool do_async)
|
||||
_efl_canvas_image_internal_evas_filter_filter_input_render(Eo *eo_obj, Evas_Image_Data *o,
|
||||
void *_filter, void *context,
|
||||
int l, int r EINA_UNUSED, int t, int b EINA_UNUSED,
|
||||
Eina_Bool do_async)
|
||||
{
|
||||
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
|
||||
Evas_Filter_Context *filter = _filter;
|
||||
|
@ -3276,7 +3276,7 @@ _evas_object_image_video_overlay_do(Evas_Object *eo_obj)
|
|||
void *
|
||||
_evas_object_image_surface_get(Evas_Object *eo, Evas_Object_Protected_Data *obj)
|
||||
{
|
||||
Evas_Image_Data *pd = eo_data_scope_get(eo, EVAS_IMAGE_CLASS);
|
||||
Evas_Image_Data *pd = eo_data_scope_get(eo, MY_CLASS);
|
||||
|
||||
if (pd->engine_data &&
|
||||
(pd->cur->image.w == obj->cur->geometry.w) &&
|
||||
|
@ -3301,41 +3301,6 @@ _evas_object_image_surface_get(Evas_Object *eo, Evas_Object_Protected_Data *obj)
|
|||
return pd->engine_data;
|
||||
}
|
||||
|
||||
/* FIXME: Temporarily allow efl_file_ APIs on Evas.Image.
|
||||
* They don't belong here, as only Efl.Canvas.Image should support them.
|
||||
* Elm.Image uses them, though, instead of using the legacy APIs...
|
||||
*/
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_image_efl_file_file_set(Eo *obj, Evas_Image_Data *pd EINA_UNUSED, const char *file, const char *key)
|
||||
{
|
||||
DBG("efl_file_set shouldn't be used on Evas.Image. please switch to Efl.Canvas.Image");
|
||||
return _evas_image_file_set(obj, file, key);
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_file_file_get(Eo *obj, Evas_Image_Data *pd EINA_UNUSED, const char **file, const char **key)
|
||||
{
|
||||
DBG("efl_file_get shouldn't be used on Evas.Image. please switch to Efl.Canvas.Image");
|
||||
_evas_image_file_get(obj, file, key);
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_evas_image_efl_file_mmap_set(Eo *obj, Evas_Image_Data *pd EINA_UNUSED, const Eina_File *f, const char *key)
|
||||
{
|
||||
DBG("efl_file_mmap_set shouldn't be used on Evas.Image. please switch to Efl.Canvas.Image");
|
||||
return _evas_image_mmap_set(obj, f, key);
|
||||
}
|
||||
|
||||
|
||||
EOLIAN static void
|
||||
_evas_image_efl_file_mmap_get(Eo *obj, Evas_Image_Data *pd EINA_UNUSED, const Eina_File **f, const char **key)
|
||||
{
|
||||
DBG("efl_file_mmap_get shouldn't be used on Evas.Image. please switch to Efl.Canvas.Image");
|
||||
_evas_image_mmap_get(obj, f, key);
|
||||
}
|
||||
|
||||
|
||||
#include "canvas/evas_image.eo.c"
|
||||
#include "canvas/efl_canvas_image_internal.eo.c"
|
||||
|
||||
/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
|
||||
|
|
|
@ -244,7 +244,7 @@ evas_object_free(Evas_Object *eo_obj, int clean_layer)
|
|||
|
||||
int was_smart_child = 0;
|
||||
|
||||
if (eo_isa(eo_obj, EVAS_IMAGE_CLASS))
|
||||
if (eo_isa(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS))
|
||||
_evas_object_image_free(eo_obj);
|
||||
evas_object_map_set(eo_obj, NULL);
|
||||
if (obj->map->prev.map) evas_map_free(obj->map->prev.map);
|
||||
|
@ -795,7 +795,7 @@ _evas_object_eo_base_destructor(Eo *eo_obj, Evas_Object_Protected_Data *obj)
|
|||
/* FIXME: Proxies should listen to source death */
|
||||
EINA_LIST_FOREACH_SAFE(obj->proxy->proxies, l, l2, proxy)
|
||||
{
|
||||
if (eo_isa(proxy, EVAS_IMAGE_CLASS))
|
||||
if (eo_isa(proxy, EFL_CANVAS_IMAGE_INTERNAL_CLASS))
|
||||
evas_object_image_source_unset(proxy);
|
||||
if (eo_isa(proxy, EFL_GFX_FILTER_INTERFACE))
|
||||
efl_gfx_filter_source_set(proxy, NULL, eo_obj);
|
||||
|
|
|
@ -1871,7 +1871,7 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object *eo_
|
|||
ENFN->rectangle_draw(ENDT, ctx, proxy_write->surface, 0, 0, w, h, do_async);
|
||||
ENFN->context_free(ENDT, ctx);
|
||||
|
||||
if (eo_isa(eo_proxy, EVAS_IMAGE_CLASS))
|
||||
if (eo_isa(eo_proxy, EFL_CANVAS_IMAGE_INTERNAL_CLASS))
|
||||
source_clip = _evas_image_proxy_source_clip_get(eo_proxy);
|
||||
|
||||
Evas_Proxy_Render_Data proxy_render_data = {
|
||||
|
@ -1927,7 +1927,7 @@ evas_render_mask_subrender(Evas_Public_Data *evas,
|
|||
|
||||
RD(level, "evas_render_mask_subrender(%p, prev: %p)\n", mask, prev_mask);
|
||||
|
||||
is_image = eo_isa(mask->object, EVAS_IMAGE_CLASS);
|
||||
is_image = eo_isa(mask->object, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||
|
||||
x = mask->cur->geometry.x;
|
||||
y = mask->cur->geometry.y;
|
||||
|
|
|
@ -645,7 +645,7 @@ START_TEST(evas_object_image_defaults)
|
|||
eo_del(o);
|
||||
|
||||
/* test eo defaults */
|
||||
o = eo_add(EVAS_IMAGE_CLASS, e);
|
||||
o = eo_add(EFL_CANVAS_IMAGE_CLASS, e);
|
||||
fail_if(!efl_gfx_fill_auto_get(o));
|
||||
eo_del(o);
|
||||
|
||||
|
|
Loading…
Reference in New Issue