From b5d87aef1c6a0c296a33d8e5c0177e9f1b8e814f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Wed, 2 Mar 2016 16:18:40 +0900 Subject: [PATCH] Efl.Gfx.View: Rename property size to view_size size is an insanely generic name, so there would be clashes in language bindings. Use eo_prefix. --- src/lib/efl/interfaces/efl_gfx_view.eo | 27 ++++++++++--------------- src/lib/evas/canvas/evas_image.eo | 4 ++-- src/lib/evas/canvas/evas_object_image.c | 6 ++---- src/lib/evas/canvas/evas_object_vg.c | 8 ++++---- src/lib/evas/canvas/evas_vg.eo | 4 ++-- 5 files changed, 21 insertions(+), 28 deletions(-) diff --git a/src/lib/efl/interfaces/efl_gfx_view.eo b/src/lib/efl/interfaces/efl_gfx_view.eo index 31a1186cf4..d90f63bf7f 100644 --- a/src/lib/efl/interfaces/efl_gfx_view.eo +++ b/src/lib/efl/interfaces/efl_gfx_view.eo @@ -1,23 +1,18 @@ interface Efl.Gfx.View { legacy_prefix: null; + eo_prefix: efl_gfx; methods { - @property size { - set { - [[Sets the size of the given image object. + @property view_size { + [[The dimensions of this object's viewport. - This function will scale down or crop the image so that it is - treated as if it were at the given size. If the size given is - smaller than the image, it will be cropped. If the size given is - larger, then the image will be treated as if it were in the upper - left hand corner of a larger image that is otherwise transparent. - ]] - } - get { - [[Retrieves the size of the given image object. - - See @.size.set for more details. - ]] - } + This property will scale down or crop the image so that it is + treated as if it were of the given size. If the given size is + smaller than the image, it will be cropped. If it's larger, then + the image will be treated as if it were in the upper left corner + of a larger image that is otherwise transparent. + ]] + set {} + get {} values { w: int; [[The new width of the image.]] h: int; [[The new height of the image.]] diff --git a/src/lib/evas/canvas/evas_image.eo b/src/lib/evas/canvas/evas_image.eo index f78a471530..2536a5f36b 100644 --- a/src/lib/evas/canvas/evas_image.eo +++ b/src/lib/evas/canvas/evas_image.eo @@ -759,8 +759,8 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Gfx.Fill, Efl.Gfx.View, Efl.Gfx.Fill.fill.get; Efl.Gfx.Fill.filled.get; Efl.Gfx.Fill.filled.set; - Efl.Gfx.View.size.set; - Efl.Gfx.View.size.get; + Efl.Gfx.View.view_size.set; + Efl.Gfx.View.view_size.get; Efl.Gfx.Filter.filter_program.set; Evas.Filter.filter_input_alpha; Evas.Filter.filter_input_render; diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 747a269088..7c663b3698 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -1072,7 +1072,7 @@ evas_object_image_size_set(Evas_Image *obj, int w, int h) } EOLIAN static void -_evas_image_efl_gfx_view_size_set(Eo *eo_obj, Evas_Image_Data *o, int w, int h) +_evas_image_efl_gfx_view_view_size_set(Eo *eo_obj, Evas_Image_Data *o, int w, int h) { Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); @@ -1142,9 +1142,7 @@ evas_object_image_size_get(const Evas_Image *obj, int *w, int *h) } EOLIAN static void -_evas_image_efl_gfx_view_size_get(Eo *eo_obj, - Evas_Image_Data *o, - int *w, int *h) +_evas_image_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; diff --git a/src/lib/evas/canvas/evas_object_vg.c b/src/lib/evas/canvas/evas_object_vg.c index 929b584871..ac805a7eef 100644 --- a/src/lib/evas/canvas/evas_object_vg.c +++ b/src/lib/evas/canvas/evas_object_vg.c @@ -425,16 +425,16 @@ evas_object_vg_was_opaque(Evas_Object *eo_obj EINA_UNUSED, } void -_evas_vg_efl_gfx_view_size_get(Eo *obj EINA_UNUSED, Evas_VG_Data *pd, - int *w, int *h) +_evas_vg_efl_gfx_view_view_size_get(Eo *obj EINA_UNUSED, Evas_VG_Data *pd, + int *w, int *h) { if (w) *w = pd->width; if (h) *h = pd->height; } void -_evas_vg_efl_gfx_view_size_set(Eo *obj EINA_UNUSED, Evas_VG_Data *pd, - int w, int h) +_evas_vg_efl_gfx_view_view_size_set(Eo *obj EINA_UNUSED, Evas_VG_Data *pd, + int w, int h) { pd->width = w; pd->height = h; diff --git a/src/lib/evas/canvas/evas_vg.eo b/src/lib/evas/canvas/evas_vg.eo index fb9f7b972d..53aa19fefc 100644 --- a/src/lib/evas/canvas/evas_vg.eo +++ b/src/lib/evas/canvas/evas_vg.eo @@ -24,7 +24,7 @@ class Evas.VG (Evas.Object, Efl.Gfx.Fill, Efl.Gfx.View) Eo.Base.destructor; Efl.Gfx.Fill.fill.set; Efl.Gfx.Fill.fill.get; - Efl.Gfx.View.size.set; - Efl.Gfx.View.size.get; + Efl.Gfx.View.view_size.set; + Efl.Gfx.View.view_size.get; } }