summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-09-18 10:08:56 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-09-18 10:08:56 +0200
commit28f589d7950516e5b02a5c8a625a2f9c02f8173a (patch)
tree0a5706f55e5887d094636ad663e55da1abad6e3a
parent1f767c81e5d30d8caf88934bb36a71603fd5fc19 (diff)
efl/image: rename "border" -> "border_insets"
Summary: this is a clearer name which makes the intent of the API more obvious at a glance ref T7875 Subscribers: cedric, #reviewers, #committers Tags: #efl_api Maniphest Tasks: T7875 Differential Revision: https://phab.enlightenment.org/D9996
-rw-r--r--src/examples/evas/evas-object-manipulation-eo.c2
-rw-r--r--src/lib/efl/interfaces/efl_gfx_image.eo14
-rw-r--r--src/lib/evas/canvas/efl_canvas_image_internal.eo4
-rw-r--r--src/lib/evas/canvas/evas_image_legacy.c8
-rw-r--r--src/lib/evas/canvas/evas_object_image.c8
-rw-r--r--src/tests/evas/evas_test_image.c2
6 files changed, 19 insertions, 19 deletions
diff --git a/src/examples/evas/evas-object-manipulation-eo.c b/src/examples/evas/evas-object-manipulation-eo.c
index a3d5949c9d..6fba6e02bf 100644
--- a/src/examples/evas/evas-object-manipulation-eo.c
+++ b/src/examples/evas/evas-object-manipulation-eo.c
@@ -220,7 +220,7 @@ main(void)
220 } 220 }
221 else 221 else
222 { 222 {
223 efl_gfx_image_border_set(d.clipper_border, 3, 3, 3, 3); 223 efl_gfx_image_border_insets_set(d.clipper_border, 3, 3, 3, 3);
224 efl_gfx_image_center_fill_mode_set(d.clipper_border, EFL_GFX_CENTER_FILL_MODE_NONE); 224 efl_gfx_image_center_fill_mode_set(d.clipper_border, EFL_GFX_CENTER_FILL_MODE_NONE);
225 efl_gfx_entity_position_set(d.clipper_border, EINA_POSITION2D((WIDTH / 4) -3, (HEIGHT / 4) - 3)); 225 efl_gfx_entity_position_set(d.clipper_border, EINA_POSITION2D((WIDTH / 4) -3, (HEIGHT / 4) - 3));
226 efl_gfx_entity_size_set(d.clipper_border, EINA_SIZE2D((WIDTH / 2) + 6, (HEIGHT / 2) + 6)); 226 efl_gfx_entity_size_set(d.clipper_border, EINA_SIZE2D((WIDTH / 2) + 6, (HEIGHT / 2) + 6));
diff --git a/src/lib/efl/interfaces/efl_gfx_image.eo b/src/lib/efl/interfaces/efl_gfx_image.eo
index b3157fb2d5..48a75404a5 100644
--- a/src/lib/efl/interfaces/efl_gfx_image.eo
+++ b/src/lib/efl/interfaces/efl_gfx_image.eo
@@ -133,11 +133,11 @@ interface @beta Efl.Gfx.Image
133 get { } 133 get { }
134 values { 134 values {
135 region: Eina.Rect; [[A rectangle inside the object boundary where content is expected. 135 region: Eina.Rect; [[A rectangle inside the object boundary where content is expected.
136 The default value is the image object's geometry with the @Efl.Gfx.Image.border 136 The default value is the image object's geometry with the @.border_insets
137 values subtracted.]] 137 values subtracted.]]
138 } 138 }
139 } 139 }
140 @property border { 140 @property border_insets {
141 [[Dimensions of this image's border, a region that does not scale 141 [[Dimensions of this image's border, a region that does not scale
142 with the center area. 142 with the center area.
143 143
@@ -151,7 +151,7 @@ interface @beta Efl.Gfx.Image
151 The units used for $l, $r, $t and $b are canvas units (pixels). 151 The units used for $l, $r, $t and $b are canvas units (pixels).
152 152
153 Note: The border region itself may be scaled by the 153 Note: The border region itself may be scaled by the
154 @.border_scale.set function. 154 @.border_insets_scale.set function.
155 155
156 Note: By default, image objects have no borders set, i.e. 156 Note: By default, image objects have no borders set, i.e.
157 $l, $r, $t and $b start as 0. 157 $l, $r, $t and $b start as 0.
@@ -167,10 +167,10 @@ interface @beta Efl.Gfx.Image
167 b: int; [[The border's bottom height. The default value is $0.]] 167 b: int; [[The border's bottom height. The default value is $0.]]
168 } 168 }
169 } 169 }
170 @property border_scale { 170 @property border_insets_scale {
171 [[Scaling factor applied to the image borders. 171 [[Scaling factor applied to the image borders.
172 172
173 This value multiplies the size of the @.border when scaling an 173 This value multiplies the size of the @.border_insets when scaling an
174 object. 174 object.
175 ]] 175 ]]
176 set {} 176 set {}
@@ -186,7 +186,7 @@ interface @beta Efl.Gfx.Image
186 This function sets how the center part of the image object's 186 This function sets how the center part of the image object's
187 source image is to be drawn, which must be one of the values 187 source image is to be drawn, which must be one of the values
188 in @Efl.Gfx.Center_Fill_Mode. By center we mean the complementary 188 in @Efl.Gfx.Center_Fill_Mode. By center we mean the complementary
189 part of that defined by @.border.set. This is very useful for 189 part of that defined by @.border_insets.set. This is very useful for
190 making frames and decorations. You would most probably also be 190 making frames and decorations. You would most probably also be
191 using a filled image (as in @Efl.Gfx.Fill.fill_auto) to use as a frame. 191 using a filled image (as in @Efl.Gfx.Fill.fill_auto) to use as a frame.
192 ]] 192 ]]
@@ -205,7 +205,7 @@ interface @beta Efl.Gfx.Image
205 once and then destroy them. When the regions are retrieved by the user, 205 once and then destroy them. When the regions are retrieved by the user,
206 it is his responsibility to destroy the iterators.. It will remember the 206 it is his responsibility to destroy the iterators.. It will remember the
207 information for the lifetime of the object. It will ignore all value 207 information for the lifetime of the object. It will ignore all value
208 of @.border, @.border_scale and @.center_fill_mode . To reset the object 208 of @.border_insets, @.border_insets_scale and @.center_fill_mode . To reset the object
209 you can just pass $null to both horizontal and vertical at the same 209 you can just pass $null to both horizontal and vertical at the same
210 time. 210 time.
211 ]] 211 ]]
diff --git a/src/lib/evas/canvas/efl_canvas_image_internal.eo b/src/lib/evas/canvas/efl_canvas_image_internal.eo
index 7240a0e94c..3a96eb972c 100644
--- a/src/lib/evas/canvas/efl_canvas_image_internal.eo
+++ b/src/lib/evas/canvas/efl_canvas_image_internal.eo
@@ -15,8 +15,8 @@ abstract @beta Efl.Canvas.Image_Internal extends Efl.Canvas.Object implements Ef
15 Efl.Gfx.Image.smooth_scale { get; set; } 15 Efl.Gfx.Image.smooth_scale { get; set; }
16 Efl.Gfx.Image.ratio { get; } 16 Efl.Gfx.Image.ratio { get; }
17 Efl.Gfx.Image.content_region { get; } 17 Efl.Gfx.Image.content_region { get; }
18 Efl.Gfx.Image.border { get; set; } 18 Efl.Gfx.Image.border_insets { get; set; }
19 Efl.Gfx.Image.border_scale { get; set; } 19 Efl.Gfx.Image.border_insets_scale { get; set; }
20 Efl.Gfx.Image.center_fill_mode { get; set; } 20 Efl.Gfx.Image.center_fill_mode { get; set; }
21 Efl.Gfx.Image.stretch_region { get; set; } 21 Efl.Gfx.Image.stretch_region { get; set; }
22 Efl.Gfx.Image.scale_hint { get; set; } 22 Efl.Gfx.Image.scale_hint { get; set; }
diff --git a/src/lib/evas/canvas/evas_image_legacy.c b/src/lib/evas/canvas/evas_image_legacy.c
index 63b1bce65a..dca17462b9 100644
--- a/src/lib/evas/canvas/evas_image_legacy.c
+++ b/src/lib/evas/canvas/evas_image_legacy.c
@@ -117,28 +117,28 @@ EAPI void
117evas_object_image_border_set(Evas_Object *obj, int l, int r, int t, int b) 117evas_object_image_border_set(Evas_Object *obj, int l, int r, int t, int b)
118{ 118{
119 EVAS_IMAGE_API(obj); 119 EVAS_IMAGE_API(obj);
120 efl_gfx_image_border_set(obj, l, r, t, b); 120 efl_gfx_image_border_insets_set(obj, l, r, t, b);
121} 121}
122 122
123EAPI void 123EAPI void
124evas_object_image_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b) 124evas_object_image_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b)
125{ 125{
126 EVAS_IMAGE_API(obj); 126 EVAS_IMAGE_API(obj);
127 efl_gfx_image_border_get(obj, l, r, t, b); 127 efl_gfx_image_border_insets_get(obj, l, r, t, b);
128} 128}
129 129
130EAPI void 130EAPI void
131evas_object_image_border_scale_set(Evas_Object *obj, double scale) 131evas_object_image_border_scale_set(Evas_Object *obj, double scale)
132{ 132{
133 EVAS_IMAGE_API(obj); 133 EVAS_IMAGE_API(obj);
134 efl_gfx_image_border_scale_set(obj, scale); 134 efl_gfx_image_border_insets_scale_set(obj, scale);
135} 135}
136 136
137EAPI double 137EAPI double
138evas_object_image_border_scale_get(const Evas_Object *obj) 138evas_object_image_border_scale_get(const Evas_Object *obj)
139{ 139{
140 EVAS_IMAGE_API(obj, 0.0); 140 EVAS_IMAGE_API(obj, 0.0);
141 return efl_gfx_image_border_scale_get(obj); 141 return efl_gfx_image_border_insets_scale_get(obj);
142} 142}
143 143
144EAPI void 144EAPI void
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 7dc4584120..3a6a7dfba4 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -590,7 +590,7 @@ _efl_canvas_image_internal_efl_gfx_image_content_region_get(const Eo *eo_obj, Ev
590} 590}
591 591
592EOLIAN static void 592EOLIAN static void
593_efl_canvas_image_internal_efl_gfx_image_border_set(Eo *eo_obj, Evas_Image_Data *o, int l, int r, int t, int b) 593_efl_canvas_image_internal_efl_gfx_image_border_insets_set(Eo *eo_obj, Evas_Image_Data *o, int l, int r, int t, int b)
594{ 594{
595 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 595 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
596 596
@@ -617,7 +617,7 @@ _efl_canvas_image_internal_efl_gfx_image_border_set(Eo *eo_obj, Evas_Image_Data
617} 617}
618 618
619EOLIAN static void 619EOLIAN static void
620_efl_canvas_image_internal_efl_gfx_image_border_get(const Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *l, int *r, int *t, int *b) 620_efl_canvas_image_internal_efl_gfx_image_border_insets_get(const Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *l, int *r, int *t, int *b)
621{ 621{
622 if (l) *l = o->cur->border.l; 622 if (l) *l = o->cur->border.l;
623 if (r) *r = o->cur->border.r; 623 if (r) *r = o->cur->border.r;
@@ -956,7 +956,7 @@ _efl_canvas_image_internal_efl_gfx_fill_fill_auto_get(const Eo *eo_obj EINA_UNUS
956} 956}
957 957
958EOLIAN static void 958EOLIAN static void
959_efl_canvas_image_internal_efl_gfx_image_border_scale_set(Eo *eo_obj, Evas_Image_Data *o, double scale) 959_efl_canvas_image_internal_efl_gfx_image_border_insets_scale_set(Eo *eo_obj, Evas_Image_Data *o, double scale)
960{ 960{
961 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 961 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
962 962
@@ -971,7 +971,7 @@ _efl_canvas_image_internal_efl_gfx_image_border_scale_set(Eo *eo_obj, Evas_Image
971} 971}
972 972
973EOLIAN static double 973EOLIAN static double
974_efl_canvas_image_internal_efl_gfx_image_border_scale_get(const Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) 974_efl_canvas_image_internal_efl_gfx_image_border_insets_scale_get(const Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
975{ 975{
976 return o->cur->border.scale; 976 return o->cur->border.scale;
977} 977}
diff --git a/src/tests/evas/evas_test_image.c b/src/tests/evas/evas_test_image.c
index 1eaa6d0e2e..bfc581992a 100644
--- a/src/tests/evas/evas_test_image.c
+++ b/src/tests/evas/evas_test_image.c
@@ -737,7 +737,7 @@ EFL_START_TEST(evas_object_image_cached_data_comparision)
737 ck_assert_int_eq(region.y, 0); 737 ck_assert_int_eq(region.y, 0);
738 ck_assert_int_eq(region.w, 250); 738 ck_assert_int_eq(region.w, 250);
739 ck_assert_int_eq(region.h, 250); 739 ck_assert_int_eq(region.h, 250);
740 efl_gfx_image_border_set(img, 7, 14, 5, 10); 740 efl_gfx_image_border_insets_set(img, 7, 14, 5, 10);
741 region = efl_gfx_image_content_region_get(img); 741 region = efl_gfx_image_content_region_get(img);
742 ck_assert_int_eq(region.x, 7); 742 ck_assert_int_eq(region.x, 7);
743 ck_assert_int_eq(region.y, 5); 743 ck_assert_int_eq(region.y, 5);