diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 8dbff475a1..d94bbaadbd 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -1004,7 +1004,7 @@ bin/elementary/test_entry_anchor2.c \ bin/elementary/test_events.c \ bin/elementary/test_evas_mask.c \ bin/elementary/test_evas_map.c \ -bin/elementary/test_efl_gfx_map.c \ +bin/elementary/test_efl_gfx_mapping.c \ bin/elementary/test_evas_snapshot.c \ bin/elementary/test_external.c \ bin/elementary/test_fileselector_button.c \ diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am index d81ea48225..a4b89122f5 100644 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am @@ -42,7 +42,7 @@ evas_canvas_eolian_pub_files = \ lib/evas/canvas/efl_input_pointer.eo \ lib/evas/canvas/efl_input_hold.eo \ lib/evas/canvas/efl_input_focus.eo \ - lib/evas/canvas/efl_gfx_map.eo \ + lib/evas/canvas/efl_gfx_mapping.eo \ lib/evas/canvas/efl_canvas_animation.eo \ lib/evas/canvas/efl_canvas_animation_alpha.eo \ lib/evas/canvas/efl_canvas_animation_rotate.eo \ @@ -264,7 +264,7 @@ lib/evas/canvas/efl_canvas_surface.c \ lib/evas/canvas/efl_canvas_surface_tbm.c \ lib/evas/canvas/efl_canvas_surface_x11.c \ lib/evas/canvas/efl_canvas_surface_wayland.c \ -lib/evas/canvas/efl_gfx_map.c \ +lib/evas/canvas/efl_gfx_mapping.c \ lib/evas/canvas/efl_input_event.c \ lib/evas/canvas/efl_input_key.c \ lib/evas/canvas/efl_input_pointer.c \ diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c index c0a2cfdaac..15fcc8fa5c 100644 --- a/src/bin/elementary/test.c +++ b/src/bin/elementary/test.c @@ -351,7 +351,7 @@ void test_evas_mask(void *data, Edje_Object *obj, void *event_info); void test_gfx_filters(void *data, Evas_Object *obj, void *event_info); void test_evas_snapshot(void *data, Evas_Object *obj, void *event_info); void test_evas_map(void *data, Edje_Object *obj, void *event_info); -void test_efl_gfx_map(void *data, Edje_Object *obj, void *event_info); +void test_efl_gfx_mapping(void *data, Edje_Object *obj, void *event_info); void test_ui_textpath(void *data, Edje_Object *obj, void *event_info); void test_efl_anim_alpha(void *data, Evas_Object *obj, void *event_info); @@ -1210,7 +1210,7 @@ add_tests: ADD_TEST(NULL, "Evas", "Gfx Filters", test_gfx_filters); ADD_TEST(NULL, "Evas", "Snapshot", test_evas_snapshot); ADD_TEST(NULL, "Evas", "Map", test_evas_map); - ADD_TEST_EO(NULL, "Evas", "Efl.Gfx.Map", test_efl_gfx_map); + ADD_TEST_EO(NULL, "Evas", "Efl.Gfx.Mapping", test_efl_gfx_mapping); //------------------------------// ADD_TEST(NULL, "Widgets Disable/Enable", "Box", test_box_disable); diff --git a/src/bin/elementary/test_efl_gfx_map.c b/src/bin/elementary/test_efl_gfx_mapping.c similarity index 56% rename from src/bin/elementary/test_efl_gfx_map.c rename to src/bin/elementary/test_efl_gfx_mapping.c index 62165d42fc..71cfd82257 100644 --- a/src/bin/elementary/test_efl_gfx_map.c +++ b/src/bin/elementary/test_efl_gfx_mapping.c @@ -6,29 +6,29 @@ static void _map_set(Evas_Object *obj) { - efl_gfx_map_reset(obj); - efl_gfx_map_point_count_set(obj, 8); + efl_gfx_mapping_reset(obj); + efl_gfx_mapping_point_count_set(obj, 8); //1st rect - efl_gfx_map_coord_absolute_set(obj, 0, 100, 0, 0); - efl_gfx_map_coord_absolute_set(obj, 1, 200, 0, 0); - efl_gfx_map_coord_absolute_set(obj, 2, 200, 100, 0); - efl_gfx_map_coord_absolute_set(obj, 3, 100, 100, 0); + efl_gfx_mapping_coord_absolute_set(obj, 0, 100, 0, 0); + efl_gfx_mapping_coord_absolute_set(obj, 1, 200, 0, 0); + efl_gfx_mapping_coord_absolute_set(obj, 2, 200, 100, 0); + efl_gfx_mapping_coord_absolute_set(obj, 3, 100, 100, 0); //2nd rect - efl_gfx_map_coord_absolute_set(obj, 4, 200, 0, 0); - efl_gfx_map_coord_absolute_set(obj, 5, 100, 200, 0); - efl_gfx_map_coord_absolute_set(obj, 6, 100, 300, 0); - efl_gfx_map_coord_absolute_set(obj, 7, 200, 100, 0); + efl_gfx_mapping_coord_absolute_set(obj, 4, 200, 0, 0); + efl_gfx_mapping_coord_absolute_set(obj, 5, 100, 200, 0); + efl_gfx_mapping_coord_absolute_set(obj, 6, 100, 300, 0); + efl_gfx_mapping_coord_absolute_set(obj, 7, 200, 100, 0); //uv: 1st rect: uv: [0-1] - efl_gfx_map_uv_set(obj, 0, 0, 0); - efl_gfx_map_uv_set(obj, 1, 0.5, 0); - efl_gfx_map_uv_set(obj, 2, 0.5, 1); - efl_gfx_map_uv_set(obj, 3, 0, 1); + efl_gfx_mapping_uv_set(obj, 0, 0, 0); + efl_gfx_mapping_uv_set(obj, 1, 0.5, 0); + efl_gfx_mapping_uv_set(obj, 2, 0.5, 1); + efl_gfx_mapping_uv_set(obj, 3, 0, 1); //uv: 2nd rect - efl_gfx_map_uv_set(obj, 4, 0.5, 0); - efl_gfx_map_uv_set(obj, 5, 1, 0); - efl_gfx_map_uv_set(obj, 6, 1, 1); - efl_gfx_map_uv_set(obj, 7, 0.5, 1); + efl_gfx_mapping_uv_set(obj, 4, 0.5, 0); + efl_gfx_mapping_uv_set(obj, 5, 1, 0); + efl_gfx_mapping_uv_set(obj, 6, 1, 1); + efl_gfx_mapping_uv_set(obj, 7, 0.5, 1); } static void @@ -38,7 +38,7 @@ _image_resize_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, } void -test_efl_gfx_map(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, +test_efl_gfx_mapping(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { const Evas_Coord W = 300, H = 300; diff --git a/src/bin/elementary/test_evas_mask.c b/src/bin/elementary/test_evas_mask.c index 6c3162feb4..497d4a2a97 100644 --- a/src/bin/elementary/test_evas_mask.c +++ b/src/bin/elementary/test_evas_mask.c @@ -81,12 +81,12 @@ _toggle_map(void *data, const Efl_Event *ev EINA_UNUSED) { Eo *ly = data; - if (!efl_gfx_map_has(ly)) + if (!efl_gfx_mapping_has(ly)) { - efl_gfx_map_zoom(ly, 0.8, 0.8, NULL, 0.5, 0.5); - efl_gfx_map_rotate(ly, 45, NULL, 0.5, 0.5); + efl_gfx_mapping_zoom(ly, 0.8, 0.8, NULL, 0.5, 0.5); + efl_gfx_mapping_rotate(ly, 45, NULL, 0.5, 0.5); } - else efl_gfx_map_reset(ly); + else efl_gfx_mapping_reset(ly); } static void diff --git a/src/bin/elementary/test_evas_snapshot.c b/src/bin/elementary/test_evas_snapshot.c index 4988702bdb..c1b110ead6 100644 --- a/src/bin/elementary/test_evas_snapshot.c +++ b/src/bin/elementary/test_evas_snapshot.c @@ -104,12 +104,12 @@ _toggle_map(void *data, const Efl_Event *ev EINA_UNUSED) Eo *snap; snap = efl_key_wref_get(win, "snap"); - if (!efl_gfx_map_has(snap)) + if (!efl_gfx_mapping_has(snap)) { - efl_gfx_map_zoom(snap, 0.8, 0.8, NULL, 0.5, 0.5); - efl_gfx_map_rotate(snap, 20.0, NULL, 0.5, 0.5); + efl_gfx_mapping_zoom(snap, 0.8, 0.8, NULL, 0.5, 0.5); + efl_gfx_mapping_rotate(snap, 20.0, NULL, 0.5, 0.5); } - else efl_gfx_map_reset(snap); + else efl_gfx_mapping_reset(snap); } void diff --git a/src/bin/elementary/test_flip_page_eo.c b/src/bin/elementary/test_flip_page_eo.c index a1ce5f5b66..e313e2848c 100644 --- a/src/bin/elementary/test_flip_page_eo.c +++ b/src/bin/elementary/test_flip_page_eo.c @@ -88,34 +88,34 @@ _slice_apply(State *st, Slice *sl, Evas_Coord x EINA_UNUSED, Evas_Coord y EINA_UNUSED, Evas_Coord w, Evas_Coord h EINA_UNUSED, Evas_Coord ox, Evas_Coord oy, Evas_Coord ow, Evas_Coord oh) { - efl_gfx_map_reset(sl->obj); - efl_gfx_map_smooth_set(sl->obj, EINA_TRUE); - efl_gfx_map_color_set(sl->obj, -1, 255, 255, 255, 255); + efl_gfx_mapping_reset(sl->obj); + efl_gfx_mapping_smooth_set(sl->obj, EINA_TRUE); + efl_gfx_mapping_color_set(sl->obj, -1, 255, 255, 255, 255); for (int i = 0; i < 4; i++) { if (st->dir == 0) { int p[4] = { 0, 1, 2, 3 }; - efl_gfx_map_coord_absolute_set(sl->obj, i, ox + sl->x[p[i]], oy + sl->y[p[i]], sl->z[p[i]]); - efl_gfx_map_uv_set(sl->obj, i, sl->u[p[i]] , sl->v[p[i]]); + efl_gfx_mapping_coord_absolute_set(sl->obj, i, ox + sl->x[p[i]], oy + sl->y[p[i]], sl->z[p[i]]); + efl_gfx_mapping_uv_set(sl->obj, i, sl->u[p[i]] , sl->v[p[i]]); } else if (st->dir == 1) { int p[4] = { 1, 0, 3, 2 }; - efl_gfx_map_coord_absolute_set(sl->obj, i, ox + (w - sl->x[p[i]]), oy + sl->y[p[i]], sl->z[p[i]]); - efl_gfx_map_uv_set(sl->obj, i, 1. - sl->u[p[i]] , sl->v[p[i]]); + efl_gfx_mapping_coord_absolute_set(sl->obj, i, ox + (w - sl->x[p[i]]), oy + sl->y[p[i]], sl->z[p[i]]); + efl_gfx_mapping_uv_set(sl->obj, i, 1. - sl->u[p[i]] , sl->v[p[i]]); } else if (st->dir == 2) { int p[4] = { 1, 0, 3, 2 }; - efl_gfx_map_coord_absolute_set(sl->obj, i, ox + sl->y[p[i]], oy + sl->x[p[i]], sl->z[p[i]]); - efl_gfx_map_uv_set(sl->obj, i, sl->v[p[i]] , sl->u[p[i]]); + efl_gfx_mapping_coord_absolute_set(sl->obj, i, ox + sl->y[p[i]], oy + sl->x[p[i]], sl->z[p[i]]); + efl_gfx_mapping_uv_set(sl->obj, i, sl->v[p[i]] , sl->u[p[i]]); } else if (st->dir == 3) { int p[4] = { 0, 1, 2, 3 }; - efl_gfx_map_coord_absolute_set(sl->obj, i, ox + sl->y[p[i]], oy + (w - sl->x[p[i]]), sl->z[p[i]]); - efl_gfx_map_uv_set(sl->obj, i, sl->v[p[i]] , 1. - sl->u[p[i]]); + efl_gfx_mapping_coord_absolute_set(sl->obj, i, ox + sl->y[p[i]], oy + (w - sl->x[p[i]]), sl->z[p[i]]); + efl_gfx_mapping_uv_set(sl->obj, i, sl->v[p[i]] , 1. - sl->u[p[i]]); } } evas_object_image_fill_set(sl->obj, 0, 0, ow, oh); @@ -125,22 +125,22 @@ static void _slice_3d(State *st EINA_UNUSED, Slice *sl, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { // vanishing point is center of page, and focal dist is 1024 - efl_gfx_map_perspective_3d_absolute(sl->obj, x + (w / 2), y + (h / 2), 0, 1024); + efl_gfx_mapping_perspective_3d_absolute(sl->obj, x + (w / 2), y + (h / 2), 0, 1024); for (int i = 0; i < 4; i++) { double xx, yy; - efl_gfx_map_coord_absolute_get(sl->obj, i, &xx, &yy, NULL); - efl_gfx_map_coord_absolute_set(sl->obj, i, xx, yy, 0); + efl_gfx_mapping_coord_absolute_get(sl->obj, i, &xx, &yy, NULL); + efl_gfx_mapping_coord_absolute_set(sl->obj, i, xx, yy, 0); } - efl_gfx_entity_visible_set(sl->obj, efl_gfx_map_clockwise_get(sl->obj)); + efl_gfx_entity_visible_set(sl->obj, efl_gfx_mapping_clockwise_get(sl->obj)); } static void _slice_light(State *st EINA_UNUSED, Slice *sl, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { - efl_gfx_map_lightning_3d_absolute(sl->obj, + efl_gfx_mapping_lighting_3d_absolute(sl->obj, // light position // (centered over page 10 * h toward camera) x + (w / 2), y + (h / 2), -10000, @@ -153,11 +153,11 @@ _slice_light(State *st EINA_UNUSED, Slice *sl, Evas_Coord x, Evas_Coord y, Evas_ { int r, g, b, a; - efl_gfx_map_color_get(sl->obj, i, &r, &g, &b, &a); + efl_gfx_mapping_color_get(sl->obj, i, &r, &g, &b, &a); r = (double)r * 1.2; if (r > 255) r = 255; g = (double)g * 1.2; if (g > 255) g = 255; b = (double)b * 1.2; if (b > 255) b = 255; - efl_gfx_map_color_set(sl->obj, i, r, g, b, a); + efl_gfx_mapping_color_set(sl->obj, i, r, g, b, a); } } @@ -253,7 +253,7 @@ _slice_obj_color_sum(Slice *s, int p, int *r, int *g, int *b, int *a) int rr = 0, gg = 0, bb = 0, aa = 0; if (!s) return 0; - efl_gfx_map_color_get(s->obj, p, &rr, &gg, &bb, &aa); + efl_gfx_mapping_color_get(s->obj, p, &rr, &gg, &bb, &aa); *r += rr; *g += gg; *b += bb; *a += aa; return 1; } @@ -262,7 +262,7 @@ static void _slice_obj_color_set(Slice *s, int p, int r, int g, int b, int a) { if (!s) return; - efl_gfx_map_color_set(s->obj, p, r, g, b, a); + efl_gfx_mapping_color_set(s->obj, p, r, g, b, a); } static void diff --git a/src/examples/evas/evas-map-aa-eo.c b/src/examples/evas/evas-map-aa-eo.c index 5a68393c75..30e8831c7b 100644 --- a/src/examples/evas/evas-map-aa-eo.c +++ b/src/examples/evas/evas-map-aa-eo.c @@ -60,15 +60,15 @@ static struct example_data d = static void update(void) { - efl_gfx_map_coord_absolute_set(d.target1, 0, d.px1, d.py1, 0); - efl_gfx_map_coord_absolute_set(d.target1, 1, d.px2, d.py2, 0); - efl_gfx_map_coord_absolute_set(d.target1, 2, d.px3, d.py3, 0); - efl_gfx_map_coord_absolute_set(d.target1, 3, d.px4, d.py4, 0); + efl_gfx_mapping_coord_absolute_set(d.target1, 0, d.px1, d.py1, 0); + efl_gfx_mapping_coord_absolute_set(d.target1, 1, d.px2, d.py2, 0); + efl_gfx_mapping_coord_absolute_set(d.target1, 2, d.px3, d.py3, 0); + efl_gfx_mapping_coord_absolute_set(d.target1, 3, d.px4, d.py4, 0); - efl_gfx_map_coord_absolute_set(d.target2, 0, d.px1 + 400, d.py1, 0); - efl_gfx_map_coord_absolute_set(d.target2, 1, d.px2 + 400, d.py2, 0); - efl_gfx_map_coord_absolute_set(d.target2, 2, d.px3 + 400, d.py3, 0); - efl_gfx_map_coord_absolute_set(d.target2, 3, d.px4 + 400, d.py4, 0); + efl_gfx_mapping_coord_absolute_set(d.target2, 0, d.px1 + 400, d.py1, 0); + efl_gfx_mapping_coord_absolute_set(d.target2, 1, d.px2 + 400, d.py2, 0); + efl_gfx_mapping_coord_absolute_set(d.target2, 2, d.px3 + 400, d.py3, 0); + efl_gfx_mapping_coord_absolute_set(d.target2, 3, d.px4 + 400, d.py4, 0); } static void diff --git a/src/examples/evas/evas-map-utils-eo.c b/src/examples/evas/evas-map-utils-eo.c index e1767cd1c3..157b3af847 100644 --- a/src/examples/evas/evas-map-utils-eo.c +++ b/src/examples/evas/evas-map-utils-eo.c @@ -83,68 +83,68 @@ _anim_cb(void *data) evas_output_size_get(ad->canvas, &win_w, &win_h); o = evas_object_name_find(ad->canvas, "obj1"); - efl_gfx_map_reset(o); - efl_gfx_map_rotate(o, 3 * f, NULL, 0.5, 0.5); - efl_gfx_map_smooth_set(o, ad->smooth); - efl_gfx_map_alpha_set(o, ad->alpha); - efl_gfx_map_color_set(o, -1, r, g, b, a); + efl_gfx_mapping_reset(o); + efl_gfx_mapping_rotate(o, 3 * f, NULL, 0.5, 0.5); + efl_gfx_mapping_smooth_set(o, ad->smooth); + efl_gfx_mapping_alpha_set(o, ad->alpha); + efl_gfx_mapping_color_set(o, -1, r, g, b, a); o = evas_object_name_find(ad->canvas, "obj2"); size = efl_gfx_entity_size_get(o); - efl_gfx_map_reset(o); - efl_gfx_map_smooth_set(o, ad->smooth); - efl_gfx_map_alpha_set(o, ad->alpha); - efl_gfx_map_color_set(o, -1, r, g, b, a); - efl_gfx_map_translate(o, 0, 0, 100); - efl_gfx_map_rotate_3d(o, f * 6, f * 6, f * 6, NULL, 1./3., 10. / size.h, 0); + efl_gfx_mapping_reset(o); + efl_gfx_mapping_smooth_set(o, ad->smooth); + efl_gfx_mapping_alpha_set(o, ad->alpha); + efl_gfx_mapping_color_set(o, -1, r, g, b, a); + efl_gfx_mapping_translate(o, 0, 0, 100); + efl_gfx_mapping_rotate_3d(o, f * 6, f * 6, f * 6, NULL, 1./3., 10. / size.h, 0); if (ad->apply_lighting) { - efl_gfx_map_lightning_3d(o, ad->canvas, 0.5, 0.5, -100., + efl_gfx_mapping_lighting_3d(o, ad->canvas, 0.5, 0.5, -100., 255, 255, 255, 0, 0, 0); } o = evas_object_name_find(ad->canvas, "obj3"); size = efl_gfx_entity_size_get(o); - efl_gfx_map_reset(o); - efl_gfx_map_smooth_set(o, ad->smooth); - efl_gfx_map_alpha_set(o, ad->alpha); - efl_gfx_map_color_set(o, -1, r, g, b, a); - efl_gfx_map_translate(o, 0, size.h/2, -20); - efl_gfx_map_rotate_3d(o, 20, f * 6, 0, NULL, 0.5, 0.5, size.w / 2); + efl_gfx_mapping_reset(o); + efl_gfx_mapping_smooth_set(o, ad->smooth); + efl_gfx_mapping_alpha_set(o, ad->alpha); + efl_gfx_mapping_color_set(o, -1, r, g, b, a); + efl_gfx_mapping_translate(o, 0, size.h/2, -20); + efl_gfx_mapping_rotate_3d(o, 20, f * 6, 0, NULL, 0.5, 0.5, size.w / 2); if (ad->apply_perspective) - efl_gfx_map_perspective_3d(o, NULL, 0.5, 0.5, 0, 256); + efl_gfx_mapping_perspective_3d(o, NULL, 0.5, 0.5, 0, 256); if (ad->apply_lighting) { evas_pointer_canvas_xy_get(ad->canvas, &mx, &my); - efl_gfx_map_lightning_3d(o, ad->canvas, + efl_gfx_mapping_lighting_3d(o, ad->canvas, (double) mx / win_w, (double) my / win_h, -256, 255, 255, 255, 0, 0, 0); } if (ad->backface_culling) - efl_gfx_entity_visible_set(o, efl_gfx_map_clockwise_get(o)); + efl_gfx_entity_visible_set(o, efl_gfx_mapping_clockwise_get(o)); else efl_gfx_entity_visible_set(o, 1); o = evas_object_name_find(ad->canvas, "obj4"); rect = efl_gfx_entity_geometry_get(o); - efl_gfx_map_reset(o); - efl_gfx_map_smooth_set(o, ad->smooth); - efl_gfx_map_alpha_set(o, ad->alpha); - efl_gfx_map_coord_absolute_set(o, 0, rect.x, rect.y + rect.h, 0); - efl_gfx_map_coord_absolute_set(o, 1, rect.x + rect.w, rect.y + rect.h, 0); - efl_gfx_map_coord_absolute_set(o, 2, win_w - 10, win_h - 30, 0); - efl_gfx_map_coord_absolute_set(o, 3, (win_w / 2) + 10, win_h - 30, 0); - efl_gfx_map_uv_set(o, 0, 0, 1); - efl_gfx_map_uv_set(o, 1, 1, 1); - efl_gfx_map_uv_set(o, 2, 1, 2. / 3.); - efl_gfx_map_uv_set(o, 3, 0, 2. / 3.); - efl_gfx_map_color_set(o, 0, 200, 200, 200, 150); - efl_gfx_map_color_set(o, 1, 200, 200, 200, 150); - efl_gfx_map_color_set(o, 2, 0, 0, 0, 0); - efl_gfx_map_color_set(o, 3, 0, 0, 0, 0); + efl_gfx_mapping_reset(o); + efl_gfx_mapping_smooth_set(o, ad->smooth); + efl_gfx_mapping_alpha_set(o, ad->alpha); + efl_gfx_mapping_coord_absolute_set(o, 0, rect.x, rect.y + rect.h, 0); + efl_gfx_mapping_coord_absolute_set(o, 1, rect.x + rect.w, rect.y + rect.h, 0); + efl_gfx_mapping_coord_absolute_set(o, 2, win_w - 10, win_h - 30, 0); + efl_gfx_mapping_coord_absolute_set(o, 3, (win_w / 2) + 10, win_h - 30, 0); + efl_gfx_mapping_uv_set(o, 0, 0, 1); + efl_gfx_mapping_uv_set(o, 1, 1, 1); + efl_gfx_mapping_uv_set(o, 2, 1, 2. / 3.); + efl_gfx_mapping_uv_set(o, 3, 0, 2. / 3.); + efl_gfx_mapping_color_set(o, 0, 200, 200, 200, 150); + efl_gfx_mapping_color_set(o, 1, 200, 200, 200, 150); + efl_gfx_mapping_color_set(o, 2, 0, 0, 0, 0); + efl_gfx_mapping_color_set(o, 3, 0, 0, 0, 0); ad->frame = (ad->frame + 1) % 60; diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h index 9cea6ddc77..a2c3e5c9e6 100644 --- a/src/lib/evas/Evas_Eo.h +++ b/src/lib/evas/Evas_Eo.h @@ -425,7 +425,7 @@ typedef void (Evas_Canvas3D_Surface_Func)(Evas_Real *out_x, #include "canvas/efl_canvas_image.eo.h" #include "canvas/efl_canvas_snapshot.eo.h" #include "canvas/efl_canvas_proxy.eo.h" -#include "canvas/efl_gfx_map.eo.h" +#include "canvas/efl_gfx_mapping.eo.h" #endif /* EFL_EO_API_SUPPORT */ #if defined(EFL_BETA_API_SUPPORT) && defined(EFL_EO_API_SUPPORT) diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h index ceb5df1f55..16ebfd26b6 100644 --- a/src/lib/evas/Evas_Legacy.h +++ b/src/lib/evas/Evas_Legacy.h @@ -7524,7 +7524,7 @@ EAPI void evas_map_util_points_populate_from_geometry(Evas_Map *m, Ev /** * Set color of all points to given color. * - * This call is useful to reuse maps after they had 3d lightning or + * This call is useful to reuse maps after they had 3d lighting or * any other colorization applied before. * * @param m map to change the color of. @@ -8037,7 +8037,7 @@ EAPI void evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled); */ EAPI Eina_Bool evas_object_map_enable_get(const Evas_Object *obj); -#include "canvas/efl_gfx_map.eo.legacy.h" +#include "canvas/efl_gfx_mapping.eo.legacy.h" /** * @brief Apply an evas filter program on this text object. diff --git a/src/lib/evas/canvas/efl_canvas_animation_alpha.c b/src/lib/evas/canvas/efl_canvas_animation_alpha.c index 8723aee184..c0bca11101 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_alpha.c +++ b/src/lib/evas/canvas/efl_canvas_animation_alpha.c @@ -43,7 +43,7 @@ _efl_canvas_animation_alpha_efl_canvas_animation_animation_apply(Eo *eo_obj, for (i = 0; i < 4; i++) { - efl_gfx_map_color_set(target, i, cur_alpha, cur_alpha, cur_alpha, cur_alpha); + efl_gfx_mapping_color_set(target, i, cur_alpha, cur_alpha, cur_alpha, cur_alpha); } return progress; diff --git a/src/lib/evas/canvas/efl_canvas_animation_player.c b/src/lib/evas/canvas/efl_canvas_animation_player.c index 63abfc3719..677443a5f5 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_player.c +++ b/src/lib/evas/canvas/efl_canvas_animation_player.c @@ -219,14 +219,14 @@ _efl_canvas_animation_player_efl_player_stop(Eo *eo_obj, else { pd->progress = 0.0; - efl_gfx_map_reset(efl_animation_player_target_get(eo_obj)); + efl_gfx_mapping_reset(efl_animation_player_target_get(eo_obj)); } efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, NULL); } else { pd->progress = 0.0; - efl_gfx_map_reset(efl_animation_player_target_get(eo_obj)); + efl_gfx_mapping_reset(efl_animation_player_target_get(eo_obj)); } if (pd->auto_del) efl_del(eo_obj); diff --git a/src/lib/evas/canvas/efl_canvas_animation_rotate.c b/src/lib/evas/canvas/efl_canvas_animation_rotate.c index d75f3475c6..c57f7e1ac2 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_rotate.c +++ b/src/lib/evas/canvas/efl_canvas_animation_rotate.c @@ -8,8 +8,8 @@ _rotation_get(Eo *target) double x1, x2, y1, y2; double theta; - efl_gfx_map_coord_absolute_get(target, 0, &x1, &y1, NULL); - efl_gfx_map_coord_absolute_get(target, 1, &x2, &y2, NULL); + efl_gfx_mapping_coord_absolute_get(target, 0, &x1, &y1, NULL); + efl_gfx_mapping_coord_absolute_get(target, 1, &x2, &y2, NULL); theta = atan((y2 - y1) / (x2 - x1)); return theta * 180 / M_PI; @@ -125,14 +125,14 @@ _efl_canvas_animation_rotate_efl_canvas_animation_animation_apply(Eo *eo_obj, if (pd->use_rel_pivot) { - efl_gfx_map_rotate(target, + efl_gfx_mapping_rotate(target, new_degree - prev_degree, (pd->rel_pivot.obj) ? pd->rel_pivot.obj : target, pd->rel_pivot.cx, pd->rel_pivot.cy); } else { - efl_gfx_map_rotate_absolute(target, + efl_gfx_mapping_rotate_absolute(target, new_degree - prev_degree, pd->abs_pivot.cx, pd->abs_pivot.cy); } diff --git a/src/lib/evas/canvas/efl_canvas_animation_scale.c b/src/lib/evas/canvas/efl_canvas_animation_scale.c index b09d7a794b..90304defc3 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_scale.c +++ b/src/lib/evas/canvas/efl_canvas_animation_scale.c @@ -10,9 +10,9 @@ _scale_get(Eo *target) Eina_Rect geometry; geometry = efl_gfx_entity_geometry_get(target); - efl_gfx_map_coord_absolute_get(target, 0, &x1, &y1, NULL); - efl_gfx_map_coord_absolute_get(target, 1, &x2, &y2, NULL); - efl_gfx_map_coord_absolute_get(target, 2, &x3, &y3, NULL); + efl_gfx_mapping_coord_absolute_get(target, 0, &x1, &y1, NULL); + efl_gfx_mapping_coord_absolute_get(target, 1, &x2, &y2, NULL); + efl_gfx_mapping_coord_absolute_get(target, 2, &x3, &y3, NULL); w = sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))); h = sqrt(((x3 - x2) * (x3 - x2)) + ((y3 - y2) * (y3 - y2))); @@ -161,7 +161,7 @@ _efl_canvas_animation_scale_efl_canvas_animation_animation_apply(Eo *eo_obj, if (pd->use_rel_pivot) { - efl_gfx_map_zoom(target, + efl_gfx_mapping_zoom(target, new_scale.scale_x / prev_scale.scale_x, new_scale.scale_y / prev_scale.scale_y, (pd->rel_pivot.obj) ? pd->rel_pivot.obj : target, @@ -169,7 +169,7 @@ _efl_canvas_animation_scale_efl_canvas_animation_animation_apply(Eo *eo_obj, } else { - efl_gfx_map_zoom_absolute(target, + efl_gfx_mapping_zoom_absolute(target, new_scale.scale_x / prev_scale.scale_x, new_scale.scale_y / prev_scale.scale_y, pd->abs_pivot.cx, pd->abs_pivot.cy); diff --git a/src/lib/evas/canvas/efl_canvas_animation_translate.c b/src/lib/evas/canvas/efl_canvas_animation_translate.c index e0c9ef7424..42748eac99 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_translate.c +++ b/src/lib/evas/canvas/efl_canvas_animation_translate.c @@ -17,8 +17,8 @@ _translation_get(Eo *target) geometry = efl_gfx_entity_geometry_get(target); - efl_gfx_map_coord_absolute_get(target, 0, &x1, &y1, NULL); - efl_gfx_map_coord_absolute_get(target, 2, &x2, &y2, NULL); + efl_gfx_mapping_coord_absolute_get(target, 0, &x1, &y1, NULL); + efl_gfx_mapping_coord_absolute_get(target, 2, &x2, &y2, NULL); translate.x = ((x1 + x2) / 2.0) - (geometry.x + (geometry.w / 2.0)); translate.y = ((y1 + y2) / 2.0) - (geometry.y + (geometry.h / 2.0)); @@ -133,7 +133,7 @@ _efl_canvas_animation_translate_efl_canvas_animation_animation_apply(Eo *eo_obj, new.y = GET_STATUS(pd->from.y, pd->to.y, progress); } - efl_gfx_map_translate(target, new.x - prev.x, new.y - prev.y, 0.0); + efl_gfx_mapping_translate(target, new.x - prev.x, new.y - prev.y, 0.0); return progress; } diff --git a/src/lib/evas/canvas/efl_canvas_object.eo b/src/lib/evas/canvas/efl_canvas_object.eo index 35a2a3bf57..385f67d6c2 100644 --- a/src/lib/evas/canvas/efl_canvas_object.eo +++ b/src/lib/evas/canvas/efl_canvas_object.eo @@ -4,7 +4,7 @@ struct Efl.Canvas.Object_Animation_Event; [[Information of animation events]] abstract @beta Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack, Efl.Animator, Efl.Input.Interface, Efl.Gfx.Hint, - Efl.Gfx.Map, Efl.Ui.I18n, Efl.Canvas.Pointer + Efl.Gfx.Mapping, Efl.Ui.I18n, Efl.Canvas.Pointer { [[Efl canvas object abstract class]] legacy_prefix: evas_object; diff --git a/src/lib/evas/canvas/efl_canvas_proxy.eo b/src/lib/evas/canvas/efl_canvas_proxy.eo index 20a30c5bfc..5024d8feac 100644 --- a/src/lib/evas/canvas/efl_canvas_proxy.eo +++ b/src/lib/evas/canvas/efl_canvas_proxy.eo @@ -15,7 +15,7 @@ class @beta Efl.Canvas.Proxy extends Efl.Canvas.Image_Internal source object in its drawing region, without affecting that source in any way. The source must be another valid @Efl.Canvas.Object. Other effects may be applied to the proxy, such as a map (see - @Efl.Gfx.Map) to create a reflection of the original object + @Efl.Gfx.Mapping) to create a reflection of the original object (for example). Any existing source object will be removed after this call. diff --git a/src/lib/evas/canvas/efl_gfx_map.c b/src/lib/evas/canvas/efl_gfx_mapping.c similarity index 77% rename from src/lib/evas/canvas/efl_gfx_map.c rename to src/lib/evas/canvas/efl_gfx_mapping.c index a63b62ed03..0800551e7a 100644 --- a/src/lib/evas/canvas/efl_gfx_map.c +++ b/src/lib/evas/canvas/efl_gfx_mapping.c @@ -8,25 +8,25 @@ #define EINA_INLIST_PREPEND(l,i) do { l = (__typeof__(l)) eina_inlist_prepend(EINA_INLIST_GET(l), EINA_INLIST_GET(i)); } while (0) #define EINA_INLIST_NEXT(l) (typeof(l)) EINA_INLIST_CONTAINER_GET(EINA_INLIST_GET(l)->next, typeof(*l)) -#define MY_CLASS EFL_GFX_MAP_MIXIN +#define MY_CLASS EFL_GFX_MAPPING_MIXIN typedef struct _Gfx_Map Gfx_Map; typedef struct _Gfx_Map_Op Gfx_Map_Op; typedef struct _Gfx_Map_Pivot Gfx_Map_Pivot; -typedef struct _Efl_Gfx_Map_Data Efl_Gfx_Map_Data; +typedef struct _Efl_Gfx_Mapping_Data Efl_Gfx_Mapping_Data; typedef struct _Gfx_Map_Point Gfx_Map_Point; typedef enum _Gfx_Map_Op_Type Gfx_Map_Op_Type; enum _Gfx_Map_Op_Type { - GFX_MAP_RAW_COORD, - GFX_MAP_COLOR, - GFX_MAP_ROTATE_2D, - GFX_MAP_ROTATE_3D, - GFX_MAP_ROTATE_QUAT, - GFX_MAP_ZOOM, - GFX_MAP_TRANSLATE, - GFX_MAP_LIGHTNING_3D, - GFX_MAP_PERSPECTIVE_3D, + GFX_MAPPING_RAW_COORD, + GFX_MAPPING_COLOR, + GFX_MAPPING_ROTATE_2D, + GFX_MAPPING_ROTATE_3D, + GFX_MAPPING_ROTATE_QUAT, + GFX_MAPPING_ZOOM, + GFX_MAPPING_TRANSLATE, + GFX_MAPPING_LIGHTING_3D, + GFX_MAPPING_PERSPECTIVE_3D, }; struct _Gfx_Map_Op { @@ -59,7 +59,7 @@ struct _Gfx_Map_Op { } translate; struct { uint8_t lr, lg, lb, ar, ag, ab; - } lightning_3d; + } lighting_3d; struct { double z0, foc; } perspective_3d; @@ -105,15 +105,15 @@ struct _Gfx_Map { Eina_Bool event_cbs; }; -struct _Efl_Gfx_Map_Data { +struct _Efl_Gfx_Mapping_Data { const Gfx_Map *cow; }; // ---------------------------------------------------------------------------- -static Eo *gfx_map_absolute = NULL; -static Eina_Cow *gfx_map_cow = NULL; -static const Gfx_Map gfx_map_cow_default = { +static Eo *gfx_mapping_absolute = NULL; +static Eina_Cow *gfx_mapping_cow = NULL; +static const Gfx_Map gfx_mapping_cow_default = { NULL, NULL, NULL, @@ -126,8 +126,8 @@ static const Gfx_Map gfx_map_cow_default = { EINA_FALSE }; -#define MAPCOW_BEGIN(_pd) eina_cow_write(gfx_map_cow, (const Eina_Cow_Data**)&(_pd->cow)) -#define MAPCOW_END(_mapcow, _pd) eina_cow_done(gfx_map_cow, (const Eina_Cow_Data**)&(_pd->cow), _mapcow, EINA_FALSE) +#define MAPCOW_BEGIN(_pd) eina_cow_write(gfx_mapping_cow, (const Eina_Cow_Data**)&(_pd->cow)) +#define MAPCOW_END(_mapcow, _pd) eina_cow_done(gfx_mapping_cow, (const Eina_Cow_Data**)&(_pd->cow), _mapcow, EINA_FALSE) #define MAPCOW_WRITE(pd, name, value) do { \ if (pd->cow->name != (value)) { \ Gfx_Map *_cow = MAPCOW_BEGIN(pd); \ @@ -138,45 +138,45 @@ static const Gfx_Map gfx_map_cow_default = { #define PIVOT_REF(_pivot) (_pivot ? efl_xref((Eo *) _pivot, eo_obj) : NULL) #define PIVOT_UNREF(_pivot) (_pivot ? efl_xunref(_pivot, eo_obj) : NULL) -static inline void _map_ops_clean(Eo *eo_obj, Efl_Gfx_Map_Data *pd); +static inline void _map_ops_clean(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd); // ---------------------------------------------------------------------------- void -_efl_gfx_map_init(void) +_efl_gfx_mapping_init(void) { - gfx_map_cow = eina_cow_add("Efl.Gfx.Map", sizeof(Gfx_Map), 8, - &gfx_map_cow_default, EINA_FALSE); + gfx_mapping_cow = eina_cow_add("Efl.Gfx.Mapping", sizeof(Gfx_Map), 8, + &gfx_mapping_cow_default, EINA_FALSE); } void -_efl_gfx_map_shutdown(void) +_efl_gfx_mapping_shutdown(void) { - eina_cow_del(gfx_map_cow); - gfx_map_cow = NULL; + eina_cow_del(gfx_mapping_cow); + gfx_mapping_cow = NULL; - efl_unref(gfx_map_absolute); - gfx_map_absolute = NULL; + efl_unref(gfx_mapping_absolute); + gfx_mapping_absolute = NULL; } // ---------------------------------------------------------------------------- EOLIAN static Efl_Object * -_efl_gfx_map_efl_object_constructor(Eo *eo_obj, Efl_Gfx_Map_Data *pd) +_efl_gfx_mapping_efl_object_constructor(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd) { eo_obj = efl_constructor(efl_super(eo_obj, MY_CLASS)); - pd->cow = eina_cow_alloc(gfx_map_cow); + pd->cow = eina_cow_alloc(gfx_mapping_cow); return eo_obj; } EOLIAN static void -_efl_gfx_map_efl_object_destructor(Eo *eo_obj, Efl_Gfx_Map_Data *pd) +_efl_gfx_mapping_efl_object_destructor(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd) { if (pd->cow) { _map_ops_clean(eo_obj, pd); free(pd->cow->points); - eina_cow_free(gfx_map_cow, (const Eina_Cow_Data **) &pd->cow); + eina_cow_free(gfx_mapping_cow, (const Eina_Cow_Data **) &pd->cow); } efl_destructor(efl_super(eo_obj, MY_CLASS)); } @@ -187,10 +187,10 @@ static void _geometry_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED) { Evas_Object_Protected_Data *obj = data; - Efl_Gfx_Map_Data *pd = efl_data_scope_get(obj->object, MY_CLASS); + Efl_Gfx_Mapping_Data *pd = efl_data_scope_get(obj->object, MY_CLASS); MAPCOW_WRITE(pd, last_calc_op, NULL); - obj->gfx_map_update = EINA_TRUE; + obj->gfx_mapping_update = EINA_TRUE; } EFL_CALLBACKS_ARRAY_DEFINE(_geometry_changes, @@ -203,7 +203,7 @@ _pivot_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED) Gfx_Map_Pivot *pivot = data; Evas_Object_Protected_Data *obj = pivot->map_obj; - obj->gfx_map_update = EINA_TRUE; + obj->gfx_mapping_update = EINA_TRUE; pivot->changed = EINA_TRUE; } @@ -212,13 +212,13 @@ EFL_CALLBACKS_ARRAY_DEFINE(_pivot_changes, { EFL_GFX_ENTITY_EVENT_RESIZE, _pivot_changed_cb }); static inline void -_map_dirty(Eo *eo_obj, Efl_Gfx_Map_Data *pd, Eina_Bool reset) +_map_dirty(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, Eina_Bool reset) { Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj); Gfx_Map_Pivot *pivot; - obj->gfx_map_has = EINA_TRUE; - obj->gfx_map_update |= !reset; + obj->gfx_mapping_has = EINA_TRUE; + obj->gfx_mapping_update |= !reset; obj->changed_map = EINA_TRUE; evas_object_change(eo_obj, obj); @@ -244,7 +244,7 @@ _map_dirty(Eo *eo_obj, Efl_Gfx_Map_Data *pd, Eina_Bool reset) } static Evas_Map * -_map_calc(const Eo *eo_obj, Evas_Object_Protected_Data *obj, Efl_Gfx_Map_Data *pd) +_map_calc(const Eo *eo_obj, Evas_Object_Protected_Data *obj, Efl_Gfx_Mapping_Data *pd) { Gfx_Map_Op *op, *first_op = pd->cow->ops, *last_op; Gfx_Map_Pivot *pivot; @@ -254,11 +254,11 @@ _map_calc(const Eo *eo_obj, Evas_Object_Protected_Data *obj, Efl_Gfx_Map_Data *p int count; Eina_Bool map_alloc = EINA_FALSE; - if (pd->cow == &gfx_map_cow_default) + if (pd->cow == &gfx_mapping_cow_default) return NULL; m = pd->cow->map; - if (!obj->gfx_map_update) return m; + if (!obj->gfx_mapping_update) return m; last_op = pd->cow->last_calc_op; count = pd->cow->count < 4 ? 4 : pd->cow->count; @@ -389,7 +389,7 @@ _map_calc(const Eo *eo_obj, Evas_Object_Protected_Data *obj, Efl_Gfx_Map_Data *p switch (op->op) { - case GFX_MAP_RAW_COORD: + case GFX_MAPPING_RAW_COORD: if (op->raw_coord.idx != -1) kmin = kmax = op->raw_coord.idx; for (k = kmin; k <= kmax; k++) @@ -400,7 +400,7 @@ _map_calc(const Eo *eo_obj, Evas_Object_Protected_Data *obj, Efl_Gfx_Map_Data *p p->z = op->raw_coord.z; } break; - case GFX_MAP_COLOR: + case GFX_MAPPING_COLOR: if (op->raw_coord.idx != -1) kmin = kmax = op->raw_coord.idx; for (k = kmin; k <= kmax; k++) @@ -412,32 +412,32 @@ _map_calc(const Eo *eo_obj, Evas_Object_Protected_Data *obj, Efl_Gfx_Map_Data *p p->a = op->color.a; } break; - case GFX_MAP_ROTATE_2D: + case GFX_MAPPING_ROTATE_2D: _map_util_rotate(m, op->rotate_2d.degrees, cx, cy); break; - case GFX_MAP_ROTATE_3D: + case GFX_MAPPING_ROTATE_3D: _map_util_3d_rotate(m, op->rotate_3d.dx, op->rotate_3d.dy, op->rotate_3d.dz, cx, cy, cz); break; - case GFX_MAP_ROTATE_QUAT: + case GFX_MAPPING_ROTATE_QUAT: _map_util_quat_rotate(m, op->rotate_quat.qx, op->rotate_quat.qy, op->rotate_quat.qz, op->rotate_quat.qw, cx, cy, cz); break; - case GFX_MAP_ZOOM: + case GFX_MAPPING_ZOOM: _map_util_zoom(m, op->zoom.zx, op->zoom.zy, cx, cy); break; - case GFX_MAP_TRANSLATE: + case GFX_MAPPING_TRANSLATE: _map_util_translate(m, op->translate.dx, op->translate.dy, op->translate.dz); break; - case GFX_MAP_LIGHTNING_3D: - _map_util_3d_lighting(m, cx, cy, cz, op->lightning_3d.lr, - op->lightning_3d.lg, op->lightning_3d.lb, - op->lightning_3d.ar, op->lightning_3d.ag, - op->lightning_3d.ab); + case GFX_MAPPING_LIGHTING_3D: + _map_util_3d_lighting(m, cx, cy, cz, op->lighting_3d.lr, + op->lighting_3d.lg, op->lighting_3d.lb, + op->lighting_3d.ar, op->lighting_3d.ag, + op->lighting_3d.ab); break; - case GFX_MAP_PERSPECTIVE_3D: + case GFX_MAPPING_PERSPECTIVE_3D: _map_util_3d_perspective(m, cx, cy, op->perspective_3d.z0, op->perspective_3d.foc); break; @@ -452,26 +452,26 @@ _map_calc(const Eo *eo_obj, Evas_Object_Protected_Data *obj, Efl_Gfx_Map_Data *p mcow->imw = imw; mcow->imh = imh; MAPCOW_END(mcow, pd); - obj->gfx_map_update = EINA_FALSE; + obj->gfx_mapping_update = EINA_FALSE; return m; } void -_efl_gfx_map_update(Eo *eo_obj) +_efl_gfx_mapping_update(Eo *eo_obj) { Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj); - Efl_Gfx_Map_Data *pd = efl_data_scope_get(eo_obj, MY_CLASS); + Efl_Gfx_Mapping_Data *pd = efl_data_scope_get(eo_obj, MY_CLASS); Evas_Map *m; m = _map_calc(eo_obj, obj, pd); evas_object_map_set(eo_obj, m); _evas_object_map_enable_set(eo_obj, obj, m != NULL); - obj->gfx_map_has = (m != NULL); + obj->gfx_mapping_has = (m != NULL); } static inline void -_map_ops_clean(Eo *eo_obj, Efl_Gfx_Map_Data *pd) +_map_ops_clean(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd) { if (pd->cow->ops) { @@ -498,16 +498,16 @@ _map_ops_clean(Eo *eo_obj, Efl_Gfx_Map_Data *pd) } EOLIAN Eina_Bool -_efl_gfx_map_map_has(Eo *eo_obj EINA_UNUSED, Efl_Gfx_Map_Data *pd EINA_UNUSED) +_efl_gfx_mapping_mapping_has(Eo *eo_obj EINA_UNUSED, Efl_Gfx_Mapping_Data *pd EINA_UNUSED) { - if (pd->cow == &gfx_map_cow_default) return EINA_FALSE; + if (pd->cow == &gfx_mapping_cow_default) return EINA_FALSE; if (pd->cow->ops) return EINA_TRUE; if (pd->cow->map) return EINA_TRUE; return EINA_FALSE; } EOLIAN static void -_efl_gfx_map_map_reset(Eo *eo_obj, Efl_Gfx_Map_Data *pd) +_efl_gfx_mapping_mapping_reset(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd) { Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj); Eina_Bool alpha, smooth; @@ -518,21 +518,21 @@ _efl_gfx_map_map_reset(Eo *eo_obj, Efl_Gfx_Map_Data *pd) if (pd->cow->event_cbs) efl_event_callback_array_del(eo_obj, _geometry_changes(), obj); - eina_cow_memcpy(gfx_map_cow, (const Eina_Cow_Data * const *) &pd->cow, - (const Eina_Cow_Data *) &gfx_map_cow_default); + eina_cow_memcpy(gfx_mapping_cow, (const Eina_Cow_Data * const *) &pd->cow, + (const Eina_Cow_Data *) &gfx_mapping_cow_default); _map_dirty(eo_obj, pd, EINA_TRUE); MAPCOW_WRITE(pd, alpha, alpha); MAPCOW_WRITE(pd, smooth, smooth); } EOLIAN static int -_efl_gfx_map_map_point_count_get(const Eo *eo_obj EINA_UNUSED, Efl_Gfx_Map_Data *pd) +_efl_gfx_mapping_mapping_point_count_get(const Eo *eo_obj EINA_UNUSED, Efl_Gfx_Mapping_Data *pd) { return pd->cow->count; } EOLIAN static void -_efl_gfx_map_map_point_count_set(Eo *eo_obj EINA_UNUSED, Efl_Gfx_Map_Data *pd, int count) +_efl_gfx_mapping_mapping_point_count_set(Eo *eo_obj EINA_UNUSED, Efl_Gfx_Mapping_Data *pd, int count) { Gfx_Map *mcow; @@ -568,7 +568,7 @@ _efl_gfx_map_map_point_count_set(Eo *eo_obj EINA_UNUSED, Efl_Gfx_Map_Data *pd, i } EOLIAN static Eina_Bool -_efl_gfx_map_map_clockwise_get(const Eo *eo_obj, Efl_Gfx_Map_Data *pd) +_efl_gfx_mapping_mapping_clockwise_get(const Eo *eo_obj, Efl_Gfx_Mapping_Data *pd) { Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj, EINA_TRUE); Evas_Map *m; @@ -579,7 +579,7 @@ _efl_gfx_map_map_clockwise_get(const Eo *eo_obj, Efl_Gfx_Map_Data *pd) } EOLIAN static void -_efl_gfx_map_map_smooth_set(Eo *eo_obj, Efl_Gfx_Map_Data *pd, Eina_Bool smooth) +_efl_gfx_mapping_mapping_smooth_set(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, Eina_Bool smooth) { if (pd->cow->smooth == smooth) return; @@ -589,13 +589,13 @@ _efl_gfx_map_map_smooth_set(Eo *eo_obj, Efl_Gfx_Map_Data *pd, Eina_Bool smooth) } EOLIAN static Eina_Bool -_efl_gfx_map_map_smooth_get(const Eo *eo_obj EINA_UNUSED, Efl_Gfx_Map_Data *pd) +_efl_gfx_mapping_mapping_smooth_get(const Eo *eo_obj EINA_UNUSED, Efl_Gfx_Mapping_Data *pd) { return pd->cow->smooth; } EOLIAN static void -_efl_gfx_map_map_alpha_set(Eo *eo_obj, Efl_Gfx_Map_Data *pd, Eina_Bool alpha) +_efl_gfx_mapping_mapping_alpha_set(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, Eina_Bool alpha) { if (pd->cow->alpha == alpha) return; @@ -605,13 +605,13 @@ _efl_gfx_map_map_alpha_set(Eo *eo_obj, Efl_Gfx_Map_Data *pd, Eina_Bool alpha) } EOLIAN static Eina_Bool -_efl_gfx_map_map_alpha_get(const Eo *eo_obj EINA_UNUSED, Efl_Gfx_Map_Data *pd) +_efl_gfx_mapping_mapping_alpha_get(const Eo *eo_obj EINA_UNUSED, Efl_Gfx_Mapping_Data *pd) { return pd->cow->alpha; } EOLIAN static void -_efl_gfx_map_map_coord_absolute_get(const Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_mapping_coord_absolute_get(const Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, int idx, double *x, double *y, double *z) { Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj); @@ -647,7 +647,7 @@ _efl_gfx_map_map_coord_absolute_get(const Eo *eo_obj, Efl_Gfx_Map_Data *pd, } EOLIAN static void -_efl_gfx_map_map_uv_set(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_mapping_uv_set(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, int idx, double u, double v) { Gfx_Map *mcow; @@ -673,7 +673,7 @@ _efl_gfx_map_map_uv_set(Eo *eo_obj, Efl_Gfx_Map_Data *pd, } EOLIAN static void -_efl_gfx_map_map_uv_get(const Eo *eo_obj EINA_UNUSED, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_mapping_uv_get(const Eo *eo_obj EINA_UNUSED, Efl_Gfx_Mapping_Data *pd, int idx, double *u, double *v) { EINA_SAFETY_ON_FALSE_RETURN((idx >= 0) && (idx < pd->cow->count) @@ -684,7 +684,7 @@ _efl_gfx_map_map_uv_get(const Eo *eo_obj EINA_UNUSED, Efl_Gfx_Map_Data *pd, } EOLIAN static void -_efl_gfx_map_map_color_get(const Eo *eo_obj EINA_UNUSED, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_mapping_color_get(const Eo *eo_obj EINA_UNUSED, Efl_Gfx_Mapping_Data *pd, int idx, int *r, int *g, int *b, int *a) { Evas_Object_Protected_Data *obj = EVAS_OBJ_GET_OR_RETURN(eo_obj); @@ -713,7 +713,7 @@ _efl_gfx_map_map_color_get(const Eo *eo_obj EINA_UNUSED, Efl_Gfx_Map_Data *pd, } static Gfx_Map_Op * -_gfx_map_op_add(Eo *eo_obj, Efl_Gfx_Map_Data *pd, Gfx_Map_Op_Type type, +_gfx_mapping_op_add(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, Gfx_Map_Op_Type type, const Efl_Gfx_Entity *eo_pivot, double cx, double cy, double cz, Eina_Bool is_absolute) { @@ -775,14 +775,14 @@ _gfx_map_op_add(Eo *eo_obj, Efl_Gfx_Map_Data *pd, Gfx_Map_Op_Type type, } EOLIAN static void -_efl_gfx_map_map_coord_absolute_set(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_mapping_coord_absolute_set(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, int idx, double x, double y, double z) { Gfx_Map_Op *op; EINA_SAFETY_ON_FALSE_RETURN((idx >= 0) && (idx < pd->cow->count)); - op = _gfx_map_op_add(eo_obj, pd, GFX_MAP_RAW_COORD, NULL, 0, 0, 0, EINA_FALSE); + op = _gfx_mapping_op_add(eo_obj, pd, GFX_MAPPING_RAW_COORD, NULL, 0, 0, 0, EINA_FALSE); if (!op) return; op->raw_coord.idx = idx; @@ -792,14 +792,14 @@ _efl_gfx_map_map_coord_absolute_set(Eo *eo_obj, Efl_Gfx_Map_Data *pd, } EOLIAN static void -_efl_gfx_map_map_color_set(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_mapping_color_set(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, int idx, int r, int g, int b, int a) { Gfx_Map_Op *op; EINA_SAFETY_ON_FALSE_RETURN((idx >= -1) && (idx < pd->cow->count)); - op = _gfx_map_op_add(eo_obj, pd, GFX_MAP_COLOR, NULL, 0, 0, 0, EINA_FALSE); + op = _gfx_mapping_op_add(eo_obj, pd, GFX_MAPPING_COLOR, NULL, 0, 0, 0, EINA_FALSE); if (!op) return; op->color.idx = idx; @@ -810,12 +810,12 @@ _efl_gfx_map_map_color_set(Eo *eo_obj, Efl_Gfx_Map_Data *pd, } EOLIAN static void -_efl_gfx_map_translate(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_translate(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double dx, double dy, double dz) { Gfx_Map_Op *op; - op = _gfx_map_op_add(eo_obj, pd, GFX_MAP_TRANSLATE, NULL, 0, 0, 0, EINA_FALSE); + op = _gfx_mapping_op_add(eo_obj, pd, GFX_MAPPING_TRANSLATE, NULL, 0, 0, 0, EINA_FALSE); if (!op) return; op->translate.dx = dx; @@ -824,40 +824,40 @@ _efl_gfx_map_translate(Eo *eo_obj, Efl_Gfx_Map_Data *pd, } static inline void -_map_rotate(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_map_rotate(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double degrees, const Efl_Gfx_Entity *pivot, double cx, double cy, Eina_Bool absolute) { Gfx_Map_Op *op; - op = _gfx_map_op_add(eo_obj, pd, GFX_MAP_ROTATE_2D, pivot, cx, cy, 0, absolute); + op = _gfx_mapping_op_add(eo_obj, pd, GFX_MAPPING_ROTATE_2D, pivot, cx, cy, 0, absolute); if (!op) return; op->rotate_2d.degrees = degrees; } EOLIAN static void -_efl_gfx_map_rotate(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_rotate(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double degrees, const Efl_Gfx_Entity *pivot, double cx, double cy) { _map_rotate(eo_obj, pd, degrees, pivot, cx, cy, EINA_FALSE); } EOLIAN static void -_efl_gfx_map_rotate_absolute(Eo *eo_obj, Efl_Gfx_Map_Data *pd, double degrees, double cx, double cy) +_efl_gfx_mapping_rotate_absolute(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double degrees, double cx, double cy) { _map_rotate(eo_obj, pd, degrees, NULL, cx, cy, EINA_TRUE); } static inline void -_map_rotate_3d(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_map_rotate_3d(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double dx, double dy, double dz, const Efl_Gfx_Entity *pivot, double cx, double cy, double cz, Eina_Bool absolute) { Gfx_Map_Op *op; - op = _gfx_map_op_add(eo_obj, pd, GFX_MAP_ROTATE_3D, pivot, cx, cy, cz, absolute); + op = _gfx_mapping_op_add(eo_obj, pd, GFX_MAPPING_ROTATE_3D, pivot, cx, cy, cz, absolute); if (!op) return; op->rotate_3d.dx = dx; @@ -866,7 +866,7 @@ _map_rotate_3d(Eo *eo_obj, Efl_Gfx_Map_Data *pd, } EOLIAN static void -_efl_gfx_map_rotate_3d(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_rotate_3d(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double dx, double dy, double dz, const Efl_Gfx_Entity *pivot, double cx, double cy, double cz) { @@ -874,21 +874,21 @@ _efl_gfx_map_rotate_3d(Eo *eo_obj, Efl_Gfx_Map_Data *pd, } EOLIAN static void -_efl_gfx_map_rotate_3d_absolute(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_rotate_3d_absolute(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double dx, double dy, double dz, double cx, double cy, double cz) { _map_rotate_3d(eo_obj, pd, dx, dy, dz, NULL, cx, cy, cz, EINA_TRUE); } static inline void -_map_rotate_quat(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_map_rotate_quat(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double qx, double qy, double qz, double qw, const Efl_Gfx_Entity *pivot, double cx, double cy, double cz, Eina_Bool absolute) { Gfx_Map_Op *op; - op = _gfx_map_op_add(eo_obj, pd, GFX_MAP_ROTATE_QUAT, pivot, cx, cy, cz, absolute); + op = _gfx_mapping_op_add(eo_obj, pd, GFX_MAPPING_ROTATE_QUAT, pivot, cx, cy, cz, absolute); if (!op) return; op->rotate_quat.qx = qx; @@ -898,7 +898,7 @@ _map_rotate_quat(Eo *eo_obj, Efl_Gfx_Map_Data *pd, } EOLIAN static void -_efl_gfx_map_rotate_quat(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_rotate_quat(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double qx, double qy, double qz, double qw, const Efl_Gfx_Entity *pivot, double cx, double cy, double cz) { @@ -906,7 +906,7 @@ _efl_gfx_map_rotate_quat(Eo *eo_obj, Efl_Gfx_Map_Data *pd, } EOLIAN static void -_efl_gfx_map_rotate_quat_absolute(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_rotate_quat_absolute(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double qx, double qy, double qz, double qw, double cx, double cy, double cz) { @@ -914,14 +914,14 @@ _efl_gfx_map_rotate_quat_absolute(Eo *eo_obj, Efl_Gfx_Map_Data *pd, } static inline void -_map_zoom(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_map_zoom(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double zoomx, double zoomy, const Efl_Gfx_Entity *pivot, double cx, double cy, Eina_Bool absolute) { Gfx_Map_Op *op; - op = _gfx_map_op_add(eo_obj, pd, GFX_MAP_ZOOM, pivot, cx, cy, 0, absolute); + op = _gfx_mapping_op_add(eo_obj, pd, GFX_MAPPING_ZOOM, pivot, cx, cy, 0, absolute); if (!op) return; op->zoom.zx = zoomx; @@ -929,7 +929,7 @@ _map_zoom(Eo *eo_obj, Efl_Gfx_Map_Data *pd, } EOLIAN static void -_efl_gfx_map_zoom(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_zoom(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double zoomx, double zoomy, const Efl_Gfx_Entity *pivot, double cx, double cy) { @@ -937,49 +937,49 @@ _efl_gfx_map_zoom(Eo *eo_obj, Efl_Gfx_Map_Data *pd, } EOLIAN static void -_efl_gfx_map_zoom_absolute(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_zoom_absolute(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double zoomx, double zoomy, double cx, double cy) { _map_zoom(eo_obj, pd, zoomx, zoomy, NULL, cx, cy, EINA_TRUE); } static inline void -_map_lightning_3d(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_map_lighting_3d(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, const Efl_Gfx_Entity *pivot, double lx, double ly, double lz, int lr, int lg, int lb, int ar, int ag, int ab, Eina_Bool absolute) { Gfx_Map_Op *op; - op = _gfx_map_op_add(eo_obj, pd, GFX_MAP_LIGHTNING_3D, pivot, lx, ly, lz, absolute); + op = _gfx_mapping_op_add(eo_obj, pd, GFX_MAPPING_LIGHTING_3D, pivot, lx, ly, lz, absolute); if (!op) return; - op->lightning_3d.lr = lr; - op->lightning_3d.lg = lg; - op->lightning_3d.lb = lb; - op->lightning_3d.ar = ar; - op->lightning_3d.ag = ag; - op->lightning_3d.ab = ab; + op->lighting_3d.lr = lr; + op->lighting_3d.lg = lg; + op->lighting_3d.lb = lb; + op->lighting_3d.ar = ar; + op->lighting_3d.ag = ag; + op->lighting_3d.ab = ab; } EOLIAN static void -_efl_gfx_map_lightning_3d(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_lighting_3d(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, const Efl_Gfx_Entity *pivot, double lx, double ly, double lz, int lr, int lg, int lb, int ar, int ag, int ab) { - _map_lightning_3d(eo_obj, pd, pivot, lx, ly, lz, lr, lg, lb, ar, ag, ab, EINA_FALSE); + _map_lighting_3d(eo_obj, pd, pivot, lx, ly, lz, lr, lg, lb, ar, ag, ab, EINA_FALSE); } EOLIAN static void -_efl_gfx_map_lightning_3d_absolute(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_lighting_3d_absolute(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double lx, double ly, double lz, int lr, int lg, int lb, int ar, int ag, int ab) { - _map_lightning_3d(eo_obj, pd, NULL, lx, ly, lz, lr, lg, lb, ar, ag, ab, EINA_TRUE); + _map_lighting_3d(eo_obj, pd, NULL, lx, ly, lz, lr, lg, lb, ar, ag, ab, EINA_TRUE); } static inline void -_map_perspective_3d(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_map_perspective_3d(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, const Efl_Gfx_Entity *pivot, double px, double py, double z0, double foc, Eina_Bool absolute) @@ -992,7 +992,7 @@ _map_perspective_3d(Eo *eo_obj, Efl_Gfx_Map_Data *pd, return; } - op = _gfx_map_op_add(eo_obj, pd, GFX_MAP_PERSPECTIVE_3D, pivot, px, py, 0, absolute); + op = _gfx_mapping_op_add(eo_obj, pd, GFX_MAPPING_PERSPECTIVE_3D, pivot, px, py, 0, absolute); if (!op) return; op->perspective_3d.z0 = z0; @@ -1000,7 +1000,7 @@ _map_perspective_3d(Eo *eo_obj, Efl_Gfx_Map_Data *pd, } EOLIAN static void -_efl_gfx_map_perspective_3d(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_perspective_3d(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, const Efl_Gfx_Entity *pivot, double px, double py, double z0, double foc) { @@ -1008,10 +1008,10 @@ _efl_gfx_map_perspective_3d(Eo *eo_obj, Efl_Gfx_Map_Data *pd, } EOLIAN static void -_efl_gfx_map_perspective_3d_absolute(Eo *eo_obj, Efl_Gfx_Map_Data *pd, +_efl_gfx_mapping_perspective_3d_absolute(Eo *eo_obj, Efl_Gfx_Mapping_Data *pd, double px, double py, double z0, double foc) { _map_perspective_3d(eo_obj, pd, NULL, px, py, z0, foc, EINA_TRUE); } -#include "canvas/efl_gfx_map.eo.c" +#include "canvas/efl_gfx_mapping.eo.c" diff --git a/src/lib/evas/canvas/efl_gfx_map.eo b/src/lib/evas/canvas/efl_gfx_mapping.eo similarity index 96% rename from src/lib/evas/canvas/efl_gfx_map.eo rename to src/lib/evas/canvas/efl_gfx_mapping.eo index 77c010d8d1..11a4ad273f 100644 --- a/src/lib/evas/canvas/efl_gfx_map.eo +++ b/src/lib/evas/canvas/efl_gfx_mapping.eo @@ -1,4 +1,4 @@ -mixin @beta Efl.Gfx.Map requires Efl.Object +mixin @beta Efl.Gfx.Mapping requires Efl.Object { [[Texture UV mapping for all objects (rotation, perspective, 3d, ...). @@ -17,23 +17,23 @@ mixin @beta Efl.Gfx.Map requires Efl.Object @since 1.20 ]] methods { - map_has { + mapping_has { [[Read-only property indicating whether an object is mapped. This will be $true if any transformation is applied to this object. ]] return: bool; [[$true if the object is mapped.]] } - map_reset { + mapping_reset { [[Resets the map transformation to its default state. This will reset all transformations to identity, meaning the points' colors, positions and UV coordinates will be reset to their default - values. @.map_has will then return $false. This function will - not modify the values of @.map_smooth or @.map_alpha. + values. @.mapping_has will then return $false. This function will + not modify the values of @.mapping_smooth or @.mapping_alpha. ]] } - @property map_point_count { + @property mapping_point_count { [[Number of points of a map. This sets the number of points of map. @@ -43,7 +43,7 @@ mixin @beta Efl.Gfx.Map requires Efl.Object count: int; [[The number of points of map]] } } - @property map_clockwise { + @property mapping_clockwise { [[Clockwise state of a map (read-only). This determines if the output points (X and Y. Z is not used) are @@ -63,7 +63,7 @@ mixin @beta Efl.Gfx.Map requires Efl.Object // Same remark for alpha - it's only for performance // Same remark for (MISSING) anti-aliasing - @property map_smooth { + @property mapping_smooth { [[Smoothing state for map rendering. This sets smoothing for map rendering. If the object is a type that has @@ -74,7 +74,7 @@ mixin @beta Efl.Gfx.Map requires Efl.Object smooth: bool; [[$true by default.]] } } - @property map_alpha { + @property mapping_alpha { [[Alpha flag for map rendering. This sets alpha flag for map rendering. If the object is a type that @@ -84,14 +84,14 @@ mixin @beta Efl.Gfx.Map requires Efl.Object and is useful if you know the object and/or all sub-objects is 100% solid. - Note that this may conflict with @.map_smooth depending on which + Note that this may conflict with @.mapping_smooth depending on which algorithm is used for anti-aliasing. ]] values { alpha: bool; [[$true by default.]] } } - @property map_coord_absolute { + @property mapping_coord_absolute { [[A point's absolute coordinate on the canvas. This sets/gets the fixed point's coordinate in the map. Note that points @@ -121,7 +121,7 @@ mixin @beta Efl.Gfx.Map requires Efl.Object z: double; [[Point Z coordinate hint (pre-perspective transform).]] } } - @property map_uv { + @property mapping_uv { [[Map point's U and V texture source point. This sets/gets the U and V coordinates for the point. This determines @@ -142,7 +142,7 @@ mixin @beta Efl.Gfx.Map requires Efl.Object v: double; [[Relative Y coordinate within the image, from 0 to 1.]] } } - @property map_color { + @property mapping_color { [[Color of a vertex in the map. This sets the color of the vertex in the map. Colors will be linearly @@ -270,7 +270,7 @@ mixin @beta Efl.Gfx.Map requires Efl.Object cy: double; [[y relative coordinate of the center point.]] } } - lightning_3d { + lighting_3d { [[Apply a lighting effect on the object. This is used to apply lighting calculations (from a single light @@ -410,7 +410,7 @@ mixin @beta Efl.Gfx.Map requires Efl.Object cy: double; [[y absolute coordinate in pixels of the center point.]] } } - lightning_3d_absolute { + lighting_3d_absolute { [[Apply a lighting effect to the object. This is used to apply lighting calculations (from a single light @@ -423,7 +423,7 @@ mixin @beta Efl.Gfx.Map requires Efl.Object "logical" side for lighting. The coordinates of the center point are given in absolute canvas - coordinates. See also @.lightning_3d for a pivot-based lightning + coordinates. See also @.lighting_3d for a pivot-based lighting effect. ]] params { diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c index 1c70871c96..9310c195e4 100644 --- a/src/lib/evas/canvas/evas_main.c +++ b/src/lib/evas/canvas/evas_main.c @@ -78,7 +78,7 @@ evas_init(void) EINA_LOG_STATE_STOP, EINA_LOG_STATE_INIT); - _efl_gfx_map_init(); + _efl_gfx_mapping_init(); evas_focus_init(); return _evas_init_count; @@ -138,7 +138,7 @@ evas_shutdown(void) evas_filter_shutdown(); evas_module_shutdown(); - _efl_gfx_map_shutdown(); + _efl_gfx_mapping_shutdown(); eina_cow_del(evas_object_proxy_cow); eina_cow_del(evas_object_map_cow); diff --git a/src/lib/evas/canvas/evas_map.h b/src/lib/evas/canvas/evas_map.h index f76f65af4f..06a18f9e31 100644 --- a/src/lib/evas/canvas/evas_map.h +++ b/src/lib/evas/canvas/evas_map.h @@ -1,4 +1,4 @@ -/* Common header for maps: legacy Evas_Map API and Efl.Gfx.Map */ +/* Common header for maps: legacy Evas_Map API and Efl.Gfx.Mapping */ #ifndef EVAS_MAP_H #define EVAS_MAP_H diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c index 06150e7cbd..b476ff2930 100644 --- a/src/lib/evas/canvas/evas_render.c +++ b/src/lib/evas/canvas/evas_render.c @@ -487,7 +487,7 @@ _evas_render_phase1_direct(Evas_Public_Data *e, _evas_mask_redraw_set(e, obj); } - _evas_object_gfx_map_update(obj); + _evas_object_gfx_mapping_update(obj); Eina_Bool has_map = _evas_render_has_map(obj); @@ -1141,7 +1141,7 @@ _evas_render_phase1_object_process(Phase1_Context *p1ctx, } #endif - _evas_object_gfx_map_update(obj); + _evas_object_gfx_mapping_update(obj); map = _evas_render_has_map(obj); hmap = _evas_render_had_map(obj); can_map = _evas_render_can_map(obj); @@ -1265,7 +1265,7 @@ _evas_render_check_pending_objects(Eina_Array *pending_objects, Evas *eo_e EINA_ if (!obj->layer) goto clean_stuff; - _evas_object_gfx_map_update(obj); + _evas_object_gfx_mapping_update(obj); EINA_PREFETCH(&(obj->cur->clipper)); EINA_PREFETCH(&(obj->cur->cache.clip)); //If the children are in active objects, They should be cleaned up. @@ -1388,12 +1388,12 @@ _evas_render_can_use_overlay(Evas_Public_Data *e, Evas_Object *eo_obj, Efl_Canva /* Check if any one is the stack make this object mapped */ eo_tmp = eo_obj; tmp = efl_data_scope_get(eo_tmp, EFL_CANVAS_OBJECT_CLASS); - _evas_object_gfx_map_update(tmp); + _evas_object_gfx_mapping_update(tmp); while (tmp && !(_evas_render_has_map(tmp) && !_evas_render_can_map(tmp))) { eo_tmp = tmp->smart.parent; tmp = efl_data_scope_get(eo_tmp, EFL_CANVAS_OBJECT_CLASS); - if (tmp) _evas_object_gfx_map_update(tmp); + if (tmp) _evas_object_gfx_mapping_update(tmp); } if (tmp && _evas_render_has_map(tmp) && !_evas_render_can_map(tmp)) @@ -1756,7 +1756,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj, proxy_src_clip = proxy_render_data->source_clip; evas_object_clip_recalc(obj); - _evas_object_gfx_map_update(obj); + _evas_object_gfx_mapping_update(obj); /* leave early if clipper is not visible */ if ((obj->cur->clipper) && (!obj->cur->clipper->cur->visible)) diff --git a/src/lib/evas/canvas/meson.build b/src/lib/evas/canvas/meson.build index c7e8810f63..c11d902503 100644 --- a/src/lib/evas/canvas/meson.build +++ b/src/lib/evas/canvas/meson.build @@ -74,7 +74,7 @@ pub_eo_files = [ 'efl_canvas_vg_gradient_radial.eo', 'efl_canvas_vg_gradient_linear.eo', 'efl_canvas_group.eo', - 'efl_gfx_map.eo', + 'efl_gfx_mapping.eo', 'efl_canvas_event_grabber.eo', 'efl_canvas_text.eo' ] @@ -179,7 +179,7 @@ evas_src += files([ 'efl_canvas_surface_tbm.c', 'efl_canvas_surface_x11.c', 'efl_canvas_surface_wayland.c', - 'efl_gfx_map.c', + 'efl_gfx_mapping.c', 'efl_input_event.c', 'efl_input_key.c', 'efl_input_pointer.c', diff --git a/src/lib/evas/include/evas_inline.x b/src/lib/evas/include/evas_inline.x index c83c1a0bc6..8c8f814fce 100644 --- a/src/lib/evas/include/evas_inline.x +++ b/src/lib/evas/include/evas_inline.x @@ -32,10 +32,10 @@ _evas_render_can_map(Evas_Object_Protected_Data *obj) } static inline void -_evas_object_gfx_map_update(Evas_Object_Protected_Data *obj) +_evas_object_gfx_mapping_update(Evas_Object_Protected_Data *obj) { - if (!obj->gfx_map_has) return; - _efl_gfx_map_update(obj->object); + if (!obj->gfx_mapping_has) return; + _efl_gfx_mapping_update(obj->object); } static inline int diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 984b52ed67..a3faa16911 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1186,8 +1186,8 @@ struct _Evas_Object_Protected_Data Eina_Bool snapshot_needs_redraw : 1; Eina_Bool snapshot_no_obscure : 1; Eina_Bool is_image_object : 1; - Eina_Bool gfx_map_has : 1; - Eina_Bool gfx_map_update : 1; + Eina_Bool gfx_mapping_has : 1; + Eina_Bool gfx_mapping_update : 1; struct { Eina_Bool ctor : 1; // used legacy constructor @@ -1736,10 +1736,10 @@ void _evas_canvas3d_eet_file_free(Evas_Canvas3D_File_Eet* eet_file); void evas_filter_init(void); void evas_filter_shutdown(void); -/* Efl.Gfx.Map */ -void _efl_gfx_map_init(void); -void _efl_gfx_map_shutdown(void); -void _efl_gfx_map_update(Eo *eo_obj); +/* Efl.Gfx.Mapping */ +void _efl_gfx_mapping_init(void); +void _efl_gfx_mapping_shutdown(void); +void _efl_gfx_mapping_update(Eo *eo_obj); /* Ector */ Ector_Surface *evas_ector_get(Evas_Public_Data *evas);