aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-01 18:06:28 +0000
committerTom Hacohen <tom@stosb.com>2016-03-03 09:58:08 +0000
commitf21ade6123b9053fca8d1632644c48525a99d6e0 (patch)
treec5eb0445f471d21365a7a5a7b0ec7d279c11b398 /src
parentSome automatic migration and some manual adjustments to calc and text. (diff)
downloadefl-f21ade6123b9053fca8d1632644c48525a99d6e0.tar.gz
Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL automatically. This commit is *only* the automatic conversion, so it can be easily reverted and re-run.
Diffstat (limited to 'src')
-rw-r--r--src/benchmarks/eo/class_simple.c2
-rw-r--r--src/benchmarks/eo/eo_bench_callbacks.c6
-rw-r--r--src/benchmarks/eo/eo_bench_eo_do.c12
-rw-r--r--src/examples/ecore/ecore_audio_custom.c14
-rw-r--r--src/examples/ecore/ecore_audio_playback.c82
-rw-r--r--src/examples/ecore/ecore_audio_to_ogg.c14
-rw-r--r--src/examples/ecore/ecore_idler_example.c2
-rw-r--r--src/examples/ecore/ecore_poller_example.c11
-rw-r--r--src/examples/edje/edje-text.c6
-rw-r--r--src/examples/eldbus/dbusmodel.c26
-rw-r--r--src/examples/emotion/emotion_basic_example.c4
-rw-r--r--src/examples/emotion/emotion_border_example.c5
-rw-r--r--src/examples/emotion/emotion_generic_example.c10
-rw-r--r--src/examples/emotion/emotion_generic_subtitle_example.c4
-rw-r--r--src/examples/emotion/emotion_signals_example.c10
-rw-r--r--src/examples/eo/evas/evas_elw_box.c2
-rw-r--r--src/examples/eo/evas/evas_elw_boxedbutton.c10
-rw-r--r--src/examples/eo/evas/evas_elw_button.c8
-rw-r--r--src/examples/eo/evas/evas_elw_win.c2
-rw-r--r--src/examples/eo/evas/evas_evas_obj.c6
-rw-r--r--src/examples/eo/evas/evas_evas_obj.h4
-rw-r--r--src/examples/eo/evas/evas_test.c29
-rw-r--r--src/examples/eo/isa/eo_isa_mixin.c2
-rw-r--r--src/examples/eo/simple/simple_main.c8
-rw-r--r--src/examples/eo/simple/simple_mixin.c2
-rw-r--r--src/examples/eolian_cxx/colourable.c6
-rw-r--r--src/examples/eolian_cxx/colourablesquare.c2
-rw-r--r--src/examples/evas/evas-3d-aabb.c157
-rw-r--r--src/examples/evas/evas-3d-blending.c128
-rw-r--r--src/examples/evas/evas-3d-colorpick.c156
-rw-r--r--src/examples/evas/evas-3d-cube-rotate.c91
-rw-r--r--src/examples/evas/evas-3d-cube.c123
-rw-r--r--src/examples/evas/evas-3d-cube2.c150
-rw-r--r--src/examples/evas/evas-3d-eet.c136
-rw-r--r--src/examples/evas/evas-3d-fog.c127
-rw-r--r--src/examples/evas/evas-3d-frustum.c229
-rw-r--r--src/examples/evas/evas-3d-hull.c242
-rw-r--r--src/examples/evas/evas-3d-md2.c120
-rw-r--r--src/examples/evas/evas-3d-mmap-set.c137
-rw-r--r--src/examples/evas/evas-3d-obj.c129
-rw-r--r--src/examples/evas/evas-3d-parallax-occlusion.c186
-rw-r--r--src/examples/evas/evas-3d-pick.c97
-rw-r--r--src/examples/evas/evas-3d-ply.c132
-rw-r--r--src/examples/evas/evas-3d-proxy.c131
-rw-r--r--src/examples/evas/evas-3d-shadows.c470
-rw-r--r--src/examples/evas/evas-object-manipulation-eo.c75
-rw-r--r--src/examples/evas/evas-vg-simple.c46
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter-header.c95
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter-macros.h109
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter.c527
-rw-r--r--src/lib/ecore/ecore_anim.c18
-rw-r--r--src/lib/ecore/ecore_exe.c12
-rw-r--r--src/lib/ecore/ecore_exe_posix.c2
-rw-r--r--src/lib/ecore/ecore_exe_win32.c4
-rw-r--r--src/lib/ecore/ecore_idle_enterer.c12
-rw-r--r--src/lib/ecore/ecore_idle_exiter.c10
-rw-r--r--src/lib/ecore/ecore_idler.c10
-rw-r--r--src/lib/ecore/ecore_job.c10
-rw-r--r--src/lib/ecore/ecore_poller.c13
-rw-r--r--src/lib/ecore/ecore_timer.c24
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj.c2
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_in.c22
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_in_sndfile.c2
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_in_tone.c6
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_out.c10
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_out_core_audio.c20
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_out_pulse.c46
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_out_sndfile.c16
-rw-r--r--src/lib/ecore_con/ecore_con.c75
-rw-r--r--src/lib/ecore_con/ecore_con_eet.c38
-rw-r--r--src/lib/ecore_con/ecore_con_legacy.c4
-rw-r--r--src/lib/ecore_con/ecore_con_url.c23
-rw-r--r--src/lib/ecore_evas/ecore_evas.c4
-rw-r--r--src/lib/ector/cairo/ector_cairo_private.h2
-rw-r--r--src/lib/ector/cairo/ector_cairo_software_surface.c13
-rw-r--r--src/lib/ector/cairo/ector_cairo_surface.c13
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_base.c6
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c14
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c14
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_shape.c34
-rw-r--r--src/lib/ector/ector_private.h2
-rw-r--r--src/lib/ector/ector_renderer_generic_base.c6
-rw-r--r--src/lib/ector/ector_renderer_generic_buffer.c2
-rw-r--r--src/lib/ector/gl/ector_gl_surface.c15
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_base.c5
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_gradient_linear.c11
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_gradient_radial.c11
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_shape.c21
-rw-r--r--src/lib/ector/software/ector_renderer_software_buffer.c4
-rw-r--r--src/lib/ector/software/ector_renderer_software_gradient_linear.c10
-rw-r--r--src/lib/ector/software/ector_renderer_software_gradient_radial.c10
-rw-r--r--src/lib/ector/software/ector_renderer_software_shape.c28
-rw-r--r--src/lib/ector/software/ector_software_buffer.c6
-rw-r--r--src/lib/ector/software/ector_software_rasterizer.c4
-rw-r--r--src/lib/ector/software/ector_software_surface.c16
-rw-r--r--src/lib/edje/edje_callbacks.c8
-rw-r--r--src/lib/edje/edje_edit.c8
-rw-r--r--src/lib/edje/edje_load.c36
-rw-r--r--src/lib/edje/edje_multisense.c24
-rw-r--r--src/lib/edje/edje_program.c8
-rw-r--r--src/lib/edje/edje_smart.c30
-rw-r--r--src/lib/edje/edje_util.c5
-rw-r--r--src/lib/efl/interfaces/efl_gfx_shape.c80
-rw-r--r--src/lib/efl/interfaces/efl_model_common.c8
-rw-r--r--src/lib/eio/eio_model.c24
-rw-r--r--src/lib/eldbus/eldbus_model_arguments.c10
-rw-r--r--src/lib/eldbus/eldbus_model_connection.c9
-rw-r--r--src/lib/eldbus/eldbus_model_method.c6
-rw-r--r--src/lib/eldbus/eldbus_model_object.c9
-rw-r--r--src/lib/eldbus/eldbus_model_proxy.c16
-rw-r--r--src/lib/eldbus/eldbus_model_signal.c10
-rw-r--r--src/lib/emotion/emotion_smart.c88
-rw-r--r--src/lib/eo/eo_base_class.c28
-rw-r--r--src/lib/evas/Evas_Legacy.h9
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c26
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_camera.c16
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_light.c32
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_material.c14
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.c48
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_node.c146
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_object.c16
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_primitive.c6
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_scene.c40
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_texture.c42
-rw-r--r--src/lib/evas/canvas/evas_clip.c12
-rw-r--r--src/lib/evas/canvas/evas_data.c7
-rw-r--r--src/lib/evas/canvas/evas_events.c14
-rw-r--r--src/lib/evas/canvas/evas_filter_mixin.c28
-rw-r--r--src/lib/evas/canvas/evas_focus.c2
-rw-r--r--src/lib/evas/canvas/evas_layer.c4
-rw-r--r--src/lib/evas/canvas/evas_main.c4
-rw-r--r--src/lib/evas/canvas/evas_object_box.c61
-rw-r--r--src/lib/evas/canvas/evas_object_grid.c4
-rw-r--r--src/lib/evas/canvas/evas_object_image.c58
-rw-r--r--src/lib/evas/canvas/evas_object_line.c2
-rw-r--r--src/lib/evas/canvas/evas_object_main.c101
-rw-r--r--src/lib/evas/canvas/evas_object_polygon.c4
-rw-r--r--src/lib/evas/canvas/evas_object_rectangle.c2
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c36
-rw-r--r--src/lib/evas/canvas/evas_object_smart_clipped.c6
-rw-r--r--src/lib/evas/canvas/evas_object_table.c14
-rw-r--r--src/lib/evas/canvas/evas_object_text.c48
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c29
-rw-r--r--src/lib/evas/canvas/evas_object_textgrid.c20
-rw-r--r--src/lib/evas/canvas/evas_object_vg.c8
-rw-r--r--src/lib/evas/canvas/evas_out.c12
-rw-r--r--src/lib/evas/canvas/evas_render.c8
-rw-r--r--src/lib/evas/canvas/evas_stack.c12
-rw-r--r--src/lib/evas/canvas/evas_vg_container.c16
-rw-r--r--src/lib/evas/canvas/evas_vg_gradient.c17
-rw-r--r--src/lib/evas/canvas/evas_vg_gradient_linear.c42
-rw-r--r--src/lib/evas/canvas/evas_vg_gradient_radial.c50
-rw-r--r--src/lib/evas/canvas/evas_vg_node.c65
-rw-r--r--src/lib/evas/canvas/evas_vg_private.h2
-rw-r--r--src/lib/evas/canvas/evas_vg_root_node.c11
-rw-r--r--src/lib/evas/canvas/evas_vg_shape.c153
-rw-r--r--src/lib/evas/canvas/render2/evas_render2.c6
-rw-r--r--src/lib/evas/canvas/render2/evas_render2_old.c6
-rw-r--r--src/lib/evas/common3d/primitives/primitive_common.c30
-rw-r--r--src/lib/evas/common3d/primitives/primitive_common.h26
-rw-r--r--src/lib/evas/common3d/save_load/evas_model_load_save_common.c24
-rw-r--r--src/lib/evas/filters/evas_filter.c2
-rw-r--r--src/lib/evas/filters/evas_filter_blend.c8
-rw-r--r--src/lib/evas/filters/evas_filter_blur.c8
-rw-r--r--src/lib/evas/filters/evas_filter_bump.c12
-rw-r--r--src/lib/evas/filters/evas_filter_curve.c8
-rw-r--r--src/lib/evas/filters/evas_filter_displace.c12
-rw-r--r--src/lib/evas/filters/evas_filter_fill.c2
-rw-r--r--src/lib/evas/filters/evas_filter_mask.c24
-rw-r--r--src/lib/evas/filters/evas_filter_parser.c27
-rw-r--r--src/lib/evas/filters/evas_filter_private.h4
-rw-r--r--src/lib/evas/filters/evas_filter_transform.c4
-rw-r--r--src/lib/evas/filters/evas_filter_utils.c4
-rw-r--r--src/modules/ethumb/emotion/emotion.c24
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_preload.c8
-rw-r--r--src/modules/evas/engines/gl_generic/evas_ector_gl_image_buffer.c14
-rw-r--r--src/modules/evas/engines/gl_generic/evas_ector_gl_rgbaimage_buffer.c13
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c26
-rw-r--r--src/modules/evas/engines/software_generic/evas_ector_software_buffer.c13
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c26
-rw-r--r--src/modules/evas/model_loaders/eet/evas_model_load_eet.c71
-rw-r--r--src/modules/evas/model_loaders/md2/evas_model_load_md2.c42
-rw-r--r--src/modules/evas/model_loaders/obj/evas_model_load_obj.c33
-rw-r--r--src/tests/ecore/ecore_test_animator.c4
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c222
-rw-r--r--src/tests/edje/edje_test_edje.c18
-rw-r--r--src/tests/eina_cxx/simple.c2
-rw-r--r--src/tests/eio/eio_model_test_file.c26
-rw-r--r--src/tests/eio/eio_model_test_monitor_add.c26
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model.c58
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_connection.c30
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_method.c31
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_object.c30
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_proxy.c24
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_signal.c29
-rw-r--r--src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c35
-rw-r--r--src/tests/emotion/emotion_test_main-eo.c150
-rw-r--r--src/tests/eo/access/access_main.c3
-rw-r--r--src/tests/eo/access/access_simple.c2
-rw-r--r--src/tests/eo/children/children_main.c8
-rw-r--r--src/tests/eo/composite_objects/composite_objects_comp.c14
-rw-r--r--src/tests/eo/composite_objects/composite_objects_main.c34
-rw-r--r--src/tests/eo/composite_objects/composite_objects_simple.c2
-rw-r--r--src/tests/eo/constructors/constructors_main.c16
-rw-r--r--src/tests/eo/constructors/constructors_mixin.c7
-rw-r--r--src/tests/eo/constructors/constructors_simple.c6
-rw-r--r--src/tests/eo/constructors/constructors_simple2.c2
-rw-r--r--src/tests/eo/constructors/constructors_simple6.c2
-rw-r--r--src/tests/eo/constructors/constructors_simple7.c2
-rw-r--r--src/tests/eo/function_overrides/function_overrides_inherit2.c12
-rw-r--r--src/tests/eo/function_overrides/function_overrides_inherit3.c2
-rw-r--r--src/tests/eo/function_overrides/function_overrides_main.c27
-rw-r--r--src/tests/eo/function_overrides/function_overrides_simple.c4
-rw-r--r--src/tests/eo/interface/interface_main.c13
-rw-r--r--src/tests/eo/interface/interface_simple.c6
-rw-r--r--src/tests/eo/mixin/mixin_inherit.c2
-rw-r--r--src/tests/eo/mixin/mixin_main.c13
-rw-r--r--src/tests/eo/mixin/mixin_mixin.c7
-rw-r--r--src/tests/eo/mixin/mixin_mixin2.c9
-rw-r--r--src/tests/eo/mixin/mixin_mixin3.c9
-rw-r--r--src/tests/eo/signals/signals_main.c108
-rw-r--r--src/tests/eo/signals/signals_simple.c10
-rw-r--r--src/tests/eo/suite/eo_test_call_errors.c6
-rw-r--r--src/tests/eo/suite/eo_test_class_behaviour_errors.c2
-rw-r--r--src/tests/eo/suite/eo_test_class_simple.c6
-rw-r--r--src/tests/eo/suite/eo_test_general.c182
-rw-r--r--src/tests/eo/suite/eo_test_threaded_calls.c5
-rw-r--r--src/tests/eo/suite/eo_test_value.c2
-rw-r--r--src/tests/eolian/data/object_impl_add_ref.c2
-rw-r--r--src/tests/eolian/data/object_impl_ref.c2
-rw-r--r--src/tests/eolian_cxx/a.c2
-rw-r--r--src/tests/eolian_cxx/b.c2
-rw-r--r--src/tests/eolian_cxx/c.c2
-rw-r--r--src/tests/eolian_cxx/callback.c2
-rw-r--r--src/tests/eolian_cxx/d.c2
-rw-r--r--src/tests/eolian_cxx/generic.c2
-rw-r--r--src/tests/eolian_cxx/simple.c2
-rw-r--r--src/tests/eolian_js/eolian_js_test_constructor_method_impl.c8
-rw-r--r--src/tests/eolian_js/eolian_js_test_test_object_impl.c12
-rw-r--r--src/tests/evas/evas_test_filters.c16
-rw-r--r--src/tests/evas/evas_test_mesh.c12
241 files changed, 3584 insertions, 4533 deletions
diff --git a/src/benchmarks/eo/class_simple.c b/src/benchmarks/eo/class_simple.c
index 0a57e285fa..a4482726c3 100644
--- a/src/benchmarks/eo/class_simple.c
+++ b/src/benchmarks/eo/class_simple.c
@@ -15,7 +15,7 @@ _other_call(Eo *obj EINA_UNUSED, void *class_data EINA_UNUSED, Eo *other, int ti
{
if (times > 0)
{
- eo_do(other, simple_other_call(obj, times-1));
+ simple_other_call(other, obj, times-1);
}
}
diff --git a/src/benchmarks/eo/eo_bench_callbacks.c b/src/benchmarks/eo/eo_bench_callbacks.c
index 5f675598f3..ab779f8417 100644
--- a/src/benchmarks/eo/eo_bench_callbacks.c
+++ b/src/benchmarks/eo/eo_bench_callbacks.c
@@ -21,7 +21,7 @@ bench_eo_callbacks_add(int request)
for (i = 0 ; i < request ; i++)
{
- eo_do(obj, eo_event_callback_priority_add(SIMPLE_FOO, (short) i, _cb, NULL));
+ eo_event_callback_priority_add(obj, SIMPLE_FOO, (short) i, _cb, NULL);
}
eo_unref(obj);
@@ -57,7 +57,7 @@ bench_eo_callbacks_call(int request)
for (j = 0 ; j < i ; j++)
{
- eo_do(obj[i], eo_event_callback_priority_add(SIMPLE_FOO, (short) j, _cb, NULL));
+ eo_event_callback_priority_add(obj[i], SIMPLE_FOO, (short) j, _cb, NULL);
}
}
@@ -66,7 +66,7 @@ bench_eo_callbacks_call(int request)
for (j = 0 ; j < (int) (distribution[i] * request) ; j++)
{
/* Miss finding the callbacks on purpose, so we measure worst case scenario. */
- eo_do(obj[i], eo_event_callback_call(SIMPLE_BAR, NULL));
+ eo_event_callback_call(obj[i], SIMPLE_BAR, NULL);
}
}
diff --git a/src/benchmarks/eo/eo_bench_eo_do.c b/src/benchmarks/eo/eo_bench_eo_do.c
index 2bcdc4246e..9f84535254 100644
--- a/src/benchmarks/eo/eo_bench_eo_do.c
+++ b/src/benchmarks/eo/eo_bench_eo_do.c
@@ -13,7 +13,7 @@ bench_eo_do_simple(int request)
Eo *obj = eo_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
- eo_do(obj, simple_a_set(i));
+ simple_a_set(obj, i);
}
eo_unref(obj);
@@ -27,8 +27,8 @@ bench_eo_do_two_objs(int request)
Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
- eo_do(obj, simple_a_set(i));
- eo_do(obj2, simple_a_set(i));
+ simple_a_set(obj, i);
+ simple_a_set(obj2, i);
}
eo_unref(obj);
@@ -43,7 +43,7 @@ bench_eo_do_two_objs_growing_stack(int request)
Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
- eo_do(obj, simple_other_call(obj2, 20));
+ simple_other_call(obj, obj2, 20);
}
eo_unref(obj);
@@ -55,7 +55,7 @@ static const Eo_Class *cur_klass;
static void
_a_set(Eo *obj, void *class_data EINA_UNUSED, int a)
{
- eo_do_super(obj, cur_klass, simple_a_set(a));
+ simple_a_set(eo_super(obj, cur_klass), a);
}
static Eo_Op_Description op_desc[] = {
@@ -81,7 +81,7 @@ bench_eo_do_super(int request)
Eo *obj = eo_add(cur_klass, NULL);
for (i = 0 ; i < request ; i++)
{
- eo_do(obj, simple_a_set(i));
+ simple_a_set(obj, i);
}
eo_unref(obj);
diff --git a/src/examples/ecore/ecore_audio_custom.c b/src/examples/ecore/ecore_audio_custom.c
index 735533517a..2570a9e20d 100644
--- a/src/examples/ecore/ecore_audio_custom.c
+++ b/src/examples/ecore/ecore_audio_custom.c
@@ -25,7 +25,7 @@ int read_cb(void *data EINA_UNUSED, Eo *eo_obj, void *buf, int len)
float *val = buf;
int i;
- eo_do(eo_obj, ecore_audio_obj_volume_get(&volume));
+ ecore_audio_obj_volume_get(eo_obj, &volume);
for(i=0; i<len/4; i++, phase1++)
{
@@ -64,13 +64,13 @@ main(int argc, const char *argv[])
printf("error when creating ecore audio source.\n");
goto end;
}
- eo_do(in, ecore_audio_obj_name_set("wail"));
- eo_do(in, ecore_audio_obj_in_samplerate_set(44100));
- eo_do(in, ecore_audio_obj_in_channels_set(1));
- eo_do(in, ecore_audio_obj_volume_set(0.7));
- eo_do(in, ecore_audio_obj_vio_set(&vio, NULL, NULL));
+ ecore_audio_obj_name_set(in, "wail");
+ ecore_audio_obj_in_samplerate_set(in, 44100);
+ ecore_audio_obj_in_channels_set(in, 1);
+ ecore_audio_obj_volume_set(in, 0.7);
+ ecore_audio_obj_vio_set(in, &vio, NULL, NULL);
- eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
+ ret = ecore_audio_obj_out_input_attach(out, in);
if (!ret) {
printf("Could not attach input");
goto end;
diff --git a/src/examples/ecore/ecore_audio_playback.c b/src/examples/ecore/ecore_audio_playback.c
index 95ab90a612..f1624e0e67 100644
--- a/src/examples/ecore/ecore_audio_playback.c
+++ b/src/examples/ecore/ecore_audio_playback.c
@@ -30,19 +30,19 @@ handle_cmd(char *cmd, size_t bread)
if (!out)
return;
- eo_do(out, ecore_audio_obj_out_inputs_get(&out_inputs));
+ ecore_audio_obj_out_inputs_get(out, &out_inputs);
EINA_LIST_FOREACH(out_inputs, input, in)
{
- eo_do(in, ecore_audio_obj_in_seek(0, SEEK_CUR, &pos));
+ ecore_audio_obj_in_seek(in, 0, SEEK_CUR, &pos);
if (!strncmp(cmd, "<", bread))
- eo_do(in, ecore_audio_obj_in_seek(-10, SEEK_CUR, &pos));
+ ecore_audio_obj_in_seek(in, -10, SEEK_CUR, &pos);
else if (!strncmp(cmd, ">", bread))
- eo_do(in, ecore_audio_obj_in_seek(10, SEEK_CUR, &pos));
+ ecore_audio_obj_in_seek(in, 10, SEEK_CUR, &pos);
min = pos / 60;
- eo_do(in, ecore_audio_obj_name_get(&name));
- eo_do(in, ecore_audio_obj_in_length_get(&length));
+ ecore_audio_obj_name_get(in, &name);
+ ecore_audio_obj_in_length_get(in, &length);
printf("Position: %2im %5.02fs (%0.2f%%) - %s\n", min, pos - min * 60, pos/length*100, name);
}
@@ -53,7 +53,7 @@ handle_cmd(char *cmd, size_t bread)
else if (!strncmp(cmd, "n", bread))
{
in = eina_list_data_get(out_inputs);
- eo_do(out, ret = ecore_audio_obj_out_input_detach(in));
+ ret = ecore_audio_obj_out_input_detach(out, in);
if (!ret)
printf("Could not detach input\n");
@@ -63,11 +63,11 @@ handle_cmd(char *cmd, size_t bread)
{
in = (Eo *)eina_list_data_get(inputs);
- eo_do(in, ecore_audio_obj_name_get(&name),
- ecore_audio_obj_in_length_get(&length));
+ ecore_audio_obj_name_get(in, &name);
+ ecore_audio_obj_in_length_get(in, &length);
printf("Start: %s (%0.2fs)\n", name, length);
- eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
+ ret = ecore_audio_obj_out_input_attach(out, in);
if (!ret)
printf("Could not attach input %s\n", name);
}
@@ -84,11 +84,11 @@ handle_cmd(char *cmd, size_t bread)
{
in = (Eo *)eina_list_data_get(inputs);
- eo_do(in, ecore_audio_obj_name_get(&name),
- ecore_audio_obj_in_length_get(&length));
+ ecore_audio_obj_name_get(in, &name);
+ ecore_audio_obj_in_length_get(in, &length);
printf("Start: %s (%0.2fs)\n", name, length);
- eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
+ ret = ecore_audio_obj_out_input_attach(out, in);
if (!ret)
printf("Could not attach input %s\n", name);
}
@@ -98,25 +98,25 @@ handle_cmd(char *cmd, size_t bread)
EINA_LIST_FOREACH(out_inputs, input, in)
{
Eina_Bool loop;
- eo_do(in, ecore_audio_obj_in_looped_get(&loop),
- ecore_audio_obj_name_get(&name));
+ ecore_audio_obj_in_looped_get(in, &loop);
+ ecore_audio_obj_name_get(in, &name);
printf("%s song %s\n", !loop?"Looping":"Not looping", name);
- eo_do(in, ecore_audio_obj_in_looped_set(!loop));
+ ecore_audio_obj_in_looped_set(in, !loop);
}
}
else if (!strncmp(cmd, "+", bread))
{
if (volume < 1.5)
volume += 0.01;
- eo_do(out, ecore_audio_obj_volume_set(volume));
+ ecore_audio_obj_volume_set(out, volume);
printf("Volume: %3.0f%%\n", volume * 100);
}
else if (!strncmp(cmd, "-", bread))
{
if (volume > 0)
volume -= 0.01;
- eo_do(out, ecore_audio_obj_volume_set(volume));
+ ecore_audio_obj_volume_set(out, volume);
printf("Volume: %3.0f%%\n", volume * 100);
}
else if (!strncmp(cmd, "*", bread))
@@ -124,11 +124,11 @@ handle_cmd(char *cmd, size_t bread)
double speed;
EINA_LIST_FOREACH(out_inputs, input, in)
{
- eo_do(in, ecore_audio_obj_in_speed_get(&speed));
+ ecore_audio_obj_in_speed_get(in, &speed);
if (speed < 2.0)
speed += 0.01;
- eo_do(in, ecore_audio_obj_in_speed_set(speed),
- ecore_audio_obj_name_get(&name));
+ ecore_audio_obj_in_speed_set(in, speed);
+ ecore_audio_obj_name_get(in, &name);
printf("Speed: %3.0f%% (%s)\n", speed * 100, name);
}
}
@@ -137,11 +137,11 @@ handle_cmd(char *cmd, size_t bread)
double speed;
EINA_LIST_FOREACH(out_inputs, input, in)
{
- eo_do(in, ecore_audio_obj_in_speed_get(&speed));
+ ecore_audio_obj_in_speed_get(in, &speed);
if (speed > 0.5)
speed -= 0.01;
- eo_do(in, ecore_audio_obj_in_speed_set(speed),
- ecore_audio_obj_name_get(&name));
+ ecore_audio_obj_in_speed_set(in, speed);
+ ecore_audio_obj_name_get(in, &name);
printf("Speed: %3.0f%% (%s)\n", speed * 100, name);
}
}
@@ -149,11 +149,11 @@ handle_cmd(char *cmd, size_t bread)
{
EINA_LIST_FOREACH(out_inputs, input, in)
{
- eo_do(in, ecore_audio_obj_paused_get(&paused),
- ecore_audio_obj_name_get(&name),
- ecore_audio_obj_in_remaining_get(&length));
+ ecore_audio_obj_paused_get(in, &paused);
+ ecore_audio_obj_name_get(in, &name);
+ ecore_audio_obj_in_remaining_get(in, &length);
printf("%s %s\n%0.2f remaining\n", !paused ? "Paused" : "Unpaused", name, length);
- eo_do(in, ecore_audio_obj_paused_set(!paused));
+ ecore_audio_obj_paused_set(in, !paused);
}
}
else if (!strncmp(cmd, "q", bread))
@@ -196,11 +196,11 @@ static Eina_Bool _play_finished(void *data EINA_UNUSED, const Eo_Event *event)
const char *name;
Eina_Bool ret;
- eo_do(event->obj, ecore_audio_obj_name_get(&name));
+ ecore_audio_obj_name_get(event->obj, &name);
printf("Done: %s\n", name);
inputs = eina_list_remove(inputs, event->obj);
- eo_do(out, ret = ecore_audio_obj_out_input_detach(event->obj));
+ ret = ecore_audio_obj_out_input_detach(out, event->obj);
eo_del(event->obj);
if (!ret)
@@ -212,9 +212,9 @@ static Eina_Bool _play_finished(void *data EINA_UNUSED, const Eo_Event *event)
const char *name;
Eo *in = (Eo *)eina_list_data_get(inputs);
- eo_do(in, ecore_audio_obj_name_get(&name));
+ ecore_audio_obj_name_get(in, &name);
printf("Start: %s\n", name);
- eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
+ ret = ecore_audio_obj_out_input_attach(out, in);
if (!ret)
printf("Could not attach input %s\n", name);
}
@@ -266,13 +266,13 @@ main(int argc, const char *argv[])
{
if (!strncmp(val, "freq=", 5)) {
freq = atoi(&val[5]);
- eo_do(in, eo_key_data_set(ECORE_AUDIO_ATTR_TONE_FREQ, &freq));
+ eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &freq);
} else if (!strncmp(val, "duration=", 9)) {
- eo_do(in, ecore_audio_obj_in_length_set(atof(&val[9])));
+ ecore_audio_obj_in_length_set(in, atof(&val[9]));
}
}
free(tmp);
- eo_do(in, ecore_audio_obj_name_set(argv[i]));
+ ecore_audio_obj_name_set(in, argv[i]);
}
else
{
@@ -283,15 +283,15 @@ main(int argc, const char *argv[])
goto end;
}
tmp = strdup(argv[i]);
- eo_do(in, ecore_audio_obj_name_set(basename(tmp)));
+ ecore_audio_obj_name_set(in, basename(tmp));
free(tmp);
- eo_do(in, ret = ecore_audio_obj_source_set(argv[i]));
+ ret = ecore_audio_obj_source_set(in, argv[i]);
if (!ret) {
printf("Could not set %s as input\n", argv[i]);
continue;
}
}
- eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_STOPPED, _play_finished, NULL));
+ eo_event_callback_add(in, ECORE_AUDIO_EV_IN_STOPPED, _play_finished, NULL);
inputs = eina_list_append(inputs, in);
}
@@ -302,13 +302,13 @@ main(int argc, const char *argv[])
if (!in)
return 1;
- eo_do(in, ecore_audio_obj_name_get(&name),
- ecore_audio_obj_in_length_get(&length));
+ ecore_audio_obj_name_get(in, &name);
+ ecore_audio_obj_in_length_get(in, &length);
printf("Start: %s (%0.2fs)\n", name, length);
out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
- eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
+ ret = ecore_audio_obj_out_input_attach(out, in);
if (!ret)
printf("Could not attach input %s\n", name);
diff --git a/src/examples/ecore/ecore_audio_to_ogg.c b/src/examples/ecore/ecore_audio_to_ogg.c
index 9d3162a0fe..fceed59045 100644
--- a/src/examples/ecore/ecore_audio_to_ogg.c
+++ b/src/examples/ecore/ecore_audio_to_ogg.c
@@ -20,10 +20,10 @@ static Eina_Bool _play_finished(void *data EINA_UNUSED, const Eo_Event *event)
const char *name;
Eo *out;
- eo_do(event->obj, ecore_audio_obj_name_get(&name));
+ ecore_audio_obj_name_get(event->obj, &name);
printf("Done: %s\n", name);
- eo_do(event->obj, ecore_audio_obj_in_output_get(&out));
+ ecore_audio_obj_in_output_get(event->obj, &out);
eo_del(event->obj);
eo_del(out);
@@ -50,18 +50,18 @@ main(int argc, char *argv[])
in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
- eo_do(in, ecore_audio_obj_name_set(basename(argv[1])));
- eo_do(in, ret = ecore_audio_obj_source_set(argv[1]));
+ ecore_audio_obj_name_set(in, basename(argv[1]));
+ ret = ecore_audio_obj_source_set(in, argv[1]);
if (!ret) {
printf("Could not set %s as input\n", argv[1]);
eo_del(in);
return 1;
}
- eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_STOPPED, _play_finished, NULL));
+ eo_event_callback_add(in, ECORE_AUDIO_EV_IN_STOPPED, _play_finished, NULL);
out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
- eo_do(out, ret = ecore_audio_obj_source_set(argv[2]));
+ ret = ecore_audio_obj_source_set(out, argv[2]);
if (!ret) {
printf("Could not set %s as output\n", argv[2]);
eo_del(in);
@@ -69,7 +69,7 @@ main(int argc, char *argv[])
return 1;
}
- eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
+ ret = ecore_audio_obj_out_input_attach(out, in);
if (!ret) {
printf("Could not attach input\n");
eo_del(out);
diff --git a/src/examples/ecore/ecore_idler_example.c b/src/examples/ecore/ecore_idler_example.c
index 681d95f1cb..aa749d9a81 100644
--- a/src/examples/ecore/ecore_idler_example.c
+++ b/src/examples/ecore/ecore_idler_example.c
@@ -110,7 +110,7 @@ main(void)
ctxt.enterer = ecore_idle_enterer_add(_enterer_cb, &ctxt);
ctxt.exiter = ecore_idle_exiter_add(_exiter_cb, &ctxt);
ctxt.idler = ecore_idler_add(_idler_cb, &ctxt);
-// ctxt.idler = eo_add(ECORE_IDLER_CLASS, NULL, ecore_idler_constructor(_idler_cb, &ctxt));
+// ctxt.idler = eo_add(ECORE_IDLER_CLASS, NULL, ecore_idler_constructor(eoid, _idler_cb, &ctxt));
ctxt.handler = ecore_event_handler_add(_event_type,
_event_handler_cb,
&ctxt);
diff --git a/src/examples/ecore/ecore_poller_example.c b/src/examples/ecore/ecore_poller_example.c
index c3d8f69f95..e60c20a90d 100644
--- a/src/examples/ecore/ecore_poller_example.c
+++ b/src/examples/ecore/ecore_poller_example.c
@@ -48,12 +48,9 @@ main(void)
poller2 = ecore_poller_add(ECORE_POLLER_CORE, 8, _poller_print_cb, str2);
poller3 = ecore_poller_add(ECORE_POLLER_CORE, 30, _poller_quit_cb, str3);
-// poller1 = eo_add(ECORE_POLLER_CLASS, NULL,
-// ecore_poller_constructor(ECORE_POLLER_CORE, 4, _poller_print_cb, str1));
-// poller2 = eo_add(ECORE_POLLER_CLASS, NULL,
-// ecore_poller_constructor(ECORE_POLLER_CORE, 8, _poller_print_cb, str2));
-// poller3 = eo_add(ECORE_POLLER_CLASS, NULL,
-// ecore_poller_constructor(ECORE_POLLER_CORE, 20, _poller_quit_cb, str3));
+// poller1 = eo_add(ECORE_POLLER_CLASS, NULL, // ecore_poller_constructor(eoid, ECORE_POLLER_CORE, 4, _poller_print_cb, str1));
+// poller2 = eo_add(ECORE_POLLER_CLASS, NULL, // ecore_poller_constructor(eoid, ECORE_POLLER_CORE, 8, _poller_print_cb, str2));
+// poller3 = eo_add(ECORE_POLLER_CLASS, NULL, // ecore_poller_constructor(eoid, ECORE_POLLER_CORE, 20, _poller_quit_cb, str3));
ecore_main_loop_begin();
@@ -61,7 +58,7 @@ main(void)
printf("changing poller2 interval to 16\n");
ecore_poller_poller_interval_set(poller2, 16);
-// eo_do(poller2, ecore_poller_interval_set(16, NULL));
+// ecore_poller_interval_set(poller2, 16, NULL);
ecore_main_loop_begin();
// eo_unref(poller1);
diff --git a/src/examples/edje/edje-text.c b/src/examples/edje/edje-text.c
index 7fc830c428..21efb05422 100644
--- a/src/examples/edje/edje-text.c
+++ b/src/examples/edje/edje-text.c
@@ -55,7 +55,7 @@ _on_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *o EINA_
fprintf(stderr, "Setting lang of this edje object to '%s'\n", lang[lang_idx]);
env = getenv("LANGUAGE");
setenv("LANGUAGE", lang[lang_idx], 1);
- eo_do(o, edje_obj_language_set(lang[lang_idx]));
+ edje_obj_language_set(o, lang[lang_idx]);
setenv("LANGUAGE", env, 1);
}
@@ -108,7 +108,7 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
evas_object_resize(edje_obj, WIDTH - 40, HEIGHT - 40);
evas_object_show(edje_obj);
setenv("LANGUAGE", "en_IN", 1);
- eo_do(edje_obj, edje_obj_language_set("en_IN"));
+ edje_obj_language_set(edje_obj, "en_IN");
edje_object_text_change_cb_set(edje_obj, _on_text_change, NULL);
edje_object_part_text_set(edje_obj, "part_two", "<b>Click here");
edje_object_part_text_select_allow_set(edje_obj, "part_two", EINA_TRUE);
@@ -123,7 +123,7 @@ main(int argc EINA_UNUSED, char *argv[] EINA_UNUSED)
evas_object_move(edje_obj_one, 0, 50);
evas_object_resize(edje_obj_one, WIDTH - 40, HEIGHT - 40);
evas_object_show(edje_obj_one);
- eo_do(edje_obj_one, edje_obj_language_set("en_IN"));
+ edje_obj_language_set(edje_obj_one, "en_IN");
edje_object_text_change_cb_set(edje_obj_one, _on_text_change, NULL);
edje_object_part_text_set(edje_obj_one, "part_two", "<b>Click here");
edje_object_part_text_select_allow_set(edje_obj_one, "part_two", EINA_TRUE);
diff --git a/src/examples/eldbus/dbusmodel.c b/src/examples/eldbus/dbusmodel.c
index a3e77e3305..b34799b4c5 100644
--- a/src/examples/eldbus/dbusmodel.c
+++ b/src/examples/eldbus/dbusmodel.c
@@ -29,9 +29,8 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model,
if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
return EINA_TRUE;
- eo_do(model,
- name = eldbus_model_proxy_name_get(),
- efl_model_properties_get(&properties_list));
+ name = eldbus_model_proxy_name_get(model);
+ efl_model_properties_get(model, &properties_list);
printf(" -> %s\n", name);
if (eina_array_count(properties_list))
@@ -39,7 +38,7 @@ _event_interface_load_status_cb(void *data EINA_UNUSED, Eo *model,
EINA_ARRAY_ITER_NEXT(properties_list, i, property, iterator)
{
- eo_do(model, efl_model_property_get(property, &property_value));
+ efl_model_property_get(model, property, &property_value);
if (property_value)
{
prop_str = eina_value_to_string(property_value);
@@ -70,7 +69,7 @@ _event_load_status_cb(void *data EINA_UNUSED, Eo *model,
if (EFL_MODEL_LOAD_STATUS_LOADED != actual_load->status)
return EINA_TRUE;
- eo_do(model, efl_model_children_count_get(&children_count));
+ efl_model_children_count_get(model, &children_count);
if (children_count == 0)
{
printf("Don't find Interfaces\n");
@@ -78,12 +77,12 @@ _event_load_status_cb(void *data EINA_UNUSED, Eo *model,
return EINA_FALSE;
}
- eo_do(model, efl_model_children_slice_get(0, 0, &accessor));
+ efl_model_children_slice_get(model, 0, 0, &accessor);
printf("\nInterfaces:\n");
EINA_ACCESSOR_FOREACH(accessor, i, child)
{
- eo_do(child, eo_event_callback_add(EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_interface_load_status_cb, NULL));
- eo_do(child, efl_model_load());
+ eo_event_callback_add(child, EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_interface_load_status_cb, NULL);
+ efl_model_load(child);
}
return EINA_FALSE;
@@ -103,17 +102,14 @@ main(int argc, char **argv EINA_UNUSED)
if (argc > 1) bus = argv[1];
if (argc > 2) path = argv[2];
- root = eo_add_ref(ELDBUS_MODEL_OBJECT_CLASS, NULL,
- eldbus_model_object_constructor(ELDBUS_CONNECTION_TYPE_SESSION,
- NULL, EINA_FALSE, bus, path));
+ root = eo_add_ref(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, bus, path));
- eo_do(root,
- eo_event_callback_add(EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_load_status_cb, NULL),
- efl_model_load());
+ eo_event_callback_add(root, EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_load_status_cb, NULL);
+ efl_model_load(root);
ecore_main_loop_begin();
- eo_do(root, eo_event_callback_del(EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_load_status_cb, NULL));
+ eo_event_callback_del(root, EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_load_status_cb, NULL);
eo_unref(root);
}
diff --git a/src/examples/emotion/emotion_basic_example.c b/src/examples/emotion/emotion_basic_example.c
index 2e7abea696..9675f6b498 100644
--- a/src/examples/emotion/emotion_basic_example.c
+++ b/src/examples/emotion/emotion_basic_example.c
@@ -65,8 +65,8 @@ main(int argc, const char *argv[])
em = emotion_object_add(e);
emotion_object_init(em, NULL);
- eo_do(em, eo_event_callback_add
- (EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL));
+ eo_event_callback_add
+ (em, EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL);
emotion_object_file_set(em, filename);
diff --git a/src/examples/emotion/emotion_border_example.c b/src/examples/emotion/emotion_border_example.c
index 22eca25cf1..ea3c07d637 100644
--- a/src/examples/emotion/emotion_border_example.c
+++ b/src/examples/emotion/emotion_border_example.c
@@ -33,8 +33,7 @@ _create_emotion_object(Evas *e)
emotion_object_init(em, "gstreamer1");
- eo_do(em, eo_event_callback_add(
- EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL));
+ eo_event_callback_add(em, EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL);
return em;
}
@@ -241,7 +240,7 @@ main(int argc, const char *argv[])
ecore_evas_data_set(ee, "emotion", em);
- eo_do(em, eo_event_callback_array_add(emotion_object_example_callbacks, NULL));
+ eo_event_callback_array_add(em, emotion_object_example_callbacks, NULL);
evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_key_down, em);
evas_object_focus_set(bg, EINA_TRUE);
diff --git a/src/examples/emotion/emotion_generic_example.c b/src/examples/emotion/emotion_generic_example.c
index 6ea7dd95da..cdbfe6e1a2 100644
--- a/src/examples/emotion/emotion_generic_example.c
+++ b/src/examples/emotion/emotion_generic_example.c
@@ -45,10 +45,10 @@ _create_emotion_object(Evas *e)
emotion_object_init(em, "generic");
- eo_do(em, eo_event_callback_add
- (EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL));
- eo_do(em, eo_event_callback_add
- (EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, _playback_stopped_cb, NULL));
+ eo_event_callback_add
+ (em, EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL);
+ eo_event_callback_add
+ (em, EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, _playback_stopped_cb, NULL);
return em;
}
@@ -227,7 +227,7 @@ main(int argc, const char *argv[])
evas_object_resize(em, WIDTH, HEIGHT);
evas_object_show(em);
- eo_do(em, eo_event_callback_array_add(emotion_object_example_callbacks, NULL));
+ eo_event_callback_array_add(em, emotion_object_example_callbacks, NULL);
evas_object_event_callback_add(bg, EVAS_CALLBACK_KEY_DOWN, _on_key_down, em);
evas_object_focus_set(bg, EINA_TRUE);
diff --git a/src/examples/emotion/emotion_generic_subtitle_example.c b/src/examples/emotion/emotion_generic_subtitle_example.c
index 03b8aab8c6..1d32f777a6 100644
--- a/src/examples/emotion/emotion_generic_subtitle_example.c
+++ b/src/examples/emotion/emotion_generic_subtitle_example.c
@@ -80,8 +80,8 @@ main(int argc, const char *argv[])
if (subtitle_filename)
emotion_object_video_subtitle_file_set(em, subtitle_filename);
- eo_do(em, eo_event_callback_add
- (EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL));
+ eo_event_callback_add
+ (em, EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL);
emotion_object_file_set(em, filename);
diff --git a/src/examples/emotion/emotion_signals_example.c b/src/examples/emotion/emotion_signals_example.c
index 3c56c40924..b84c47d899 100644
--- a/src/examples/emotion/emotion_signals_example.c
+++ b/src/examples/emotion/emotion_signals_example.c
@@ -68,8 +68,7 @@ _position_update_cb(void *data EINA_UNUSED,
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
{
printf(">>> Emotion object first position update.\n");
- eo_do(o, eo_event_callback_del(EMOTION_OBJECT_EVENT_POSITION_UPDATE,
- _position_update_cb, NULL));
+ eo_event_callback_del(o, EMOTION_OBJECT_EVENT_POSITION_UPDATE, _position_update_cb, NULL);
_display_info(o);
return EINA_TRUE;
@@ -80,8 +79,7 @@ _frame_decode_cb(void *data EINA_UNUSED,
Eo *o, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
{
printf(">>> Emotion object first frame decode.\n");
- eo_do(o, eo_event_callback_del(EMOTION_OBJECT_EVENT_FRAME_DECODE,
- _frame_decode_cb, NULL));
+ eo_event_callback_del(o, EMOTION_OBJECT_EVENT_FRAME_DECODE, _frame_decode_cb, NULL);
_display_info(o);
return EINA_TRUE;
@@ -121,8 +119,8 @@ static const Eo_Callback_Array_Item emotion_object_example_callbacks[] = {
static void
_setup_emotion_callbacks(Evas_Object *o)
{
- eo_do(o, eo_event_callback_add
- (EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL));
+ eo_event_callback_add
+ (o, EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, _playback_started_cb, NULL);
}
int
diff --git a/src/examples/eo/evas/evas_elw_box.c b/src/examples/eo/evas/evas_elw_box.c
index 96df326e99..c352027b91 100644
--- a/src/examples/eo/evas/evas_elw_box.c
+++ b/src/examples/eo/evas/evas_elw_box.c
@@ -30,7 +30,7 @@ _pack_end(Eo *obj EINA_UNUSED, void *class_data, va_list *list)
static void
_constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
{
- eo_do_super(obj, MY_CLASS, eo_constructor());
+ eo_constructor(eo_super(obj, MY_CLASS));
Widget_Data *wd = class_data;
diff --git a/src/examples/eo/evas/evas_elw_boxedbutton.c b/src/examples/eo/evas/evas_elw_boxedbutton.c
index 44fc2605c8..62842771ab 100644
--- a/src/examples/eo/evas/evas_elw_boxedbutton.c
+++ b/src/examples/eo/evas/evas_elw_boxedbutton.c
@@ -20,14 +20,14 @@ typedef struct
static void
_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
{
- eo_do_super(obj, MY_CLASS, eo_constructor());
+ eo_constructor(eo_super(obj, MY_CLASS));
Eo *bt = eo_add(ELW_BUTTON_CLASS, obj);
- eo_do(obj, eo_composite_attach(bt));
- eo_do(bt, eo_event_callback_forwarder_add(EV_CLICKED, obj));
- eo_do(bt, exevas_obj_visibility_set(EINA_TRUE));
+ eo_composite_attach(obj, bt);
+ eo_event_callback_forwarder_add(bt, EV_CLICKED, obj);
+ exevas_obj_visibility_set(bt, EINA_TRUE);
- eo_do(obj, elw_box_pack_end(bt));
+ elw_box_pack_end(obj, bt);
eo_unref(bt);
}
diff --git a/src/examples/eo/evas/evas_elw_button.c b/src/examples/eo/evas/evas_elw_button.c
index 7067171dc4..7dee7bb175 100644
--- a/src/examples/eo/evas/evas_elw_button.c
+++ b/src/examples/eo/evas/evas_elw_button.c
@@ -28,7 +28,7 @@ _position_set(Eo *obj, void *class_data EINA_UNUSED, va_list *list)
x = va_arg(*list, Evas_Coord);
y = va_arg(*list, Evas_Coord);
printf("But set position %d,%d\n", x, y);
- eo_do_super(obj, MY_CLASS, exevas_obj_position_set(x, y));
+ exevas_obj_position_set(eo_super(obj, MY_CLASS), x, y);
}
static void
@@ -46,13 +46,13 @@ _btn_clicked(void *data, Evas_Object *evas_obj, void *event_info)
(void) evas_obj;
(void) event_info;
Eo *obj = data;
- eo_do(obj, eo_event_callback_call(EV_CLICKED, NULL, NULL));
+ eo_event_callback_call(obj, EV_CLICKED, NULL, NULL);
}
static void
_constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
{
- eo_do_super(obj, MY_CLASS, eo_constructor());
+ eo_constructor(eo_super(obj, MY_CLASS));
Widget_Data *wd = class_data;
@@ -68,7 +68,7 @@ _constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
static void
_destructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
{
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
//Widget_Data *wd = class_data;
/* FIXME: Commented out because it's automatically done because our tree
diff --git a/src/examples/eo/evas/evas_elw_win.c b/src/examples/eo/evas/evas_elw_win.c
index e5a917d781..d4e830f513 100644
--- a/src/examples/eo/evas/evas_elw_win.c
+++ b/src/examples/eo/evas/evas_elw_win.c
@@ -29,7 +29,7 @@ my_win_del(void *data, Evas_Object *obj, void *event_info)
static void
_constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
{
- eo_do_super(obj, MY_CLASS, eo_constructor());
+ eo_constructor(eo_super(obj, MY_CLASS));
Widget_Data *wd = class_data;
diff --git a/src/examples/eo/evas/evas_evas_obj.c b/src/examples/eo/evas/evas_evas_obj.c
index 768d3d4ea6..1a26ddfda6 100644
--- a/src/examples/eo/evas/evas_evas_obj.c
+++ b/src/examples/eo/evas/evas_evas_obj.c
@@ -82,18 +82,18 @@ _child_add(Eo *obj, void *class_data, va_list *list)
static void
_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
{
- eo_do_super(obj, MY_CLASS, eo_constructor());
+ eo_constructor(eo_super(obj, MY_CLASS));
/* Add type check. */
Eo *parent = eo_parent_get(obj);
if (parent)
- eo_do(parent, exevas_obj_child_add(obj));
+ exevas_obj_child_add(parent, obj);
}
static void
_destructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
{
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
Widget_Data *wd = class_data;
diff --git a/src/examples/eo/evas/evas_evas_obj.h b/src/examples/eo/evas/evas_evas_obj.h
index 61cf7201ef..5490c6989e 100644
--- a/src/examples/eo/evas/evas_evas_obj.h
+++ b/src/examples/eo/evas/evas_evas_obj.h
@@ -76,7 +76,7 @@ static inline Evas_Object *
eo_evas_object_get(const Eo *obj)
{
void *data;
- eo_do((Eo *) obj, eo_key_data_get(EXEVAS_OBJ_STR, &data));
+ eo_key_data_get((Eo *) obj, EXEVAS_OBJ_STR, &data);
return data;
}
@@ -84,7 +84,7 @@ eo_evas_object_get(const Eo *obj)
static inline void
eo_evas_object_set(Eo *obj, Evas_Object *evas_obj)
{
- eo_do(obj, eo_key_data_set(EXEVAS_OBJ_STR, evas_obj));
+ eo_key_data_set(obj, EXEVAS_OBJ_STR, evas_obj);
}
#endif
diff --git a/src/examples/eo/evas/evas_test.c b/src/examples/eo/evas/evas_test.c
index dca7a94ff3..50691e64bb 100644
--- a/src/examples/eo/evas/evas_test.c
+++ b/src/examples/eo/evas/evas_test.c
@@ -32,27 +32,28 @@ main(int argc, char *argv[])
eo_init();
Eo *win = eo_add(ELW_WIN_CLASS, NULL);
- eo_do(win, exevas_obj_size_set(winw, winh), exevas_obj_visibility_set(EINA_TRUE));
+ exevas_obj_size_set(win, winw, winh);
+ exevas_obj_visibility_set(win, EINA_TRUE);
Eo *bt = eo_add(ELW_BUTTON_CLASS, win);
- eo_do(bt, exevas_obj_position_set(25, 25),
- exevas_obj_size_set(50, 50),
- exevas_obj_color_set(255, 0, 0, 255),
- elw_button_text_set("Click"),
- exevas_obj_visibility_set(EINA_TRUE));
- eo_do(bt, eo_event_callback_add(EV_CLICKED, _btn_clicked_cb, "btn"));
+ exevas_obj_position_set(bt, 25, 25);
+ exevas_obj_size_set(bt, 50, 50);
+ exevas_obj_color_set(bt, 255, 0, 0, 255);
+ elw_button_text_set(bt, "Click");
+ exevas_obj_visibility_set(bt, EINA_TRUE);
+ eo_event_callback_add(bt, EV_CLICKED, _btn_clicked_cb, "btn");
int r, g, b, a;
- eo_do(bt, exevas_obj_color_get(&r, &g, &b, &a));
+ exevas_obj_color_get(bt, &r, &g, &b, &a);
printf("RGBa(%d, %d, %d, %d)\n", r, g, b, a);
Eo *bx = eo_add(ELW_BOXEDBUTTON_CLASS, win);
- eo_do(bx, exevas_obj_position_set(100, 100),
- exevas_obj_size_set(70, 70),
- exevas_obj_color_set(0, 0, 255, 255),
- elw_button_text_set("Click2"),
- exevas_obj_visibility_set(EINA_TRUE));
- eo_do(bx, eo_event_callback_add(EV_CLICKED, _btn_clicked_cb, "bxedbtn"));
+ exevas_obj_position_set(bx, 100, 100);
+ exevas_obj_size_set(bx, 70, 70);
+ exevas_obj_color_set(bx, 0, 0, 255, 255);
+ elw_button_text_set(bx, "Click2");
+ exevas_obj_visibility_set(bx, EINA_TRUE);
+ eo_event_callback_add(bx, EV_CLICKED, _btn_clicked_cb, "bxedbtn");
elm_run();
diff --git a/src/examples/eo/isa/eo_isa_mixin.c b/src/examples/eo/isa/eo_isa_mixin.c
index ce45601a95..2a5c13b2ef 100644
--- a/src/examples/eo/isa/eo_isa_mixin.c
+++ b/src/examples/eo/isa/eo_isa_mixin.c
@@ -13,7 +13,7 @@ _a_square_get(Eo *obj, void *class_data EINA_UNUSED)
{
int a;
- eo_do(obj, a = simple_a_get());
+ a = simple_a_get(obj);
printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__);
return a * a;
}
diff --git a/src/examples/eo/simple/simple_main.c b/src/examples/eo/simple/simple_main.c
index 2ee7ee44ca..fc6d060933 100644
--- a/src/examples/eo/simple/simple_main.c
+++ b/src/examples/eo/simple/simple_main.c
@@ -14,13 +14,13 @@ main(int argc, char *argv[])
Eo *obj = eo_add(SIMPLE_CLASS, NULL);
- eo_do(obj, simple_a_set(4));
+ simple_a_set(obj, 4);
int a = 0, a2 = 0, a3 = 0;
- eo_do(obj, a = simple_a_get(),
- a3 = interface_a_power_3_get(),
- a2 = mixin_a_square_get());
+ a = simple_a_get(obj);
+ a3 = interface_a_power_3_get(obj);
+ a2 = mixin_a_square_get(obj);
printf("Got %d %d %d\n", a, a2, a3);
diff --git a/src/examples/eo/simple/simple_mixin.c b/src/examples/eo/simple/simple_mixin.c
index 5831ce022b..db5b90e802 100644
--- a/src/examples/eo/simple/simple_mixin.c
+++ b/src/examples/eo/simple/simple_mixin.c
@@ -13,7 +13,7 @@ _a_square_get(Eo *obj, void *class_data EINA_UNUSED)
{
int a;
- eo_do(obj, a = simple_a_get());
+ a = simple_a_get(obj);
printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__);
return a * a;
}
diff --git a/src/examples/eolian_cxx/colourable.c b/src/examples/eolian_cxx/colourable.c
index 655d63c5c2..0c132c4509 100644
--- a/src/examples/eolian_cxx/colourable.c
+++ b/src/examples/eolian_cxx/colourable.c
@@ -35,7 +35,7 @@ _colourable_eo_base_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
= eina_log_domain_register("colourable", EINA_COLOR_BLUE);
}
DBG("_colourable_constructor(%p, %p)\n", obj, MY_CLASS);
- return eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
+ return eo_constructor(eo_super(obj, MY_CLASS));
}
void
@@ -47,7 +47,7 @@ _colourable_eo_base_destructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
_colourable_impl_logdomain = 0;
}
DBG("_colourable_destructor()\n");
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
void
@@ -63,7 +63,7 @@ _colourable_rgb_24bits_constructor(Eo *obj, Colourable_Data *self, int rgb)
self->g = (rgb & 0x0000ff00) >> 8;
self->b = rgb & 0x000000ff;
DBG("_colourable_rgb_24bits_constructor(0x%.6x)\n", (int)rgb);
- eo_do_super(obj, MY_CLASS, eo_constructor());
+ eo_constructor(eo_super(obj, MY_CLASS));
}
void
diff --git a/src/examples/eolian_cxx/colourablesquare.c b/src/examples/eolian_cxx/colourablesquare.c
index 87bc419816..0804d361dc 100644
--- a/src/examples/eolian_cxx/colourablesquare.c
+++ b/src/examples/eolian_cxx/colourablesquare.c
@@ -35,7 +35,7 @@ _colourablesquare_size_constructor(Eo *obj, ColourableSquare_Data *self, int siz
}
self->size = size;
DBG("_colourablesquare_constructor(%d)\n", size);
- eo_do_super(obj, MY_CLASS, eo_constructor());
+ eo_constructor(eo_super(obj, MY_CLASS));
}
static int
diff --git a/src/examples/evas/evas-3d-aabb.c b/src/examples/evas/evas-3d-aabb.c
index c8d906c881..d02668bed0 100644
--- a/src/examples/evas/evas-3d-aabb.c
+++ b/src/examples/evas/evas-3d-aabb.c
@@ -57,7 +57,7 @@ _animate_scene(void *data)
{
static int frame = 0;
- eo_do((Evas_Canvas3D_Node *)data, evas_canvas3d_node_mesh_frame_set(mesh, frame));
+ evas_canvas3d_node_mesh_frame_set((Evas_Canvas3D_Node *)data, mesh, frame);
_redraw_aabb();
@@ -84,22 +84,22 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void
{
case 1:
{
- eo_do(node, evas_canvas3d_node_orientation_angle_axis_set(90, 1.0, 0.0, 0.0));
+ evas_canvas3d_node_orientation_angle_axis_set(node, 90, 1.0, 0.0, 0.0);
break;
}
case 2:
{
- eo_do(node, evas_canvas3d_node_orientation_angle_axis_set(90, 0.0, 1.0, 0.0));
+ evas_canvas3d_node_orientation_angle_axis_set(node, 90, 0.0, 1.0, 0.0);
break;
}
case 3:
{
- eo_do(node, evas_canvas3d_node_orientation_angle_axis_set(90, 0.0, 0.0, 1.0));
+ evas_canvas3d_node_orientation_angle_axis_set(node, 90, 0.0, 0.0, 1.0);
break;
}
case 4:
{
- eo_do(node, evas_canvas3d_node_orientation_angle_axis_set(90, 1.0, 1.0, 0.0));
+ evas_canvas3d_node_orientation_angle_axis_set(node, 90, 1.0, 1.0, 0.0);
break;
}
}
@@ -111,8 +111,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- eo_do(background, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(background, w, h);
+ efl_gfx_size_set(image, w, h);
}
static Eina_Bool
@@ -120,9 +120,9 @@ _redraw_aabb()
{
Evas_Real x0, y0, z0, x1, y1, z1;
- eo_do(mesh_node, evas_canvas3d_node_bounding_box_get(&x0, &y0, &z0, &x1, &y1, &z1));
- eo_do(mesh_box_node, evas_canvas3d_node_position_set((x0 + x1)/2, (y0 + y1)/2, (z0 + z1)/2),
- evas_canvas3d_node_scale_set(x1 - x0, y1 - y0, z1 - z0));
+ evas_canvas3d_node_bounding_box_get(mesh_node, &x0, &y0, &z0, &x1, &y1, &z1);
+ evas_canvas3d_node_position_set(mesh_box_node, (x0 + x1)/2, (y0 + y1)/2, (z0 + z1)/2);
+ evas_canvas3d_node_scale_set(mesh_box_node, x1 - x0, y1 - y0, z1 - z0);
return EINA_TRUE;
}
@@ -144,118 +144,87 @@ main(void)
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(camera,
- evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0));
+ evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(camera_node,
- evas_canvas3d_node_camera_set(camera));
- eo_do(root_node,
- evas_canvas3d_node_member_add(camera_node));
- eo_do(camera_node,
- evas_canvas3d_node_position_set(100.0, 50.0, 20.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(camera_node, camera);
+ evas_canvas3d_node_member_add(root_node, camera_node);
+ evas_canvas3d_node_position_set(camera_node, 100.0, 50.0, 20.0);
+ evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(light,
- evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_directional_set(EINA_TRUE));
+ evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_directional_set(light, EINA_TRUE);
light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(light_node,
- evas_canvas3d_node_light_set(light),
- evas_canvas3d_node_position_set(1000.0, 0.0, 1000.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(root_node,
- evas_canvas3d_node_member_add(light_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(light_node, light);
+ evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
+ evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(root_node, light_node);
mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(mesh,
- efl_file_set(model_path, NULL),
- evas_canvas3d_mesh_frame_material_set(0, material),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
+ efl_file_set(mesh, model_path, NULL);
+ evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
+ evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(texture,
- evas_canvas3d_texture_file_set(image_path, NULL),
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
- EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
- EVAS_CANVAS3D_WRAP_MODE_REPEAT));
- eo_do(material,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT,
- 0.01, 0.01, 0.01, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE,
- 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR,
- 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(50.0));
-
- mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- mesh_box_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_texture_file_set(texture, image_path, NULL);
+ evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
+ evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
+ evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.01, 0.01, 0.01, 1.0);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(material, 50.0);
+
+ mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ mesh_box_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
material_box = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(material_box, evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE));
+ evas_canvas3d_material_enable_set(material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(cube,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
+ evas_canvas3d_primitive_form_set(cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
mesh_box = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(mesh_box,
- evas_canvas3d_mesh_from_primitive_set(0, cube),
- evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR),
- evas_canvas3d_mesh_frame_material_set(0, material_box));
+ evas_canvas3d_mesh_from_primitive_set(mesh_box, 0, cube);
+ evas_canvas3d_mesh_vertex_assembly_set(mesh_box, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
+ evas_canvas3d_mesh_shade_mode_set(mesh_box, EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR);
+ evas_canvas3d_mesh_frame_material_set(mesh_box, 0, material_box);
_redraw_aabb();
- eo_do(root_node,
- evas_canvas3d_node_member_add(mesh_box_node));
- eo_do(mesh_box_node,
- evas_canvas3d_node_mesh_add(mesh_box));
+ evas_canvas3d_node_member_add(root_node, mesh_box_node);
+ evas_canvas3d_node_mesh_add(mesh_box_node, mesh_box);
- eo_do(root_node,
- evas_canvas3d_node_member_add(mesh_node));
- eo_do(mesh_node,
- evas_canvas3d_node_mesh_add(mesh));
+ evas_canvas3d_node_member_add(root_node, mesh_node);
+ evas_canvas3d_node_mesh_add(mesh_node, mesh);
- eo_do(scene,
- evas_canvas3d_scene_root_node_set(root_node),
- evas_canvas3d_scene_camera_node_set(camera_node),
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
+ evas_canvas3d_scene_root_node_set(scene, root_node);
+ evas_canvas3d_scene_camera_node_set(scene, camera_node);
+ evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
- eo_do(background,
- efl_gfx_color_set(0, 0, 0, 255),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_color_set(background, 0, 0, 0, 255);
+ efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_visible_set(background, EINA_TRUE);
image = evas_object_image_filled_add(evas);
- eo_do(image,
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_visible_set(image, EINA_TRUE);
evas_object_focus_set(image, EINA_TRUE);
- eo_do(image, evas_obj_image_scene_set(scene));
+ evas_obj_image_scene_set(image, scene);
evas_object_event_callback_add(image, EVAS_CALLBACK_KEY_DOWN, _on_key_down, mesh_node);
diff --git a/src/examples/evas/evas-3d-blending.c b/src/examples/evas/evas-3d-blending.c
index 98bd74afb5..db7c7a1590 100644
--- a/src/examples/evas/evas-3d-blending.c
+++ b/src/examples/evas/evas-3d-blending.c
@@ -102,7 +102,7 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void
func2 = EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA_SATURATE;
if(func2 > EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA_SATURATE)
func2 = EVAS_CANVAS3D_BLEND_FUNC_ZERO;
- eo_do(scene->mesh1, evas_canvas3d_mesh_blending_func_set(func1, func2));
+ evas_canvas3d_mesh_blending_func_set(scene->mesh1, func1, func2);
printf("sfactor = %s, dfactor = %s\n", blend_func_names[func1], blend_func_names[func2]);
}
@@ -121,8 +121,8 @@ _on_canvas_resize(Ecore_Evas *ee)
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
evas_object_resize(background, w, h);
- eo_do(background, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(background, w, h);
+ efl_gfx_size_set(image, w, h);
}
static Eina_Bool
@@ -133,8 +133,7 @@ _animate_scene(void *data)
angle += 0.02;
- eo_do(scene->mesh_node,
- evas_canvas3d_node_position_set(3 * sin(angle), 0.0, 3 * cos(angle)));
+ evas_canvas3d_node_position_set(scene->mesh_node, 3 * sin(angle), 0.0, 3 * cos(angle));
if (angle > 2 * M_PI) angle = 0;
@@ -146,49 +145,40 @@ _camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(data->camera,
- evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
+ evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(data->camera_node,
- evas_canvas3d_node_camera_set(data->camera),
- evas_canvas3d_node_position_set(0.0, 0.0, 10.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
+ evas_canvas3d_node_camera_set(data->camera_node, data->camera);
+ evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
+ evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->camera_node));
+ evas_canvas3d_node_member_add(data->root_node, data->camera_node);
}
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(data->light,
- evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
+ evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(data->light_node,
- evas_canvas3d_node_light_set(data->light),
- evas_canvas3d_node_position_set(0.0, 0.0, 10.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(data->light_node, data->light);
+ evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
+ evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(data->root_node, data->light_node);
}
static void
_set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material)
{
- eo_do(mesh,
- evas_canvas3d_mesh_from_primitive_set(0, sphere),
- evas_canvas3d_mesh_frame_material_set(0, material),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
+ evas_canvas3d_mesh_from_primitive_set(mesh, 0, sphere);
+ evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
+ evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
}
static void
@@ -196,32 +186,27 @@ _mesh_setup(Scene_Data *data)
{
data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(data->material,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
-
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 1.0, 0.2, 0.2, 0.2),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 0.0, 0.0, 0.2),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2),
- evas_canvas3d_material_shininess_set(100.0));
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 1.0, 0.2, 0.2, 0.2);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 0.0, 0.0, 0.2);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2);
+ evas_canvas3d_material_shininess_set(data->material, 100.0);
data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(data->material1,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
-
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.0, 0.2, 0.2, 0.2),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.0, 0.0, 1.0, 0.2),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2),
- evas_canvas3d_material_shininess_set(100.0));
+ evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.0, 0.2, 0.2, 0.2);
+ evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.0, 0.0, 1.0, 0.2);
+ evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2);
+ evas_canvas3d_material_shininess_set(data->material1, 100.0);
data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(data->sphere,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
- evas_canvas3d_primitive_precision_set(50));
+ evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
+ evas_canvas3d_primitive_precision_set(data->sphere, 50);
data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
@@ -230,27 +215,23 @@ _mesh_setup(Scene_Data *data)
_set_ball(data->mesh1, data->sphere, data->material1);
data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
- eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
+ evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
data->mesh_node1 =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node1));
- eo_do(data->mesh_node1, evas_canvas3d_node_mesh_add(data->mesh1));
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node1);
+ evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1);
- eo_do(data->mesh1, evas_canvas3d_mesh_blending_enable_set(EINA_TRUE),
- evas_canvas3d_mesh_blending_func_set(func1, func2));
+ evas_canvas3d_mesh_blending_enable_set(data->mesh1, EINA_TRUE);
+ evas_canvas3d_mesh_blending_func_set(data->mesh1, func1, func2);
- eo_do(data->mesh_node,
- evas_canvas3d_node_scale_set(2.0, 2.0, 2.0));
+ evas_canvas3d_node_scale_set(data->mesh_node, 2.0, 2.0, 2.0);
- eo_do(data->mesh_node1,
- evas_canvas3d_node_scale_set(5.0, 5.0, 5.0));
+ evas_canvas3d_node_scale_set(data->mesh_node1, 5.0, 5.0, 5.0);
}
static void
@@ -258,21 +239,18 @@ _scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- eo_do(data->scene,
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
- evas_canvas3d_scene_background_color_set(0.5, 0.5, 0.5, 1));
+ evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
+ evas_canvas3d_scene_background_color_set(data->scene, 0.5, 0.5, 0.5, 1);
data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
_mesh_setup(data);
- eo_do(data->scene,
- evas_canvas3d_scene_root_node_set(data->root_node),
- evas_canvas3d_scene_camera_node_set(data->camera_node));
+ evas_canvas3d_scene_root_node_set(data->scene, data->root_node);
+ evas_canvas3d_scene_camera_node_set(data->scene, data->camera_node);
}
int
@@ -312,7 +290,7 @@ main(void)
evas_object_focus_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
- eo_do(image, evas_obj_image_scene_set(data.scene));
+ evas_obj_image_scene_set(image, data.scene);
/* Add animation timer callback. */
diff --git a/src/examples/evas/evas-3d-colorpick.c b/src/examples/evas/evas-3d-colorpick.c
index f3cf3b4c79..885a53bd81 100644
--- a/src/examples/evas/evas-3d-colorpick.c
+++ b/src/examples/evas/evas-3d-colorpick.c
@@ -119,8 +119,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- eo_do(bg, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(bg, w, h);
+ efl_gfx_size_set(image, w, h);
}
static Eina_Bool
@@ -129,7 +129,7 @@ _animate_sphere(void *data)
static int angle = 0.0;
Eo *n = (Eo*)(((Test_object *)data)->node);
Evas_Real s = ((Test_object *)data)->speed;
- eo_do(n, evas_canvas3d_node_orientation_angle_axis_set(angle, s, s - 1, s + 1));
+ evas_canvas3d_node_orientation_angle_axis_set(n, angle, s, s - 1, s + 1);
angle++;
if (angle > 360) angle = 0.0;
return EINA_TRUE;
@@ -141,9 +141,8 @@ void _recalculate_position()
Evas_Real x1, y1, shiftx = 0, shifty = 0;
Test_object *m;
- eo_do(((Test_object *)eina_list_nth(globalscene.spheres, 0))->node,
- evas_canvas3d_object_update(),
- evas_canvas3d_node_bounding_box_get(NULL, NULL, NULL, &x1, &y1, NULL));
+ evas_canvas3d_object_update(((Test_object *)eina_list_nth(globalscene.spheres, 0))->node);
+ evas_canvas3d_node_bounding_box_get(((Test_object *)eina_list_nth(globalscene.spheres, 0))->node, NULL, NULL, NULL, &x1, &y1, NULL);
for (i = 0; i < globalscene.row; ++i)
{
@@ -152,7 +151,7 @@ void _recalculate_position()
{
shifty = (j * 2 - globalscene.col) * y1;
m = (Test_object *)eina_list_nth(globalscene.spheres, count);
- eo_do(m->node, evas_canvas3d_node_position_set(shifty, 0.0, shiftx));
+ evas_canvas3d_node_position_set(m->node, shifty, 0.0, shiftx);
count++;
}
}
@@ -167,31 +166,29 @@ _on_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED,
Test_object * item;
if (!strcmp(ev->key, "Down"))
{
- eo_do(globalscene.camera_node, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z),
- evas_canvas3d_node_position_set(x, y, (z - 5)));
+ evas_canvas3d_node_position_get(globalscene.camera_node, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
+ evas_canvas3d_node_position_set(globalscene.camera_node, x, y, (z - 5));
}
else if (!strcmp(ev->key, "Up"))
{
- eo_do(globalscene.camera_node, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z),
- evas_canvas3d_node_position_set(x, y, (z + 5)));
+ evas_canvas3d_node_position_get(globalscene.camera_node, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
+ evas_canvas3d_node_position_set(globalscene.camera_node, x, y, (z + 5));
}
else if (!strcmp(ev->key, "Left"))
{
- eo_do(((Test_object *)eina_list_nth(globalscene.spheres, 0))->node,
- evas_canvas3d_node_scale_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
+ evas_canvas3d_node_scale_get(((Test_object *)eina_list_nth(globalscene.spheres, 0))->node, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
EINA_LIST_FOREACH(globalscene.spheres, l, item)
{
- eo_do(item->node, evas_canvas3d_node_scale_set((x - SCALE_UNIT), (y - SCALE_UNIT), (z - SCALE_UNIT)));
+ evas_canvas3d_node_scale_set(item->node, (x - SCALE_UNIT), (y - SCALE_UNIT), (z - SCALE_UNIT));
}
_recalculate_position();
}
else if (!strcmp(ev->key, "Right"))
{
- eo_do(((Test_object *)eina_list_nth(globalscene.spheres, 0))->node,
- evas_canvas3d_node_scale_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
+ evas_canvas3d_node_scale_get(((Test_object *)eina_list_nth(globalscene.spheres, 0))->node, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
EINA_LIST_FOREACH(globalscene.spheres, l, item)
{
- eo_do(item->node, evas_canvas3d_node_scale_set((x + SCALE_UNIT), (y + SCALE_UNIT), (z + SCALE_UNIT)));
+ evas_canvas3d_node_scale_set(item->node, (x + SCALE_UNIT), (y + SCALE_UNIT), (z + SCALE_UNIT));
}
_recalculate_position();
}
@@ -212,27 +209,26 @@ _on_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *eo EINA
Eina_Bool flag;
if (ev->button == 1)
{
- eo_do(globalscene.scene, evas_canvas3d_scene_color_pick_enable_set(EINA_TRUE));
- eo_do(globalscene.scene,
- flag = evas_canvas3d_scene_pick(ev->canvas.x, ev->canvas.y, &n, &m, NULL, NULL));
+ evas_canvas3d_scene_color_pick_enable_set(globalscene.scene, EINA_TRUE);
+ flag = evas_canvas3d_scene_pick(globalscene.scene, ev->canvas.x, ev->canvas.y, &n, &m, NULL, NULL);
time = clock() - time;
diff_sec = ((float)time) / CLOCKS_PER_SEC / 10;
if (flag)
{
fprintf(stdout, "Boom! Time expended for color pick: %2.7f .\n", diff_sec);
- eo_do(n, evas_canvas3d_node_scale_set(VEC_3(SMALL_SCALE)));
+ evas_canvas3d_node_scale_set(n, VEC_3(SMALL_SCALE));
}
}
else
{
- eo_do(globalscene.scene, evas_canvas3d_scene_color_pick_enable_set(EINA_FALSE));
- eo_do(globalscene.scene, flag = evas_canvas3d_scene_pick(ev->canvas.x, ev->canvas.y, &n, &m, &s, &t));
+ evas_canvas3d_scene_color_pick_enable_set(globalscene.scene, EINA_FALSE);
+ flag = evas_canvas3d_scene_pick(globalscene.scene, ev->canvas.x, ev->canvas.y, &n, &m, &s, &t);
time = clock() - time;
diff_sec = ((float)time) / CLOCKS_PER_SEC / 10;
if (flag)
{
fprintf(stdout, "Boom! Time expended for geometry pick: %2.7f .\n", diff_sec);
- eo_do(n, evas_canvas3d_node_scale_set(VEC_3(BIG_SCALE)));
+ evas_canvas3d_node_scale_set(n, VEC_3(BIG_SCALE));
}
}
}
@@ -244,36 +240,27 @@ _init_sphere(void *this, const char *texture)
sphere->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
sphere->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(sphere->primitive,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
- evas_canvas3d_primitive_precision_set(50));
- eo_do(sphere->mesh,
- evas_canvas3d_mesh_from_primitive_set(0, sphere->primitive),
- evas_canvas3d_mesh_frame_material_set(0, sphere->material),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
+ evas_canvas3d_primitive_form_set(sphere->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
+ evas_canvas3d_primitive_precision_set(sphere->primitive, 50);
+ evas_canvas3d_mesh_from_primitive_set(sphere->mesh, 0, sphere->primitive);
+ evas_canvas3d_mesh_frame_material_set(sphere->mesh, 0, sphere->material);
+ evas_canvas3d_mesh_shade_mode_set(sphere->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
- eo_do(sphere->mesh, evas_canvas3d_mesh_color_pick_enable_set(EINA_TRUE));
+ evas_canvas3d_mesh_color_pick_enable_set(sphere->mesh, EINA_TRUE);
sphere->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(sphere->texture,
- evas_canvas3d_texture_file_set(texture, NULL),
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
- EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
- EVAS_CANVAS3D_WRAP_MODE_REPEAT));
- eo_do(sphere->material,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, sphere->texture),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT,
- 0.01, 0.01, 0.01, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE,
- 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR,
- 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(50.0));
+ evas_canvas3d_texture_file_set(sphere->texture, texture, NULL);
+ evas_canvas3d_texture_filter_set(sphere->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
+ evas_canvas3d_texture_wrap_set(sphere->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
+ evas_canvas3d_material_texture_set(sphere->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, sphere->texture);
+ evas_canvas3d_material_enable_set(sphere->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(sphere->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(sphere->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_enable_set(sphere->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
+ evas_canvas3d_material_color_set(sphere->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.01, 0.01, 0.01, 1.0);
+ evas_canvas3d_material_color_set(sphere->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_color_set(sphere->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(sphere->material, 50.0);
return EINA_TRUE;
}
@@ -287,41 +274,29 @@ _init_scene(const char *texture)
globalscene.scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- globalscene.root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ globalscene.root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
globalscene.camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(globalscene.camera,
- evas_canvas3d_camera_projection_perspective_set(30.0, 1.0, 1.0, 1000.0));
+ evas_canvas3d_camera_projection_perspective_set(globalscene.camera, 30.0, 1.0, 1.0, 1000.0);
globalscene.camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(globalscene.camera_node,
- evas_canvas3d_node_camera_set(globalscene.camera));
- eo_do(globalscene.root_node,
- evas_canvas3d_node_member_add(globalscene.camera_node));
- eo_do(globalscene.camera_node,
- evas_canvas3d_node_position_set(0.0, 30.0, 800.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, -1000.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(globalscene.camera_node, globalscene.camera);
+ evas_canvas3d_node_member_add(globalscene.root_node, globalscene.camera_node);
+ evas_canvas3d_node_position_set(globalscene.camera_node, 0.0, 30.0, 800.0);
+ evas_canvas3d_node_look_at_set(globalscene.camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, -1000.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
globalscene.light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(globalscene.light,
- evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_directional_set(EINA_TRUE));
+ evas_canvas3d_light_ambient_set(globalscene.light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_diffuse_set(globalscene.light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(globalscene.light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_directional_set(globalscene.light, EINA_TRUE);
globalscene.light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(globalscene.light_node,
- evas_canvas3d_node_light_set(globalscene.light),
- evas_canvas3d_node_position_set(100.0, 50.0, 300.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 1.0, 1.0, 1.0));
- eo_do(globalscene.root_node,
- evas_canvas3d_node_member_add(globalscene.light_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(globalscene.light_node, globalscene.light);
+ evas_canvas3d_node_position_set(globalscene.light_node, 100.0, 50.0, 300.0);
+ evas_canvas3d_node_look_at_set(globalscene.light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 1.0, 1.0, 1.0);
+ evas_canvas3d_node_member_add(globalscene.root_node, globalscene.light_node);
tmp = 0.01;
for (i = 0; i < globalscene.col * globalscene.row; i++)
@@ -338,24 +313,22 @@ _init_scene(const char *texture)
m->material = spheretmp->material;
m->texture = spheretmp->texture;
}
- m->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
+ m->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
m->speed = tmp;
m->sphere_animate = _animate_sphere;
m->animate = ecore_timer_add(m->speed, m->sphere_animate, m);
- eo_do(globalscene.root_node, evas_canvas3d_node_member_add(m->node));
- eo_do(m->node, evas_canvas3d_node_mesh_add(m->mesh),
- evas_canvas3d_node_scale_set(VEC_3(INIT_SCALE)));
+ evas_canvas3d_node_member_add(globalscene.root_node, m->node);
+ evas_canvas3d_node_mesh_add(m->node, m->mesh);
+ evas_canvas3d_node_scale_set(m->node, VEC_3(INIT_SCALE));
globalscene.spheres = eina_list_append(globalscene.spheres, m);
tmp += 0.01;
}
_recalculate_position();
- eo_do(globalscene.scene,
- evas_canvas3d_scene_root_node_set(globalscene.root_node),
- evas_canvas3d_scene_camera_node_set(globalscene.camera_node),
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
+ evas_canvas3d_scene_root_node_set(globalscene.scene, globalscene.root_node);
+ evas_canvas3d_scene_camera_node_set(globalscene.scene, globalscene.camera_node);
+ evas_canvas3d_scene_size_set(globalscene.scene, WIDTH, HEIGHT);
return EINA_TRUE;
}
@@ -410,11 +383,10 @@ int main(int argc, char **argv)
image = evas_object_image_filled_add(evas);
- eo_do(image,
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_visible_set(image, EINA_TRUE);
evas_object_focus_set(image, EINA_TRUE);
- eo_do(image, evas_obj_image_scene_set(globalscene.scene));
+ evas_obj_image_scene_set(image, globalscene.scene);
r = evas_object_key_grab(image, "Down", 0, 0, EINA_TRUE);
r = evas_object_key_grab(image, "Up", 0, 0, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-cube-rotate.c b/src/examples/evas/evas-3d-cube-rotate.c
index eec0234960..e393c14deb 100644
--- a/src/examples/evas/evas-3d-cube-rotate.c
+++ b/src/examples/evas/evas-3d-cube-rotate.c
@@ -89,7 +89,7 @@ _rotate_x_reload(Evas_Canvas3D_Scene *eo_scene, Evas_Event_Mouse_Down *ev, Evas_
Evas_Real s, t;
int mouse_diff;
- eo_do(eo_scene, evas_canvas3d_scene_pick(ev->canvas.x, ev->canvas.y, &n, &m, &s, &t));
+ evas_canvas3d_scene_pick(eo_scene, ev->canvas.x, ev->canvas.y, &n, &m, &s, &t);
if ((n == node) && (m == mesh))
{
@@ -140,7 +140,7 @@ _animate_scene(void *data)
angle += sc->angle;
- eo_do(sc->mesh_node, evas_canvas3d_node_orientation_angle_axis_set(angle, 0, 1.0, 0.0));
+ evas_canvas3d_node_orientation_angle_axis_set(sc->mesh_node, angle, 0, 1.0, 0.0);
return EINA_TRUE;
}
@@ -149,39 +149,32 @@ static void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(data->camera,
- evas_canvas3d_camera_projection_perspective_set(20.0, 1.0, 2.0, 50.0));
+ evas_canvas3d_camera_projection_perspective_set(data->camera, 20.0, 1.0, 2.0, 50.0);
- data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(data->camera_node,
- evas_canvas3d_node_camera_set(data->camera),
- evas_canvas3d_node_position_set(3.0, 3.0, 10.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
+ data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(data->camera_node, data->camera);
+ evas_canvas3d_node_position_set(data->camera_node, 3.0, 3.0, 10.0);
+ evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->camera_node));
+ evas_canvas3d_node_member_add(data->root_node, data->camera_node);
}
static void
_light_setup(Scene_Data *data)
{
- data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS,evas);
+ data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(data->light,
- evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
+ evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
- data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(data->light_node,
- evas_canvas3d_node_light_set(data->light),
- evas_canvas3d_node_position_set(5.0, 5.0, 10.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
+ evas_canvas3d_node_light_set(data->light_node, data->light);
+ evas_canvas3d_node_position_set(data->light_node, 5.0, 5.0, 10.0);
+ evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node));
+ evas_canvas3d_node_member_add(data->root_node, data->light_node);
}
static void
@@ -190,51 +183,44 @@ _mesh_setup(Scene_Data *data)
/* Setup material. */
data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(data->material,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(100.0));
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(data->material, 100.0);
/* Setup primitive */
data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(data->cube,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
+ evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
/* Setup mesh. */
data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(data->mesh,
- evas_canvas3d_mesh_from_primitive_set(0, data->cube),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
- evas_canvas3d_mesh_frame_material_set(0, data->material));
-
- data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->root_node,
- evas_canvas3d_node_member_add(data->mesh_node));
- eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
+ evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
+ evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
+ evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
+
+ data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
+ evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
}
static void
_scene_setup(Scene_Data *data)
{
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
- eo_do(scene,
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT),
- evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
+ evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
+ evas_canvas3d_scene_background_color_set(scene, 0.0, 0.0, 0.0, 0.0);
_camera_setup(data);
_light_setup(data);
_mesh_setup(data);
- eo_do(scene,
- evas_canvas3d_scene_root_node_set(data->root_node),
- evas_canvas3d_scene_camera_node_set(data->camera_node));
+ evas_canvas3d_scene_root_node_set(scene, data->root_node);
+ evas_canvas3d_scene_camera_node_set(scene, data->camera_node);
data->mouse_old_x = 0;
data->mouse_diff_x = 0;
@@ -276,8 +262,7 @@ main(void)
evas_object_show(image);
/* Set the image object as render target for 3D scene. */
- eo_do(image,
- evas_obj_image_scene_set(scene));
+ evas_obj_image_scene_set(image, scene);
evas_object_focus_set(image, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-cube.c b/src/examples/evas/evas-3d-cube.c
index d3bcbbe6b5..6f6f4208c2 100644
--- a/src/examples/evas/evas-3d-cube.c
+++ b/src/examples/evas/evas-3d-cube.c
@@ -110,8 +110,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- eo_do(background, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(background, w, h);
+ efl_gfx_size_set(image, w, h);
}
static Eina_Bool
@@ -122,8 +122,7 @@ _animate_scene(void *data)
angle += 0.5;
- eo_do(scene->mesh_node,
- evas_canvas3d_node_orientation_angle_axis_set(angle, 1.0, 1.0, 1.0));
+ evas_canvas3d_node_orientation_angle_axis_set(scene->mesh_node, angle, 1.0, 1.0, 1.0);
/* Rotate */
if (angle > 360.0) angle -= 360.0f;
@@ -136,38 +135,30 @@ _camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(data->camera,
- evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
+ evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(data->camera_node,
- evas_canvas3d_node_camera_set(data->camera),
- evas_canvas3d_node_position_set(0.0, 0.0, 10.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->camera_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(data->camera_node, data->camera);
+ evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
+ evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(data->root_node, data->camera_node);
}
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(data->light,
- evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
+ evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(data->light_node,
- evas_canvas3d_node_light_set(data->light),
- evas_canvas3d_node_position_set(0.0, 0.0, 10.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(data->light_node, data->light);
+ evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
+ evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(data->root_node, data->light_node);
}
static void
_mesh_setup(Scene_Data *data)
@@ -175,65 +166,49 @@ _mesh_setup(Scene_Data *data)
/* Setup material. */
data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(data->material,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
-
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(100.0));
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(data->material, 100.0);
/* Setup mesh. */
data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(data->mesh,
- evas_canvas3d_mesh_vertex_count_set(24),
- evas_canvas3d_mesh_frame_add(0),
-
- evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION,
- 12 * sizeof(float), &cube_vertices[ 0]),
- evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL,
- 12 * sizeof(float), &cube_vertices[ 3]),
- evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR,
- 12 * sizeof(float), &cube_vertices[ 6]),
- evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD,
- 12 * sizeof(float), &cube_vertices[10]),
-
- evas_canvas3d_mesh_index_data_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT,
- 36, &cube_indices[0]),
- evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
-
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
-
- evas_canvas3d_mesh_frame_material_set(0, data->material));
+ evas_canvas3d_mesh_vertex_count_set(data->mesh, 24);
+ evas_canvas3d_mesh_frame_add(data->mesh, 0);
+ evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]);
+ evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 12 * sizeof(float), &cube_vertices[ 3]);
+ evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, 12 * sizeof(float), &cube_vertices[ 6]);
+ evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 12 * sizeof(float), &cube_vertices[10]);
+ evas_canvas3d_mesh_index_data_set(data->mesh, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, 36, &cube_indices[0]);
+ evas_canvas3d_mesh_vertex_assembly_set(data->mesh, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
+ evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
+ evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
- eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
+ evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
}
static void
_scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- eo_do(data->scene,
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
- evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
+ evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
+ evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
_mesh_setup(data);
- eo_do(data->scene,
- evas_canvas3d_scene_root_node_set(data->root_node),
- evas_canvas3d_scene_camera_node_set(data->camera_node));
+ evas_canvas3d_scene_root_node_set(data->scene, data->root_node);
+ evas_canvas3d_scene_camera_node_set(data->scene, data->camera_node);
}
int
@@ -259,19 +234,17 @@ main(void)
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
- eo_do(background,
- efl_gfx_color_set(0, 0, 0, 255),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_color_set(background, 0, 0, 0, 255);
+ efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = evas_object_image_filled_add(evas);
- eo_do(image,
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
- eo_do(image, evas_obj_image_scene_set(data.scene));
+ evas_obj_image_scene_set(image, data.scene);
/* Add animation timer callback. */
ecore_timer_add(0.016, _animate_scene, &data);
diff --git a/src/examples/evas/evas-3d-cube2.c b/src/examples/evas/evas-3d-cube2.c
index a2dd1febf5..e46c2f7c64 100644
--- a/src/examples/evas/evas-3d-cube2.c
+++ b/src/examples/evas/evas-3d-cube2.c
@@ -79,8 +79,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- eo_do(background, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(background, w, h);
+ efl_gfx_size_set(image, w, h);
}
static Eina_Bool
@@ -93,8 +93,7 @@ _animate_scene(void *data)
angle += 0.2;
- eo_do(scene->mesh_node,
- evas_canvas3d_node_orientation_angle_axis_set(angle, 1.0, 1.0, 1.0));
+ evas_canvas3d_node_orientation_angle_axis_set(scene->mesh_node, angle, 1.0, 1.0, 1.0);
/* Rotate */
if (angle > 360.0) angle -= 360.0f;
@@ -104,7 +103,7 @@ _animate_scene(void *data)
if (frame >= 20) inc = -1;
else if (frame <= 0) inc = 1;
- eo_do(scene->mesh_node, evas_canvas3d_node_mesh_frame_set(scene->mesh, frame));
+ evas_canvas3d_node_mesh_frame_set(scene->mesh_node, scene->mesh, frame);
return EINA_TRUE;
}
@@ -113,39 +112,30 @@ static void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(data->camera,
- evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
+ evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(data->camera_node,
- evas_canvas3d_node_camera_set(data->camera),
- evas_canvas3d_node_position_set(0.0, 0.0, 3.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(data->root_node,
- evas_canvas3d_node_member_add(data->camera_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(data->camera_node, data->camera);
+ evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 3.0);
+ evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(data->root_node, data->camera_node);
}
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(data->light,
- evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
+ evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(data->light_node,
- evas_canvas3d_node_light_set(data->light),
- evas_canvas3d_node_position_set(0.0, 0.0, 10.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(data->light_node, data->light);
+ evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
+ evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(data->root_node, data->light_node);
}
static void
@@ -155,86 +145,70 @@ _mesh_setup(Scene_Data *data)
data->material0 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(data->material0,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
-
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(100.0));
-
- eo_do(data->material1,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
-
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(100.0));
+ evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_material_color_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
+ evas_canvas3d_material_color_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(data->material0, 100.0);
+
+ evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
+ evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(data->material1, 100.0);
data->texture0 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
data->texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
data->texture_normal = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(data->texture0,
- evas_canvas3d_texture_data_set(EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]));
- eo_do(data->texture1,
- evas_canvas3d_texture_data_set(EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels1[0]));
- eo_do(data->texture_normal,
- evas_canvas3d_texture_file_set(normal_map_path, NULL));
+ evas_canvas3d_texture_data_set(data->texture0, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]);
+ evas_canvas3d_texture_data_set(data->texture1, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels1[0]);
+ evas_canvas3d_texture_file_set(data->texture_normal, normal_map_path, NULL);
- eo_do(data->material0,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture0));
- eo_do(data->material1,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture1));
- eo_do(data->material1,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_normal));
+ evas_canvas3d_material_texture_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture0);
+ evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture1);
+ evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_normal);
/* Set data of primitive */
data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(data->cube,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
+ evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
/* Setup mesh. */
data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(data->mesh,
- evas_canvas3d_mesh_from_primitive_set(0, data->cube),
- evas_canvas3d_mesh_frame_material_set(0, data->material0),
- evas_canvas3d_mesh_frame_add(20),
- evas_canvas3d_mesh_frame_material_set(20, data->material1),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP));
+ evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
+ evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material0);
+ evas_canvas3d_mesh_frame_add(data->mesh, 20);
+ evas_canvas3d_mesh_frame_material_set(data->mesh, 20, data->material1);
+ evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
- eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
+ evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
}
static void
_scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- eo_do(data->scene,
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT),
- evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
+ evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
+ evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
_mesh_setup(data);
- eo_do(data->scene,
- evas_canvas3d_scene_root_node_set(data->root_node),
- evas_canvas3d_scene_camera_node_set(data->camera_node));
+ evas_canvas3d_scene_root_node_set(data->scene, data->root_node);
+ evas_canvas3d_scene_camera_node_set(data->scene, data->camera_node);
}
int
@@ -261,19 +235,17 @@ main(void)
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
- eo_do(background,
- efl_gfx_color_set(0, 0, 0, 255),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_color_set(background, 0, 0, 0, 255);
+ efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = evas_object_image_filled_add(evas);
- eo_do(image,
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
- eo_do(image, evas_obj_image_scene_set(data.scene));
+ evas_obj_image_scene_set(image, data.scene);
/* Add animation timer callback. */
ecore_timer_add(0.01, _animate_scene, &data);
diff --git a/src/examples/evas/evas-3d-eet.c b/src/examples/evas/evas-3d-eet.c
index 9067825e00..dc09191e05 100644
--- a/src/examples/evas/evas-3d-eet.c
+++ b/src/examples/evas/evas-3d-eet.c
@@ -58,8 +58,7 @@ _animate_eet(void *data)
{
angle += 0.5;
- eo_do((Evas_Canvas3D_Node *)data,
- evas_canvas3d_node_orientation_angle_axis_set(angle, 1.0, 1.0, 1.0));
+ evas_canvas3d_node_orientation_angle_axis_set((Evas_Canvas3D_Node *)data, angle, 1.0, 1.0, 1.0);
/* Rotate */
if (angle > 360.0) angle -= 360.0f;
@@ -72,7 +71,7 @@ _animate_md2(void *data)
{
static int frame = 0;
- eo_do((Evas_Canvas3D_Node *)data, evas_canvas3d_node_mesh_frame_set(mesh, frame));
+ evas_canvas3d_node_mesh_frame_set((Evas_Canvas3D_Node *)data, mesh, frame);
frame += 32;
@@ -93,8 +92,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- eo_do(background, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(background, w, h);
+ efl_gfx_size_set(image, w, h);
}
int
@@ -119,113 +118,86 @@ main(void)
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(camera,
- evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0));
-
- camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(camera_node,
- evas_canvas3d_node_camera_set(camera));
- eo_do(root_node,
- evas_canvas3d_node_member_add(camera_node));
- eo_do(camera_node,
- evas_canvas3d_node_position_set(200.0, 0.0, 40.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
+ evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
+
+ camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(camera_node, camera);
+ evas_canvas3d_node_member_add(root_node, camera_node);
+ evas_canvas3d_node_position_set(camera_node, 200.0, 0.0, 40.0);
+ evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
/* Add the light. */
light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(light,
- evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_directional_set(EINA_TRUE));
-
- light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(light_node,
- evas_canvas3d_node_light_set(light),
- evas_canvas3d_node_position_set(1000.0, 0.0, 1000.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(root_node,
- evas_canvas3d_node_member_add(light_node));
+ evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_directional_set(light, EINA_TRUE);
+
+ light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(light_node, light);
+ evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
+ evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(root_node, light_node);
/* Add the meshes. */
mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
mesh2 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(mesh,
- efl_file_set(input_model_path, NULL),
- evas_canvas3d_mesh_frame_material_set(0, material),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
-
- eo_do(material,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT,
- 0.50, 0.50, 0.00, 0.30),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE,
- 0.00, 0.50, 0.50, 0.30),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR,
- 0.50, 0.00, 0.50, 0.30),
- evas_canvas3d_material_shininess_set(50.0));
+ efl_file_set(mesh, input_model_path, NULL);
+ evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
+ evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
+
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.50, 0.50, 0.00, 0.30);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.00, 0.50, 0.50, 0.30);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.50, 0.00, 0.50, 0.30);
+ evas_canvas3d_material_shininess_set(material, 50.0);
if (!ecore_file_mkpath(PACKAGE_EXAMPLES_DIR EVAS_SAVED_FILES))
fprintf(stderr, "Failed to create folder %s\n\n",
PACKAGE_EXAMPLES_DIR EVAS_SAVED_FILES);
- eo_do(mesh, efl_file_save(output_model_path, NULL, NULL));
+ efl_file_save(mesh, output_model_path, NULL, NULL);
- eo_do(mesh2,
- efl_file_set(output_model_path, NULL),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
+ efl_file_set(mesh2, output_model_path, NULL);
+ evas_canvas3d_mesh_shade_mode_set(mesh2, EVAS_CANVAS3D_SHADE_MODE_PHONG);
- mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
+ mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(root_node,
- evas_canvas3d_node_member_add(mesh_node));
- eo_do(mesh_node,
- evas_canvas3d_node_mesh_add(mesh),
- evas_canvas3d_node_position_set(0.0, -40.0, 0.0));
+ evas_canvas3d_node_member_add(root_node, mesh_node);
+ evas_canvas3d_node_mesh_add(mesh_node, mesh);
+ evas_canvas3d_node_position_set(mesh_node, 0.0, -40.0, 0.0);
- mesh_node2 = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(root_node,
- evas_canvas3d_node_member_add(mesh_node2));
- eo_do(mesh_node2,
- evas_canvas3d_node_mesh_add(mesh2),
- evas_canvas3d_node_position_set(0.0, 40.0, 0.0));
+ mesh_node2 = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_member_add(root_node, mesh_node2);
+ evas_canvas3d_node_mesh_add(mesh_node2, mesh2);
+ evas_canvas3d_node_position_set(mesh_node2, 0.0, 40.0, 0.0);
/* Set up scene. */
- eo_do(scene,
- evas_canvas3d_scene_root_node_set(root_node),
- evas_canvas3d_scene_camera_node_set(camera_node),
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
+ evas_canvas3d_scene_root_node_set(scene, root_node);
+ evas_canvas3d_scene_camera_node_set(scene, camera_node);
+ evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
- eo_do(background,
- efl_gfx_color_set(0, 0, 0, 255),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_color_set(background, 0, 0, 0, 255);
+ efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = evas_object_image_filled_add(evas);
- eo_do(image,
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
- eo_do(image, evas_obj_image_scene_set(scene));
+ evas_obj_image_scene_set(image, scene);
ecore_timer_add(0.01, _animate_md2, mesh_node);
ecore_timer_add(0.01, _animate_eet, mesh_node2);
diff --git a/src/examples/evas/evas-3d-fog.c b/src/examples/evas/evas-3d-fog.c
index 5d191e800f..33bd05cc8c 100644
--- a/src/examples/evas/evas-3d-fog.c
+++ b/src/examples/evas/evas-3d-fog.c
@@ -59,8 +59,8 @@ _on_canvas_resize(Ecore_Evas *ee)
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
evas_object_resize(background, w, h);
- eo_do(background, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(background, w, h);
+ efl_gfx_size_set(image, w, h);
}
static Eina_Bool
@@ -71,8 +71,7 @@ _animate_scene(void *data)
angle += 0.5;
- eo_do(scene->animation_node,
- evas_canvas3d_node_orientation_angle_axis_set(angle, 0.0, 1.0, 0.0));
+ evas_canvas3d_node_orientation_angle_axis_set(scene->animation_node, angle, 0.0, 1.0, 0.0);
if (angle > 360.0) angle -= 360.0f;
@@ -84,49 +83,40 @@ _camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(data->camera,
- evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
+ evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(data->camera_node,
- evas_canvas3d_node_camera_set(data->camera),
- evas_canvas3d_node_position_set(0.0, 0.0, 7.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
+ evas_canvas3d_node_camera_set(data->camera_node, data->camera);
+ evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 7.0);
+ evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->camera_node));
+ evas_canvas3d_node_member_add(data->root_node, data->camera_node);
}
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(data->light,
- evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
+ evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(data->light_node,
- evas_canvas3d_node_light_set(data->light),
- evas_canvas3d_node_position_set(0.0, 0.0, 10.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(data->light_node, data->light);
+ evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
+ evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(data->root_node, data->light_node);
}
static void
_set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material)
{
- eo_do(mesh,
- evas_canvas3d_mesh_from_primitive_set(0, sphere),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
- evas_canvas3d_mesh_frame_material_set(0, material));
+ evas_canvas3d_mesh_from_primitive_set(mesh, 0, sphere);
+ evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
+ evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
}
@@ -135,20 +125,17 @@ _mesh_setup(Scene_Data *data)
{
data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(data->material,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
-
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(100.0));
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(data->material, 100.0);
data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(data->sphere,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
- evas_canvas3d_primitive_precision_set(50));
+ evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
+ evas_canvas3d_primitive_precision_set(data->sphere, 50);
data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
@@ -157,28 +144,27 @@ _mesh_setup(Scene_Data *data)
_set_ball(data->mesh1, data->sphere, data->material);
data->animation_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->animation_node, evas_canvas3d_node_member_add(data->mesh_node));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->animation_node));
- eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh),
- evas_canvas3d_node_position_set(0.0, 0.0, 3.0));
+ evas_canvas3d_node_member_add(data->animation_node, data->mesh_node);
+ evas_canvas3d_node_member_add(data->root_node, data->animation_node);
+ evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
+ evas_canvas3d_node_position_set(data->mesh_node, 0.0, 0.0, 3.0);
data->mesh_node1 =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node1));
- eo_do(data->mesh_node1, evas_canvas3d_node_mesh_add(data->mesh1),
- evas_canvas3d_node_scale_set(3, 3, 3));
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node1);
+ evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1);
+ evas_canvas3d_node_scale_set(data->mesh_node1, 3, 3, 3);
- eo_do(data->mesh, evas_canvas3d_mesh_fog_enable_set(EINA_TRUE), evas_canvas3d_mesh_fog_color_set(FOG_COLOR, FOG_FACTOR));
- eo_do(data->mesh1, evas_canvas3d_mesh_fog_enable_set(EINA_TRUE), evas_canvas3d_mesh_fog_color_set(FOG_COLOR, FOG_FACTOR));
+ evas_canvas3d_mesh_fog_enable_set(data->mesh, EINA_TRUE);
+ evas_canvas3d_mesh_fog_color_set(data->mesh, FOG_COLOR, FOG_FACTOR);
+ evas_canvas3d_mesh_fog_enable_set(data->mesh1, EINA_TRUE);
+ evas_canvas3d_mesh_fog_color_set(data->mesh1, FOG_COLOR, FOG_FACTOR);
}
static void
@@ -186,21 +172,18 @@ _scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- eo_do(data->scene,
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
- evas_canvas3d_scene_background_color_set(FOG_COLOR, 1));
+ evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
+ evas_canvas3d_scene_background_color_set(data->scene, FOG_COLOR, 1);
data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
_mesh_setup(data);
- eo_do(data->scene,
- evas_canvas3d_scene_root_node_set(data->root_node),
- evas_canvas3d_scene_camera_node_set(data->camera_node));
+ evas_canvas3d_scene_root_node_set(data->scene, data->root_node);
+ evas_canvas3d_scene_camera_node_set(data->scene, data->camera_node);
}
int
@@ -227,20 +210,18 @@ main(void)
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
- eo_do(background,
- efl_gfx_color_set(0, 0, 0, 255),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_color_set(background, 0, 0, 0, 255);
+ efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = evas_object_image_filled_add(evas);
- eo_do(image,
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
- eo_do(image, evas_obj_image_scene_set(data.scene));
+ evas_obj_image_scene_set(image, data.scene);
/* Add animation timer callback. */
ecore_animator_frametime_set(0.008);
diff --git a/src/examples/evas/evas-3d-frustum.c b/src/examples/evas/evas-3d-frustum.c
index 94d43f28e3..4e1323f5b4 100644
--- a/src/examples/evas/evas-3d-frustum.c
+++ b/src/examples/evas/evas-3d-frustum.c
@@ -100,18 +100,17 @@ _redraw_bounding_object(void *data)
Eo *current_mesh;
Eina_List *meshes = NULL, *l;
- eo_do(scene->mesh_node, meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get());
+ meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get(scene->mesh_node);
EINA_LIST_FOREACH(meshes, l, current_mesh)
{
- eo_do(scene->mesh_node, evas_canvas3d_node_mesh_del(current_mesh));
+ evas_canvas3d_node_mesh_del(scene->mesh_node, current_mesh);
}
switch (key)
{
case EVAS_CANVAS3D_FRUSTUM_MODE_BSPHERE:
{
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_bounding_sphere_get(&x0, &y0, &z0, &rad));
+ evas_canvas3d_node_bounding_sphere_get(scene->mesh_node_model, &x0, &y0, &z0, &rad);
current_mesh = scene->mesh_sphere;
px = x0;
py = y0;
@@ -121,9 +120,7 @@ _redraw_bounding_object(void *data)
}
case EVAS_CANVAS3D_FRUSTUM_MODE_AABB:
{
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_bounding_box_get(&x0, &y0, &z0,
- &x1, &y1, &z1));
+ evas_canvas3d_node_bounding_box_get(scene->mesh_node_model, &x0, &y0, &z0, &x1, &y1, &z1);
current_mesh = scene->mesh_aabb;
px = (x1 + x0) / 2;
py = (y1 + y0) / 2;
@@ -135,8 +132,7 @@ _redraw_bounding_object(void *data)
}
case EVAS_CANVAS3D_FRUSTUM_MODE_CENTRAL_POINT:
{
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_bounding_sphere_get(&x0, &y0, &z0, &rad));
+ evas_canvas3d_node_bounding_sphere_get(scene->mesh_node_model, &x0, &y0, &z0, &rad);
current_mesh = scene->mesh_sphere;
px = x0;
py = y0;
@@ -148,10 +144,9 @@ _redraw_bounding_object(void *data)
return ECORE_CALLBACK_RENEW;
}
- eo_do(scene->mesh_node,
- evas_canvas3d_node_mesh_add(current_mesh),
- evas_canvas3d_node_position_set(px, py, pz),
- evas_canvas3d_node_scale_set(sx, sy, sz));
+ evas_canvas3d_node_mesh_add(scene->mesh_node, current_mesh);
+ evas_canvas3d_node_position_set(scene->mesh_node, px, py, pz);
+ evas_canvas3d_node_scale_set(scene->mesh_node, sx, sy, sz);
return ECORE_CALLBACK_RENEW;
}
@@ -166,109 +161,97 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void
if (!strcmp("w", ev->key))
{
ffar += 20;
- eo_do(scene->camera, evas_canvas3d_camera_projection_frustum_set(fleft, fright, fbottom, fup, fnear, ffar));
+ evas_canvas3d_camera_projection_frustum_set(scene->camera, fleft, fright, fbottom, fup, fnear, ffar);
}
else if(!strcmp("s", ev->key))
{
ffar -= 20;
- eo_do(scene->camera, evas_canvas3d_camera_projection_frustum_set(fleft, fright, fbottom, fup, fnear, ffar));
+ evas_canvas3d_camera_projection_frustum_set(scene->camera, fleft, fright, fbottom, fup, fnear, ffar);
}
else if(!strcmp("t", ev->key))
{
fnear += 2;
- eo_do(scene->camera, evas_canvas3d_camera_projection_frustum_set(fleft, fright, fbottom, fup, fnear, ffar));
+ evas_canvas3d_camera_projection_frustum_set(scene->camera, fleft, fright, fbottom, fup, fnear, ffar);
}
else if(!strcmp("g", ev->key))
{
fnear -= 2;
- eo_do(scene->camera, evas_canvas3d_camera_projection_frustum_set(fleft, fright, fbottom, fup, fnear, ffar));
+ evas_canvas3d_camera_projection_frustum_set(scene->camera, fleft, fright, fbottom, fup, fnear, ffar);
}
else if(!strcmp("i", ev->key))
{
obj_y++;
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_position_set(obj_x, obj_y, obj_z));
+ evas_canvas3d_node_position_set(scene->mesh_node_model, obj_x, obj_y, obj_z);
}
else if(!strcmp("k", ev->key))
{
obj_y--;
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_position_set(obj_x, obj_y, obj_z));
+ evas_canvas3d_node_position_set(scene->mesh_node_model, obj_x, obj_y, obj_z);
}
else if(!strcmp("o", ev->key))
{
obj_z++;
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_position_set(obj_x, obj_y, obj_z));
+ evas_canvas3d_node_position_set(scene->mesh_node_model, obj_x, obj_y, obj_z);
}
else if(!strcmp("u", ev->key))
{
obj_z--;
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_position_set(obj_x, obj_y, obj_z));
+ evas_canvas3d_node_position_set(scene->mesh_node_model, obj_x, obj_y, obj_z);
}
else if(!strcmp("l", ev->key))
{
obj_x++;
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_position_set(obj_x, obj_y, obj_z));
+ evas_canvas3d_node_position_set(scene->mesh_node_model, obj_x, obj_y, obj_z);
}
else if(!strcmp("j", ev->key))
{
obj_x--;
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_position_set(obj_x, obj_y, obj_z));
+ evas_canvas3d_node_position_set(scene->mesh_node_model, obj_x, obj_y, obj_z);
}
else if(!strcmp("z", ev->key))
{
obj_sc_y+=0.02;
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_scale_set(obj_sc_x, obj_sc_y, obj_sc_z));
+ evas_canvas3d_node_scale_set(scene->mesh_node_model, obj_sc_x, obj_sc_y, obj_sc_z);
}
else if(!strcmp("Z", ev->key))
{
obj_sc_y-=0.02;
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_scale_set(obj_sc_x, obj_sc_y, obj_sc_z));
+ evas_canvas3d_node_scale_set(scene->mesh_node_model, obj_sc_x, obj_sc_y, obj_sc_z);
}
else if(!strcmp("x", ev->key))
{
obj_sc_z+=0.02;
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_scale_set(obj_sc_x, obj_sc_y, obj_sc_z));
+ evas_canvas3d_node_scale_set(scene->mesh_node_model, obj_sc_x, obj_sc_y, obj_sc_z);
}
else if(!strcmp("X", ev->key))
{
obj_sc_z-=0.02;
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_scale_set(obj_sc_x, obj_sc_y, obj_sc_z));
+ evas_canvas3d_node_scale_set(scene->mesh_node_model, obj_sc_x, obj_sc_y, obj_sc_z);
}
else if(!strcmp("c", ev->key))
{
obj_sc_x+=0.02;
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_scale_set(obj_sc_x, obj_sc_y, obj_sc_z));
+ evas_canvas3d_node_scale_set(scene->mesh_node_model, obj_sc_x, obj_sc_y, obj_sc_z);
}
else if(!strcmp("C", ev->key))
{
obj_sc_x-=0.02;
- eo_do(scene->mesh_node_model,
- evas_canvas3d_node_scale_set(obj_sc_x, obj_sc_y, obj_sc_z));
+ evas_canvas3d_node_scale_set(scene->mesh_node_model, obj_sc_x, obj_sc_y, obj_sc_z);
}
else if(!strcmp("Return", ev->key))
{
- eo_do(scene->camera, evas_canvas3d_camera_projection_frustum_set(fleft, fright, fbottom, fup, fnear, ffar));
+ evas_canvas3d_camera_projection_frustum_set(scene->camera, fleft, fright, fbottom, fup, fnear, ffar);
}
else if (!strcmp("1", ev->key))
{
- eo_do(scene->camera_node, evas_canvas3d_node_position_set(0.0, 0.0, 300.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
+ evas_canvas3d_node_position_set(scene->camera_node, 0.0, 0.0, 300.0);
+ evas_canvas3d_node_look_at_set(scene->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
fprintf(stdout, "Changed position and view of camera\n");
}
else if (!strcmp("2", ev->key))
{
- eo_do(scene->camera_node, evas_canvas3d_node_position_set(300.0, 300.0, 300.0);
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
+ evas_canvas3d_node_position_set(scene->camera_node, 300.0, 300.0, 300.0);
+ evas_canvas3d_node_look_at_set(scene->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
fprintf(stdout, "Changed position and view of camera\n");
}
else if (!strcmp("3", ev->key))
@@ -289,7 +272,7 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void
}
_redraw_bounding_object(data);
- eo_do(scene->camera, frustum = evas_canvas3d_camera_node_visible_get(scene->camera_node, scene->mesh_node_model, key));
+ frustum = evas_canvas3d_camera_node_visible_get(scene->camera, scene->camera_node, scene->mesh_node_model, key);
fprintf(stdout, "far - %f frustum - %d radius - %f\n", ffar, frustum, radius);
}
@@ -297,35 +280,30 @@ static void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(data->camera_node,
- evas_canvas3d_node_camera_set(data->camera),
- evas_canvas3d_node_position_set(0.0, 0.0, 300.0);
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
+ data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(data->camera_node, data->camera);
+ evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 300.0);
+ evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
- eo_do(data->camera, evas_canvas3d_camera_projection_frustum_set(fleft, fright, fbottom, fup, fnear, ffar));
+ evas_canvas3d_camera_projection_frustum_set(data->camera, fleft, fright, fbottom, fup, fnear, ffar);
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->camera_node));
+ evas_canvas3d_node_member_add(data->root_node, data->camera_node);
}
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(data->light,
- evas_canvas3d_light_ambient_set( 0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
-
- data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS,evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(data->light_node,
- evas_canvas3d_node_light_set(data->light),
- evas_canvas3d_node_position_set(0.0, 0.0, 200.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
-
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node));
+ evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
+
+ data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(data->light_node, data->light);
+ evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 200.0);
+ evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
+
+ evas_canvas3d_node_member_add(data->root_node, data->light_node);
}
static void
@@ -333,43 +311,37 @@ _mesh_setup(Scene_Data *data)
{
data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(data->material,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
-
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(100.0));
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(data->material, 100.0);
data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(data->cube,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
+ evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(data->sphere,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
- evas_canvas3d_primitive_precision_set(20));
+ evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
+ evas_canvas3d_primitive_precision_set(data->sphere, 20);
data->mesh_aabb = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(data->mesh_aabb,
- evas_canvas3d_mesh_from_primitive_set(0, data->cube),
- evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_DIFFUSE),
- evas_canvas3d_mesh_frame_material_set(0, data->material));
+ evas_canvas3d_mesh_from_primitive_set(data->mesh_aabb, 0, data->cube);
+ evas_canvas3d_mesh_vertex_assembly_set(data->mesh_aabb, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
+ evas_canvas3d_mesh_shade_mode_set(data->mesh_aabb, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
+ evas_canvas3d_mesh_frame_material_set(data->mesh_aabb, 0, data->material);
data->mesh_sphere = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(data->mesh_sphere,
- evas_canvas3d_mesh_from_primitive_set(0, data->sphere),
- evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_DIFFUSE),
- evas_canvas3d_mesh_frame_material_set(0, data->material));
+ evas_canvas3d_mesh_from_primitive_set(data->mesh_sphere, 0, data->sphere);
+ evas_canvas3d_mesh_vertex_assembly_set(data->mesh_sphere, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
+ evas_canvas3d_mesh_shade_mode_set(data->mesh_sphere, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
+ evas_canvas3d_mesh_frame_material_set(data->mesh_sphere, 0, data->material);
data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
- eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh_aabb));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
+ evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_aabb);
}
static void
@@ -379,27 +351,24 @@ _mesh_setup_model(Scene_Data *data)
data->material_model = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
data->texture_model = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(data->texture_model,
- evas_canvas3d_texture_file_set(texture_path, NULL),
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT));
-
- eo_do(data->material_model,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.01, 0.01, 0.01, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_texture_set( EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture_model),
- evas_canvas3d_material_shininess_set(100.0));
-
- eo_do(data->mesh_model,
- efl_file_set(mesh_path, NULL),
- evas_canvas3d_mesh_frame_material_set(0, data->material_model),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_DIFFUSE));
+ evas_canvas3d_texture_file_set(data->texture_model, texture_path, NULL);
+ evas_canvas3d_texture_filter_set(data->texture_model, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
+ evas_canvas3d_texture_wrap_set(data->texture_model, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
+
+ evas_canvas3d_material_enable_set(data->material_model, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_model, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_model, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_model, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_model, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material_model, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.01, 0.01, 0.01, 1.0);
+ evas_canvas3d_material_color_set(data->material_model, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_color_set(data->material_model, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_texture_set(data->material_model, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture_model);
+ evas_canvas3d_material_shininess_set(data->material_model, 100.0);
+
+ efl_file_set(data->mesh_model, mesh_path, NULL);
+ evas_canvas3d_mesh_frame_material_set(data->mesh_model, 0, data->material_model);
+ evas_canvas3d_mesh_shade_mode_set(data->mesh_model, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
}
static void
@@ -407,29 +376,25 @@ _scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_light_setup(data);
_mesh_setup_model(data);
_camera_setup(data);
- data->mesh_node_model = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->mesh_node_model,
- evas_canvas3d_node_position_set(obj_x, obj_y, obj_z),
- evas_canvas3d_node_orientation_angle_axis_set(-90, 1.0, 0.0, 0.0),
- evas_canvas3d_node_scale_set(obj_sc_x, obj_sc_y, obj_sc_z));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node_model));
- eo_do(data->mesh_node_model, evas_canvas3d_node_mesh_add(data->mesh_model));
+ data->mesh_node_model = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_position_set(data->mesh_node_model, obj_x, obj_y, obj_z);
+ evas_canvas3d_node_orientation_angle_axis_set(data->mesh_node_model, -90, 1.0, 0.0, 0.0);
+ evas_canvas3d_node_scale_set(data->mesh_node_model, obj_sc_x, obj_sc_y, obj_sc_z);
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_model);
+ evas_canvas3d_node_mesh_add(data->mesh_node_model, data->mesh_model);
_mesh_setup(data);
- eo_do(data->scene,
- evas_canvas3d_scene_size_set( WIDTH, HEIGHT),
- evas_canvas3d_scene_background_color_set(0.5, 0.5, 0.5, 0.0),
- evas_canvas3d_scene_root_node_set(data->root_node);
- evas_canvas3d_scene_camera_node_set(data->camera_node));
+ evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
+ evas_canvas3d_scene_background_color_set(data->scene, 0.5, 0.5, 0.5, 0.0);
+ evas_canvas3d_scene_root_node_set(data->scene, data->root_node);
+ evas_canvas3d_scene_camera_node_set(data->scene, data->camera_node);
}
int
@@ -466,7 +431,7 @@ main(void)
evas_object_show(image);
evas_object_focus_set(image, EINA_TRUE);
- eo_do(image, evas_obj_image_scene_set(data.scene));
+ evas_obj_image_scene_set(image, data.scene);
_redraw_bounding_object(&data);
_show_help();
diff --git a/src/examples/evas/evas-3d-hull.c b/src/examples/evas/evas-3d-hull.c
index 31748dc2e6..487788437c 100644
--- a/src/examples/evas/evas-3d-hull.c
+++ b/src/examples/evas/evas-3d-hull.c
@@ -85,58 +85,52 @@ int rr;
#define MODEL_MESH_INIT(name, model, shade) \
data->mesh_##name = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); \
- eo_do(data->mesh_##name, \
- efl_file_set(model, NULL), \
- evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES), \
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_##shade), \
- evas_canvas3d_mesh_frame_material_set(0, data->material));
+ efl_file_set(data->mesh_##name, model, NULL); \
+ evas_canvas3d_mesh_vertex_assembly_set(data->mesh_##name, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES); \
+ evas_canvas3d_mesh_shade_mode_set(data->mesh_##name, EVAS_CANVAS3D_SHADE_MODE_##shade); \
+ evas_canvas3d_mesh_frame_material_set(data->mesh_##name, 0, data->material);
#define CONVEX_HULL_MESH_INIT(name) \
vert = eina_inarray_new(sizeof(float), 1); \
ind = eina_inarray_new(sizeof(unsigned short int), 1);\
- eo_do(data->mesh_##name, \
- evas_canvas3d_mesh_convex_hull_data_get(0, vert, ind)); \
+ evas_canvas3d_mesh_convex_hull_data_get(data->mesh_##name, 0, vert, ind); \
vertex = (float*) vert->members;\
index = ind->members;\
data->mesh_##name##_ch = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); \
- eo_do(data->mesh_##name##_ch, \
- evas_canvas3d_mesh_vertex_count_set((vert->len / 10)), \
- evas_canvas3d_mesh_frame_add(0), \
- evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, \
- 10 * sizeof(float), &vertex[ 0]), \
- evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, \
- 10 * sizeof(float), &vertex[ 3]), \
- evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, \
- 10 * sizeof(float), &vertex[ 6]), \
- evas_canvas3d_mesh_index_data_copy_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, \
- ind->len, &index[0]), \
- evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES), \
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR), \
- evas_canvas3d_mesh_frame_material_set(0, data->material)); \
+ evas_canvas3d_mesh_vertex_count_set(data->mesh_##name##_ch, (vert->len / 10)); \
+ evas_canvas3d_mesh_frame_add(data->mesh_##name##_ch, 0); \
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(data->mesh_##name##_ch, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, \
+ 10 * sizeof(float), &vertex[ 0]); \
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(data->mesh_##name##_ch, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, \
+ 10 * sizeof(float), &vertex[ 3]); \
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(data->mesh_##name##_ch, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_COLOR, \
+ 10 * sizeof(float), &vertex[ 6]); \
+ evas_canvas3d_mesh_index_data_copy_set(data->mesh_##name##_ch, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, \
+ ind->len, &index[0]); \
+ evas_canvas3d_mesh_vertex_assembly_set(data->mesh_##name##_ch, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES); \
+ evas_canvas3d_mesh_shade_mode_set(data->mesh_##name##_ch, EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR); \
+ evas_canvas3d_mesh_frame_material_set(data->mesh_##name##_ch, 0, data->material); \
free(vert); \
free(ind);
#define SWITCH_MESH(index, name, scale) \
case index: \
{ \
- eo_do(scene->mesh_node, list = evas_canvas3d_node_mesh_list_get()); \
+ list = evas_canvas3d_node_mesh_list_get(scene->mesh_node); \
mesh = eina_list_nth(list, 0); \
- eo_do(scene->mesh_node, \
- evas_canvas3d_node_mesh_del(mesh), \
- evas_canvas3d_node_mesh_add(scene->mesh_##name), \
- evas_canvas3d_node_scale_set(scale, scale, scale)); \
- eo_do(scene->mesh_node_convex_hull, list = evas_canvas3d_node_mesh_list_get()); \
+ evas_canvas3d_node_mesh_del(scene->mesh_node, mesh); \
+ evas_canvas3d_node_mesh_add(scene->mesh_node, scene->mesh_##name); \
+ evas_canvas3d_node_scale_set(scene->mesh_node, scale, scale, scale); \
+ list = evas_canvas3d_node_mesh_list_get(scene->mesh_node_convex_hull); \
mesh = eina_list_nth(list, 0); \
- eo_do(scene->mesh_node_convex_hull, \
- evas_canvas3d_node_mesh_del(mesh), \
- evas_canvas3d_node_mesh_add(scene->mesh_##name##_ch), \
- evas_canvas3d_node_scale_set(scale, scale, scale)); \
- eo_do(scene->mesh_node_blender, list = evas_canvas3d_node_mesh_list_get()); \
+ evas_canvas3d_node_mesh_del(scene->mesh_node_convex_hull, mesh); \
+ evas_canvas3d_node_mesh_add(scene->mesh_node_convex_hull, scene->mesh_##name##_ch); \
+ evas_canvas3d_node_scale_set(scene->mesh_node_convex_hull, scale, scale, scale); \
+ list = evas_canvas3d_node_mesh_list_get(scene->mesh_node_blender); \
mesh = eina_list_nth(list, 0); \
- eo_do(scene->mesh_node_blender, \
- evas_canvas3d_node_mesh_del(mesh), \
- evas_canvas3d_node_mesh_add(scene->mesh_blender_##name), \
- evas_canvas3d_node_scale_set(scale, scale, scale)); \
+ evas_canvas3d_node_mesh_del(scene->mesh_node_blender, mesh); \
+ evas_canvas3d_node_mesh_add(scene->mesh_node_blender, scene->mesh_blender_##name); \
+ evas_canvas3d_node_scale_set(scene->mesh_node_blender, scale, scale, scale); \
_print_result(scene->mesh_##name##_ch, scene->mesh_blender_test_##name); \
break; \
}
@@ -174,12 +168,12 @@ static void
_print_result(Evas_Canvas3D_Mesh *mesh, Evas_Canvas3D_Mesh *convex_mesh)
{
int v_count = 0;
- eo_do(mesh, v_count = evas_canvas3d_mesh_vertex_count_get());
+ v_count = evas_canvas3d_mesh_vertex_count_get(mesh);
printf("Vertex count is %d for convex hull\n",
v_count);
- eo_do(convex_mesh, v_count = evas_canvas3d_mesh_vertex_count_get());
+ v_count = evas_canvas3d_mesh_vertex_count_get(convex_mesh);
printf("Vertex count is %d for blender convex hull\n\n",
v_count);
@@ -199,8 +193,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- eo_do(background, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(background, w, h);
+ efl_gfx_size_set(image, w, h);
}
static Eina_Bool
@@ -213,14 +207,11 @@ _animate_scene(void *data)
if (angle >= 360.0)
angle = 0.0;
- eo_do(scene->mesh_node,
- evas_canvas3d_node_orientation_angle_axis_set(angle, 1.0, 1.0, 1.0));
+ evas_canvas3d_node_orientation_angle_axis_set(scene->mesh_node, angle, 1.0, 1.0, 1.0);
- eo_do(scene->mesh_node_convex_hull,
- evas_canvas3d_node_orientation_angle_axis_set(angle, 1.0, 1.0, 1.0));
+ evas_canvas3d_node_orientation_angle_axis_set(scene->mesh_node_convex_hull, angle, 1.0, 1.0, 1.0);
- eo_do(scene->mesh_node_blender,
- evas_canvas3d_node_orientation_angle_axis_set(angle, 1.0, 1.0, 1.0));
+ evas_canvas3d_node_orientation_angle_axis_set(scene->mesh_node_blender, angle, 1.0, 1.0, 1.0);
return EINA_TRUE;
}
@@ -266,38 +257,30 @@ _camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(data->camera,
- evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
+ evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(data->camera_node,
- evas_canvas3d_node_camera_set(data->camera),
- evas_canvas3d_node_position_set(0.0, 0.0, 10.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->camera_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(data->camera_node, data->camera);
+ evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
+ evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(data->root_node, data->camera_node);
}
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(data->light,
- evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
+ evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(data->light_node,
- evas_canvas3d_node_light_set(data->light),
- evas_canvas3d_node_position_set(0.0, 0.0, 10.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(data->light_node, data->light);
+ evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
+ evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(data->root_node, data->light_node);
}
static void
@@ -311,51 +294,41 @@ _mesh_setup(Scene_Data *data)
/* Setup material. */
data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(data->material,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
-
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(100.0));
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(data->material, 100.0);
/* Setup mesh sphere */
primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(primitive,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
- evas_canvas3d_primitive_precision_set(10));
+ evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
+ evas_canvas3d_primitive_precision_set(primitive, 10);
data->mesh_sphere = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(data->mesh_sphere, evas_canvas3d_mesh_from_primitive_set(0, primitive));
- eo_do(data->mesh_sphere,
- evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
-
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
-
- evas_canvas3d_mesh_frame_material_set(0, data->material));
+ evas_canvas3d_mesh_from_primitive_set(data->mesh_sphere, 0, primitive);
+ evas_canvas3d_mesh_vertex_assembly_set(data->mesh_sphere, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
+ evas_canvas3d_mesh_shade_mode_set(data->mesh_sphere, EVAS_CANVAS3D_SHADE_MODE_PHONG);
+ evas_canvas3d_mesh_frame_material_set(data->mesh_sphere, 0, data->material);
/* Setup mesh torus */
data->mesh_torus = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(primitive,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_TORUS),
- evas_canvas3d_primitive_precision_set(50));
- eo_do(data->mesh_torus, evas_canvas3d_mesh_from_primitive_set(0, primitive));
- eo_do(data->mesh_torus,
- evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
- evas_canvas3d_mesh_frame_material_set(0, data->material));
+ evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_TORUS);
+ evas_canvas3d_primitive_precision_set(primitive, 50);
+ evas_canvas3d_mesh_from_primitive_set(data->mesh_torus, 0, primitive);
+ evas_canvas3d_mesh_vertex_assembly_set(data->mesh_torus, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
+ evas_canvas3d_mesh_shade_mode_set(data->mesh_torus, EVAS_CANVAS3D_SHADE_MODE_PHONG);
+ evas_canvas3d_mesh_frame_material_set(data->mesh_torus, 0, data->material);
/* Setup mesh cube */
data->mesh_cube = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(primitive,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE),
- evas_canvas3d_primitive_precision_set(50));
- eo_do(data->mesh_cube, evas_canvas3d_mesh_from_primitive_set(0, primitive));
- eo_do(data->mesh_cube,
- evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
- evas_canvas3d_mesh_frame_material_set(0, data->material));
+ evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
+ evas_canvas3d_primitive_precision_set(primitive, 50);
+ evas_canvas3d_mesh_from_primitive_set(data->mesh_cube, 0, primitive);
+ evas_canvas3d_mesh_vertex_assembly_set(data->mesh_cube, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
+ evas_canvas3d_mesh_shade_mode_set(data->mesh_cube, EVAS_CANVAS3D_SHADE_MODE_PHONG);
+ evas_canvas3d_mesh_frame_material_set(data->mesh_cube, 0, data->material);
MODEL_MESH_INIT(plain, plain, PHONG)
MODEL_MESH_INIT(column, column, PHONG)
@@ -382,13 +355,11 @@ _mesh_setup(Scene_Data *data)
MODEL_MESH_INIT(blender_test_sonic, sonic_test, DIFFUSE)
data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
- eo_do(data->mesh_node,
- evas_canvas3d_node_mesh_add(data->mesh_sphere),
- evas_canvas3d_node_scale_set(SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE),
- evas_canvas3d_node_position_set(3.0, 0.0, 0.0));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
+ evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_sphere);
+ evas_canvas3d_node_scale_set(data->mesh_node, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
+ evas_canvas3d_node_position_set(data->mesh_node, 3.0, 0.0, 0.0);
CONVEX_HULL_MESH_INIT(sphere)
CONVEX_HULL_MESH_INIT(torus)
@@ -402,43 +373,36 @@ _mesh_setup(Scene_Data *data)
_print_result(data->mesh_sphere_ch, data->mesh_blender_test_sphere);
data->mesh_node_convex_hull =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node_convex_hull));
- eo_do(data->mesh_node_convex_hull,
- evas_canvas3d_node_position_set(0.0, 0.0, 0.0),
- evas_canvas3d_node_scale_set(SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE),
- evas_canvas3d_node_mesh_add(data->mesh_sphere_ch));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_convex_hull);
+ evas_canvas3d_node_position_set(data->mesh_node_convex_hull, 0.0, 0.0, 0.0);
+ evas_canvas3d_node_scale_set(data->mesh_node_convex_hull, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
+ evas_canvas3d_node_mesh_add(data->mesh_node_convex_hull, data->mesh_sphere_ch);
data->mesh_node_blender =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node_blender));
- eo_do(data->mesh_node_blender,
- evas_canvas3d_node_position_set(-3.0, 0.0, 0.0),
- evas_canvas3d_node_scale_set(SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE),
- evas_canvas3d_node_mesh_add(data->mesh_blender_sphere));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_blender);
+ evas_canvas3d_node_position_set(data->mesh_node_blender, -3.0, 0.0, 0.0);
+ evas_canvas3d_node_scale_set(data->mesh_node_blender, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
+ evas_canvas3d_node_mesh_add(data->mesh_node_blender, data->mesh_blender_sphere);
}
static void
_scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- eo_do(data->scene,
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
- evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
+ evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
+ evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
_mesh_setup(data);
- eo_do(data->scene,
- evas_canvas3d_scene_root_node_set(data->root_node),
- evas_canvas3d_scene_camera_node_set(data->camera_node));
+ evas_canvas3d_scene_root_node_set(data->scene, data->root_node);
+ evas_canvas3d_scene_camera_node_set(data->scene, data->camera_node);
}
int
@@ -468,22 +432,20 @@ main(void)
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
- eo_do(background,
- efl_gfx_color_set(0, 0, 0, 255),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_color_set(background, 0, 0, 0, 255);
+ efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = evas_object_image_filled_add(evas);
- eo_do(image,
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_visible_set(image, EINA_TRUE);
evas_object_show(image),
evas_object_focus_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
- eo_do(image, evas_obj_image_scene_set(data.scene));
+ evas_obj_image_scene_set(image, data.scene);
evas_object_event_callback_add(image, EVAS_CALLBACK_KEY_DOWN, _key_down, &data);
diff --git a/src/examples/evas/evas-3d-md2.c b/src/examples/evas/evas-3d-md2.c
index 9409efc5b7..e19dfd6630 100644
--- a/src/examples/evas/evas-3d-md2.c
+++ b/src/examples/evas/evas-3d-md2.c
@@ -47,7 +47,7 @@ _animate_scene(void *data)
{
static int frame = 0;
- eo_do((Evas_Canvas3D_Node *)data, evas_canvas3d_node_mesh_frame_set(mesh, frame));
+ evas_canvas3d_node_mesh_frame_set((Evas_Canvas3D_Node *)data, mesh, frame);
frame += 32;
@@ -68,8 +68,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- eo_do(background, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(background, w, h);
+ efl_gfx_size_set(image, w, h);
}
int
@@ -94,102 +94,76 @@ main(void)
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(camera,
- evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0));
+ evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(camera_node,
- evas_canvas3d_node_camera_set(camera));
- eo_do(root_node,
- evas_canvas3d_node_member_add(camera_node));
- eo_do(camera_node,
- evas_canvas3d_node_position_set(100.0, 0.0, 20.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(camera_node, camera);
+ evas_canvas3d_node_member_add(root_node, camera_node);
+ evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 20.0);
+ evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
/* Add the light. */
light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(light,
- evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_directional_set(EINA_TRUE));
+ evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_directional_set(light, EINA_TRUE);
light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(light_node,
- evas_canvas3d_node_light_set(light),
- evas_canvas3d_node_position_set(1000.0, 0.0, 1000.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(root_node,
- evas_canvas3d_node_member_add(light_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(light_node, light);
+ evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
+ evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(root_node, light_node);
/* Add the mesh. */
mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(mesh,
- efl_file_set(model_path, NULL),
- evas_canvas3d_mesh_frame_material_set(0, material),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
+ efl_file_set(mesh, model_path, NULL);
+ evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
+ evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(texture,
- evas_canvas3d_texture_file_set(image_path, NULL),
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
- EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
- EVAS_CANVAS3D_WRAP_MODE_REPEAT));
- eo_do(material,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT,
- 0.01, 0.01, 0.01, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE,
- 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR,
- 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(50.0));
-
- mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(root_node,
- evas_canvas3d_node_member_add(mesh_node));
- eo_do(mesh_node,
- evas_canvas3d_node_mesh_add(mesh));
+ evas_canvas3d_texture_file_set(texture, image_path, NULL);
+ evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
+ evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
+ evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.01, 0.01, 0.01, 1.0);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(material, 50.0);
+
+ mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_member_add(root_node, mesh_node);
+ evas_canvas3d_node_mesh_add(mesh_node, mesh);
/* Set up scene. */
- eo_do(scene,
- evas_canvas3d_scene_root_node_set(root_node),
- evas_canvas3d_scene_camera_node_set(camera_node),
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
+ evas_canvas3d_scene_root_node_set(scene, root_node);
+ evas_canvas3d_scene_camera_node_set(scene, camera_node);
+ evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
- eo_do(background,
- efl_gfx_color_set(0, 0, 0, 255),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_color_set(background, 0, 0, 0, 255);
+ efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = evas_object_image_filled_add(evas);
- eo_do(image,
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
- eo_do(image, evas_obj_image_scene_set(scene));
+ evas_obj_image_scene_set(image, scene);
ecore_timer_add(0.01, _animate_scene, mesh_node);
diff --git a/src/examples/evas/evas-3d-mmap-set.c b/src/examples/evas/evas-3d-mmap-set.c
index 39f6d34a6b..000204d2e8 100644
--- a/src/examples/evas/evas-3d-mmap-set.c
+++ b/src/examples/evas/evas-3d-mmap-set.c
@@ -33,24 +33,22 @@
snprintf(buffer, PATH_MAX, "%s%s", template_path, #extention); \
extention##_file = eina_file_open(buffer , 0); \
mesh_##extention = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); \
- eo_do(mesh_##extention, \
- efl_file_mmap_set(extention##_file, NULL), \
- evas_canvas3d_mesh_frame_material_set(0, material), \
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG)); \
- node_##extention = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, \
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); \
- eo_do(root_node, evas_canvas3d_node_member_add(node_##extention)); \
- eo_do(node_##extention, evas_canvas3d_node_mesh_add(mesh_##extention), \
- evas_canvas3d_node_position_set(initial_node_data[number * 10], \
- initial_node_data[number * 10 + 1], \
- initial_node_data[number * 10 + 2]), \
- evas_canvas3d_node_scale_set(initial_node_data[number * 10 + 3], \
- initial_node_data[number * 10 + 4], \
- initial_node_data[number * 10 + 5]), \
- evas_canvas3d_node_orientation_angle_axis_set(initial_node_data[number * 10 + 6], \
- initial_node_data[number * 10 + 7], \
- initial_node_data[number * 10 + 8], \
- initial_node_data[number * 10 + 9]));\
+ efl_file_mmap_set(mesh_##extention, extention##_file, NULL); \
+ evas_canvas3d_mesh_frame_material_set(mesh_##extention, 0, material); \
+ evas_canvas3d_mesh_shade_mode_set(mesh_##extention, EVAS_CANVAS3D_SHADE_MODE_PHONG); \
+ node_##extention = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); \
+ evas_canvas3d_node_member_add(root_node, node_##extention); \
+ evas_canvas3d_node_mesh_add(node_##extention, mesh_##extention); \
+ evas_canvas3d_node_position_set(node_##extention, initial_node_data[number * 10], \
+ initial_node_data[number * 10 + 1], \
+ initial_node_data[number * 10 + 2]); \
+ evas_canvas3d_node_scale_set(node_##extention, initial_node_data[number * 10 + 3], \
+ initial_node_data[number * 10 + 4], \
+ initial_node_data[number * 10 + 5]); \
+ evas_canvas3d_node_orientation_angle_axis_set(node_##extention, initial_node_data[number * 10 + 6], \
+ initial_node_data[number * 10 + 7], \
+ initial_node_data[number * 10 + 8], \
+ initial_node_data[number * 10 + 9]);\
ecore_timer_add(0.01, _animate_##extention, node_##extention);
static const char *template_path = PACKAGE_EXAMPLES_DIR EVAS_MODEL_FOLDER "/mesh_for_mmap.";
@@ -100,9 +98,8 @@ _animate_obj(void *data)
obj_animation_parameter += obj_animation_velocity;
float oap = obj_animation_parameter/200;
- eo_do((Evas_Canvas3D_Node *)data,
- evas_canvas3d_node_scale_set(oap, oap, oap),
- evas_canvas3d_node_orientation_angle_axis_set(obj_animation_parameter, 0.0, 1.0, 0.0));
+ evas_canvas3d_node_scale_set((Evas_Canvas3D_Node *)data, oap, oap, oap);
+ evas_canvas3d_node_orientation_angle_axis_set((Evas_Canvas3D_Node *)data, obj_animation_parameter, 0.0, 1.0, 0.0);
if (obj_animation_parameter >= 360.0 || obj_animation_parameter <= 0.0)
obj_animation_velocity *= -1.0;
@@ -115,8 +112,7 @@ _animate_eet(void *data)
{
eet_animation_parameter += eet_animation_velocity;
- eo_do((Evas_Canvas3D_Node *)data,
- evas_canvas3d_node_orientation_angle_axis_set(eet_animation_parameter, 1.0, 0.0, 0.0));
+ evas_canvas3d_node_orientation_angle_axis_set((Evas_Canvas3D_Node *)data, eet_animation_parameter, 1.0, 0.0, 0.0);
eet_animation_velocity = sin(eet_animation_parameter / 180 * M_PI) + 1.1;
return EINA_TRUE;
@@ -127,8 +123,7 @@ _animate_ply(void *data)
{
ply_animation_parameter += ply_animation_velocity;
- eo_do((Evas_Canvas3D_Node *)data,
- evas_canvas3d_node_orientation_angle_axis_set(ply_animation_parameter, 1.0, 0.0, 0.0));
+ evas_canvas3d_node_orientation_angle_axis_set((Evas_Canvas3D_Node *)data, ply_animation_parameter, 1.0, 0.0, 0.0);
if (ply_animation_parameter > 360.0) ply_animation_parameter -= 180.0f;
@@ -140,8 +135,7 @@ _animate_md2(void *data)
{
md2_animation_parameter += md2_animation_velocity;
- eo_do((Evas_Canvas3D_Node *)data,
- evas_canvas3d_node_mesh_frame_set(mesh_md2, md2_animation_parameter));
+ evas_canvas3d_node_mesh_frame_set((Evas_Canvas3D_Node *)data, mesh_md2, md2_animation_parameter);
if (md2_animation_parameter >= 360.0 || md2_animation_parameter <= 0.0)
md2_animation_velocity *= -1.0;
@@ -161,8 +155,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- eo_do(background, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(background, w, h);
+ efl_gfx_size_set(image, w, h);
}
int
@@ -190,58 +184,42 @@ main(void)
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(camera,
- evas_canvas3d_camera_projection_perspective_set(10.0, 1.0, 1.0, 500.0));
+ evas_canvas3d_camera_projection_perspective_set(camera, 10.0, 1.0, 1.0, 500.0);
camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(camera_node,
- evas_canvas3d_node_camera_set(camera));
- eo_do(root_node,
- evas_canvas3d_node_member_add(camera_node));
- eo_do(camera_node,
- evas_canvas3d_node_position_set(0.0, 0.0, 100.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(camera_node, camera);
+ evas_canvas3d_node_member_add(root_node, camera_node);
+ evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 100.0);
+ evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
/* Add the light. */
light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(light,
- evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_directional_set(EINA_TRUE));
+ evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_directional_set(light, EINA_TRUE);
light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(light_node,
- evas_canvas3d_node_light_set(light),
- evas_canvas3d_node_position_set(1.0, 0.0, 100.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(root_node,
- evas_canvas3d_node_member_add(light_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(light_node, light);
+ evas_canvas3d_node_position_set(light_node, 1.0, 0.0, 100.0);
+ evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(root_node, light_node);
material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(material,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT,
- 0.01, 0.01, 0.01, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE,
- 1.0, 1.0, 0.0, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR,
- 0.5, 0.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(50.0));
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.01, 0.01, 0.01, 1.0);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 0.0, 1.0);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.5, 0.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(material, 50.0);
/* Add the meshes */
LOAD_AND_ADD_MESH(obj, 0);
@@ -250,26 +228,23 @@ main(void)
LOAD_AND_ADD_MESH(md2, 3);
/* Set up scene. */
- eo_do(scene,
- evas_canvas3d_scene_root_node_set(root_node),
- evas_canvas3d_scene_camera_node_set(camera_node),
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
+ evas_canvas3d_scene_root_node_set(scene, root_node);
+ evas_canvas3d_scene_camera_node_set(scene, camera_node);
+ evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
- eo_do(background,
- efl_gfx_color_set(20, 20, 200, 255),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_color_set(background, 20, 20, 200, 255);
+ efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = evas_object_image_filled_add(evas);
- eo_do(image,
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
- eo_do(image, evas_obj_image_scene_set(scene));
+ evas_obj_image_scene_set(image, scene);
/* Enter main loop. */
ecore_main_loop_begin();
diff --git a/src/examples/evas/evas-3d-obj.c b/src/examples/evas/evas-3d-obj.c
index 0d40a4125a..b9a6b69bd1 100644
--- a/src/examples/evas/evas-3d-obj.c
+++ b/src/examples/evas/evas-3d-obj.c
@@ -46,49 +46,43 @@
#define ADD_OBJ_MESH(path, Y, Z, num, shade_mode, name_of_material) \
mesh[num] = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); \
snprintf(full_file_path, PATH_MAX, "%s%s", path, ".obj"); \
- eo_do(mesh[num], \
- efl_file_set(full_file_path, NULL), \
- evas_canvas3d_mesh_frame_material_set(0, name_of_material), \
- evas_canvas3d_mesh_shade_mode_set(shade_mode)); \
- mesh_node[num] = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, \
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); \
- eo_do(root_node, \
- evas_canvas3d_node_member_add(mesh_node[num])); \
- eo_do(mesh_node[num], \
- evas_canvas3d_node_mesh_add(mesh[num]), \
- evas_canvas3d_node_position_set(0, Y, Z)); \
+ efl_file_set(mesh[num], full_file_path, NULL); \
+ evas_canvas3d_mesh_frame_material_set(mesh[num], 0, name_of_material); \
+ evas_canvas3d_mesh_shade_mode_set(mesh[num], shade_mode); \
+ mesh_node[num] = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); \
+ evas_canvas3d_node_member_add(root_node, mesh_node[num]); \
+ evas_canvas3d_node_mesh_add(mesh_node[num], mesh[num]); \
+ evas_canvas3d_node_position_set(mesh_node[num], 0, Y, Z); \
#define ADD_OBJ_MESH_AND_SAVED_COPY(path, Y, Z, num, shade_mode, name_of_material)\
snprintf(buffer, PATH_MAX, "%s%s", input_template, #path); \
ADD_OBJ_MESH(buffer, Y, Z, num, shade_mode, name_of_material) \
snprintf(buffer, PATH_MAX, "%s%s%s", output_template, #path, ".obj"); \
- eo_do(mesh[num], efl_file_save(buffer, NULL, NULL)); \
+ efl_file_save(mesh[num], buffer, NULL, NULL); \
snprintf(buffer, PATH_MAX, "%s%s", output_template, #path); \
ADD_OBJ_MESH(buffer, Y + COPY_OFFSET, Z, num + 4, shade_mode, name_of_material)
#define ADD_TEXTURE(name, path) \
name = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
- eo_do(name, \
- evas_canvas3d_texture_file_set(path, NULL), \
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
- EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST), \
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT, \
- EVAS_CANVAS3D_WRAP_MODE_REPEAT));
+ evas_canvas3d_texture_file_set(name, path, NULL); \
+ evas_canvas3d_texture_filter_set(name, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
+ EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \
+ evas_canvas3d_texture_wrap_set(name, EVAS_CANVAS3D_WRAP_MODE_REPEAT, \
+ EVAS_CANVAS3D_WRAP_MODE_REPEAT);
#define ADD_MATERIAL(name) \
name = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); \
- eo_do(name, \
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), \
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), \
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),\
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE), \
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, \
- COL_RED, 0.5), \
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, \
- COL_GREEN, 0.5), \
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, \
- COL_BLUE, 0.5), \
- evas_canvas3d_material_shininess_set(100.0));
+ evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); \
+ evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); \
+ evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE); \
+ evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE); \
+ evas_canvas3d_material_color_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, \
+ COL_RED, 0.5); \
+ evas_canvas3d_material_color_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, \
+ COL_GREEN, 0.5); \
+ evas_canvas3d_material_color_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, \
+ COL_BLUE, 0.5); \
+ evas_canvas3d_material_shininess_set(name, 100.0);
static const char *texture_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/sweet_home_reversed.png";
static const char *output_template = PACKAGE_EXAMPLES_DIR EVAS_SAVED_FILES "/saved_";
@@ -118,8 +112,7 @@ _animate_scene(void *data)
{
angle += 0.2;
- eo_do((Evas_Canvas3D_Node *)data,
- evas_canvas3d_node_orientation_angle_axis_set(angle, 1.0, 1.0, -1.0));
+ evas_canvas3d_node_orientation_angle_axis_set((Evas_Canvas3D_Node *)data, angle, 1.0, 1.0, -1.0);
/* Rotate */
if (angle > 360.0) angle -= 360.0f;
@@ -139,8 +132,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- eo_do(background, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(background, w, h);
+ efl_gfx_size_set(image, w, h);
}
int
@@ -167,51 +160,38 @@ main(void)
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(camera,
- evas_canvas3d_camera_projection_perspective_set(20.0, 1.0, 1.0, 500.0));
+ evas_canvas3d_camera_projection_perspective_set(camera, 20.0, 1.0, 1.0, 500.0);
camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(camera_node,
- evas_canvas3d_node_camera_set(camera));
- eo_do(root_node,
- evas_canvas3d_node_member_add(camera_node));
- eo_do(camera_node,
- evas_canvas3d_node_position_set(100.0, 0.0, 0.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(camera_node, camera);
+ evas_canvas3d_node_member_add(root_node, camera_node);
+ evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 0.0);
+ evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
/* Add the light. */
light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(light,
- evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_directional_set(EINA_TRUE));
+ evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_directional_set(light, EINA_TRUE);
light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(light_node,
- evas_canvas3d_node_light_set(light),
- evas_canvas3d_node_position_set(10.0, 0.0, 0.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(root_node,
- evas_canvas3d_node_member_add(light_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(light_node, light);
+ evas_canvas3d_node_position_set(light_node, 10.0, 0.0, 0.0);
+ evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(root_node, light_node);
ADD_TEXTURE(texture, texture_path)
ADD_MATERIAL(material)
ADD_MATERIAL(material_with_tex)
- eo_do(material_with_tex,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture));
+ evas_canvas3d_material_texture_set(material_with_tex, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
if (!ecore_file_mkpath(PACKAGE_EXAMPLES_DIR EVAS_SAVED_FILES))
fprintf(stderr, "Failed to create folder %s\n\n",
@@ -227,26 +207,23 @@ main(void)
EVAS_CANVAS3D_SHADE_MODE_SHADOW_MAP_RENDER, NULL)
/* Set up scene. */
- eo_do(scene,
- evas_canvas3d_scene_root_node_set(root_node),
- evas_canvas3d_scene_camera_node_set(camera_node),
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
+ evas_canvas3d_scene_root_node_set(scene, root_node);
+ evas_canvas3d_scene_camera_node_set(scene, camera_node);
+ evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add a background rectangle MESHES. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
- eo_do(background,
- efl_gfx_color_set(0, 0, 0, 255),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_color_set(background, 0, 0, 0, 255);
+ efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = evas_object_image_filled_add(evas);
- eo_do(image,
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
- eo_do(image, evas_obj_image_scene_set(scene));
+ evas_obj_image_scene_set(image, scene);
for (i = 0; i < NUMBER_OF_MESHES; i++)
ecore_timer_add(ANIM_SPEED, _animate_scene, mesh_node[i]);
diff --git a/src/examples/evas/evas-3d-parallax-occlusion.c b/src/examples/evas/evas-3d-parallax-occlusion.c
index fd1e8ce18b..ff20dfe20e 100644
--- a/src/examples/evas/evas-3d-parallax-occlusion.c
+++ b/src/examples/evas/evas-3d-parallax-occlusion.c
@@ -62,10 +62,10 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void
Evas_Event_Key_Down *ev = event_info;
if (!strcmp("n", ev->key))
- eo_do(scene->mesh, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP));
+ evas_canvas3d_mesh_shade_mode_set(scene->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
if (!strcmp("p", ev->key))
- eo_do(scene->mesh, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PARALLAX_OCCLUSION));
+ evas_canvas3d_mesh_shade_mode_set(scene->mesh, EVAS_CANVAS3D_SHADE_MODE_PARALLAX_OCCLUSION);
}
static void
@@ -80,8 +80,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- eo_do(background, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(background, w, h);
+ efl_gfx_size_set(image, w, h);
}
static Eina_Bool
@@ -92,10 +92,9 @@ _animate_scene(void *data)
angle += 0.5;
- eo_do(scene->mesh_node,
- evas_canvas3d_node_orientation_angle_axis_set(angle, 0.0, 1.0, 0.0));
+ evas_canvas3d_node_orientation_angle_axis_set(scene->mesh_node, angle, 0.0, 1.0, 0.0);
- eo_do(scene->mesh_node, evas_canvas3d_node_mesh_frame_set(scene->mesh, 50 * (1 + sin(angle / 180.0 * M_PI))));
+ evas_canvas3d_node_mesh_frame_set(scene->mesh_node, scene->mesh, 50 * (1 + sin(angle / 180.0 * M_PI)));
/* Rotate */
if (angle > 360.0) angle = 0.0f;
@@ -107,36 +106,28 @@ _camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(data->camera,
- evas_canvas3d_camera_projection_perspective_set(30.0, 1.0, 2.0, 50.0));
-
- data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(data->camera_node,
- evas_canvas3d_node_camera_set(data->camera),
- evas_canvas3d_node_position_set(0.0, 0.0, 10.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->camera_node));
+ evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0);
+
+ data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(data->camera_node, data->camera);
+ evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
+ evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(data->root_node, data->camera_node);
}
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(data->light,
- evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
-
- data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(data->light_node,
- evas_canvas3d_node_light_set(data->light),
- evas_canvas3d_node_position_set(-20.0, 20.0, 50.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node));
+ evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
+
+ data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(data->light_node, data->light);
+ evas_canvas3d_node_position_set(data->light_node, -20.0, 20.0, 50.0);
+ evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(data->root_node, data->light_node);
}
static void
@@ -147,95 +138,80 @@ _mesh_setup(Scene_Data *data)
data->texture_rocks = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
data->texture_rocks_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(data->texture_rocks, evas_canvas3d_texture_file_set(rock_diffuse, NULL),
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
- EVAS_CANVAS3D_WRAP_MODE_REPEAT));
- eo_do(data->texture_rocks_n, evas_canvas3d_texture_file_set(rock_n_and_height_map, NULL),
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
- EVAS_CANVAS3D_WRAP_MODE_REPEAT));
-
- eo_do(data->material_rocks,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_rocks_n),
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture_rocks),
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, data->texture_rocks),
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, data->texture_rocks),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
-
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.1, 0.1, 0.1, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(100.0));
+ evas_canvas3d_texture_file_set(data->texture_rocks, rock_diffuse, NULL);
+ evas_canvas3d_texture_wrap_set(data->texture_rocks, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
+ evas_canvas3d_texture_file_set(data->texture_rocks_n, rock_n_and_height_map, NULL);
+ evas_canvas3d_texture_wrap_set(data->texture_rocks_n, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
+
+ evas_canvas3d_material_texture_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_rocks_n);
+ evas_canvas3d_material_texture_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture_rocks);
+ evas_canvas3d_material_texture_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, data->texture_rocks);
+ evas_canvas3d_material_texture_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, data->texture_rocks);
+ evas_canvas3d_material_enable_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.1, 0.1, 0.1, 1.0);
+ evas_canvas3d_material_color_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_color_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(data->material_rocks, 100.0);
data->material_wood = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
data->texture_wood = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
data->texture_four_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(data->texture_wood, evas_canvas3d_texture_file_set(wood_diffuse, NULL),
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
- EVAS_CANVAS3D_WRAP_MODE_REPEAT));
- eo_do(data->texture_four_n, evas_canvas3d_texture_file_set(wood_n_and_height_map, NULL),
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
- EVAS_CANVAS3D_WRAP_MODE_REPEAT));
-
- eo_do(data->material_wood,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_four_n),
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture_wood),
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, data->texture_wood),
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, data->texture_wood),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
-
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.1, 0.1, 0.1, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(100.0));
+ evas_canvas3d_texture_file_set(data->texture_wood, wood_diffuse, NULL);
+ evas_canvas3d_texture_wrap_set(data->texture_wood, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
+ evas_canvas3d_texture_file_set(data->texture_four_n, wood_n_and_height_map, NULL);
+ evas_canvas3d_texture_wrap_set(data->texture_four_n, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
+
+ evas_canvas3d_material_texture_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_four_n);
+ evas_canvas3d_material_texture_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture_wood);
+ evas_canvas3d_material_texture_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, data->texture_wood);
+ evas_canvas3d_material_texture_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, data->texture_wood);
+ evas_canvas3d_material_enable_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.1, 0.1, 0.1, 1.0);
+ evas_canvas3d_material_color_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_color_set(data->material_wood, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(data->material_wood, 100.0);
/* Set data of primitive */
data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(data->cube,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
+ evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
/* Setup mesh. */
data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(data->mesh,
- evas_canvas3d_mesh_from_primitive_set(0, data->cube),
- evas_canvas3d_mesh_from_primitive_set(100, data->cube),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PARALLAX_OCCLUSION),
- evas_canvas3d_mesh_frame_material_set(0, data->material_rocks));
-
- eo_do(data->mesh,
- evas_canvas3d_mesh_frame_material_set(100, data->material_wood));
-
- data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
- eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh),
- evas_canvas3d_node_scale_set(3, 3, 3));
+ evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
+ evas_canvas3d_mesh_from_primitive_set(data->mesh, 100, data->cube);
+ evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PARALLAX_OCCLUSION);
+ evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material_rocks);
+
+ evas_canvas3d_mesh_frame_material_set(data->mesh, 100, data->material_wood);
+
+ data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
+ evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
+ evas_canvas3d_node_scale_set(data->mesh_node, 3, 3, 3);
}
static void
_scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- eo_do(data->scene,
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
- evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
+ evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
+ evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
- data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
_mesh_setup(data);
- eo_do(data->scene,
- evas_canvas3d_scene_root_node_set(data->root_node),
- evas_canvas3d_scene_camera_node_set(data->camera_node));
+ evas_canvas3d_scene_root_node_set(data->scene, data->root_node);
+ evas_canvas3d_scene_camera_node_set(data->scene, data->camera_node);
}
int
@@ -262,20 +238,18 @@ main(void)
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
- eo_do(background,
- efl_gfx_color_set(0, 0, 0, 255),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_color_set(background, 0, 0, 0, 255);
+ efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = evas_object_image_filled_add(evas);
- eo_do(image,
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE),
- evas_object_focus_set(image, EINA_TRUE));
+ efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_visible_set(image, EINA_TRUE);
+ evas_object_focus_set(image, image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
- eo_do(image, evas_obj_image_scene_set(data.scene));
+ evas_obj_image_scene_set(image, data.scene);
/* Add animation timer callback. */
ecore_timer_add(0.01, _animate_scene, &data);
diff --git a/src/examples/evas/evas-3d-pick.c b/src/examples/evas/evas-3d-pick.c
index db8389ae36..1ae79a8cc9 100644
--- a/src/examples/evas/evas-3d-pick.c
+++ b/src/examples/evas/evas-3d-pick.c
@@ -51,8 +51,7 @@ _animate_scene(void *data)
angle += 0.3;
- eo_do((Evas_Canvas3D_Node *)data,
- evas_canvas3d_node_orientation_angle_axis_set(angle, 0.0, 1.0, 0.0));
+ evas_canvas3d_node_orientation_angle_axis_set((Evas_Canvas3D_Node *)data, angle, 0.0, 1.0, 0.0);
/* Rotate */
if (angle > 360.0) angle -= 360.0f;
@@ -96,12 +95,12 @@ _on_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj,
obj_x = ev->canvas.x - x;
obj_y = ev->canvas.y - y;
- eo_do(scene, evas_canvas3d_scene_size_get(&scene_w, &scene_h));
+ evas_canvas3d_scene_size_get(scene, &scene_w, &scene_h);
scene_x = obj_x * scene_w / (Evas_Real)w;
scene_y = obj_y * scene_h / (Evas_Real)h;
- eo_do(scene, pick = evas_canvas3d_scene_pick(scene_x, scene_y, &n, &m, &s, &t));
+ pick = evas_canvas3d_scene_pick(scene, scene_x, scene_y, &n, &m, &s, &t);
if (pick) printf("Picked : ");
else printf("Not picked : ");
@@ -136,80 +135,62 @@ main(void)
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(camera,
- evas_canvas3d_camera_projection_perspective_set(30.0, 1.0, 1.0, 100.0));
+ evas_canvas3d_camera_projection_perspective_set(camera, 30.0, 1.0, 1.0, 100.0);
camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(camera_node,
- evas_canvas3d_node_camera_set(camera),
- evas_canvas3d_node_position_set(0.0, 0.0, 2.5),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(root_node, evas_canvas3d_node_member_add(camera_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(camera_node, camera);
+ evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 2.5);
+ evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(root_node, camera_node);
sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(sphere,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
- evas_canvas3d_primitive_precision_set(50));
+ evas_canvas3d_primitive_form_set(sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
+ evas_canvas3d_primitive_precision_set(sphere, 50);
mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(mesh, evas_canvas3d_mesh_from_primitive_set(0, sphere));
+ evas_canvas3d_mesh_from_primitive_set(mesh, 0, sphere);
material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(texture_diffuse,
- evas_canvas3d_texture_file_set(image_path, NULL),
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR,
- EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR));
- eo_do(material,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE,
- texture_diffuse),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
-
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.01, 0.01, 0.01,
- 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0,
- 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0,
- 1.0),
- evas_canvas3d_material_shininess_set(50.0));
-
- mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
-
- eo_do(root_node, evas_canvas3d_node_member_add(mesh_node));
- eo_do(mesh_node, evas_canvas3d_node_mesh_add(mesh));
- eo_do(mesh, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_DIFFUSE),
- evas_canvas3d_mesh_frame_material_set(0, material));
+ evas_canvas3d_texture_file_set(texture_diffuse, image_path, NULL);
+ evas_canvas3d_texture_filter_set(texture_diffuse, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR);
+ evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.01, 0.01, 0.01, 1.0);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(material, 50.0);
+
+ mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+
+ evas_canvas3d_node_member_add(root_node, mesh_node);
+ evas_canvas3d_node_mesh_add(mesh_node, mesh);
+ evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
+ evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
/* Set up scene. */
- eo_do(scene,
- evas_canvas3d_scene_root_node_set(root_node),
- evas_canvas3d_scene_camera_node_set(camera_node),
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
+ evas_canvas3d_scene_root_node_set(scene, root_node);
+ evas_canvas3d_scene_camera_node_set(scene, camera_node);
+ evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add evas objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
- eo_do(background,
- efl_gfx_color_set(0, 0, 0, 255),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_color_set(background, 0, 0, 0, 255);
+ efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_visible_set(background, EINA_TRUE);
image = evas_object_image_filled_add(evas);
- eo_do(image,
- evas_obj_image_scene_set(scene),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ evas_obj_image_scene_set(image, scene);
+ efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_visible_set(image, EINA_TRUE);
evas_object_event_callback_add(image, EVAS_CALLBACK_MOUSE_DOWN,
_on_mouse_down, NULL);
diff --git a/src/examples/evas/evas-3d-ply.c b/src/examples/evas/evas-3d-ply.c
index 25e3288aab..b34b2cc313 100644
--- a/src/examples/evas/evas-3d-ply.c
+++ b/src/examples/evas/evas-3d-ply.c
@@ -78,7 +78,7 @@ _animate_scene(void *data)
{
angle += 0.2;
- eo_do((Evas_Canvas3D_Node *)data, evas_canvas3d_node_orientation_angle_axis_set(angle, 1.0, 1.0, 1.0));
+ evas_canvas3d_node_orientation_angle_axis_set((Evas_Canvas3D_Node *)data, angle, 1.0, 1.0, 1.0);
/* Rotate */
if (angle > 360.0) angle -= 360.0f;
@@ -98,8 +98,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- eo_do(background, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(background, w, h);
+ efl_gfx_size_set(image, w, h);
}
int
@@ -133,63 +133,44 @@ main(void)
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(camera,
- evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0));
-
- camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(camera_node,
- evas_canvas3d_node_camera_set(camera));
- eo_do(root_node,
- evas_canvas3d_node_member_add(camera_node));
- eo_do(camera_node,
- evas_canvas3d_node_position_set(15.0, 0.0, 0.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
+ evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
+
+ camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(camera_node, camera);
+ evas_canvas3d_node_member_add(root_node, camera_node);
+ evas_canvas3d_node_position_set(camera_node, 15.0, 0.0, 0.0);
+ evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
/* Add the light. */
light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(light,
- evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_directional_set(EINA_TRUE));
-
- light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(light_node,
- evas_canvas3d_node_light_set(light),
- evas_canvas3d_node_position_set(1000.0, 0.0, 1000.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(root_node,
- evas_canvas3d_node_member_add(light_node));
+ evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_directional_set(light, EINA_TRUE);
+
+ light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(light_node, light);
+ evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
+ evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(root_node, light_node);
material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(texture,
- evas_canvas3d_texture_file_set(image_path, NULL),
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
- EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
- EVAS_CANVAS3D_WRAP_MODE_REPEAT));
- eo_do(material,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT,
- 0.01, 0.01, 0.01, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE,
- 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR,
- 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(50.0));
+ evas_canvas3d_texture_file_set(texture, image_path, NULL);
+ evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
+ evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
+ evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.01, 0.01, 0.01, 1.0);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(material, 50.0);
if (!ecore_file_mkpath(PACKAGE_EXAMPLES_DIR EVAS_SAVED_FILES))
fprintf(stderr, "Failed to create folder %s\n\n",
@@ -201,51 +182,44 @@ main(void)
mesh[i] = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
snprintf(buffer, PATH_MAX, "%s%s", input_template, file_name[i % 8]);
- eo_do(mesh[i],
- efl_file_set(buffer, NULL),
- evas_canvas3d_mesh_frame_material_set(0, material),
- evas_canvas3d_mesh_shade_mode_set(draw_mode[(i % 8)]));
+ efl_file_set(mesh[i], buffer, NULL);
+ evas_canvas3d_mesh_frame_material_set(mesh[i], 0, material);
+ evas_canvas3d_mesh_shade_mode_set(mesh[i], draw_mode[(i % 8)]);
snprintf(buffer, PATH_MAX, "%s%s", output_template, file_name[i % 8]);
- eo_do(mesh[i], efl_file_save(buffer, NULL, NULL));
+ efl_file_save(mesh[i], buffer, NULL, NULL);
if (i > 15)
{
- eo_do(mesh[i],
- efl_file_set(buffer, NULL),
- evas_canvas3d_mesh_frame_material_set(0, material),
- evas_canvas3d_mesh_shade_mode_set(draw_mode[(i % 8)]));
+ efl_file_set(mesh[i], buffer, NULL);
+ evas_canvas3d_mesh_frame_material_set(mesh[i], 0, material);
+ evas_canvas3d_mesh_shade_mode_set(mesh[i], draw_mode[(i % 8)]);
}
- mesh_node[i] = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(root_node, evas_canvas3d_node_member_add(mesh_node[i]));
- eo_do(mesh_node[i],
- evas_canvas3d_node_mesh_add(mesh[i]),
- evas_canvas3d_node_position_set(0, ((i % 4) * 4) + ((i / 16) * 1) - 6.5, (((i % 16) / 4) * 4) - 6));
+ mesh_node[i] = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_member_add(root_node, mesh_node[i]);
+ evas_canvas3d_node_mesh_add(mesh_node[i], mesh[i]);
+ evas_canvas3d_node_position_set(mesh_node[i], 0, ((i % 4) * 4) + ((i / 16) * 1) - 6.5, (((i % 16) / 4) * 4) - 6);
}
/* Set up scene. */
- eo_do(scene,
- evas_canvas3d_scene_root_node_set(root_node),
- evas_canvas3d_scene_camera_node_set(camera_node),
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
+ evas_canvas3d_scene_root_node_set(scene, root_node);
+ evas_canvas3d_scene_camera_node_set(scene, camera_node);
+ evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
- eo_do(background,
- efl_gfx_color_set(100, 100, 100, 255),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_color_set(background, 100, 100, 100, 255);
+ efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = evas_object_image_filled_add(evas);
- eo_do(image,
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_visible_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
- eo_do(image, evas_obj_image_scene_set(scene));
+ evas_obj_image_scene_set(image, scene);
ecore_animator_frametime_set(0.03);
for (i = 0; i < NUMBER_OF_MESHES; i++)
diff --git a/src/examples/evas/evas-3d-proxy.c b/src/examples/evas/evas-3d-proxy.c
index 48d85e474d..901c52bd54 100644
--- a/src/examples/evas/evas-3d-proxy.c
+++ b/src/examples/evas/evas-3d-proxy.c
@@ -56,8 +56,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- eo_do(background, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(background, w, h);
+ efl_gfx_size_set(image, w, h);
}
static Eina_Bool
@@ -70,15 +70,13 @@ _animate_scene(void *data)
angle += 0.5;
- eo_do(scene->mesh_node,
- evas_canvas3d_node_orientation_angle_axis_set(angle, 1.0, 1.0, 1.0));
+ evas_canvas3d_node_orientation_angle_axis_set(scene->mesh_node, angle, 1.0, 1.0, 1.0);
/* Rotate */
if (angle > 360.0) angle -= 360.0f;
- eo_do(source,
- pixels = evas_obj_image_data_get(EINA_TRUE),
- stride = evas_obj_image_stride_get());
+ pixels = evas_obj_image_data_get(source, EINA_TRUE);
+ stride = evas_obj_image_stride_get(source);
for (i = 0; i < IMG_HEIGHT; i++)
{
@@ -90,9 +88,8 @@ _animate_scene(void *data)
}
}
- eo_do(source,
- evas_obj_image_data_set(pixels),
- evas_obj_image_data_update_add(0, 0, IMG_WIDTH, IMG_HEIGHT));
+ evas_obj_image_data_set(source, pixels);
+ evas_obj_image_data_update_add(source, 0, 0, IMG_WIDTH, IMG_HEIGHT);
return EINA_TRUE;
}
@@ -101,39 +98,30 @@ static void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(data->camera,
- evas_canvas3d_camera_projection_perspective_set(30.0, 1.0, 2.0, 50.0));
+ evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0);
data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(data->camera_node,
- evas_canvas3d_node_camera_set(data->camera),
- evas_canvas3d_node_position_set(0.0, 0.0, 5.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(data->root_node,
- evas_canvas3d_node_member_add(data->camera_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ evas_canvas3d_node_camera_set(data->camera_node, data->camera);
+ evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 5.0);
+ evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(data->root_node, data->camera_node);
}
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(data->light,
- evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
+ evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(data->light_node,
- evas_canvas3d_node_light_set(data->light),
- evas_canvas3d_node_position_set(0.0, 0.0, 10.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(data->light_node, data->light);
+ evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
+ evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_member_add(data->root_node, data->light_node);
}
static void
@@ -143,61 +131,51 @@ _mesh_setup(Scene_Data *data)
data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
data->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(data->texture,
- evas_canvas3d_texture_source_set(source),
- evas_canvas3d_texture_source_visible_set(EINA_TRUE));
+ evas_canvas3d_texture_source_set(data->texture, source);
+ evas_canvas3d_texture_source_visible_set(data->texture, EINA_TRUE);
- eo_do(data->material,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
-
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(100.0),
-
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture));
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.8, 0.8, 0.8, 1.0);
+ evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(data->material, 100.0);
+ evas_canvas3d_material_texture_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture);
/* Set data of primitive */
data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(data->cube,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
+ evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
/* Setup mesh. */
data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(data->mesh,
- evas_canvas3d_mesh_from_primitive_set(0, data->cube),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_FLAT),
- evas_canvas3d_mesh_frame_material_set(0, data->material));
+ evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
+ evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_FLAT);
+ evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
- eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
+ evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
}
static void
_scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- eo_do(data->scene,
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT),
- evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
+ evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
+ evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
_mesh_setup(data);
- eo_do(data->scene,
- evas_canvas3d_scene_root_node_set(data->root_node),
- evas_canvas3d_scene_camera_node_set(data->camera_node));
+ evas_canvas3d_scene_root_node_set(data->scene, data->root_node);
+ evas_canvas3d_scene_camera_node_set(data->scene, data->camera_node);
}
int
@@ -222,30 +200,27 @@ main(void)
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
- eo_do(background,
- efl_gfx_color_set(0, 0, 0, 255),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_color_set(background, 0, 0, 0, 255);
+ efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_visible_set(background, EINA_TRUE);
/* Add a background image. */
source = evas_object_image_filled_add(evas);
- eo_do(source,
- efl_gfx_view_size_set(IMG_WIDTH, IMG_HEIGHT),
- efl_gfx_position_set((WIDTH / 2), (HEIGHT / 2)),
- efl_gfx_size_set((WIDTH / 2), (HEIGHT / 2)),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_view_size_set(source, IMG_WIDTH, IMG_HEIGHT);
+ efl_gfx_position_set(source, (WIDTH / 2), (HEIGHT / 2));
+ efl_gfx_size_set(source, (WIDTH / 2), (HEIGHT / 2));
+ efl_gfx_visible_set(source, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = evas_object_image_filled_add(evas);
- eo_do(image,
- efl_gfx_size_set((WIDTH / 2), (HEIGHT / 2)),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_size_set(image, (WIDTH / 2), (HEIGHT / 2));
+ efl_gfx_visible_set(image, EINA_TRUE);
/* Setup scene */
_scene_setup(&data);
/* Set the image object as render target for 3D scene. */
- eo_do(image, evas_obj_image_scene_set(data.scene));
+ evas_obj_image_scene_set(image, data.scene);
/* Add animation timer callback. */
ecore_timer_add(0.016, _animate_scene, &data);
diff --git a/src/examples/evas/evas-3d-shadows.c b/src/examples/evas/evas-3d-shadows.c
index 8fe1495d81..f70d7e41a8 100644
--- a/src/examples/evas/evas-3d-shadows.c
+++ b/src/examples/evas/evas-3d-shadows.c
@@ -84,20 +84,20 @@ _cb_clicked(void *data EINA_UNUSED, const Eo_Event *event)
Eina_List *meshes = NULL, *l;
Evas_Canvas3D_Mesh *m;
Evas_Canvas3D_Node *billboard = NULL;
- eo_do((Evas_Canvas3D_Node *)event->event_info, meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get());
+ meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get((Evas_Canvas3D_Node *)event->event_info);
EINA_LIST_FOREACH(meshes, l, m)
{
- eo_do(m, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_DIFFUSE));
+ evas_canvas3d_mesh_shade_mode_set(m, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
}
if (choosed_node != (Evas_Canvas3D_Node *)event->event_info)
{
- eo_do(choosed_node, billboard = evas_canvas3d_node_billboard_target_get());
+ billboard = evas_canvas3d_node_billboard_target_get(choosed_node);
if (!billboard)
{
- eo_do(choosed_node, meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get());
+ meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get(choosed_node);
EINA_LIST_FOREACH(meshes, l, m)
{
- eo_do(m, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
+ evas_canvas3d_mesh_shade_mode_set(m, EVAS_CANVAS3D_SHADE_MODE_PHONG);
}
}
choosed_node = (Evas_Canvas3D_Node *)event->event_info;
@@ -111,10 +111,10 @@ _cb_collision(void *data EINA_UNUSED, const Eo_Event *event)
{
Eina_List *meshes = NULL, *l;
Evas_Canvas3D_Mesh *m;
- eo_do((Evas_Canvas3D_Node *)event->event_info, meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get());
+ meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get((Evas_Canvas3D_Node *)event->event_info);
EINA_LIST_FOREACH(meshes, l, m)
{
- eo_do(m, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_DIFFUSE));
+ evas_canvas3d_mesh_shade_mode_set(m, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
}
return EINA_TRUE;
@@ -142,20 +142,15 @@ _animate_scene(void *data)
Scene_Data *scene = (Scene_Data *)data;
if (scene->init)
{
- eo_do(scene->mediator,
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
- eo_do(scene->mediator,
- evas_canvas3d_node_position_set(sin(angle) * 20 , y , cos(angle) * 20),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 3.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 5.0, 0.0));
+ evas_canvas3d_node_position_get(scene->mediator, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
+ evas_canvas3d_node_position_set(scene->mediator, sin(angle) * 20, y, cos(angle) * 20);
+ evas_canvas3d_node_look_at_set(scene->mediator, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 3.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 5.0, 0.0);
angle += 0.005;
if (angle > 360) angle = 0.0;
}
else
- eo_do(scene->mediator,
- evas_canvas3d_node_position_set(0.0, 6.0, 12.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 3.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 5.0, 0.0));
+ evas_canvas3d_node_position_set(scene->mediator, 0.0, 6.0, 12.0);
+ evas_canvas3d_node_look_at_set(scene->mediator, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 3.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 5.0, 0.0);
return EINA_TRUE;
}
@@ -172,8 +167,8 @@ _on_canvas_resize(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- eo_do(background, efl_gfx_size_set(w, h));
- eo_do(image, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(background, w, h);
+ efl_gfx_size_set(image, w, h);
}
static void
@@ -181,83 +176,70 @@ _body_material_set(Body_3D *body, float r, float g, float b)
{
body->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(body->material,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
+ evas_canvas3d_material_enable_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_color_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, r, g, b, 1.0);
+ evas_canvas3d_material_color_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, r, g, b, 1.0);
+ evas_canvas3d_material_color_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(body->material, 100.0);
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, r, g, b, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, r, g, b, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(100.0));
-
- eo_do(body->mesh,
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
- evas_canvas3d_mesh_frame_material_set(0, body->material));
+ evas_canvas3d_mesh_shade_mode_set(body->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
+ evas_canvas3d_mesh_frame_material_set(body->mesh, 0, body->material);
}
static void
_sphere_setup(Body_3D *sphere)
{
sphere->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(sphere->primitive,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
- evas_canvas3d_primitive_precision_set(50));
+ evas_canvas3d_primitive_form_set(sphere->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
+ evas_canvas3d_primitive_precision_set(sphere->primitive, 50);
sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(sphere->mesh,
- evas_canvas3d_mesh_from_primitive_set(0, sphere->primitive));
+ evas_canvas3d_mesh_from_primitive_set(sphere->mesh, 0, sphere->primitive);
_body_material_set(sphere, 1, 0.0, 0.0);
- sphere->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH),
- evas_canvas3d_node_position_set(3.0, 3.0, 0.0));
- eo_do(sphere->node, evas_canvas3d_node_mesh_add(sphere->mesh));
+ sphere->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH), evas_canvas3d_node_position_set(eoid, 3.0, 3.0, 0.0));
+ evas_canvas3d_node_mesh_add(sphere->node, sphere->mesh);
}
static void
_cone_setup(Body_3D *cone)
{
cone->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(cone->primitive,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CONE),
- evas_canvas3d_primitive_precision_set(50));
+ evas_canvas3d_primitive_form_set(cone->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CONE);
+ evas_canvas3d_primitive_precision_set(cone->primitive, 50);
cone->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(cone->mesh,
- evas_canvas3d_mesh_from_primitive_set(0, cone->primitive));
+ evas_canvas3d_mesh_from_primitive_set(cone->mesh, 0, cone->primitive);
_body_material_set(cone, 0.8, 0.5, 0.5);
cone->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(cone->node, evas_canvas3d_node_mesh_add(cone->mesh),
- evas_canvas3d_node_orientation_angle_axis_set(-90.0, 1.0, 0.0, 0.0),
- evas_canvas3d_node_position_set(-4.0, 0.0, -3.0));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_mesh_add(cone->node, cone->mesh);
+ evas_canvas3d_node_orientation_angle_axis_set(cone->node, -90.0, 1.0, 0.0, 0.0);
+ evas_canvas3d_node_position_set(cone->node, -4.0, 0.0, -3.0);
}
static void
_cylinder_setup(Body_3D *cylinder)
{
cylinder->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(cylinder->primitive,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER),
- evas_canvas3d_primitive_precision_set(50));
+ evas_canvas3d_primitive_form_set(cylinder->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER);
+ evas_canvas3d_primitive_precision_set(cylinder->primitive, 50);
cylinder->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(cylinder->mesh,
- evas_canvas3d_mesh_from_primitive_set(0, cylinder->primitive));
+ evas_canvas3d_mesh_from_primitive_set(cylinder->mesh, 0, cylinder->primitive);
_body_material_set(cylinder, 0.0, 0.0, 1.0);
cylinder->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(cylinder->node, evas_canvas3d_node_mesh_add(cylinder->mesh),
- evas_canvas3d_node_orientation_angle_axis_set(-90.0, 1.0, 0.0, 0.0),
- evas_canvas3d_node_position_set(-2.0, 3.0, 1.0));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_mesh_add(cylinder->node, cylinder->mesh);
+ evas_canvas3d_node_orientation_angle_axis_set(cylinder->node, -90.0, 1.0, 0.0, 0.0);
+ evas_canvas3d_node_position_set(cylinder->node, -2.0, 3.0, 1.0);
}
static void
@@ -265,228 +247,184 @@ _fence_setup(Body_3D *fence)
{
Eo *texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(texture, evas_canvas3d_texture_atlas_enable_set(EINA_FALSE));
- eo_do(texture,
- evas_canvas3d_texture_file_set(PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL),
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
- EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
- EVAS_CANVAS3D_WRAP_MODE_REPEAT));
+ evas_canvas3d_texture_atlas_enable_set(texture, EINA_FALSE);
+ evas_canvas3d_texture_file_set(texture, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL);
+ evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
+ evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
Eo *texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(texture1, evas_canvas3d_texture_atlas_enable_set(EINA_FALSE));
- eo_do(texture1,
- evas_canvas3d_texture_file_set(PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid_n.png", NULL),
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
- EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
- EVAS_CANVAS3D_WRAP_MODE_REPEAT));
+ evas_canvas3d_texture_atlas_enable_set(texture1, EINA_FALSE);
+ evas_canvas3d_texture_file_set(texture1, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid_n.png", NULL);
+ evas_canvas3d_texture_filter_set(texture1, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
+ evas_canvas3d_texture_wrap_set(texture1, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
fence->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(fence->material,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture),
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, texture),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, texture1),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(100.0));
+ evas_canvas3d_material_texture_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
+ evas_canvas3d_material_texture_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, texture);
+ evas_canvas3d_material_enable_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_enable_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
+ evas_canvas3d_material_texture_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, texture1);
+ evas_canvas3d_material_color_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_color_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_color_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(fence->material, 100.0);
fence->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(fence->primitive,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER),
- evas_canvas3d_primitive_mode_set(EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE),
- evas_canvas3d_primitive_tex_scale_set(160.0, 12.0),
- evas_canvas3d_primitive_precision_set(50));
+ evas_canvas3d_primitive_form_set(fence->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER);
+ evas_canvas3d_primitive_mode_set(fence->primitive, EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE);
+ evas_canvas3d_primitive_tex_scale_set(fence->primitive, 160.0, 12.0);
+ evas_canvas3d_primitive_precision_set(fence->primitive, 50);
fence->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(fence->mesh,
- evas_canvas3d_mesh_from_primitive_set(0, fence->primitive));
-
- eo_do(fence->mesh,
- evas_canvas3d_mesh_frame_material_set(0, fence->material),
- evas_canvas3d_mesh_alpha_func_set(EVAS_CANVAS3D_COMPARISON_GREATER, 0),
- evas_canvas3d_mesh_alpha_test_enable_set(EINA_TRUE),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP));
+ evas_canvas3d_mesh_from_primitive_set(fence->mesh, 0, fence->primitive);
+
+ evas_canvas3d_mesh_frame_material_set(fence->mesh, 0, fence->material);
+ evas_canvas3d_mesh_alpha_func_set(fence->mesh, EVAS_CANVAS3D_COMPARISON_GREATER, 0);
+ evas_canvas3d_mesh_alpha_test_enable_set(fence->mesh, EINA_TRUE);
+ evas_canvas3d_mesh_shade_mode_set(fence->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
fence->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(fence->node, evas_canvas3d_node_mesh_add(fence->mesh),
- evas_canvas3d_node_orientation_angle_axis_set(-90.0, 1.0, 0.0, 0.0),
- evas_canvas3d_node_scale_set(10.0, 10.0, 5.0),
- evas_canvas3d_node_position_set(0.0, -1.0, -2.0));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_mesh_add(fence->node, fence->mesh);
+ evas_canvas3d_node_orientation_angle_axis_set(fence->node, -90.0, 1.0, 0.0, 0.0);
+ evas_canvas3d_node_scale_set(fence->node, 10.0, 10.0, 5.0);
+ evas_canvas3d_node_position_set(fence->node, 0.0, -1.0, -2.0);
}
static void
_square_setup(Body_3D *square)
{
square->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(square->primitive,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE));
+ evas_canvas3d_primitive_form_set(square->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE);
square->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(square->mesh,
- evas_canvas3d_mesh_from_primitive_set(0, square->primitive));
+ evas_canvas3d_mesh_from_primitive_set(square->mesh, 0, square->primitive);
_body_material_set(square, 0.4, 0.4, 0.4);
square->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(square->node, evas_canvas3d_node_mesh_add(square->mesh),
- evas_canvas3d_node_position_set(0.0, -1.0, 0.0),
- evas_canvas3d_node_scale_set(30.0, 30.0, 30.0),
- evas_canvas3d_node_orientation_angle_axis_set(90.0, 1.0, 0.0, 0.0));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_mesh_add(square->node, square->mesh);
+ evas_canvas3d_node_position_set(square->node, 0.0, -1.0, 0.0);
+ evas_canvas3d_node_scale_set(square->node, 30.0, 30.0, 30.0);
+ evas_canvas3d_node_orientation_angle_axis_set(square->node, 90.0, 1.0, 0.0, 0.0);
}
static void
_box_setup(Body_3D *box)
{
box->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(box->primitive,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
+ evas_canvas3d_primitive_form_set(box->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
box->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(box->mesh,
- evas_canvas3d_mesh_from_primitive_set(0, box->primitive));
+ evas_canvas3d_mesh_from_primitive_set(box->mesh, 0, box->primitive);
_body_material_set(box, 0, 1, 0);
- box->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(box->node, evas_canvas3d_node_mesh_add(box->mesh),
- evas_canvas3d_node_position_set(3.0, 0.0, -3.0));
+ box->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_mesh_add(box->node, box->mesh);
+ evas_canvas3d_node_position_set(box->node, 3.0, 0.0, -3.0);
}
static void
_model_setup(Body_3D *model)
{
model->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(model->texture,
- evas_canvas3d_texture_file_set(image_path, NULL),
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
- EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
- EVAS_CANVAS3D_WRAP_MODE_REPEAT));
+ evas_canvas3d_texture_file_set(model->texture, image_path, NULL);
+ evas_canvas3d_texture_filter_set(model->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
+ evas_canvas3d_texture_wrap_set(model->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
model->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(model->material,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, model->texture),
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, model->texture),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
- evas_canvas3d_material_shininess_set(100.0));
+ evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, model->texture);
+ evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, model->texture);
+ evas_canvas3d_material_enable_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_shininess_set(model->material, 100.0);
model->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(model->mesh,
- efl_file_set(model_path, NULL),
- evas_canvas3d_mesh_frame_material_set(0, model->material),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
+ efl_file_set(model->mesh, model_path, NULL);
+ evas_canvas3d_mesh_frame_material_set(model->mesh, 0, model->material);
+ evas_canvas3d_mesh_shade_mode_set(model->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
model->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(model->node, evas_canvas3d_node_mesh_add(model->mesh),
- evas_canvas3d_node_scale_set(0.1, 0.1, 0.1),
- evas_canvas3d_node_orientation_angle_axis_set(120.0, -0.577, -0.577, -0.577));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_mesh_add(model->node, model->mesh);
+ evas_canvas3d_node_scale_set(model->node, 0.1, 0.1, 0.1);
+ evas_canvas3d_node_orientation_angle_axis_set(model->node, 120.0, -0.577, -0.577, -0.577);
}
static void
_billboard_setup(Scene_Data *data)
{
data->billboard.texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(data->billboard.texture,
- evas_canvas3d_texture_file_set(b_image_path, NULL),
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
- EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
- EVAS_CANVAS3D_WRAP_MODE_REPEAT));
+ evas_canvas3d_texture_file_set(data->billboard.texture, b_image_path, NULL);
+ evas_canvas3d_texture_filter_set(data->billboard.texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
+ evas_canvas3d_texture_wrap_set(data->billboard.texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
data->billboard.primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(data->billboard.primitive,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE));
+ evas_canvas3d_primitive_form_set(data->billboard.primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE);
data->billboard.mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_do(data->billboard.mesh,
- evas_canvas3d_mesh_from_primitive_set(0, data->billboard.primitive));
+ evas_canvas3d_mesh_from_primitive_set(data->billboard.mesh, 0, data->billboard.primitive);
_body_material_set(&(data->billboard), 1.0, 1.0, 1.0);
- eo_do(data->billboard.material,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->billboard.texture));
-
- eo_do(data->billboard.mesh,
- evas_canvas3d_mesh_frame_material_set(0, data->billboard.material),
- evas_canvas3d_mesh_alpha_func_set(EVAS_CANVAS3D_COMPARISON_GREATER, 0),
- evas_canvas3d_mesh_alpha_test_enable_set(EINA_TRUE),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_DIFFUSE),
- evas_canvas3d_mesh_blending_enable_set(EINA_TRUE),
- evas_canvas3d_mesh_blending_func_set(EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA,
- EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA));
-
- data->billboard.node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->billboard.node,
- evas_canvas3d_node_mesh_add(data->billboard.mesh),
- evas_canvas3d_node_position_set(0.0, 2.0, 0.0),
- evas_canvas3d_node_scale_set(2.2, 4.6, 4.0));
-
- eo_do(data->billboard.node,
- evas_canvas3d_node_billboard_target_set(data->mediator));
+ evas_canvas3d_material_texture_set(data->billboard.material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->billboard.texture);
+
+ evas_canvas3d_mesh_frame_material_set(data->billboard.mesh, 0, data->billboard.material);
+ evas_canvas3d_mesh_alpha_func_set(data->billboard.mesh, EVAS_CANVAS3D_COMPARISON_GREATER, 0);
+ evas_canvas3d_mesh_alpha_test_enable_set(data->billboard.mesh, EINA_TRUE);
+ evas_canvas3d_mesh_shade_mode_set(data->billboard.mesh, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
+ evas_canvas3d_mesh_blending_enable_set(data->billboard.mesh, EINA_TRUE);
+ evas_canvas3d_mesh_blending_func_set(data->billboard.mesh, EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA, EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA);
+
+ data->billboard.node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ evas_canvas3d_node_mesh_add(data->billboard.node, data->billboard.mesh);
+ evas_canvas3d_node_position_set(data->billboard.node, 0.0, 2.0, 0.0);
+ evas_canvas3d_node_scale_set(data->billboard.node, 2.2, 4.6, 4.0);
+
+ evas_canvas3d_node_billboard_target_set(data->billboard.node, data->mediator);
}
static void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- data->mediator = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->mediator = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
- eo_do(data->camera,
- evas_canvas3d_camera_projection_perspective_set(50.0, 1.0, 2.0, 100.0));
+ evas_canvas3d_camera_projection_perspective_set(data->camera, 50.0, 1.0, 2.0, 100.0);
data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(data->camera_node,
- evas_canvas3d_node_camera_set(data->camera));
+ evas_canvas3d_node_camera_set(data->camera_node, data->camera);
- eo_do(data->mediator,
- evas_canvas3d_node_position_set(0.0, 6.0, 12.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 3.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 5.0, 0.0));
+ evas_canvas3d_node_position_set(data->mediator, 0.0, 6.0, 12.0);
+ evas_canvas3d_node_look_at_set(data->mediator, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 3.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 5.0, 0.0);
- eo_do(data->mediator, evas_canvas3d_node_member_add(data->camera_node));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->mediator));
+ evas_canvas3d_node_member_add(data->mediator, data->camera_node);
+ evas_canvas3d_node_member_add(data->root_node, data->mediator);
}
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(data->light,
- evas_canvas3d_light_ambient_set(AMBIENT_LIGHT, 1.0),
- evas_canvas3d_light_diffuse_set(DIFFUSE_LIGHT, 1.0),
- evas_canvas3d_light_specular_set(SPECULAR_LIGHT, 1.0),
- evas_canvas3d_light_spot_cutoff_set(20),
- evas_canvas3d_light_projection_perspective_set(40.0, 1.0, 2.0, 1000.0));
+ evas_canvas3d_light_ambient_set(data->light, AMBIENT_LIGHT, 1.0);
+ evas_canvas3d_light_diffuse_set(data->light, DIFFUSE_LIGHT, 1.0);
+ evas_canvas3d_light_specular_set(data->light, SPECULAR_LIGHT, 1.0);
+ evas_canvas3d_light_spot_cutoff_set(data->light, 20);
+ evas_canvas3d_light_projection_perspective_set(data->light, 40.0, 1.0, 2.0, 1000.0);
data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(data->light_node,
- evas_canvas3d_node_light_set(data->light),
- evas_canvas3d_node_position_set(50.0, 50.0, 70.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 15.0, 0.0, -5.0,
- EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ evas_canvas3d_node_light_set(data->light_node, data->light);
+ evas_canvas3d_node_position_set(data->light_node, 50.0, 50.0, 70.0);
+ evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 15.0, 0.0, -5.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
+ evas_canvas3d_node_member_add(data->root_node, data->light_node);
}
static void
@@ -496,13 +434,11 @@ _scene_setup(Scene_Data *data)
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- eo_do(data->scene,
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
- evas_canvas3d_scene_background_color_set(BG_COLOR, 1));
+ evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
+ evas_canvas3d_scene_background_color_set(data->scene, BG_COLOR, 1);
data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@@ -517,19 +453,17 @@ _scene_setup(Scene_Data *data)
_fence_setup(&data->fence);
_billboard_setup(data);
- eo_do(data->root_node,
- evas_canvas3d_node_member_add(data->sphere.node),
- evas_canvas3d_node_member_add(data->cube.node),
- evas_canvas3d_node_member_add(data->cylinder.node),
- evas_canvas3d_node_member_add(data->square.node),
- evas_canvas3d_node_member_add(data->model.node),
- evas_canvas3d_node_member_add(data->cone.node),
- evas_canvas3d_node_member_add(data->fence.node));
-
- eo_do(data->scene,
- evas_canvas3d_scene_root_node_set(data->root_node),
- evas_canvas3d_scene_camera_node_set(data->camera_node),
- evas_canvas3d_scene_shadows_enable_set(EINA_TRUE));
+ evas_canvas3d_node_member_add(data->root_node, data->sphere.node);
+ evas_canvas3d_node_member_add(data->root_node, data->cube.node);
+ evas_canvas3d_node_member_add(data->root_node, data->cylinder.node);
+ evas_canvas3d_node_member_add(data->root_node, data->square.node);
+ evas_canvas3d_node_member_add(data->root_node, data->model.node);
+ evas_canvas3d_node_member_add(data->root_node, data->cone.node);
+ evas_canvas3d_node_member_add(data->root_node, data->fence.node);
+
+ evas_canvas3d_scene_root_node_set(data->scene, data->root_node);
+ evas_canvas3d_scene_camera_node_set(data->scene, data->camera_node);
+ evas_canvas3d_scene_shadows_enable_set(data->scene, EINA_TRUE);
}
static void
@@ -540,66 +474,66 @@ _on_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *eo EINA_U
if (!strcmp("w", ev->key))
{
Evas_Real x, y, z;
- eo_do(choosed_node, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
- eo_do(choosed_node, evas_canvas3d_node_position_set(x, y + STEP, z));
+ evas_canvas3d_node_position_get(choosed_node, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
+ evas_canvas3d_node_position_set(choosed_node, x, y + STEP, z);
}
else if(!strcmp("s", ev->key))
{
Evas_Real x, y, z;
- eo_do(choosed_node, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
- eo_do(choosed_node, evas_canvas3d_node_position_set(x, y - STEP, z));
+ evas_canvas3d_node_position_get(choosed_node, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
+ evas_canvas3d_node_position_set(choosed_node, x, y - STEP, z);
}
else if(!strcmp("a", ev->key))
{
Evas_Real x, y, z;
- eo_do(choosed_node, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
- eo_do(choosed_node, evas_canvas3d_node_position_set(x - STEP, y, z));
+ evas_canvas3d_node_position_get(choosed_node, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
+ evas_canvas3d_node_position_set(choosed_node, x - STEP, y, z);
}
else if(!strcmp("d", ev->key))
{
Evas_Real x, y, z;
- eo_do(choosed_node, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
- eo_do(choosed_node, evas_canvas3d_node_position_set(x + STEP, y, z));
+ evas_canvas3d_node_position_get(choosed_node, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
+ evas_canvas3d_node_position_set(choosed_node, x + STEP, y, z);
}
else if(!strcmp("q", ev->key))
{
Evas_Real x, y, z;
- eo_do(choosed_node, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
- eo_do(choosed_node, evas_canvas3d_node_position_set(x, y, z - STEP));
+ evas_canvas3d_node_position_get(choosed_node, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
+ evas_canvas3d_node_position_set(choosed_node, x, y, z - STEP);
}
else if(!strcmp("e", ev->key))
{
Evas_Real x, y, z;
- eo_do(choosed_node, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
- eo_do(choosed_node, evas_canvas3d_node_position_set(x, y, z + STEP));
+ evas_canvas3d_node_position_get(choosed_node, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
+ evas_canvas3d_node_position_set(choosed_node, x, y, z + STEP);
}
else if(!strcmp("1", ev->key))
{
- eo_do(scene->root_node, evas_canvas3d_node_member_del(scene->model.node));
- eo_do(scene->root_node, evas_canvas3d_node_member_add(scene->billboard.node));
+ evas_canvas3d_node_member_del(scene->root_node, scene->model.node);
+ evas_canvas3d_node_member_add(scene->root_node, scene->billboard.node);
}
else if(!strcmp("2", ev->key))
{
- eo_do(scene->root_node, evas_canvas3d_node_member_add(scene->model.node));
- eo_do(scene->root_node, evas_canvas3d_node_member_del(scene->billboard.node));
+ evas_canvas3d_node_member_add(scene->root_node, scene->model.node);
+ evas_canvas3d_node_member_del(scene->root_node, scene->billboard.node);
}
else if(!strcmp("Up", ev->key))
{
Evas_Real x, y, z;
- eo_do(scene->camera_node, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
- eo_do(scene->camera_node, evas_canvas3d_node_position_set(x, y, z + STEP));
+ evas_canvas3d_node_position_get(scene->camera_node, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
+ evas_canvas3d_node_position_set(scene->camera_node, x, y, z + STEP);
}
else if(!strcmp("Down", ev->key))
{
Evas_Real x, y, z;
- eo_do(scene->camera_node, evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
- eo_do(scene->camera_node, evas_canvas3d_node_position_set(x, y, z - STEP));
+ evas_canvas3d_node_position_get(scene->camera_node, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
+ evas_canvas3d_node_position_set(scene->camera_node, x, y, z - STEP);
}
else if (!strcmp("i", ev->key))
{
scene->init = !scene->init;
- eo_do(scene->model.node, evas_canvas3d_node_position_set(0.0, 0.0, 0.0));
- eo_do(scene->billboard.node, evas_canvas3d_node_position_set(0.0, 2.0, 0.0));
+ evas_canvas3d_node_position_set(scene->model.node, 0.0, 0.0, 0.0);
+ evas_canvas3d_node_position_set(scene->billboard.node, 0.0, 2.0, 0.0);
}
else
{
@@ -611,30 +545,30 @@ static void _init(Scene_Data *data)
{
Eina_List *meshes = NULL, *l;
Evas_Canvas3D_Mesh *m;
- eo_do(data->sphere.node, meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get());
+ meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get(data->sphere.node);
EINA_LIST_FOREACH(meshes, l, m)
{
- eo_do(m, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
+ evas_canvas3d_mesh_shade_mode_set(m, EVAS_CANVAS3D_SHADE_MODE_PHONG);
}
- eo_do(data->cube.node, meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get());
+ meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get(data->cube.node);
EINA_LIST_FOREACH(meshes, l, m)
{
- eo_do(m, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
+ evas_canvas3d_mesh_shade_mode_set(m, EVAS_CANVAS3D_SHADE_MODE_PHONG);
}
- eo_do(data->cylinder.node, meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get());
+ meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get(data->cylinder.node);
EINA_LIST_FOREACH(meshes, l, m)
{
- eo_do(m, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
+ evas_canvas3d_mesh_shade_mode_set(m, EVAS_CANVAS3D_SHADE_MODE_PHONG);
}
- eo_do(data->model.node, meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get());
+ meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get(data->model.node);
EINA_LIST_FOREACH(meshes, l, m)
{
- eo_do(m, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
+ evas_canvas3d_mesh_shade_mode_set(m, EVAS_CANVAS3D_SHADE_MODE_PHONG);
}
- eo_do(data->cone.node, meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get());
+ meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get(data->cone.node);
EINA_LIST_FOREACH(meshes, l, m)
{
- eo_do(m, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
+ evas_canvas3d_mesh_shade_mode_set(m, EVAS_CANVAS3D_SHADE_MODE_PHONG);
}
}
@@ -651,7 +585,7 @@ _on_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, voi
_init(d);
return;
}
- eo_do(d->scene, evas_canvas3d_scene_pick(ev->canvas.x, ev->canvas.y, &n, &m, &s, &t));
+ evas_canvas3d_scene_pick(d->scene, ev->canvas.x, ev->canvas.y, &n, &m, &s, &t);
}
int
@@ -677,20 +611,18 @@ main(void)
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
- eo_do(background,
- efl_gfx_color_set(0, 0, 0, 255),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_color_set(background, 0, 0, 0, 255);
+ efl_gfx_size_set(background, WIDTH, HEIGHT);
+ efl_gfx_visible_set(background, EINA_TRUE);
/* Add an image object for 3D scene rendering. */
image = evas_object_image_filled_add(evas);
- eo_do(image,
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_size_set(image, WIDTH, HEIGHT);
+ efl_gfx_visible_set(image, EINA_TRUE);
evas_object_focus_set(image, EINA_TRUE);
/* Set the image object as render target for 3D scene. */
- eo_do(image, evas_obj_image_scene_set(data.scene));
+ evas_obj_image_scene_set(image, data.scene);
nodes1 = eina_list_append(nodes1, data.sphere.node);
nodes2 = eina_list_append(nodes2, data.sphere.node);
@@ -698,14 +630,14 @@ main(void)
nodes2 = eina_list_append(nodes2, data.cone.node);
/*Set callbacks*/
- eo_do(data.cube.node, eo_event_callback_add(EVAS_CANVAS3D_OBJECT_EVENT_CLICKED, _cb_clicked, NULL));
- eo_do(data.cube.node, eo_event_callback_add(EVAS_CANVAS3D_OBJECT_EVENT_COLLISION, _cb_collision, nodes2));
+ eo_event_callback_add(data.cube.node, EVAS_CANVAS3D_OBJECT_EVENT_CLICKED, _cb_clicked, NULL);
+ eo_event_callback_add(data.cube.node, EVAS_CANVAS3D_OBJECT_EVENT_COLLISION, _cb_collision, nodes2);
- eo_do(data.model.node, eo_event_callback_add(EVAS_CANVAS3D_OBJECT_EVENT_CLICKED, _cb_clicked, NULL));
- eo_do(data.model.node, eo_event_callback_add(EVAS_CANVAS3D_OBJECT_EVENT_COLLISION, _cb_collision, nodes1));
+ eo_event_callback_add(data.model.node, EVAS_CANVAS3D_OBJECT_EVENT_CLICKED, _cb_clicked, NULL);
+ eo_event_callback_add(data.model.node, EVAS_CANVAS3D_OBJECT_EVENT_COLLISION, _cb_collision, nodes1);
- eo_do(data.billboard.node, eo_event_callback_add(EVAS_CANVAS3D_OBJECT_EVENT_CLICKED, _cb_clicked, NULL));
- eo_do(data.billboard.node, eo_event_callback_add(EVAS_CANVAS3D_OBJECT_EVENT_COLLISION, _cb_collision, nodes1));
+ eo_event_callback_add(data.billboard.node, EVAS_CANVAS3D_OBJECT_EVENT_CLICKED, _cb_clicked, NULL);
+ eo_event_callback_add(data.billboard.node, EVAS_CANVAS3D_OBJECT_EVENT_COLLISION, _cb_collision, nodes1);
evas_object_event_callback_add(image, EVAS_CALLBACK_MOUSE_DOWN, _on_mouse_down, &data);
evas_object_event_callback_add(image, EVAS_CALLBACK_KEY_DOWN, _on_key_down, &data);
diff --git a/src/examples/evas/evas-object-manipulation-eo.c b/src/examples/evas/evas-object-manipulation-eo.c
index 9f17ee8313..bcd825cb97 100644
--- a/src/examples/evas/evas-object-manipulation-eo.c
+++ b/src/examples/evas/evas-object-manipulation-eo.c
@@ -59,7 +59,7 @@ _canvas_resize_cb(Ecore_Evas *ee)
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- eo_do(d.bg, efl_gfx_size_set(w, h));
+ efl_gfx_size_set(d.bg, w, h);
}
static void
@@ -80,7 +80,7 @@ _on_keydown(void *data EINA_UNUSED,
{
int alpha, r, g, b;
- eo_do(d.clipper, efl_gfx_color_get(&r, &g, &b, &alpha));
+ efl_gfx_color_get(d.clipper, &r, &g, &b, &alpha);
evas_color_argb_unpremul(alpha, &r, &g, &b);
alpha -= 20;
@@ -88,7 +88,7 @@ _on_keydown(void *data EINA_UNUSED,
alpha = 255;
evas_color_argb_premul(alpha, &r, &g, &b);
- eo_do(d.clipper, efl_gfx_color_set(r, g, b, alpha));
+ efl_gfx_color_set(d.clipper, r, g, b, alpha);
fprintf(stdout, "Changing clipper's opacity: %d%%\n",
(int)((alpha / 255.0) * 100));
@@ -102,7 +102,7 @@ _on_keydown(void *data EINA_UNUSED,
fprintf(stdout, "Changing clipper's color to");
- eo_do(d.clipper, efl_gfx_color_get(&r, &g, &b, &alpha));
+ efl_gfx_color_get(d.clipper, &r, &g, &b, &alpha);
evas_color_argb_unpremul(alpha, &r, &g, &b);
if (g > 0)
@@ -117,7 +117,7 @@ _on_keydown(void *data EINA_UNUSED,
}
evas_color_argb_premul(alpha, &r, &g, &b);
- eo_do(d.clipper, efl_gfx_color_set(r, g, b, alpha));
+ efl_gfx_color_set(d.clipper, r, g, b, alpha);
return;
}
@@ -126,15 +126,15 @@ _on_keydown(void *data EINA_UNUSED,
fprintf(stdout, "Toggling clipping ");
Evas_Object *clip = NULL;
- eo_do(d.img, clip = evas_obj_clip_get());
+ clip = evas_obj_clip_get(d.img);
if (clip == d.clipper)
{
- eo_do(d.img, evas_obj_clip_unset());
+ evas_obj_clip_unset(d.img);
fprintf(stdout, "off\n");
}
else
{
- eo_do(d.img, evas_obj_clip_set(d.clipper));
+ evas_obj_clip_set(d.img, d.clipper);
fprintf(stdout, "on\n");
}
return;
@@ -145,8 +145,8 @@ _on_keydown(void *data EINA_UNUSED,
Eina_Bool visibility;
/* Don't use "get"-"set" expressions in one eo_do call,
* if you pass parameter to "set" by value. */
- eo_do(d.clipper, visibility = efl_gfx_visible_get());
- eo_do(d.clipper, efl_gfx_visible_set(!visibility));
+ visibility = efl_gfx_visible_get(d.clipper);
+ efl_gfx_visible_set(d.clipper, !visibility);
fprintf(stdout, "Clipper is now %s\n", visibility ? "hidden" : "visible");
return;
}
@@ -177,12 +177,15 @@ main(void)
d.bg = eo_add(EVAS_RECTANGLE_CLASS, d.canvas);
/* Eo-styled way to perform actions on an object*/
- eo_do(d.bg, evas_obj_name_set("background rectangle"),
- efl_gfx_color_set(255, 255, 255, 255), /* white bg */
- efl_gfx_position_set(0, 0), /* at canvas' origin */
- efl_gfx_size_set(WIDTH, HEIGHT), /* covers full canvas */
- efl_gfx_visible_set(EINA_TRUE),
- evas_obj_focus_set(EINA_TRUE));
+ evas_obj_name_set(d.bg, "background rectangle");
+ efl_gfx_color_set(d.bg, 255, 255, 255, 255);
+ /* white bg */
+ efl_gfx_position_set(d.bg, 0, 0);
+ /* at canvas' origin */
+ efl_gfx_size_set(d.bg, WIDTH, HEIGHT);
+ /* covers full canvas */
+ efl_gfx_visible_set(d.bg, EINA_TRUE);
+ evas_obj_focus_set(d.bg, EINA_TRUE);
evas_object_event_callback_add(
d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL);
@@ -194,9 +197,9 @@ main(void)
* So it's possible to decrement refcount, and 'image' object
* will be deleted automatically by parent.*/
- eo_do(d.img, evas_obj_image_filled_set(EINA_TRUE),
- efl_file_set(img_path, NULL),
- err = evas_obj_image_load_error_get());
+ evas_obj_image_filled_set(d.img, EINA_TRUE);
+ efl_file_set(d.img, img_path, NULL);
+ err = evas_obj_image_load_error_get(d.img);
if (err != EVAS_LOAD_ERROR_NONE)
{
@@ -204,20 +207,20 @@ main(void)
}
else
{
- eo_do(d.img, efl_gfx_position_set(0, 0),
- efl_gfx_size_set(WIDTH, HEIGHT),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_position_set(d.img, 0, 0);
+ efl_gfx_size_set(d.img, WIDTH, HEIGHT);
+ efl_gfx_visible_set(d.img, EINA_TRUE);
const char *type = NULL;
- eo_do(d.img, type = evas_obj_type_get());
+ type = evas_obj_type_get(d.img);
fprintf(stdout, "Image object added, type is: %s\n", type);
}
/* border on the image's clipper, here just to emphasize its position */
d.clipper_border = eo_add(EVAS_IMAGE_CLASS, d.canvas);
- eo_do(d.clipper_border, evas_obj_image_filled_set(EINA_TRUE),
- efl_file_set(border_img_path, NULL),
- err = evas_obj_image_load_error_get());
+ evas_obj_image_filled_set(d.clipper_border, EINA_TRUE);
+ efl_file_set(d.clipper_border, border_img_path, NULL);
+ err = evas_obj_image_load_error_get(d.clipper_border);
if (err != EVAS_LOAD_ERROR_NONE)
{
@@ -225,24 +228,22 @@ main(void)
}
else
{
- eo_do(d.clipper_border,
- evas_obj_image_border_set(3, 3, 3, 3),
- evas_obj_image_border_center_fill_set(EVAS_BORDER_FILL_NONE),
- efl_gfx_position_set((WIDTH / 4) -3, (HEIGHT / 4) - 3),
- efl_gfx_size_set((WIDTH / 2) + 6, (HEIGHT / 2) + 6),
- efl_gfx_visible_set(EINA_TRUE));
+ evas_obj_image_border_set(d.clipper_border, 3, 3, 3, 3);
+ evas_obj_image_border_center_fill_set(d.clipper_border, EVAS_BORDER_FILL_NONE);
+ efl_gfx_position_set(d.clipper_border, (WIDTH / 4) -3, (HEIGHT / 4) - 3);
+ efl_gfx_size_set(d.clipper_border, (WIDTH / 2) + 6, (HEIGHT / 2) + 6);
+ efl_gfx_visible_set(d.clipper_border, EINA_TRUE);
}
/* solid white clipper (note that it's the default color for a
* rectangle) - it won't change clippees' colors, then (multiplying
* by 255) */
d.clipper = eo_add(EVAS_RECTANGLE_CLASS, d.canvas);
- eo_do(d.clipper,
- efl_gfx_position_set( WIDTH / 4, HEIGHT / 4),
- efl_gfx_size_set(WIDTH / 2, HEIGHT / 2),
- efl_gfx_visible_set(EINA_TRUE));
+ efl_gfx_position_set(d.clipper, WIDTH / 4, HEIGHT / 4);
+ efl_gfx_size_set(d.clipper, WIDTH / 2, HEIGHT / 2);
+ efl_gfx_visible_set(d.clipper, EINA_TRUE);
- eo_do(d.img, evas_obj_clip_set(d.clipper));
+ evas_obj_clip_set(d.img, d.clipper);
fprintf(stdout, "%s", commands);
diff --git a/src/examples/evas/evas-vg-simple.c b/src/examples/evas/evas-vg-simple.c
index 17416ebfaa..2c0c7026b0 100644
--- a/src/examples/evas/evas-vg-simple.c
+++ b/src/examples/evas/evas-vg-simple.c
@@ -447,21 +447,17 @@ vector_set(int x, int y, int w, int h)
eina_matrix3_rotate(&matrix, radian);
root = evas_object_vg_root_node_get(d.vg);
- //eo_do(root, evas_vg_node_transformation_set(&matrix));
+ //evas_vg_node_transformation_set(root, &matrix);
- Efl_VG *bg = eo_add(EFL_VG_SHAPE_CLASS, root,
- efl_vg_name_set("bg"));
+ Efl_VG *bg = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "bg"));
_rect_add(bg, 0, 0 , vg_w, vg_h);
evas_vg_node_origin_set(bg, 0,0);
evas_vg_shape_stroke_width_set(bg, 1.0);
evas_vg_node_color_set(bg, 80, 80, 80, 80);
- Efl_VG *shape = eo_add(EFL_VG_SHAPE_CLASS, root,
- efl_vg_name_set("shape"));
- Efl_VG *rgradient = eo_add(EFL_VG_GRADIENT_RADIAL_CLASS, NULL,
- efl_vg_name_set("rgradient"));
- Efl_VG *lgradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, NULL,
- efl_vg_name_set("lgradient"));
+ Efl_VG *shape = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "shape"));
+ Efl_VG *rgradient = eo_add(EFL_VG_GRADIENT_RADIAL_CLASS, NULL, efl_vg_name_set(eoid, "rgradient"));
+ Efl_VG *lgradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, NULL, efl_vg_name_set(eoid, "lgradient"));
_arcto(shape, 0, 0, 100, 100, 25, 330);
@@ -502,8 +498,7 @@ vector_set(int x, int y, int w, int h)
evas_vg_node_color_set(shape, 0, 0, 255, 255);
evas_vg_shape_stroke_color_set(shape, 0, 0, 255, 128);
- Efl_VG *rect = eo_add(EFL_VG_SHAPE_CLASS, root,
- efl_vg_name_set("rect"));
+ Efl_VG *rect = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "rect"));
_rect_add(rect, 0, 0, 100, 100);
evas_vg_node_origin_set(rect, 100, 100);
evas_vg_shape_fill_set(rect, lgradient);
@@ -511,8 +506,7 @@ vector_set(int x, int y, int w, int h)
evas_vg_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND);
evas_vg_shape_stroke_color_set(rect, 255, 255, 255, 255);
- Efl_VG *rect1 = eo_add(EFL_VG_SHAPE_CLASS, root,
- efl_vg_name_set("rect1"));
+ Efl_VG *rect1 = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "rect1"));
_rect_add(rect1, 0, 0, 70, 70);
evas_vg_node_origin_set(rect1, 50, 70);
evas_vg_shape_stroke_scale_set(rect1, 2);
@@ -520,8 +514,7 @@ vector_set(int x, int y, int w, int h)
evas_vg_shape_stroke_join_set(rect1, EFL_GFX_JOIN_ROUND);
evas_vg_shape_stroke_color_set(rect1, 0, 100, 80, 100);
- Efl_VG *circle = eo_add(EFL_VG_SHAPE_CLASS, root,
- efl_vg_name_set("circle"));
+ Efl_VG *circle = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "circle"));
_arcto(circle, 0, 0, 250, 100, 30, 300);
evas_vg_shape_fill_set(circle, lgradient);
//evas_vg_node_transformation_set(&matrix),
@@ -529,35 +522,30 @@ vector_set(int x, int y, int w, int h)
evas_vg_node_color_set(circle, 50, 0, 0, 50);
// Foreground
- Efl_VG *fg = eo_add(EFL_VG_SHAPE_CLASS, root,
- efl_vg_name_set("fg"));
+ Efl_VG *fg = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "fg"));
_rect_add(fg, 0, 0, vg_w, vg_h);
evas_vg_node_origin_set(fg, 0, 0);
evas_vg_shape_stroke_width_set(fg, 5.0);
evas_vg_shape_stroke_join_set(fg, EFL_GFX_JOIN_ROUND);
evas_vg_shape_stroke_color_set(fg, 70, 70, 0, 70);
- Efl_VG *tst = eo_add(EFL_VG_SHAPE_CLASS, root,
- efl_vg_name_set("tst"));
+ Efl_VG *tst = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "tst"));
evas_vg_shape_shape_append_rect(tst, 50, 25, 200, 200, 3, 5);
evas_vg_node_color_set(tst, 0, 0, 200, 200);
evas_vg_shape_stroke_width_set(tst, 2);
evas_vg_shape_stroke_color_set(tst, 255, 0, 0, 255);
- Efl_VG *vc = eo_add(EFL_VG_SHAPE_CLASS, root,
- efl_vg_name_set("vc"));
+ Efl_VG *vc = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "vc"));
evas_vg_shape_shape_append_circle(vc, 100, 100, 23);
evas_vg_node_color_set(vc, 0, 200, 0, 255);
evas_vg_shape_stroke_width_set(vc, 4);
evas_vg_shape_stroke_color_set(vc, 255, 0, 0, 255);
- beginning = eo_add(EFL_VG_CONTAINER_CLASS, NULL,
- efl_vg_dup(root));
- end = eo_add(EFL_VG_CONTAINER_CLASS, NULL,
- efl_vg_dup(root));
+ beginning = eo_add(EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(eoid, root));
+ end = eo_add(EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(eoid, root));
- eo_do(end, circle = efl_vg_container_child_get("circle"));
- eo_do(circle, efl_vg_transformation_set(&matrix));
+ circle = efl_vg_container_child_get(end, "circle");
+ efl_vg_transformation_set(circle, &matrix);
}
static Eina_Bool
@@ -578,7 +566,7 @@ _anim(void *data EINA_UNUSED)
pos = ecore_animator_pos_map((now - start_time) / 3, ECORE_POS_MAP_SINUSOIDAL, 0, 0);
- eo_do(root, efl_vg_interpolate(beginning, end, pos));
+ efl_vg_interpolate(root, beginning, end, pos);
return EINA_TRUE;
}
@@ -600,7 +588,7 @@ _keydown(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, Evas_Object *o EINA_UNU
ecore_animator_del(anim);
anim = NULL;
}
- /* eo_do(root, efl_vg_interpolate(beginning, end, 0.5)); */
+ /* efl_vg_interpolate(root, beginning, end, 0.5); */
}
fprintf(stderr, "key: [%s]\n", ev->key);
}
diff --git a/src/examples/evas/shooter/evas-3d-shooter-header.c b/src/examples/evas/shooter/evas-3d-shooter-header.c
index 894df546f0..ee608ba2f9 100644
--- a/src/examples/evas/shooter/evas-3d-shooter-header.c
+++ b/src/examples/evas/shooter/evas-3d-shooter-header.c
@@ -14,7 +14,7 @@ evas_box3_set(Box3 *box, Evas_Real x0, Evas_Real y0, Evas_Real z0, Evas_Real x1,
void
_scale(Evas_Canvas3D_Node *node, Evas_Real scale)
{
- eo_do(node, evas_canvas3d_node_scale_set(1.0 * scale, 1.0 * scale, 1.0 * scale));
+ evas_canvas3d_node_scale_set(node, 1.0 * scale, 1.0 * scale, 1.0 * scale);
}
float
@@ -27,21 +27,17 @@ void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_do(data->camera,
- evas_canvas3d_camera_projection_perspective_set(65.0, 1.0, 1.0, 300.0));
+ evas_canvas3d_camera_projection_perspective_set(data->camera, 65.0, 1.0, 1.0, 300.0);
- data->mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
- data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ data->mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->mediator_node));
- eo_do(data->mediator_node, evas_canvas3d_node_member_add(data->camera_node));
+ evas_canvas3d_node_member_add(data->root_node, data->mediator_node);
+ evas_canvas3d_node_member_add(data->mediator_node, data->camera_node);
- eo_do(data->camera_node,
- evas_canvas3d_node_camera_set(data->camera),
- evas_canvas3d_node_position_set(20.0, 80.0, 30.0);
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
+ evas_canvas3d_node_camera_set(data->camera_node, data->camera);
+ evas_canvas3d_node_position_set(data->camera_node, 20.0, 80.0, 30.0);
+ evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
}
void
@@ -49,21 +45,18 @@ _light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
- eo_do(data->light,
- evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_light_specular_set(0.2, 0.2, 0.2, 1.0),
- evas_canvas3d_light_projection_perspective_set(100.0, 1.0, 1.0, 200.0));
+ evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_light_specular_set(data->light, 0.2, 0.2, 0.2, 1.0);
+ evas_canvas3d_light_projection_perspective_set(data->light, 100.0, 1.0, 1.0, 200.0);
- data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_do(data->light_node,
- evas_canvas3d_node_light_set(data->light),
- evas_canvas3d_node_position_set(-30.0, 70.0, 0.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
+ evas_canvas3d_node_light_set(data->light_node, data->light);
+ evas_canvas3d_node_position_set(data->light_node, -30.0, 70.0, 0.0);
+ evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
- eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node));
+ evas_canvas3d_node_member_add(data->root_node, data->light_node);
}
Eina_Bool _mesh_aabb(Evas_Canvas3D_Mesh **mesh, Scene_Data *scene, int index)
@@ -96,15 +89,12 @@ Eina_Bool _mesh_aabb(Evas_Canvas3D_Mesh **mesh, Scene_Data *scene, int index)
else if (fmod(index, 12) == 11)
node = scene->mesh_node_snake;
- eo_do(node,
- evas_canvas3d_node_bounding_sphere_get(&x0, &y0, &z0, &r));
+ evas_canvas3d_node_bounding_sphere_get(node, &x0, &y0, &z0, &r);
- eo_do(scene->mesh_node_ball,
- evas_canvas3d_node_scale_set(r, r, r),
- evas_canvas3d_node_position_set(x0, y0, z0));
+ evas_canvas3d_node_scale_set(scene->mesh_node_ball, r, r, r);
+ evas_canvas3d_node_position_set(scene->mesh_node_ball, x0, y0, z0);
- eo_do(node,
- evas_canvas3d_node_bounding_box_get(&x0, &y0, &z0, &x1, &y1, &z1));
+ evas_canvas3d_node_bounding_box_get(node, &x0, &y0, &z0, &x1, &y1, &z1);
float vertixes[] =
{
@@ -151,10 +141,9 @@ Eina_Bool _mesh_aabb(Evas_Canvas3D_Mesh **mesh, Scene_Data *scene, int index)
if (*mesh)
{
- eo_do(*mesh,
- evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES),
- evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 6 * sizeof(float), &vertixes[ 0]),
- evas_canvas3d_mesh_index_data_copy_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, 48, &indixes[0]));
+ evas_canvas3d_mesh_vertex_assembly_set(*mesh, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(*mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 6 * sizeof(float), &vertixes[ 0]);
+ evas_canvas3d_mesh_index_data_copy_set(*mesh, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, 48, &indixes[0]);
return EINA_TRUE;
}
@@ -183,8 +172,7 @@ Eina_Bool _horizontal_circle_resolution(Evas_Canvas3D_Node *node, Evas_Real x, E
{
Evas_Real x0, y0, z0, x1, y1, z1;
- eo_do(node,
- evas_canvas3d_node_bounding_box_get(&x0, &y0, &z0, &x1, &y1, &z1));
+ evas_canvas3d_node_bounding_box_get(node, &x0, &y0, &z0, &x1, &y1, &z1);
if (((x0 - x) * (x0 - x)) + ((z0 - z) * (z0 - z)) < r * r) return EINA_FALSE;
if (((x0 - x) * (x0 - x)) + ((z1 - z) * (z1 - z)) < r * r) return EINA_FALSE;
@@ -207,10 +195,8 @@ Eina_Bool _horizontal_circle_object_resolution(Evas_Canvas3D_Node *node, Evas_Ca
{
Evas_Real x0, y0, z0, x1, y1, z1, x, y, z;
- eo_do(node2,
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_WORLD, &x, &y, &z));
- eo_do(node,
- evas_canvas3d_node_bounding_box_get(&x0, &y0, &z0, &x1, &y1, &z1));
+ evas_canvas3d_node_position_get(node2, EVAS_CANVAS3D_SPACE_WORLD, &x, &y, &z);
+ evas_canvas3d_node_bounding_box_get(node, &x0, &y0, &z0, &x1, &y1, &z1);
if (((x0 - x) * (x0 - x)) + ((z0 - z) * (z0 - z)) < r * r) return EINA_FALSE;
if (((x0 - x) * (x0 - x)) + ((z1 - z) * (z1 - z)) < r * r) return EINA_FALSE;
@@ -233,8 +219,7 @@ Eina_Bool _horizontal_circle_position_resolution(Evas_Canvas3D_Node *node, Evas_
{
Evas_Real x0, y0, z0;
- eo_do(node,
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x0, &y0, &z0));
+ evas_canvas3d_node_position_get(node, EVAS_CANVAS3D_SPACE_PARENT, &x0, &y0, &z0);
if (((x0 - x) * (x0 - x)) + ((z0 - z) * (z0 - z)) < r * r) return EINA_FALSE;
@@ -245,8 +230,7 @@ Eina_Bool _horizontal_position_resolution(Evas_Canvas3D_Node *node, Evas_Real x,
{
Evas_Real x0, y0, z0, x1, y1, z1;
- eo_do(node,
- evas_canvas3d_node_bounding_box_get(&x0, &y0, &z0, &x1, &y1, &z1));
+ evas_canvas3d_node_bounding_box_get(node, &x0, &y0, &z0, &x1, &y1, &z1);
if ((x > x0) && (x < x1) && (z > z0) && (z < z1))
return EINA_FALSE;
@@ -266,8 +250,7 @@ Eina_Bool _horizontal_object_resolution(Evas_Canvas3D_Node *node, Evas_Real x1,
{
Evas_Real x3, y3, z3, x4, y4, z4;
- eo_do(node,
- evas_canvas3d_node_bounding_box_get(&x3, &y3, &z3, &x4, &y4, &z4));
+ evas_canvas3d_node_bounding_box_get(node, &x3, &y3, &z3, &x4, &y4, &z4);
if ((x4 + x_move < x1) || (x4 + x_move > x2) ||
(z4 + z_move < z1) || (z4 + z_move > z2))
@@ -285,8 +268,7 @@ Eina_Bool _horizontal_frame_resolution(Evas_Canvas3D_Node *node, Evas_Real x1, E
*x_move = 0;
*z_move = 0;
- eo_do(node,
- evas_canvas3d_node_bounding_box_get(&x3, &y3, &z3, &x4, &y4, &z4));
+ evas_canvas3d_node_bounding_box_get(node, &x3, &y3, &z3, &x4, &y4, &z4);
if (x3 < x1)
*x_move = x1 - x3;
@@ -364,14 +346,11 @@ _set_ball(Eo *mesh, int p)
_generate_square_grid(indices, p);
- eo_do(mesh, evas_canvas3d_mesh_vertex_count_set(vcount),
- evas_canvas3d_mesh_frame_add(0);
- evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION,
- sizeof(vec3), &vertices[0]);
- evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL,
- sizeof(vec3), &normals[0]);
- evas_canvas3d_mesh_index_data_copy_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT,
- icount , &indices[0]));
+ evas_canvas3d_mesh_vertex_count_set(mesh, vcount);
+ evas_canvas3d_mesh_frame_add(mesh, 0);
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, sizeof(vec3), &vertices[0]);
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, sizeof(vec3), &normals[0]);
+ evas_canvas3d_mesh_index_data_copy_set(mesh, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, icount, &indices[0]);
free(vertices);
free(normals);
diff --git a/src/examples/evas/shooter/evas-3d-shooter-macros.h b/src/examples/evas/shooter/evas-3d-shooter-macros.h
index e19a507f17..cae6417ea2 100644
--- a/src/examples/evas/shooter/evas-3d-shooter-macros.h
+++ b/src/examples/evas/shooter/evas-3d-shooter-macros.h
@@ -110,111 +110,98 @@ typedef struct _vec2
#define ENABLE_FOG(mesh) \
- eo_do(mesh, evas_canvas3d_mesh_fog_enable_set(EINA_TRUE), \
- evas_canvas3d_mesh_fog_color_set(FOG_COLOR, FOG_FACTOR));
+ evas_canvas3d_mesh_fog_enable_set(mesh, EINA_TRUE); \
+ evas_canvas3d_mesh_fog_color_set(mesh, FOG_COLOR, FOG_FACTOR);
#define DISABLE_FOG(mesh) \
- eo_do(mesh, evas_canvas3d_mesh_fog_enable_set(EINA_FALSE));
+ evas_canvas3d_mesh_fog_enable_set(mesh, EINA_FALSE);
#define ENABLE_NORMAL(mesh) \
- eo_do(mesh, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP));
+ evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
#define DISABLE_NORMAL(mesh) \
- eo_do(mesh, evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
+ evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
#define ADD_MESH(Object, Name, a, d, s) \
data->material_##Object = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); \
\
- eo_do(data->material_##Object, \
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), \
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), \
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE), \
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE), \
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, a, a, a, 1.0), \
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, d, d, d, 1.0), \
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, s, s, s, 1.0), \
- evas_canvas3d_material_shininess_set(50.0)); \
+ evas_canvas3d_material_enable_set(data->material_##Object, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); \
+ evas_canvas3d_material_enable_set(data->material_##Object, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); \
+ evas_canvas3d_material_enable_set(data->material_##Object, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE); \
+ evas_canvas3d_material_enable_set(data->material_##Object, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE); \
+ evas_canvas3d_material_color_set(data->material_##Object, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, a, a, a, 1.0); \
+ evas_canvas3d_material_color_set(data->material_##Object, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, d, d, d, 1.0); \
+ evas_canvas3d_material_color_set(data->material_##Object, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, s, s, s, 1.0); \
+ evas_canvas3d_material_shininess_set(data->material_##Object, 50.0); \
\
data->mesh_##Name = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
#define SETUP_DEFAULT_MESH(Object, Name, Shade_Mode) \
- eo_do(data->mesh_##Name, \
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_##Shade_Mode), \
- evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES), \
- evas_canvas3d_mesh_frame_material_set(0, data->material_##Object));
+ evas_canvas3d_mesh_shade_mode_set(data->mesh_##Name, EVAS_CANVAS3D_SHADE_MODE_##Shade_Mode); \
+ evas_canvas3d_mesh_vertex_assembly_set(data->mesh_##Name, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES); \
+ evas_canvas3d_mesh_frame_material_set(data->mesh_##Name, 0, data->material_##Object);
#define SETUP_MESH_NODE(Name) \
- data->mesh_node_##Name = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, \
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); \
+ data->mesh_node_##Name = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); \
\
- eo_do(data->mesh_node_##Name, \
- evas_canvas3d_node_mesh_add(data->mesh_##Name));
+ evas_canvas3d_node_mesh_add(data->mesh_node_##Name, data->mesh_##Name);
#define MATERIAL_TEXTURE_SET(Object, Name, file, image) \
- eo_do(data->mesh_##Name, \
- efl_file_set(file, NULL)); \
+ efl_file_set(data->mesh_##Name, file, NULL); \
\
SETUP_DEFAULT_MESH(Object, Name, PHONG) \
data->texture_diffuse_##Object = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
\
- eo_do(data->texture_diffuse_##Object, \
- evas_canvas3d_texture_atlas_enable_set(EINA_FALSE), \
- evas_canvas3d_texture_file_set(image, NULL), \
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
- EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST), \
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT)); \
+ evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_##Object, EINA_FALSE); \
+ evas_canvas3d_texture_file_set(data->texture_diffuse_##Object, image, NULL); \
+ evas_canvas3d_texture_filter_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
+ EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \
+ evas_canvas3d_texture_wrap_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); \
\
- eo_do(data->material_##Object, \
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, \
- data->texture_diffuse_##Object), \
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, \
- data->texture_diffuse_##Object));
+ evas_canvas3d_material_texture_set(data->material_##Object, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, \
+ data->texture_diffuse_##Object); \
+ evas_canvas3d_material_texture_set(data->material_##Object, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, \
+ data->texture_diffuse_##Object);
#define CUBE_TEXTURE_SET(Object, Name, vertex, image) \
- eo_do(data->mesh_##Name, \
- evas_canvas3d_mesh_from_primitive_set(0, data->cube_primitive), \
- evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, \
- 2 * sizeof(float), vertex)); \
+ evas_canvas3d_mesh_from_primitive_set(data->mesh_##Name, 0, data->cube_primitive); \
+ evas_canvas3d_mesh_frame_vertex_data_set(data->mesh_##Name, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, \
+ 2 * sizeof(float), vertex); \
SETUP_DEFAULT_MESH(Object, Name, NORMAL_MAP) \
data->texture_diffuse_##Object = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
\
- eo_do(data->texture_diffuse_##Object, \
- evas_canvas3d_texture_atlas_enable_set(EINA_FALSE), \
- evas_canvas3d_texture_file_set(image, NULL), \
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
- EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST), \
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT)); \
+ evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_##Object, EINA_FALSE); \
+ evas_canvas3d_texture_file_set(data->texture_diffuse_##Object, image, NULL); \
+ evas_canvas3d_texture_filter_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
+ EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \
+ evas_canvas3d_texture_wrap_set(data->texture_diffuse_##Object, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); \
\
- eo_do(data->material_##Object, \
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, \
- data->texture_diffuse_##Object), \
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, \
- data->texture_diffuse_##Object));
+ evas_canvas3d_material_texture_set(data->material_##Object, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, \
+ data->texture_diffuse_##Object); \
+ evas_canvas3d_material_texture_set(data->material_##Object, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, \
+ data->texture_diffuse_##Object);
#define NORMAL_SET(Object, Name, normal) \
data->texture_normal_##Object = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
\
- eo_do(data->texture_normal_##Object, \
- evas_canvas3d_texture_atlas_enable_set(EINA_FALSE), \
- evas_canvas3d_texture_file_set(normal, NULL), \
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
- EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST), \
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT)); \
+ evas_canvas3d_texture_atlas_enable_set(data->texture_normal_##Object, EINA_FALSE); \
+ evas_canvas3d_texture_file_set(data->texture_normal_##Object, normal, NULL); \
+ evas_canvas3d_texture_filter_set(data->texture_normal_##Object, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
+ EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \
+ evas_canvas3d_texture_wrap_set(data->texture_normal_##Object, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); \
\
- eo_do(data->material_##Object, \
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, \
- data->texture_normal_##Object)); \
+ evas_canvas3d_material_texture_set(data->material_##Object, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, \
+ data->texture_normal_##Object); \
\
- eo_do(data->mesh_##Name, \
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP));
+ evas_canvas3d_mesh_shade_mode_set(data->mesh_##Name, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
#define TEXTCOORDS_SET(Name, fb1, fb2, lr1, lr2, tb1, tb2) \
static float Name##_textcoords[] = \
diff --git a/src/examples/evas/shooter/evas-3d-shooter.c b/src/examples/evas/shooter/evas-3d-shooter.c
index fac65a3412..9ea9ceb1a4 100644
--- a/src/examples/evas/shooter/evas-3d-shooter.c
+++ b/src/examples/evas/shooter/evas-3d-shooter.c
@@ -115,8 +115,7 @@ _key_down(void *data,
{
if (space_move == 0.0)
{
- eo_do(scene->mesh_node_tommy,
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
+ evas_canvas3d_node_position_get(scene->mesh_node_tommy, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
old_space_position = y;
space_move = JUMP;
}
@@ -134,19 +133,15 @@ _key_down(void *data,
if (!scene->blending)
{
scene->blending = EINA_TRUE;
- eo_do(scene->texture_diffuse_carpet,
- evas_canvas3d_texture_file_set(gazebo_t_trans_path, NULL));
- eo_do(scene->mesh_carpet,
- evas_canvas3d_mesh_blending_enable_set(EINA_TRUE),
- evas_canvas3d_mesh_blending_func_set(EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA, EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA));
+ evas_canvas3d_texture_file_set(scene->texture_diffuse_carpet, gazebo_t_trans_path, NULL);
+ evas_canvas3d_mesh_blending_enable_set(scene->mesh_carpet, EINA_TRUE);
+ evas_canvas3d_mesh_blending_func_set(scene->mesh_carpet, EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA, EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA);
}
else
{
scene->blending = EINA_FALSE;
- eo_do(scene->texture_diffuse_carpet,
- evas_canvas3d_texture_file_set(gazebo_t_path, NULL));
- eo_do(scene->mesh_carpet,
- evas_canvas3d_mesh_blending_enable_set(EINA_FALSE));
+ evas_canvas3d_texture_file_set(scene->texture_diffuse_carpet, gazebo_t_path, NULL);
+ evas_canvas3d_mesh_blending_enable_set(scene->mesh_carpet, EINA_FALSE);
}
}
else if (!strcmp(ev->key, "S"))
@@ -154,14 +149,12 @@ _key_down(void *data,
if (!scene->blending)
{
scene->blending = EINA_TRUE;
- eo_do(global_scene,
- evas_canvas3d_scene_shadows_enable_set(EINA_TRUE));
+ evas_canvas3d_scene_shadows_enable_set(global_scene, EINA_TRUE);
}
else
{
scene->blending = EINA_FALSE;
- eo_do(global_scene,
- evas_canvas3d_scene_shadows_enable_set(EINA_FALSE));
+ evas_canvas3d_scene_shadows_enable_set(global_scene, EINA_FALSE);
}
}
else if (!strcmp(ev->key, "F"))
@@ -257,13 +250,11 @@ _key_down(void *data,
}
}
else if (!strcmp(ev->key, "F1"))
- eo_do(scene->camera_node,
- evas_canvas3d_node_position_set(0.0, 80.0, 30.0);
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
+ evas_canvas3d_node_position_set(scene->camera_node, 0.0, 80.0, 30.0);
+ evas_canvas3d_node_look_at_set(scene->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
else if (!strcmp(ev->key, "F2"))
- eo_do(scene->camera_node,
- evas_canvas3d_node_position_set(-2.0, 0.0, 4.0),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, -100.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
+ evas_canvas3d_node_position_set(scene->camera_node, -2.0, 0.0, 4.0);
+ evas_canvas3d_node_look_at_set(scene->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, -100.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
else if (!strcmp(ev->key, "A"))
aabb_index++;
}
@@ -308,27 +299,22 @@ _animate_camera(void *data)
x_move_lateral = camera_move * sin((angle_camera + 90) * TO_RADIAN);
z_move_lateral = camera_move * cos((angle_camera + 90) * TO_RADIAN);
- eo_do(scene->mediator_node,
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_WORLD, &x, &y, &z));
+ evas_canvas3d_node_position_get(scene->mediator_node, EVAS_CANVAS3D_SPACE_WORLD, &x, &y, &z);
- eo_do(scene->mesh_node_world,
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x1, &y1, &z1));
+ evas_canvas3d_node_position_get(scene->mesh_node_world, EVAS_CANVAS3D_SPACE_PARENT, &x1, &y1, &z1);
- eo_do(scene->mesh_node_tommy,
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x2, &y2, &z2));
+ evas_canvas3d_node_position_get(scene->mesh_node_tommy, EVAS_CANVAS3D_SPACE_PARENT, &x2, &y2, &z2);
if (fall_speed != 0)
{
if (y - fall_speed < 0)
{
- eo_do(scene->mediator_node,
- evas_canvas3d_node_position_set(x, 0, z));
+ evas_canvas3d_node_position_set(scene->mediator_node, x, 0, z);
fall_speed = 0.0;
}
else
{
- eo_do(scene->mediator_node,
- evas_canvas3d_node_position_set(x, y - fall_speed, z));
+ evas_canvas3d_node_position_set(scene->mediator_node, x, y - fall_speed, z);
fall_speed += FALL_SPEED_UP;
}
}
@@ -354,10 +340,8 @@ _animate_camera(void *data)
_horizontal_circle_position_resolution(scene->mesh_node_column[2], x + x_move, z + z_move, SOLDIER_RADIUS) &&
_horizontal_circle_position_resolution(scene->mesh_node_column[3], x + x_move, z + z_move, SOLDIER_RADIUS))
{
- eo_do(scene->mediator_node,
- evas_canvas3d_node_position_set(x + x_move, y, z + z_move));
- eo_do(scene->mesh_node_world,
- evas_canvas3d_node_position_set(x1 + x_move, y1, z1 + z_move));
+ evas_canvas3d_node_position_set(scene->mediator_node, x + x_move, y, z + z_move);
+ evas_canvas3d_node_position_set(scene->mesh_node_world, x1 + x_move, y1, z1 + z_move);
}
}
else if ((SOLDIER_FRAME_X1 < x + x_move_lateral) && (x + x_move_lateral < SOLDIER_FRAME_X2) &&
@@ -381,27 +365,22 @@ _animate_camera(void *data)
_horizontal_circle_position_resolution(scene->mesh_node_column[2], x + x_move_lateral, z + z_move_lateral, SOLDIER_RADIUS) &&
_horizontal_circle_position_resolution(scene->mesh_node_column[3], x + x_move_lateral, z + z_move_lateral, SOLDIER_RADIUS))
{
- eo_do(scene->mediator_node,
- evas_canvas3d_node_position_set(x + x_move_lateral, y, z + z_move_lateral));
- eo_do(scene->mesh_node_world,
- evas_canvas3d_node_position_set(x1 + x_move_lateral, y1, z1 + z_move_lateral));
+ evas_canvas3d_node_position_set(scene->mediator_node, x + x_move_lateral, y, z + z_move_lateral);
+ evas_canvas3d_node_position_set(scene->mesh_node_world, x1 + x_move_lateral, y1, z1 + z_move_lateral);
}
}
- eo_do(scene->mediator_node,
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
+ evas_canvas3d_node_position_get(scene->mediator_node, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
if (!_horizontal_position_resolution(scene->mesh_node_level[step_indicator+1], x, z))
{
- eo_do(scene->mediator_node,
- evas_canvas3d_node_position_set(x, y + STEP, z));
+ evas_canvas3d_node_position_set(scene->mediator_node, x, y + STEP, z);
old_space_position += STEP;
step_indicator++;
}
else if (!_horizontal_position_resolution(scene->mesh_node_level[step_indicator-1], x, z) && step_indicator > 0)
{
- eo_do(scene->mediator_node,
- evas_canvas3d_node_position_set(x, y - STEP, z));
+ evas_canvas3d_node_position_set(scene->mediator_node, x, y - STEP, z);
old_space_position -= STEP;
step_indicator--;
}
@@ -411,14 +390,11 @@ _animate_camera(void *data)
step_indicator = 0;
}
- eo_do(scene->mediator_node,
- evas_canvas3d_node_orientation_angle_axis_set(angle_camera, 0, 1.0, 0.0),
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
+ evas_canvas3d_node_orientation_angle_axis_set(scene->mediator_node, angle_camera, 0, 1.0, 0.0);
+ evas_canvas3d_node_position_get(scene->mediator_node, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
- eo_do(scene->mesh_node_warrior,
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x1, &y1, &z1));
- eo_do(scene->mesh_node_snake,
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x2, &y2, &z2));
+ evas_canvas3d_node_position_get(scene->mesh_node_warrior, EVAS_CANVAS3D_SPACE_PARENT, &x1, &y1, &z1);
+ evas_canvas3d_node_position_get(scene->mesh_node_snake, EVAS_CANVAS3D_SPACE_PARENT, &x2, &y2, &z2);
float snake_x = (x2 - x) / _distance(x, z, x2, z2);
float snake_z = (z2 - z) / _distance(x, z, x2, z2);
@@ -432,11 +408,9 @@ _animate_camera(void *data)
_horizontal_circle_object_resolution(scene->mesh_node_warrior, scene->mesh_node_column[2], COLUMN_RADIUS) &&
_horizontal_circle_object_resolution(scene->mesh_node_warrior, scene->mesh_node_column[3], COLUMN_RADIUS) &&
_horizontal_circle_object_resolution(scene->mesh_node_level[0], scene->mesh_node_warrior, COLUMN_RADIUS))
- eo_do(scene->mesh_node_warrior,
- evas_canvas3d_node_position_set((x - x1) * WARRIOR_SPEED + x1, y1, (z - z1) * WARRIOR_SPEED + z1));
+ evas_canvas3d_node_position_set(scene->mesh_node_warrior, (x - x1) * WARRIOR_SPEED + x1, y1, (z - z1) * WARRIOR_SPEED + z1);
else
- eo_do(scene->mesh_node_warrior,
- evas_canvas3d_node_position_set((z - z1) * WARRIOR_SPEED2 + x1, y1, -(x - x1) * WARRIOR_SPEED2 + z1));
+ evas_canvas3d_node_position_set(scene->mesh_node_warrior, (z - z1) * WARRIOR_SPEED2 + x1, y1, -(x - x1) * WARRIOR_SPEED2 + z1);
}
/* if soldier is looking at the snake */
@@ -447,44 +421,34 @@ _animate_camera(void *data)
{
if ((_horizontal_object_resolution(scene->mesh_node_snake, SNAKE_FRAME_X1, SNAKE_FRAME_Z1,
SNAKE_FRAME_X2, SNAKE_FRAME_Z2, snake_z * SNAKE_SPEED, -snake_x * SNAKE_SPEED)))
- eo_do(scene->mesh_node_snake,
- evas_canvas3d_node_position_set(snake_z * SNAKE_SPEED + x2, y2, -snake_x * SNAKE_SPEED + z2));
+ evas_canvas3d_node_position_set(scene->mesh_node_snake, snake_z * SNAKE_SPEED + x2, y2, -snake_x * SNAKE_SPEED + z2);
else if (_horizontal_circle_resolution(scene->mesh_node_snake, (x2 - x) * SNAKE_SPEED2 + x,
(z2 - z) * SNAKE_SPEED2 + z, SOLDIER_RADIUS))
- eo_do(scene->mesh_node_snake,
- evas_canvas3d_node_position_set((x - x2) * SNAKE_SPEED2 + x2, y2, (z - z2) * SNAKE_SPEED2 + z2));
+ evas_canvas3d_node_position_set(scene->mesh_node_snake, (x - x2) * SNAKE_SPEED2 + x2, y2, (z - z2) * SNAKE_SPEED2 + z2);
}
/* if snake is located at the right hand of the soldier */
else
{
if ((_horizontal_object_resolution(scene->mesh_node_snake, SNAKE_FRAME_X1, SNAKE_FRAME_Z1,
SNAKE_FRAME_X2, SNAKE_FRAME_Z2, -snake_z * SNAKE_SPEED, snake_x * SNAKE_SPEED)))
- eo_do(scene->mesh_node_snake,
- evas_canvas3d_node_position_set(-snake_z * SNAKE_SPEED + x2, y2, snake_x * SNAKE_SPEED + z2));
+ evas_canvas3d_node_position_set(scene->mesh_node_snake, -snake_z * SNAKE_SPEED + x2, y2, snake_x * SNAKE_SPEED + z2);
else if (_horizontal_circle_resolution(scene->mesh_node_snake, (x2 - x) * SNAKE_SPEED2 + x,
(z2 - z) * SNAKE_SPEED2 + z, SOLDIER_RADIUS))
- eo_do(scene->mesh_node_snake,
- evas_canvas3d_node_position_set((x - x2) * SNAKE_SPEED2 + x2, y2, (z - z2) * SNAKE_SPEED2 + z2));
+ evas_canvas3d_node_position_set(scene->mesh_node_snake, (x - x2) * SNAKE_SPEED2 + x2, y2, (z - z2) * SNAKE_SPEED2 + z2);
}
}
else if (_horizontal_circle_resolution(scene->mesh_node_snake, (x2 - x) * SNAKE_SPEED2 + x, (z2 - z) * SNAKE_SPEED2 + z, SOLDIER_RADIUS))
- eo_do(scene->mesh_node_snake,
- evas_canvas3d_node_position_set((x - x2) * SNAKE_SPEED2 + x2, y2, (z - z2) * SNAKE_SPEED2 + z2));
+ evas_canvas3d_node_position_set(scene->mesh_node_snake, (x - x2) * SNAKE_SPEED2 + x2, y2, (z - z2) * SNAKE_SPEED2 + z2);
- eo_do(scene->mesh_node_snake,
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x2, &y2, &z2));
+ evas_canvas3d_node_position_get(scene->mesh_node_snake, EVAS_CANVAS3D_SPACE_PARENT, &x2, &y2, &z2);
- eo_do(scene->mesh_node_warrior,
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, -1000.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT,
- (z - z1) / _distance(x, z, x1, z1), 0, (x1 - x) / _distance(x, z, x1, z1)));
+ evas_canvas3d_node_look_at_set(scene->mesh_node_warrior, EVAS_CANVAS3D_SPACE_PARENT, 0.0, -1000.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, (z - z1) / _distance(x, z, x1, z1), 0, (x1 - x) / _distance(x, z, x1, z1));
- eo_do(scene->mesh_node_snake,
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 2 * x2 - x, y2, 2 * z2 - z, EVAS_CANVAS3D_SPACE_PARENT, 0, 1, 0));
+ evas_canvas3d_node_look_at_set(scene->mesh_node_snake, EVAS_CANVAS3D_SPACE_PARENT, 2 * x2 - x, y2, 2 * z2 - z, EVAS_CANVAS3D_SPACE_PARENT, 0, 1, 0);
if (!_horizontal_frame_resolution(scene->mesh_node_snake, SNAKE_FRAME_X1, SNAKE_FRAME_Z1,
SNAKE_FRAME_X2, SNAKE_FRAME_Z2, &x_move, &z_move))
- eo_do(scene->mesh_node_snake,
- evas_canvas3d_node_position_set(x2 + x_move, y2, z2 + z_move));
+ evas_canvas3d_node_position_set(scene->mesh_node_snake, x2 + x_move, y2, z2 + z_move);
return EINA_TRUE;
}
@@ -509,22 +473,18 @@ _animate_scene_gun(void *data)
/* rocket and gun movement */
angle_eagle += d_angle_eagle;
- eo_do(scene->mesh_node_eagle,
- frame_eagle = evas_canvas3d_node_mesh_frame_get(scene->mesh_eagle));
+ frame_eagle = evas_canvas3d_node_mesh_frame_get(scene->mesh_node_eagle, scene->mesh_eagle);
if (frame_eagle > 19500) frame_eagle = 0;
frame_eagle += 150;
- eo_do(scene->mesh_node_snake,
- frame_snake = evas_canvas3d_node_mesh_frame_get(scene->mesh_snake));
+ frame_snake = evas_canvas3d_node_mesh_frame_get(scene->mesh_node_snake, scene->mesh_snake);
if (frame_snake > 16000) frame_snake = 0;
frame_snake += 64;
- eo_do(scene->mesh_node_eagle,
- evas_canvas3d_node_orientation_angle_axis_set(angle_eagle, 0.0, 1.0, 0.0),
- /* equation of eagle flight */
- evas_canvas3d_node_position_set(38 * sin((angle_eagle + 90) * TO_RADIAN), 20 + 20 * sin(angle_eagle * TO_RADIAN),
- -10 + 20.0 * cos((angle_eagle + 90) * TO_RADIAN)),
- evas_canvas3d_node_mesh_frame_set(scene->mesh_eagle, frame_eagle));
+ evas_canvas3d_node_orientation_angle_axis_set(scene->mesh_node_eagle, angle_eagle, 0.0, 1.0, 0.0);
+ /* equation of eagle flight */
+ evas_canvas3d_node_position_set(scene->mesh_node_eagle, 38 * sin((angle_eagle + 90) * TO_RADIAN), 20 + 20 * sin(angle_eagle * TO_RADIAN), -10 + 20.0 * cos((angle_eagle + 90) * TO_RADIAN));
+ evas_canvas3d_node_mesh_frame_set(scene->mesh_node_eagle, scene->mesh_eagle, frame_eagle);
for (i = 0; i < 10; i ++)
{
@@ -536,15 +496,13 @@ _animate_scene_gun(void *data)
else if (rocket_indicator[i] == 1)
{
_scale(scene->mesh_node_rocket[i], 0.4);
- eo_do(scene->material_rocket[i],
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.8, 0.8, 0.8, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.2, 0.2, 0.0, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.5, 0.5, 0.5, 1.0));
+ evas_canvas3d_material_color_set(scene->material_rocket[i], EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.8, 0.8, 0.8, 1.0);
+ evas_canvas3d_material_color_set(scene->material_rocket[i], EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.2, 0.2, 0.0, 1.0);
+ evas_canvas3d_material_color_set(scene->material_rocket[i], EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.5, 0.5, 0.5, 1.0);
rocket_indicator[i] = 2;
- eo_do(scene->mesh_node_rocket[i],
- evas_canvas3d_node_position_set(ROCKET_POS_X, ROCKET_POS_Y, ROCKET_POS_Z));
+ evas_canvas3d_node_position_set(scene->mesh_node_rocket[i], ROCKET_POS_X, ROCKET_POS_Y, ROCKET_POS_Z);
rocket_parametr[i] = 0;
}
else if (rocket_indicator[i] == 2)
@@ -552,33 +510,27 @@ _animate_scene_gun(void *data)
rocket_parametr[i] += ROCKET_SPEED;
/* equation of rocket flight */
- eo_do(scene->mesh_node_rocket[i],
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_WORLD, &x, &y, &z));
+ evas_canvas3d_node_position_get(scene->mesh_node_rocket[i], EVAS_CANVAS3D_SPACE_WORLD, &x, &y, &z);
if ((ROCKET_FRAME_X1 < x) && (x < ROCKET_FRAME_X2) && (ROCKET_FRAME_Z1 < z) && (z < ROCKET_FRAME_Z2))
- eo_do(scene->mesh_node_rocket[i],
- evas_canvas3d_node_position_set(ROCKET_POS_X, ROCKET_POS_Y, ROCKET_POS_Z - rocket_parametr[i]));
+ evas_canvas3d_node_position_set(scene->mesh_node_rocket[i], ROCKET_POS_X, ROCKET_POS_Y, ROCKET_POS_Z - rocket_parametr[i]);
else
rocket_indicator[i] = 3;
/* the way to stop the rocket */
- eo_do(scene->mesh_node_warrior,
- evas_canvas3d_node_bounding_box_get(&x, &y, &z, &x1, &y1, &z1));
+ evas_canvas3d_node_bounding_box_get(scene->mesh_node_warrior, &x, &y, &z, &x1, &y1, &z1);
evas_box3_set(&boxy, x, y, z, x1, y1, z1);
- eo_do(scene->mesh_node_rocket[i],
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
+ evas_canvas3d_node_position_get(scene->mesh_node_rocket[i], EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
- eo_do(scene->mediator_node,
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x1, &y1, &z1));
+ evas_canvas3d_node_position_get(scene->mediator_node, EVAS_CANVAS3D_SPACE_PARENT, &x1, &y1, &z1);
if (((z * sinus + x * cosinus + x1) >= boxy.p0.x) && ((z * sinus + x * cosinus + x1) <= boxy.p1.x) &&
((z * cosinus - x * sinus + z1) >= boxy.p0.z) && ((z * cosinus - x * sinus + z1) <= boxy.p1.z))
{
- eo_do(scene->material_rocket[i],
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.8, 0.8, 0.8, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.9, 0.1, 0.1, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.5, 0.5, 0.5, 1.0));
+ evas_canvas3d_material_color_set(scene->material_rocket[i], EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.8, 0.8, 0.8, 1.0);
+ evas_canvas3d_material_color_set(scene->material_rocket[i], EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.9, 0.1, 0.1, 1.0);
+ evas_canvas3d_material_color_set(scene->material_rocket[i], EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.5, 0.5, 0.5, 1.0);
_scale(scene->mesh_node_rocket[i], 4.5);
rocket_indicator[i] = 3;
@@ -589,18 +541,14 @@ _animate_scene_gun(void *data)
if (tommy_indicator == 1)
{
tommy_indicator = 2;
- eo_do(scene->mesh_node_tommy,
- evas_canvas3d_node_position_set(TOMMY_POS_X, TOMMY_POS_Y, TOMMY_POS_Z));
+ evas_canvas3d_node_position_set(scene->mesh_node_tommy, TOMMY_POS_X, TOMMY_POS_Y, TOMMY_POS_Z);
tommy_parametr = 0.0;
}
/* parametric equations of gun movement, (GUN_DIR_X, GUN_DIR_Y, GUN_DIR_Z) is direction vector */
else if (tommy_indicator == 2)
{
tommy_parametr += GUN_SPEED;
- eo_do(scene->mesh_node_tommy,
- evas_canvas3d_node_position_set(TOMMY_POS_X + GUN_DIR_X * tommy_parametr,
- TOMMY_POS_Y + GUN_DIR_Y * tommy_parametr,
- TOMMY_POS_Z + GUN_DIR_Z * tommy_parametr));
+ evas_canvas3d_node_position_set(scene->mesh_node_tommy, TOMMY_POS_X + GUN_DIR_X * tommy_parametr, TOMMY_POS_Y + GUN_DIR_Y * tommy_parametr, TOMMY_POS_Z + GUN_DIR_Z * tommy_parametr);
if (TOMMY_POS_Z + GUN_DIR_Z * tommy_parametr >= -8.3)
tommy_indicator = 3;
@@ -608,13 +556,9 @@ _animate_scene_gun(void *data)
else if (tommy_indicator == 3)
{
tommy_parametr-= GUN_SPEED / 2;
- eo_do(scene->mesh_node_tommy,
- evas_canvas3d_node_position_set(TOMMY_POS_X + GUN_DIR_X * tommy_parametr,
- TOMMY_POS_Y + GUN_DIR_Y * tommy_parametr,
- TOMMY_POS_Z + GUN_DIR_Z * tommy_parametr));
+ evas_canvas3d_node_position_set(scene->mesh_node_tommy, TOMMY_POS_X + GUN_DIR_X * tommy_parametr, TOMMY_POS_Y + GUN_DIR_Y * tommy_parametr, TOMMY_POS_Z + GUN_DIR_Z * tommy_parametr);
- eo_do(scene->mesh_node_tommy,
- evas_canvas3d_node_position_get(EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z));
+ evas_canvas3d_node_position_get(scene->mesh_node_tommy, EVAS_CANVAS3D_SPACE_PARENT, &x, &y, &z);
if (z <= TOMMY_POS_Z)
{
tommy_indicator = 4;
@@ -624,59 +568,44 @@ _animate_scene_gun(void *data)
if (angle_eagle > 360.0) angle -= 360.0f;
- eo_do(scene->mesh_node_warrior,
- evas_canvas3d_node_mesh_frame_set(scene->mesh_warrior, frame));
+ evas_canvas3d_node_mesh_frame_set(scene->mesh_node_warrior, scene->mesh_warrior, frame);
- eo_do(scene->mesh_node_snake,
- evas_canvas3d_node_mesh_frame_set(scene->mesh_snake, frame_snake));
+ evas_canvas3d_node_mesh_frame_set(scene->mesh_node_snake, scene->mesh_snake, frame_snake);
if (space_move && (soldier_mode == 0))
{
- eo_do(scene->mesh_node_soldier,
- evas_canvas3d_node_mesh_add(scene->mesh_soldier_jump),
- evas_canvas3d_node_mesh_del(scene->mesh_soldier),
- evas_canvas3d_node_mesh_frame_set(scene->mesh_soldier_jump, 0));
+ evas_canvas3d_node_mesh_add(scene->mesh_node_soldier, scene->mesh_soldier_jump);
+ evas_canvas3d_node_mesh_del(scene->mesh_node_soldier, scene->mesh_soldier);
+ evas_canvas3d_node_mesh_frame_set(scene->mesh_node_soldier, scene->mesh_soldier_jump, 0);
soldier_mode = 1;
- eo_do(scene->mesh_node_tommy,
- evas_canvas3d_node_position_set(TOMMY_JUMP_X, TOMMY_JUMP_Y, TOMMY_JUMP_Z),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 1000.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT,
- 0, 0, 1));
+ evas_canvas3d_node_position_set(scene->mesh_node_tommy, TOMMY_JUMP_X, TOMMY_JUMP_Y, TOMMY_JUMP_Z);
+ evas_canvas3d_node_look_at_set(scene->mesh_node_tommy, EVAS_CANVAS3D_SPACE_PARENT, 1000.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0, 0, 1);
}
else if (soldier_mode == 1)
{
- eo_do(scene->mesh_node_soldier,
- frame_soldier = evas_canvas3d_node_mesh_frame_get(scene->mesh_soldier_jump));
+ frame_soldier = evas_canvas3d_node_mesh_frame_get(scene->mesh_node_soldier, scene->mesh_soldier_jump);
frame_soldier += 124;
- eo_do(scene->mesh_node_soldier,
- evas_canvas3d_node_mesh_frame_set(scene->mesh_soldier_jump, frame_soldier));
+ evas_canvas3d_node_mesh_frame_set(scene->mesh_node_soldier, scene->mesh_soldier_jump, frame_soldier);
if (frame_soldier < 2480)
- eo_do(scene->mesh_node_tommy,
- evas_canvas3d_node_position_set(TOMMY_JUMP_X, TOMMY_JUMP_Y + 4.5 * frame_soldier / 2480, TOMMY_JUMP_Z));
+ evas_canvas3d_node_position_set(scene->mesh_node_tommy, TOMMY_JUMP_X, TOMMY_JUMP_Y + 4.5 * frame_soldier / 2480, TOMMY_JUMP_Z);
else
- eo_do(scene->mesh_node_tommy,
- evas_canvas3d_node_position_set(TOMMY_JUMP_X, TOMMY_JUMP_Y + 4.5 * (4960 - frame_soldier) / 2480, TOMMY_JUMP_Z));
+ evas_canvas3d_node_position_set(scene->mesh_node_tommy, TOMMY_JUMP_X, TOMMY_JUMP_Y + 4.5 * (4960 - frame_soldier) / 2480, TOMMY_JUMP_Z);
if (frame_soldier > 4960)
{
- eo_do(scene->mesh_node_soldier,
- evas_canvas3d_node_mesh_del(scene->mesh_soldier_jump));
- eo_do(scene->mesh_node_soldier,
- evas_canvas3d_node_mesh_add(scene->mesh_soldier),
- evas_canvas3d_node_mesh_frame_set(scene->mesh_soldier, 0));
+ evas_canvas3d_node_mesh_del(scene->mesh_node_soldier, scene->mesh_soldier_jump);
+ evas_canvas3d_node_mesh_add(scene->mesh_node_soldier, scene->mesh_soldier);
+ evas_canvas3d_node_mesh_frame_set(scene->mesh_node_soldier, scene->mesh_soldier, 0);
soldier_mode = 0;
- eo_do(scene->mesh_node_tommy,
- evas_canvas3d_node_position_set(TOMMY_POS_X, TOMMY_POS_Y, TOMMY_POS_Z),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, -1000.0, 0.0,
- EVAS_CANVAS3D_SPACE_PARENT, 2, 0, 1.5));
+ evas_canvas3d_node_position_set(scene->mesh_node_tommy, TOMMY_POS_X, TOMMY_POS_Y, TOMMY_POS_Z);
+ evas_canvas3d_node_look_at_set(scene->mesh_node_tommy, EVAS_CANVAS3D_SPACE_PARENT, 0.0, -1000.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 2, 0, 1.5);
}
}
else if (camera_move)
{
- eo_do(scene->mesh_node_soldier,
- frame_soldier = evas_canvas3d_node_mesh_frame_get(scene->mesh_soldier));
+ frame_soldier = evas_canvas3d_node_mesh_frame_get(scene->mesh_node_soldier, scene->mesh_soldier);
frame_soldier += 124;
if (frame_soldier > 6200) frame_soldier = 0;
- eo_do(scene->mesh_node_soldier,
- evas_canvas3d_node_mesh_frame_set(scene->mesh_soldier, frame_soldier));
+ evas_canvas3d_node_mesh_frame_set(scene->mesh_node_soldier, scene->mesh_soldier, frame_soldier);
}
/* create bounding box */
@@ -723,8 +652,7 @@ _reload_camera(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, voi
Evas_Canvas3D_Mesh *m;
Evas_Real s, t;
- eo_do(global_scene,
- evas_canvas3d_scene_pick(ev->canvas.x, ev->canvas.y, &n, &m, &s, &t));
+ evas_canvas3d_scene_pick(global_scene, ev->canvas.x, ev->canvas.y, &n, &m, &s, &t);
d_angle_camera = 0;
if (n || m)
@@ -772,14 +700,12 @@ _mesh_setup_gun_planet(Scene_Data *data)
/* Setup material and texture for world. */
ADD_MESH(world, world, 0.5, 0.5, 1.0);
- eo_do(data->mesh_world,
- evas_canvas3d_mesh_from_primitive_set(0, data->sphere_primitive));
+ evas_canvas3d_mesh_from_primitive_set(data->mesh_world, 0, data->sphere_primitive);
SETUP_DEFAULT_MESH(world, world, DIFFUSE);
SETUP_MESH_NODE(world);
- eo_do(data->mesh_node_world,
- evas_canvas3d_node_scale_set(350, 350, 350),
- evas_canvas3d_node_position_set(0.0, 0.0, 0.0));
+ evas_canvas3d_node_scale_set(data->mesh_node_world, 350, 350, 350);
+ evas_canvas3d_node_position_set(data->mesh_node_world, 0.0, 0.0, 0.0);
/* Setup material and texture for player */
@@ -788,14 +714,11 @@ _mesh_setup_gun_planet(Scene_Data *data)
SETUP_MESH_NODE(soldier)
- eo_do(data->mesh_node_soldier,
- evas_canvas3d_node_position_set(0, -10, 0),
- evas_canvas3d_node_scale_set(5, 5, 5));
+ evas_canvas3d_node_position_set(data->mesh_node_soldier, 0, -10, 0);
+ evas_canvas3d_node_scale_set(data->mesh_node_soldier, 5, 5, 5);
- eo_do(data->mesh_node_soldier,
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, -10.0, -100.0, EVAS_CANVAS3D_SPACE_PARENT,
- 0, 1, 0),
- evas_canvas3d_node_mesh_frame_set(data->mesh_soldier, 0));
+ evas_canvas3d_node_look_at_set(data->mesh_node_soldier, EVAS_CANVAS3D_SPACE_PARENT, 0.0, -10.0, -100.0, EVAS_CANVAS3D_SPACE_PARENT, 0, 1, 0);
+ evas_canvas3d_node_mesh_frame_set(data->mesh_node_soldier, data->mesh_soldier, 0);
ADD_MESH(soldier, soldier_jump, 1.0, 1.0, 1.0)
MATERIAL_TEXTURE_SET(soldier, soldier_jump, soldier_jump_path, soldier_tex_path)
@@ -804,17 +727,14 @@ _mesh_setup_gun_planet(Scene_Data *data)
ADD_MESH(tommy, tommy, 0.0, 0.3, 1.0)
SETUP_MESH_NODE(tommy)
- eo_do(data->mesh_tommy,
- efl_file_set(gun_path, NULL),
- efl_file_save("try.obj", NULL, NULL),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
- evas_canvas3d_mesh_frame_material_set(0, data->material_tommy));
-
- eo_do(data->mesh_node_tommy,
- evas_canvas3d_node_scale_set(1.5, 1.5, 1.5),
- evas_canvas3d_node_position_set(TOMMY_POS_X, TOMMY_POS_Y, TOMMY_POS_Z),
- evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, -1000.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT,
- 2, 0, 1.5));
+ efl_file_set(data->mesh_tommy, gun_path, NULL);
+ efl_file_save(data->mesh_tommy, "try.obj", NULL, NULL);
+ evas_canvas3d_mesh_shade_mode_set(data->mesh_tommy, EVAS_CANVAS3D_SHADE_MODE_PHONG);
+ evas_canvas3d_mesh_frame_material_set(data->mesh_tommy, 0, data->material_tommy);
+
+ evas_canvas3d_node_scale_set(data->mesh_node_tommy, 1.5, 1.5, 1.5);
+ evas_canvas3d_node_position_set(data->mesh_node_tommy, TOMMY_POS_X, TOMMY_POS_Y, TOMMY_POS_Z);
+ evas_canvas3d_node_look_at_set(data->mesh_node_tommy, EVAS_CANVAS3D_SPACE_PARENT, 0.0, -1000.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 2, 0, 1.5);
/* Setup material and texture for gazebo */
@@ -823,10 +743,9 @@ _mesh_setup_gun_planet(Scene_Data *data)
MATERIAL_TEXTURE_SET(gazebo, gazebo, gazebo_bot_path, gazebo_b_path)
NORMAL_SET(gazebo, gazebo, gazebo_b_n_path)
- eo_do(data->mesh_node_gazebo,
- evas_canvas3d_node_scale_set(0.18, 0.18, 0.18),
- evas_canvas3d_node_orientation_angle_axis_set(180, 0.0, 1.0, 0.0),
- evas_canvas3d_node_position_set(-20, -10, -35));
+ evas_canvas3d_node_scale_set(data->mesh_node_gazebo, 0.18, 0.18, 0.18);
+ evas_canvas3d_node_orientation_angle_axis_set(data->mesh_node_gazebo, 180, 0.0, 1.0, 0.0);
+ evas_canvas3d_node_position_set(data->mesh_node_gazebo, -20, -10, -35);
/* Setup material and texture for carpet */
@@ -837,38 +756,32 @@ _mesh_setup_gun_planet(Scene_Data *data)
if (data->blending)
{
- eo_do(data->texture_diffuse_carpet,
- evas_canvas3d_texture_atlas_enable_set(EINA_FALSE),
- evas_canvas3d_texture_file_set(gazebo_t_trans_path, NULL));
- eo_do(data->mesh_carpet,
- evas_canvas3d_mesh_blending_enable_set(EINA_TRUE),
- evas_canvas3d_mesh_blending_func_set(EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA, EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA));
+ evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_carpet, EINA_FALSE);
+ evas_canvas3d_texture_file_set(data->texture_diffuse_carpet, gazebo_t_trans_path, NULL);
+ evas_canvas3d_mesh_blending_enable_set(data->mesh_carpet, EINA_TRUE);
+ evas_canvas3d_mesh_blending_func_set(data->mesh_carpet, EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA, EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA);
}
- eo_do(data->mesh_node_carpet,
- evas_canvas3d_node_scale_set(0.18, 0.18, 0.18),
- evas_canvas3d_node_position_set(-20, -10, -35));
+ evas_canvas3d_node_scale_set(data->mesh_node_carpet, 0.18, 0.18, 0.18);
+ evas_canvas3d_node_position_set(data->mesh_node_carpet, -20, -10, -35);
/* Setup material and texture for eagle. */
ADD_MESH(eagle, eagle, 0.01, 1.0, 1.0)
SETUP_MESH_NODE(eagle)
MATERIAL_TEXTURE_SET(eagle, eagle, eagle_path, eagle_tex_path)
- eo_do(data->mesh_node_eagle,
- evas_canvas3d_node_scale_set(0.1, 0.1, 0.1),
- evas_canvas3d_node_position_set(-20, 20, 0));
+ evas_canvas3d_node_scale_set(data->mesh_node_eagle, 0.1, 0.1, 0.1);
+ evas_canvas3d_node_position_set(data->mesh_node_eagle, -20, 20, 0);
/* Set material for bounding box */
ADD_MESH(cube, cube, 0.01, 1.0, 1.0)
- eo_do(data->mesh_cube, evas_canvas3d_mesh_frame_add(0));
+ evas_canvas3d_mesh_frame_add(data->mesh_cube, 0);
SETUP_DEFAULT_MESH(cube, cube, DIFFUSE);
SETUP_MESH_NODE(cube)
- eo_do(data->mesh_cube,
- evas_canvas3d_mesh_index_data_set(EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT,
- 36, &cube_indices[0]),
- evas_canvas3d_mesh_vertex_count_set(24),
- evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES));
+ evas_canvas3d_mesh_index_data_set(data->mesh_cube, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, 36, &cube_indices[0]);
+ evas_canvas3d_mesh_vertex_count_set(data->mesh_cube, 24);
+ evas_canvas3d_mesh_vertex_assembly_set(data->mesh_cube, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
/* Setup mesh for column carpet */
@@ -878,30 +791,27 @@ _mesh_setup_gun_planet(Scene_Data *data)
CUBE_TEXTURE_SET(column_c, column_c, cube_textcoords, red_brick_path)
NORMAL_SET(column_c, column_c, red_brick_n_path)
- eo_do(data->mesh_node_column_c,
- evas_canvas3d_node_orientation_angle_axis_set(90, 0, 1.0, 0.0),
- evas_canvas3d_node_scale_set(96.0, 1.6 , 4.8 ),
- evas_canvas3d_node_position_set(10 , 9.0, -12));
+ evas_canvas3d_node_orientation_angle_axis_set(data->mesh_node_column_c, 90, 0, 1.0, 0.0);
+ evas_canvas3d_node_scale_set(data->mesh_node_column_c, 96.0, 1.6, 4.8);
+ evas_canvas3d_node_position_set(data->mesh_node_column_c, 10, 9.0, -12);
/* Setup mesh for bounding sphere */
data->material_ball = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(data->material_ball,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.0, 5.0, 1.0, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(50.0));
+ evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_color_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.0, 5.0, 1.0, 1.0);
+ evas_canvas3d_material_color_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(data->material_ball, 50.0);
data->mesh_ball = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
_set_ball(data->mesh_ball, 10);
- eo_do(data->mesh_ball,
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_DIFFUSE),
- evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES),
- evas_canvas3d_mesh_frame_material_set(0, data->material_ball));
+ evas_canvas3d_mesh_shade_mode_set(data->mesh_ball, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
+ evas_canvas3d_mesh_vertex_assembly_set(data->mesh_ball, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
+ evas_canvas3d_mesh_frame_material_set(data->mesh_ball, 0, data->material_ball);
SETUP_MESH_NODE(ball)
@@ -921,26 +831,22 @@ _mesh_setup_wall(Scene_Data *data, int index)
/* placing of wall carpet on the floor grid */
if (index == 0)
- eo_do(data->mesh_node_wall[index],
- evas_canvas3d_node_scale_set(6.7 * 19.5, 20.0, 2.0),
- evas_canvas3d_node_position_set(-39.7 + 18.6 * 3, 0.0, -60.3));
+ evas_canvas3d_node_scale_set(data->mesh_node_wall[index], 6.7 * 19.5, 20.0, 2.0);
+ evas_canvas3d_node_position_set(data->mesh_node_wall[index], -39.7 + 18.6 * 3, 0.0, -60.3);
else if (index == 1)
{
- eo_do(data->mesh_node_wall[index],
- evas_canvas3d_node_scale_set(5 * 19.5, 20.0, 2.0),
- evas_canvas3d_node_position_set(81.2, 0.0, -51.5 + 19.5 * 2),
- evas_canvas3d_node_orientation_angle_axis_set(90, 0, 1.0, 0.0));
+ evas_canvas3d_node_scale_set(data->mesh_node_wall[index], 5 * 19.5, 20.0, 2.0);
+ evas_canvas3d_node_position_set(data->mesh_node_wall[index], 81.2, 0.0, -51.5 + 19.5 * 2);
+ evas_canvas3d_node_orientation_angle_axis_set(data->mesh_node_wall[index], 90, 0, 1.0, 0.0);
}
else if (index == 2)
- eo_do(data->mesh_node_wall[index],
- evas_canvas3d_node_scale_set(6.7 * 19.5, 20.0, 2.0),
- evas_canvas3d_node_position_set(-39.7 + 18.6*3, 0.0, 35.3));
+ evas_canvas3d_node_scale_set(data->mesh_node_wall[index], 6.7 * 19.5, 20.0, 2.0);
+ evas_canvas3d_node_position_set(data->mesh_node_wall[index], -39.7 + 18.6*3, 0.0, 35.3);
else if (index == 3)
{
- eo_do(data->mesh_node_wall[index],
- evas_canvas3d_node_scale_set(5* 19.5, 20.0, 2.0),
- evas_canvas3d_node_position_set(-48.4, 0.0, -51.5 + 19.5 * 2),
- evas_canvas3d_node_orientation_angle_axis_set(90, 0, 1.0, 0.0));
+ evas_canvas3d_node_scale_set(data->mesh_node_wall[index], 5* 19.5, 20.0, 2.0);
+ evas_canvas3d_node_position_set(data->mesh_node_wall[index], -48.4, 0.0, -51.5 + 19.5 * 2);
+ evas_canvas3d_node_orientation_angle_axis_set(data->mesh_node_wall[index], 90, 0, 1.0, 0.0);
}
}
@@ -951,48 +857,40 @@ _mesh_setup_column(Scene_Data *data, int index)
data->material_column = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_do(data->material_column,
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
- evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.4, 0.4, 0.4, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.6, 0.6, 0.6, 1.0),
- evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
- evas_canvas3d_material_shininess_set(50.0));
+ evas_canvas3d_material_enable_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
+ evas_canvas3d_material_enable_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, EINA_TRUE);
+ evas_canvas3d_material_color_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, 0.4, 0.4, 0.4, 1.0);
+ evas_canvas3d_material_color_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, 0.6, 0.6, 0.6, 1.0);
+ evas_canvas3d_material_color_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
+ evas_canvas3d_material_shininess_set(data->material_column, 50.0);
data->mesh_column[index] = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
SETUP_MESH_NODE(column[index])
- eo_do(data->mesh_column[index],
- evas_canvas3d_mesh_from_primitive_set(0, data->cylinder_primitive),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_DIFFUSE),
- evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES),
- evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
- evas_canvas3d_mesh_frame_material_set(0, data->material_column));
+ evas_canvas3d_mesh_from_primitive_set(data->mesh_column[index], 0, data->cylinder_primitive);
+ evas_canvas3d_mesh_shade_mode_set(data->mesh_column[index], EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
+ evas_canvas3d_mesh_vertex_assembly_set(data->mesh_column[index], EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
+ evas_canvas3d_mesh_shade_mode_set(data->mesh_column[index], EVAS_CANVAS3D_SHADE_MODE_PHONG);
+ evas_canvas3d_mesh_frame_material_set(data->mesh_column[index], 0, data->material_column);
data->texture_diffuse_column = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_do(data->texture_diffuse_column,
- evas_canvas3d_texture_file_set(red_brick_path, NULL),
- evas_canvas3d_texture_atlas_enable_set(EINA_FALSE),
- evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
- EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
- evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT));
+ evas_canvas3d_texture_file_set(data->texture_diffuse_column, red_brick_path, NULL);
+ evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_column, EINA_FALSE);
+ evas_canvas3d_texture_filter_set(data->texture_diffuse_column, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
+ evas_canvas3d_texture_wrap_set(data->texture_diffuse_column, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
- eo_do(data->material_column,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE,
- data->texture_diffuse_column),
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT,
- data->texture_diffuse_column));
+ evas_canvas3d_material_texture_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture_diffuse_column);
+ evas_canvas3d_material_texture_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, data->texture_diffuse_column);
NORMAL_SET(column, column[index], red_brick_n_path)
- eo_do(data->mesh_node_column[index],
- evas_canvas3d_node_scale_set(2.2, 2.2, 19.0),
- evas_canvas3d_node_position_set(10 , 0, -45 + 21.25 * index),
- evas_canvas3d_node_orientation_angle_axis_set(90, 1.0, 0.0, 0.0));
+ evas_canvas3d_node_scale_set(data->mesh_node_column[index], 2.2, 2.2, 19.0);
+ evas_canvas3d_node_position_set(data->mesh_node_column[index], 10, 0, -45 + 21.25 * index);
+ evas_canvas3d_node_orientation_angle_axis_set(data->mesh_node_column[index], 90, 1.0, 0.0, 0.0);
}
void
@@ -1007,9 +905,8 @@ _mesh_setup_grass(Scene_Data *data)
NORMAL_SET(grass, grass, gray_brick_n_path)
/* placing of grass carpet on the floor grid */
- eo_do(data->mesh_node_grass,
- evas_canvas3d_node_scale_set(130.0, 1.0, 96.0),
- evas_canvas3d_node_position_set(16.5, -10.0, -12));
+ evas_canvas3d_node_scale_set(data->mesh_node_grass, 130.0, 1.0, 96.0);
+ evas_canvas3d_node_position_set(data->mesh_node_grass, 16.5, -10.0, -12);
}
void
@@ -1024,9 +921,8 @@ _mesh_setup(Scene_Data *data, float h EINA_UNUSED, float w EINA_UNUSED, float d
CUBE_TEXTURE_SET(level[0], level[index], isource, red_brick_path)
NORMAL_SET(level[0], level[index], red_brick_n_path)
- eo_do(data->mesh_node_level[index],
- evas_canvas3d_node_scale_set(19.5, 20.0, 2.0),
- evas_canvas3d_node_position_set(50, 0, -15));
+ evas_canvas3d_node_scale_set(data->mesh_node_level[index], 19.5, 20.0, 2.0);
+ evas_canvas3d_node_position_set(data->mesh_node_level[index], 50, 0, -15);
}
else
{
@@ -1035,9 +931,8 @@ _mesh_setup(Scene_Data *data, float h EINA_UNUSED, float w EINA_UNUSED, float d
CUBE_TEXTURE_SET(level[1], level[index], isource, gray_brick_path)
NORMAL_SET(level[1], level[index], gray_brick_n_path)
- eo_do(data->mesh_node_level[index],
- evas_canvas3d_node_scale_set(2.0, 2.0, 8.0),
- evas_canvas3d_node_position_set(40 + (2 * index), -10 + (2 * index), -10));
+ evas_canvas3d_node_scale_set(data->mesh_node_level[index], 2.0, 2.0, 8.0);
+ evas_canvas3d_node_position_set(data->mesh_node_level[index], 40 + (2 * index), -10 + (2 * index), -10);
}
}
@@ -1050,9 +945,8 @@ _mesh_setup_warrior(Scene_Data *data)
SETUP_MESH_NODE(warrior)
MATERIAL_TEXTURE_SET(warrior, warrior, warrior_path, warrior_tex_path)
- eo_do(data->mesh_node_warrior,
- evas_canvas3d_node_position_set(57, -10, 0),
- evas_canvas3d_node_scale_set(0.15, 0.15, 0.15));
+ evas_canvas3d_node_position_set(data->mesh_node_warrior, 57, -10, 0);
+ evas_canvas3d_node_scale_set(data->mesh_node_warrior, 0.15, 0.15, 0.15);
}
void
@@ -1063,23 +957,20 @@ _mesh_setup_snake(Scene_Data *data)
MATERIAL_TEXTURE_SET(snake, snake, snake_path, snake_tex_path)
NORMAL_SET(snake, snake, snake_tex_n_path)
- eo_do(data->mesh_node_snake,
- evas_canvas3d_node_position_set(20, -10, 20),
- evas_canvas3d_node_scale_set(4.0, 4.0, 4.0));
+ evas_canvas3d_node_position_set(data->mesh_node_snake, 20, -10, 20);
+ evas_canvas3d_node_scale_set(data->mesh_node_snake, 4.0, 4.0, 4.0);
}
void
_mesh_setup_rocket(Scene_Data *data, int index)
{
ADD_MESH(rocket[index], rocket[index], 0.8, 0.2, 0.5);
- eo_do(data->mesh_rocket[index],
- evas_canvas3d_mesh_from_primitive_set(0, data->sphere_primitive));
+ evas_canvas3d_mesh_from_primitive_set(data->mesh_rocket[index], 0, data->sphere_primitive);
SETUP_DEFAULT_MESH(rocket[index], rocket[index], DIFFUSE);
SETUP_MESH_NODE(rocket[index]);
- eo_do(data->mesh_node_rocket[index],
- evas_canvas3d_node_scale_set(1, 1, 1),
- evas_canvas3d_node_position_set(ROCKET_POS_X, ROCKET_POS_Y, ROCKET_POS_Z));
+ evas_canvas3d_node_scale_set(data->mesh_node_rocket[index], 1, 1, 1);
+ evas_canvas3d_node_position_set(data->mesh_node_rocket[index], ROCKET_POS_X, ROCKET_POS_Y, ROCKET_POS_Z);
}
void
@@ -1091,23 +982,19 @@ _scene_setup(Scene_Data *data)
motion_vec[i] = 0;
data->cube_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(data->cube_primitive,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE),
- evas_canvas3d_primitive_precision_set(10));
+ evas_canvas3d_primitive_form_set(data->cube_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
+ evas_canvas3d_primitive_precision_set(data->cube_primitive, 10);
data->sphere_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(data->sphere_primitive,
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
- evas_canvas3d_primitive_precision_set(50));
+ evas_canvas3d_primitive_form_set(data->sphere_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
+ evas_canvas3d_primitive_precision_set(data->sphere_primitive, 50);
global_scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- eo_do(global_scene,
- evas_canvas3d_scene_size_set(WIDTH, HEIGHT),
- evas_canvas3d_scene_background_color_set(0.5, 0.5, 0.9, 0.0));
+ evas_canvas3d_scene_size_set(global_scene, WIDTH, HEIGHT);
+ evas_canvas3d_scene_background_color_set(global_scene, 0.5, 0.5, 0.9, 0.0);
- data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
@@ -1118,11 +1005,10 @@ _scene_setup(Scene_Data *data)
_mesh_setup_rocket(data, i);
data->cylinder_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_do(data->cylinder_primitive,
- evas_canvas3d_primitive_mode_set(EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE),
- evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER),
- evas_canvas3d_primitive_tex_scale_set(1.0, 1.0),
- evas_canvas3d_primitive_precision_set(50));
+ evas_canvas3d_primitive_mode_set(data->cylinder_primitive, EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE);
+ evas_canvas3d_primitive_form_set(data->cylinder_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER);
+ evas_canvas3d_primitive_tex_scale_set(data->cylinder_primitive, 1.0, 1.0);
+ evas_canvas3d_primitive_precision_set(data->cylinder_primitive, 50);
for ( i = 0; i < 4; i++)
_mesh_setup_column(data, i);
@@ -1143,12 +1029,11 @@ _scene_setup(Scene_Data *data)
_mesh_aabb(&data->mesh_cube, data, aabb_index);
- eo_do(global_scene,
- evas_canvas3d_scene_root_node_set(data->root_node),
- evas_canvas3d_scene_camera_node_set(data->camera_node));
+ evas_canvas3d_scene_root_node_set(global_scene, data->root_node);
+ evas_canvas3d_scene_camera_node_set(global_scene, data->camera_node);
if (data->shadow)
- eo_do(global_scene,evas_canvas3d_scene_shadows_enable_set(EINA_TRUE));
+ evas_canvas3d_scene_shadows_enable_set(global_scene, EINA_TRUE);
if (data->fog)
{
@@ -1174,40 +1059,33 @@ _scene_setup(Scene_Data *data)
}
}
- data->carp_mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->carp_mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_do(data->carp_mediator_node,
- evas_canvas3d_node_member_add(data->mesh_node_carpet));
+ evas_canvas3d_node_member_add(data->carp_mediator_node, data->mesh_node_carpet);
- eo_do(data->mediator_node,
- evas_canvas3d_node_member_add(data->mesh_node_soldier),
- evas_canvas3d_node_member_add(data->mesh_node_tommy));
+ evas_canvas3d_node_member_add(data->mediator_node, data->mesh_node_soldier);
+ evas_canvas3d_node_member_add(data->mediator_node, data->mesh_node_tommy);
for (i = 0; i < 10; i++)
- eo_do(data->mediator_node,
- evas_canvas3d_node_member_add(data->mesh_node_rocket[i]));
-
- eo_do(data->root_node,
- evas_canvas3d_node_member_add(data->carp_mediator_node),
- evas_canvas3d_node_member_add(data->mesh_node_world),
- evas_canvas3d_node_member_add(data->mesh_node_gazebo),
- evas_canvas3d_node_member_add(data->mesh_node_eagle),
- evas_canvas3d_node_member_add(data->mesh_node_cube),
- evas_canvas3d_node_member_add(data->mesh_node_column_c),
- evas_canvas3d_node_member_add(data->mesh_node_ball),
- evas_canvas3d_node_member_add(data->mesh_node_grass),
- evas_canvas3d_node_member_add(data->mesh_node_warrior),
- evas_canvas3d_node_member_add(data->mesh_node_snake));
+ evas_canvas3d_node_member_add(data->mediator_node, data->mesh_node_rocket[i]);
+
+ evas_canvas3d_node_member_add(data->root_node, data->carp_mediator_node);
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_world);
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_gazebo);
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_eagle);
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_cube);
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_column_c);
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_ball);
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_grass);
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_warrior);
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_snake);
for (i = 0; i < 4; i++)
- eo_do(data->root_node,
- evas_canvas3d_node_member_add(data->mesh_node_wall[i]),
- evas_canvas3d_node_member_add(data->mesh_node_column[i]));
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_wall[i]);
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_column[i]);
for (i = 0; i < 10; i++)
- eo_do(data->root_node,
- evas_canvas3d_node_member_add(data->mesh_node_level[i]));
+ evas_canvas3d_node_member_add(data->root_node, data->mesh_node_level[i]);
}
int
@@ -1263,8 +1141,7 @@ main(int argc, char *argv[])
evas_object_show(image);
/* Set the image object as render target for 3D scene. */
- eo_do(image,
- evas_obj_image_scene_set(global_scene));
+ evas_obj_image_scene_set(image, global_scene);
evas_object_focus_set(image, EINA_TRUE);
diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c
index a5f4d9dc5d..d54e92f315 100644
--- a/src/lib/ecore/ecore_anim.c
+++ b/src/lib/ecore/ecore_anim.c
@@ -319,7 +319,7 @@ _do_tick(void)
eina_inlist_remove(EINA_INLIST_GET(animators),
EINA_INLIST_GET(animator));
- eo_do(animator->obj, eo_parent_set(NULL));
+ eo_parent_set(animator->obj, NULL);
if (eo_destructed_is(animator->obj))
eo_manual_free(animator->obj);
else
@@ -372,8 +372,7 @@ ecore_animator_add(Ecore_Task_Cb func,
{
Ecore_Animator *animator = NULL;
- animator = eo_add(MY_CLASS, _ecore_parent,
- ecore_animator_constructor(func, data));
+ animator = eo_add(MY_CLASS, _ecore_parent, ecore_animator_constructor(eoid, func, data));
return animator;
}
@@ -389,8 +388,7 @@ ecore_animator_timeline_add(double runtime,
const void *data)
{
Ecore_Animator *animator;
- animator = eo_add(MY_CLASS, _ecore_parent,
- ecore_animator_timeline_constructor(runtime, func, data));
+ animator = eo_add(MY_CLASS, _ecore_parent, ecore_animator_timeline_constructor(eoid, runtime, func, data));
return animator;
}
@@ -682,7 +680,7 @@ _ecore_animator_eo_base_destructor(Eo *obj, Ecore_Animator_Data *pd)
pd->delete_me = EINA_TRUE;
animators_delete_me++;
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
EOLIAN static Eo *
@@ -693,7 +691,7 @@ _ecore_animator_eo_base_finalize(Eo *obj, Ecore_Animator_Data *pd)
return NULL;
}
- return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
+ return eo_finalize(eo_super(obj, MY_CLASS));
}
EAPI void
@@ -718,7 +716,7 @@ EAPI void
ecore_animator_freeze(Ecore_Animator *animator)
{
ECORE_ANIMATOR_CHECK(animator);
- eo_do(animator, eo_event_freeze());
+ eo_event_freeze(animator);
}
EOLIAN static void
@@ -738,7 +736,7 @@ EAPI void
ecore_animator_thaw(Ecore_Animator *animator)
{
ECORE_ANIMATOR_CHECK(animator);
- eo_do(animator, eo_event_thaw());
+ eo_event_thaw(animator);
}
EOLIAN static void
@@ -813,7 +811,7 @@ _ecore_animator_shutdown(void)
if (animator->suspended) animators_suspended--;
animators = (Ecore_Animator_Data *)eina_inlist_remove(EINA_INLIST_GET(animators), EINA_INLIST_GET(animators));
- eo_do(animator->obj, eo_parent_set(NULL));
+ eo_parent_set(animator->obj, NULL);
if (eo_destructed_is(animator->obj))
eo_manual_free(animator->obj);
else
diff --git a/src/lib/ecore/ecore_exe.c b/src/lib/ecore/ecore_exe.c
index e31f96e4bc..75c577b67f 100644
--- a/src/lib/ecore/ecore_exe.c
+++ b/src/lib/ecore/ecore_exe.c
@@ -67,7 +67,7 @@ ecore_exe_pipe_run(const char *exe_cmd,
Ecore_Exe_Flags flags,
const void *data)
{
- Ecore_Exe *ret = eo_add(MY_CLASS, NULL, ecore_obj_exe_command_set(exe_cmd, flags));
+ Ecore_Exe *ret = eo_add(MY_CLASS, NULL, ecore_obj_exe_command_set(eoid, exe_cmd, flags));
if (ret)
{
Ecore_Exe_Data *pd = eo_data_scope_get(ret, MY_CLASS);
@@ -95,7 +95,7 @@ EOLIAN static Eo *
_ecore_exe_eo_base_finalize(Eo *obj, Ecore_Exe_Data *exe)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
- eo_do_super(obj, MY_CLASS, obj = eo_finalize());
+ obj = eo_finalize(eo_super(obj, MY_CLASS));
if (!obj)
return obj;
@@ -216,7 +216,7 @@ ecore_exe_free(Ecore_Exe *obj)
EOLIAN static void
_ecore_exe_eo_base_destructor(Eo *obj, Ecore_Exe_Data *exe)
{
- eo_do_super(obj, ECORE_EXE_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, ECORE_EXE_CLASS));
_impl_ecore_exe_eo_base_destructor(obj, exe);
}
@@ -247,7 +247,7 @@ ecore_exe_cmd_get(const Ecore_Exe *obj)
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
const char *ret = NULL;
- eo_do(obj, ecore_obj_exe_command_get(&ret, NULL));
+ ecore_obj_exe_command_get(obj, &ret, NULL);
return ret;
}
@@ -292,13 +292,13 @@ ecore_exe_flags_get(const Ecore_Exe *obj)
EAPI void
ecore_exe_pause(Ecore_Exe *obj)
{
- eo_do(obj, efl_control_suspend_set(EINA_TRUE));
+ efl_control_suspend_set(obj, EINA_TRUE);
}
EAPI void
ecore_exe_continue(Ecore_Exe *obj)
{
- eo_do(obj, efl_control_suspend_set(EINA_FALSE));
+ efl_control_suspend_set(obj, EINA_FALSE);
}
EOLIAN static void
diff --git a/src/lib/ecore/ecore_exe_posix.c b/src/lib/ecore/ecore_exe_posix.c
index e416e23b6d..7c503a6e9a 100644
--- a/src/lib/ecore/ecore_exe_posix.c
+++ b/src/lib/ecore/ecore_exe_posix.c
@@ -1171,7 +1171,7 @@ _ecore_exe_data_generic_handler(void *data,
ecore_event_add(event_type, e,
_ecore_exe_event_exe_data_free,
NULL);
- eo_do(obj, eo_event_callback_call(eo_event, e));
+ eo_event_callback_call(obj, eo_event, e);
}
}
}
diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c
index 42cc5ceb23..bc4041492f 100644
--- a/src/lib/ecore/ecore_exe_win32.c
+++ b/src/lib/ecore/ecore_exe_win32.c
@@ -158,7 +158,7 @@ _ecore_exe_pipe_read_thread_cb(void *data)
ecore_event_add(ECORE_EXE_EVENT_DATA, event_data,
_ecore_exe_event_exe_data_free,
NULL);
- eo_do(obj, eo_event_callback_call(ECORE_EXE_EVENT_DATA_GET, event_data));
+ eo_event_callback_call(obj, ECORE_EXE_EVENT_DATA_GET, event_data);
}
current_buf = NULL;
@@ -228,7 +228,7 @@ _ecore_exe_pipe_error_thread_cb(void *data)
ecore_event_add(ECORE_EXE_EVENT_ERROR, event_data,
_ecore_exe_event_exe_data_free,
NULL);
- eo_do(obj, eo_event_callback_call(ECORE_EXE_EVENT_DATA_ERROR, event_data));
+ eo_event_callback_call(obj, ECORE_EXE_EVENT_DATA_ERROR, event_data);
}
current_buf = NULL;
diff --git a/src/lib/ecore/ecore_idle_enterer.c b/src/lib/ecore/ecore_idle_enterer.c
index 6c40158207..a7cbfa5704 100644
--- a/src/lib/ecore/ecore_idle_enterer.c
+++ b/src/lib/ecore/ecore_idle_enterer.c
@@ -61,7 +61,7 @@ ecore_idle_enterer_add(Ecore_Task_Cb func,
const void *data)
{
Ecore_Idle_Enterer *ie = NULL;
- ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_after_constructor(func, data));
+ ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_after_constructor(eoid, func, data));
return ie;
}
@@ -78,7 +78,7 @@ ecore_idle_enterer_before_add(Ecore_Task_Cb func,
const void *data)
{
Ecore_Idle_Enterer *ie = NULL;
- ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_before_constructor(func, data));
+ ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_before_constructor(eoid, func, data));
return ie;
}
@@ -117,7 +117,7 @@ _ecore_idle_enterer_eo_base_destructor(Eo *obj, Ecore_Idle_Enterer_Data *idle_en
idle_enterer->delete_me = 1;
idle_enterers_delete_me = 1;
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
EOLIAN static Eo *
@@ -128,7 +128,7 @@ _ecore_idle_enterer_eo_base_finalize(Eo *obj, Ecore_Idle_Enterer_Data *idle_ente
return NULL;
}
- return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
+ return eo_finalize(eo_super(obj, MY_CLASS));
}
void
@@ -139,7 +139,7 @@ _ecore_idle_enterer_shutdown(void)
{
idle_enterers = (Ecore_Idle_Enterer_Data *)eina_inlist_remove(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(idle_enterers));
- eo_do(ie->obj, eo_parent_set(NULL));
+ eo_parent_set(ie->obj, NULL);
if (eo_destructed_is(ie->obj))
eo_manual_free(ie->obj);
else
@@ -201,7 +201,7 @@ _ecore_idle_enterer_call(void)
idle_enterers = (Ecore_Idle_Enterer_Data *)eina_inlist_remove(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(ie));
- eo_do(ie->obj, eo_parent_set(NULL));
+ eo_parent_set(ie->obj, NULL);
if (eo_destructed_is(ie->obj))
eo_manual_free(ie->obj);
else
diff --git a/src/lib/ecore/ecore_idle_exiter.c b/src/lib/ecore/ecore_idle_exiter.c
index d4e6962795..5074b13009 100644
--- a/src/lib/ecore/ecore_idle_exiter.c
+++ b/src/lib/ecore/ecore_idle_exiter.c
@@ -37,7 +37,7 @@ ecore_idle_exiter_add(Ecore_Task_Cb func,
const void *data)
{
Ecore_Idle_Exiter *ie = NULL;
- ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_exiter_constructor(func, data));
+ ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_exiter_constructor(eoid, func, data));
return ie;
}
@@ -88,7 +88,7 @@ _ecore_idle_exiter_eo_base_finalize(Eo *obj, Ecore_Idle_Exiter_Data *idle_exiter
return NULL;
}
- return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
+ return eo_finalize(eo_super(obj, MY_CLASS));
}
EOLIAN static void
@@ -98,7 +98,7 @@ _ecore_idle_exiter_eo_base_destructor(Eo *obj, Ecore_Idle_Exiter_Data *idle_exit
idle_exiter->delete_me = 1;
idle_exiters_delete_me = 1;
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
void
@@ -109,7 +109,7 @@ _ecore_idle_exiter_shutdown(void)
{
idle_exiters = (Ecore_Idle_Exiter_Data *)eina_inlist_remove(EINA_INLIST_GET(idle_exiters), EINA_INLIST_GET(idle_exiters));
- eo_do(ie->obj, eo_parent_set(NULL));
+ eo_parent_set(ie->obj, NULL);
if (eo_destructed_is(ie->obj))
eo_manual_free(ie->obj);
else
@@ -172,7 +172,7 @@ _ecore_idle_exiter_call(void)
idle_exiters = (Ecore_Idle_Exiter_Data *)eina_inlist_remove(EINA_INLIST_GET(idle_exiters), EINA_INLIST_GET(ie));
- eo_do(ie->obj, eo_parent_set(NULL));
+ eo_parent_set(ie->obj, NULL);
if (eo_destructed_is(ie->obj))
eo_manual_free(ie->obj);
else
diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c
index 6cd3ba1e7a..f68d424488 100644
--- a/src/lib/ecore/ecore_idler.c
+++ b/src/lib/ecore/ecore_idler.c
@@ -35,7 +35,7 @@ EAPI Ecore_Idler *
ecore_idler_add(Ecore_Task_Cb func,
const void *data)
{
- return eo_add(MY_CLASS, _ecore_parent, ecore_idler_constructor(func, data));
+ return eo_add(MY_CLASS, _ecore_parent, ecore_idler_constructor(eoid, func, data));
}
EOLIAN static void
@@ -86,7 +86,7 @@ _ecore_idler_eo_base_destructor(Eo *obj, Ecore_Idler_Data *idler)
idler->delete_me = 1;
idlers_delete_me = 1;
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
EOLIAN static Eo *
@@ -97,7 +97,7 @@ _ecore_idler_eo_base_finalize(Eo *obj, Ecore_Idler_Data *idler)
return NULL;
}
- return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
+ return eo_finalize(eo_super(obj, MY_CLASS));
}
void
@@ -108,7 +108,7 @@ _ecore_idler_shutdown(void)
{
idlers = (Ecore_Idler_Data *)eina_inlist_remove(EINA_INLIST_GET(idlers), EINA_INLIST_GET(idlers));
- eo_do(ie->obj, eo_parent_set(NULL));
+ eo_parent_set(ie->obj, NULL);
if (eo_destructed_is(ie->obj))
eo_manual_free(ie->obj);
else
@@ -167,7 +167,7 @@ _ecore_idler_all_call(void)
idlers = (Ecore_Idler_Data *)eina_inlist_remove(EINA_INLIST_GET(idlers), EINA_INLIST_GET(ie));
- eo_do(ie->obj, eo_parent_set(NULL));
+ eo_parent_set(ie->obj, NULL);
if (eo_destructed_is(ie->obj))
eo_manual_free(ie->obj);
else
diff --git a/src/lib/ecore/ecore_job.c b/src/lib/ecore/ecore_job.c
index ed988ab66c..1f459c7940 100644
--- a/src/lib/ecore/ecore_job.c
+++ b/src/lib/ecore/ecore_job.c
@@ -49,7 +49,7 @@ EAPI Ecore_Job *
ecore_job_add(Ecore_Cb func,
const void *data)
{
- Ecore_Job *job = eo_add(MY_CLASS, _ecore_parent, ecore_job_constructor(func, data));
+ Ecore_Job *job = eo_add(MY_CLASS, _ecore_parent, ecore_job_constructor(eoid, func, data));
return job;
}
@@ -88,7 +88,7 @@ ecore_job_del(Ecore_Job *obj)
Ecore_Job_Data *job = eo_data_scope_get(obj, MY_CLASS);
data = job->data;
ecore_event_del(job->event);
- eo_do(obj, eo_parent_set(NULL));
+ eo_parent_set(obj, NULL);
return data;
}
@@ -96,7 +96,7 @@ EOLIAN static void
_ecore_job_eo_base_destructor(Eo *obj, Ecore_Job_Data *_pd EINA_UNUSED)
{
/*FIXME: check if ecore_event_del should be called from here*/
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
EOLIAN static Eo *
@@ -107,7 +107,7 @@ _ecore_job_eo_base_finalize(Eo *obj, Ecore_Job_Data *pd)
return NULL;
}
- return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
+ return eo_finalize(eo_super(obj, MY_CLASS));
}
static Eina_Bool
@@ -126,7 +126,7 @@ static void
_ecore_job_event_free(void *data,
void *job EINA_UNUSED)
{
- eo_do(data, eo_parent_set(NULL));
+ eo_parent_set(data, NULL);
Ecore_Job *obj = data;
diff --git a/src/lib/ecore/ecore_poller.c b/src/lib/ecore/ecore_poller.c
index 348a734dd7..79f2a78f0b 100644
--- a/src/lib/ecore/ecore_poller.c
+++ b/src/lib/ecore/ecore_poller.c
@@ -173,7 +173,7 @@ _ecore_poller_cb_timer(void *data EINA_UNUSED)
{
pollers[i] = (Ecore_Poller_Data *)eina_inlist_remove(EINA_INLIST_GET(pollers[i]), EINA_INLIST_GET(poller));
- eo_do(poller->obj, eo_parent_set(NULL));
+ eo_parent_set(poller->obj, NULL);
if (eo_destructed_is(poller->obj))
eo_manual_free(poller->obj);
else
@@ -237,8 +237,7 @@ ecore_poller_add(Ecore_Poller_Type type EINA_UNUSED,
const void *data)
{
Ecore_Poller *poller;
- poller = eo_add(MY_CLASS, _ecore_parent,
- ecore_poller_constructor(type, interval, func, data));
+ poller = eo_add(MY_CLASS, _ecore_parent, ecore_poller_constructor(eoid, type, interval, func, data));
return poller;
}
@@ -352,7 +351,7 @@ ecore_poller_del(Ecore_Poller *obj)
data = poller->data;
pollers[poller->ibit] = (Ecore_Poller_Data *)eina_inlist_remove(EINA_INLIST_GET(pollers[poller->ibit]), EINA_INLIST_GET(poller));
- eo_do(poller->obj, eo_parent_set(NULL));
+ eo_parent_set(poller->obj, NULL);
if (eo_destructed_is(poller->obj))
eo_manual_free(obj);
else
@@ -371,7 +370,7 @@ _ecore_poller_eo_base_destructor(Eo *obj, Ecore_Poller_Data *pd)
poller_delete_count++;
}
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
EOLIAN static Eo *
@@ -382,7 +381,7 @@ _ecore_poller_eo_base_finalize(Eo *obj, Ecore_Poller_Data *pd)
return NULL;
}
- return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
+ return eo_finalize(eo_super(obj, MY_CLASS));
}
void
@@ -396,7 +395,7 @@ _ecore_poller_shutdown(void)
while ((poller = pollers[i]))
{
pollers[i] = (Ecore_Poller_Data *)eina_inlist_remove(EINA_INLIST_GET(pollers[i]), EINA_INLIST_GET(pollers[i]));
- eo_do(poller->obj, eo_parent_set(NULL));
+ eo_parent_set(poller->obj, NULL);
if (eo_destructed_is(poller->obj))
eo_manual_free(poller->obj);
else
diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c
index 11a6ad1924..7343a7f726 100644
--- a/src/lib/ecore/ecore_timer.c
+++ b/src/lib/ecore/ecore_timer.c
@@ -93,7 +93,7 @@ ecore_timer_add(double in,
Ecore_Timer *timer = NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
- timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(in, func, data));
+ timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(eoid, in, func, data));
return timer;
}
@@ -232,7 +232,7 @@ EAPI void
ecore_timer_freeze(Ecore_Timer *timer)
{
ECORE_TIMER_CHECK(timer);
- eo_do(timer, eo_event_freeze());
+ eo_event_freeze(timer);
}
EOLIAN static void
@@ -261,7 +261,7 @@ ecore_timer_freeze_get(Ecore_Timer *timer)
{
int r = 0;
- eo_do(timer, r = eo_event_freeze_count_get());
+ r = eo_event_freeze_count_get(timer);
return !!r;
}
@@ -277,7 +277,7 @@ EAPI void
ecore_timer_thaw(Ecore_Timer *timer)
{
ECORE_TIMER_CHECK(timer);
- eo_do(timer, eo_event_thaw());
+ eo_event_thaw(timer);
}
EOLIAN static void
@@ -357,7 +357,7 @@ _ecore_timer_loop_add(double in,
const void *data)
{
Ecore_Timer *timer = NULL;
- timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(in, func, data));
+ timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(eoid, in, func, data));
return timer;
}
@@ -397,7 +397,7 @@ _ecore_timer_del(Ecore_Timer *obj)
if (timer->delete_me)
timers_delete_me--;
- eo_do(obj, eo_parent_set(NULL));
+ eo_parent_set(obj, NULL);
if (eo_destructed_is(obj))
eo_manual_free(obj);
@@ -421,7 +421,7 @@ _ecore_timer_eo_base_destructor(Eo *obj, Ecore_Timer_Data *pd)
timers_delete_me++;
}
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
EOLIAN static Eo *
@@ -432,7 +432,7 @@ _ecore_timer_eo_base_finalize(Eo *obj, Ecore_Timer_Data *pd)
return NULL;
}
- return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
+ return eo_finalize(eo_super(obj, MY_CLASS));
}
void
@@ -445,7 +445,7 @@ _ecore_timer_shutdown(void)
timers = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timers));
eo_data_unref(timer->obj, timer);
- eo_do(timer->obj, eo_parent_set(NULL));
+ eo_parent_set(timer->obj, NULL);
if (eo_destructed_is(timer->obj))
eo_manual_free(timer->obj);
else
@@ -457,7 +457,7 @@ _ecore_timer_shutdown(void)
suspended = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(suspended));
eo_data_unref(timer->obj, timer);
- eo_do(timer->obj, eo_parent_set(NULL));
+ eo_parent_set(timer->obj, NULL);
if (eo_destructed_is(timer->obj))
eo_manual_free(timer->obj);
else
@@ -489,7 +489,7 @@ _ecore_timer_cleanup(void)
timers = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
eo_data_unref(timer->obj, timer);
- eo_do(timer->obj, eo_parent_set(NULL));
+ eo_parent_set(timer->obj, NULL);
if (eo_destructed_is(timer->obj))
eo_manual_free(timer->obj);
else
@@ -514,7 +514,7 @@ _ecore_timer_cleanup(void)
suspended = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
eo_data_unref(timer->obj, timer);
- eo_do(timer->obj, eo_parent_set(NULL));
+ eo_parent_set(timer->obj, NULL);
if (eo_destructed_is(timer->obj))
eo_manual_free(timer->obj);
else
diff --git a/src/lib/ecore_audio/ecore_audio_obj.c b/src/lib/ecore_audio/ecore_audio_obj.c
index 3607cd9fca..bef68c8b46 100644
--- a/src/lib/ecore_audio/ecore_audio_obj.c
+++ b/src/lib/ecore_audio/ecore_audio_obj.c
@@ -58,7 +58,7 @@ EOLIAN static Eo *
_ecore_audio_eo_base_constructor(Eo *eo_obj, Ecore_Audio_Object *obj)
{
obj->volume = 1.0;
- return eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
+ return eo_constructor(eo_super(eo_obj, MY_CLASS));
}
#include "ecore_audio.eo.c"
diff --git a/src/lib/ecore_audio/ecore_audio_obj_in.c b/src/lib/ecore_audio/ecore_audio_obj_in.c
index a6afa18781..c69bd2fc74 100644
--- a/src/lib/ecore_audio/ecore_audio_obj_in.c
+++ b/src/lib/ecore_audio/ecore_audio_obj_in.c
@@ -27,7 +27,7 @@ _ecore_audio_in_speed_set(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Input *obj, double
obj->speed = speed;
- eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, NULL));
+ eo_event_callback_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, NULL);
}
EOLIAN static double
@@ -41,7 +41,7 @@ _ecore_audio_in_samplerate_set(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Input *obj, i
{
obj->samplerate = samplerate;
- eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, NULL));
+ eo_event_callback_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, NULL);
}
EOLIAN static int
@@ -89,7 +89,7 @@ _ecore_audio_in_remaining_get(Eo *eo_obj, Ecore_Audio_Input *obj)
if (!obj->seekable) return -1;
else {
double ret = 0.0;
- eo_do(eo_obj, ret = ecore_audio_obj_in_seek(0, SEEK_CUR));
+ ret = ecore_audio_obj_in_seek(eo_obj, 0, SEEK_CUR);
return obj->length - ret;
}
}
@@ -104,14 +104,14 @@ _ecore_audio_in_read(Eo *eo_obj, Ecore_Audio_Input *obj, void *buf, size_t len)
memset(buf, 0, len);
len_read = len;
} else {
- eo_do(eo_obj, len_read = ecore_audio_obj_in_read_internal(buf, len));
+ len_read = ecore_audio_obj_in_read_internal(eo_obj, buf, len);
if (len_read == 0) {
if (!obj->looped || !obj->seekable) {
- eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_IN_EVENT_IN_STOPPED, NULL));
+ eo_event_callback_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_STOPPED, NULL);
} else {
- eo_do(eo_obj, ecore_audio_obj_in_seek(0, SEEK_SET));
- eo_do(eo_obj, len_read = ecore_audio_obj_in_read_internal(buf, len));
- eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_IN_EVENT_IN_LOOPED, NULL));
+ ecore_audio_obj_in_seek(eo_obj, 0, SEEK_SET);
+ len_read = ecore_audio_obj_in_read_internal(eo_obj, buf, len);
+ eo_event_callback_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_LOOPED, NULL);
}
}
@@ -173,7 +173,7 @@ _ecore_audio_in_ecore_audio_vio_set(Eo *eo_obj, Ecore_Audio_Input *obj, Ecore_Au
EOLIAN static Eo *
_ecore_audio_in_eo_base_constructor(Eo *eo_obj, Ecore_Audio_Input *obj)
{
- eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
+ eo_obj = eo_constructor(eo_super(eo_obj, MY_CLASS));
obj->speed = 1.0;
@@ -184,9 +184,9 @@ EOLIAN static void
_ecore_audio_in_eo_base_destructor(Eo *eo_obj, Ecore_Audio_Input *obj)
{
if(obj->output)
- eo_do(obj->output, ecore_audio_obj_out_input_detach(eo_obj));
+ ecore_audio_obj_out_input_detach(obj->output, eo_obj);
- eo_do_super(eo_obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(eo_obj, MY_CLASS));
}
#include "ecore_audio_in.eo.c"
diff --git a/src/lib/ecore_audio/ecore_audio_obj_in_sndfile.c b/src/lib/ecore_audio/ecore_audio_obj_in_sndfile.c
index 599ae27391..cefe28b021 100644
--- a/src/lib/ecore_audio/ecore_audio_obj_in_sndfile.c
+++ b/src/lib/ecore_audio/ecore_audio_obj_in_sndfile.c
@@ -205,7 +205,7 @@ _ecore_audio_in_sndfile_eo_base_destructor(Eo *eo_obj, Ecore_Audio_In_Sndfile_Da
if (ea_obj->vio)
_free_vio(ea_obj);
- eo_do_super(eo_obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(eo_obj, MY_CLASS));
}
#include "ecore_audio_in_sndfile.eo.c"
diff --git a/src/lib/ecore_audio/ecore_audio_obj_in_tone.c b/src/lib/ecore_audio/ecore_audio_obj_in_tone.c
index 2b097f66f1..ff35a982a2 100644
--- a/src/lib/ecore_audio/ecore_audio_obj_in_tone.c
+++ b/src/lib/ecore_audio/ecore_audio_obj_in_tone.c
@@ -90,7 +90,7 @@ _ecore_audio_in_tone_eo_base_key_data_set(Eo *eo_obj, Ecore_Audio_In_Tone_Data *
if (!strcmp(key, ECORE_AUDIO_ATTR_TONE_FREQ)) {
obj->freq = *(int *)val;
} else {
- eo_do_super(eo_obj, MY_CLASS, eo_key_data_set(key, val));
+ eo_key_data_set(eo_super(eo_obj, MY_CLASS), key, val);
}
}
@@ -102,7 +102,7 @@ _ecore_audio_in_tone_eo_base_key_data_get(Eo *eo_obj, Ecore_Audio_In_Tone_Data *
return (void *) (intptr_t) obj->freq;
} else {
void *ret = NULL;
- eo_do_super(eo_obj, MY_CLASS, ret = eo_key_data_get(key));
+ ret = eo_key_data_get(eo_super(eo_obj, MY_CLASS), key);
return ret;
}
}
@@ -112,7 +112,7 @@ _ecore_audio_in_tone_eo_base_constructor(Eo *eo_obj, Ecore_Audio_In_Tone_Data *o
{
Ecore_Audio_Input *in_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_IN_CLASS);
- eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
+ eo_obj = eo_constructor(eo_super(eo_obj, MY_CLASS));
in_obj->channels = 1;
in_obj->samplerate = 44100;
diff --git a/src/lib/ecore_audio/ecore_audio_obj_out.c b/src/lib/ecore_audio/ecore_audio_obj_out.c
index 0414d668b5..c34245fa49 100644
--- a/src/lib/ecore_audio/ecore_audio_obj_out.c
+++ b/src/lib/ecore_audio/ecore_audio_obj_out.c
@@ -34,7 +34,7 @@ static Eina_Bool _write_cb(void *data)
/* FIXME: Multiple inputs */
in = eina_list_data_get(out_obj->inputs);
- eo_do(in, bread = ecore_audio_obj_in_read(buf, 4*1024));
+ bread = ecore_audio_obj_in_read(in, buf, 4*1024);
if (bread == 0) {
ea_obj->paused = EINA_TRUE;
@@ -61,7 +61,7 @@ _ecore_audio_out_input_attach(Eo *eo_obj, Ecore_Audio_Output *obj, Eo *input)
if (in->output == eo_obj)
return EINA_FALSE;
- if (in->output) eo_do(in->output, ecore_audio_obj_out_input_detach(input));
+ if (in->output) ecore_audio_obj_out_input_detach(in->output, input);
in->output = eo_obj;
/* TODO: Send event */
@@ -132,7 +132,7 @@ _ecore_audio_out_ecore_audio_vio_set(Eo *eo_obj, Ecore_Audio_Output *_pd EINA_UN
EOLIAN static Eo *
_ecore_audio_out_eo_base_constructor(Eo *eo_obj, Ecore_Audio_Output *obj)
{
- eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
+ eo_obj = eo_constructor(eo_super(eo_obj, MY_CLASS));
obj->need_writer = EINA_TRUE;
@@ -146,10 +146,10 @@ _ecore_audio_out_eo_base_destructor(Eo *eo_obj, Ecore_Audio_Output *obj)
Eo *in;
EINA_LIST_FOREACH_SAFE(obj->inputs, cur, tmp, in) {
- eo_do(eo_obj, ecore_audio_obj_out_input_detach(in));
+ ecore_audio_obj_out_input_detach(eo_obj, in);
}
- eo_do_super(eo_obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(eo_obj, MY_CLASS));
}
#include "ecore_audio_out.eo.c"
diff --git a/src/lib/ecore_audio/ecore_audio_obj_out_core_audio.c b/src/lib/ecore_audio/ecore_audio_obj_out_core_audio.c
index 1d2ead4566..aa0d76b5a0 100644
--- a/src/lib/ecore_audio/ecore_audio_obj_out_core_audio.c
+++ b/src/lib/ecore_audio/ecore_audio_obj_out_core_audio.c
@@ -185,7 +185,7 @@ _audio_io_proc_cb(AudioObjectID obj_id EINA_UNUSED,
if (helper->fake_stereo)
{
- eo_do(helper->input, bread = ecore_audio_obj_in_read(buf, size * 2));
+ bread = ecore_audio_obj_in_read(helper->input, buf, size * 2);
for (k = bread - 1; k >= 0; --k)
{
@@ -196,7 +196,7 @@ _audio_io_proc_cb(AudioObjectID obj_id EINA_UNUSED,
}
else
{
- eo_do(helper->input, bread = ecore_audio_obj_in_read(buf, size * 4));
+ bread = ecore_audio_obj_in_read(helper->input, buf, size * 4);
bread /= 4;
}
@@ -219,7 +219,7 @@ EOLIAN static void
_ecore_audio_out_core_audio_ecore_audio_volume_set(Eo *obj, Ecore_Audio_Out_Core_Audio_Data *sd EINA_UNUSED, double volume)
{
// TODO Change volume of playing inputs
- eo_do_super(obj, MY_CLASS, ecore_audio_obj_volume_set(volume));
+ ecore_audio_obj_volume_set(eo_super(obj, MY_CLASS), volume);
}
EOLIAN static Eina_Bool
@@ -230,7 +230,7 @@ _ecore_audio_out_core_audio_ecore_audio_out_input_attach(Eo *obj, Ecore_Audio_Ou
OSStatus err;
Eina_Bool chk;
- eo_do_super(obj, MY_CLASS, chk = ecore_audio_obj_out_input_attach(input));
+ chk = ecore_audio_obj_out_input_attach(eo_super(obj, MY_CLASS), input);
if (EINA_UNLIKELY(!chk))
{
ERR("Failed to attach input (eo_do_super)");
@@ -266,10 +266,10 @@ _ecore_audio_out_core_audio_ecore_audio_out_input_attach(Eo *obj, Ecore_Audio_Ou
}
/* Forward samplerate to CoreAudio */
- eo_do(input, helper->format.mSampleRate = ecore_audio_obj_in_samplerate_get());
+ helper->format.mSampleRate = ecore_audio_obj_in_samplerate_get(input);
/* Set channels. If only 1 channel, emulate stereo */
- eo_do(input, channels = ecore_audio_obj_in_channels_get());
+ channels = ecore_audio_obj_in_channels_get(input);
if (channels == 1)
{
DBG("Fake stereo enabled for input %p", input);
@@ -303,7 +303,7 @@ _ecore_audio_out_core_audio_ecore_audio_out_input_attach(Eo *obj, Ecore_Audio_Ou
}
/* Keep track of data for deallocation */
- eo_do(input, eo_key_data_set("coreaudio_data", helper));
+ eo_key_data_set(input, "coreaudio_data", helper);
/* Start playing */
helper->is_playing = EINA_TRUE;
@@ -322,7 +322,7 @@ free_proc_id:
free_helper:
free(helper);
detach:
- eo_do_super(obj, MY_CLASS, ecore_audio_obj_out_input_detach(input));
+ ecore_audio_obj_out_input_detach(eo_super(obj, MY_CLASS), input);
return_failure:
return EINA_FALSE;
}
@@ -335,10 +335,10 @@ _ecore_audio_out_core_audio_ecore_audio_out_input_detach(Eo *obj, Ecore_Audio_Ou
DBG("Detach");
/* Free helper */
- eo_do(input, data = eo_key_data_get("coreaudio_data"));
+ data = eo_key_data_get(input, "coreaudio_data");
_core_audio_helper_free(data);
- eo_do_super(obj, MY_CLASS, ret = ecore_audio_obj_out_input_detach(input));
+ ret = ecore_audio_obj_out_input_detach(eo_super(obj, MY_CLASS), input);
return ret;
}
diff --git a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c
index 2c869fd1f4..95aa0c0254 100644
--- a/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c
+++ b/src/lib/ecore_audio/ecore_audio_obj_out_pulse.c
@@ -61,10 +61,10 @@ _ecore_audio_out_pulse_ecore_audio_volume_set(Eo *eo_obj, Ecore_Audio_Out_Pulse_
pa_cvolume_set(&pa_volume, 2, volume * PA_VOLUME_NORM);
- eo_do_super(eo_obj, MY_CLASS, ecore_audio_obj_volume_set(volume));
+ ecore_audio_obj_volume_set(eo_super(eo_obj, MY_CLASS), volume);
EINA_LIST_FOREACH(out_obj->inputs, input, in) {
- eo_do(in, stream = eo_key_data_get("pulse_data"));
+ stream = eo_key_data_get(in, "pulse_data");
idx = pa_stream_get_index(stream);
pa_operation_unref(pa_context_set_sink_input_volume(class_vars.context, idx, &pa_volume, NULL, NULL));
}
@@ -81,7 +81,7 @@ static void _write_cb(pa_stream *stream, size_t len, void *data)
pa_stream_begin_write(stream, &buf, &wlen);
- eo_do(in, bread = ecore_audio_obj_in_read(buf, wlen));
+ bread = ecore_audio_obj_in_read(in, buf, wlen);
pa_stream_write(stream, buf, bread, NULL, 0, PA_SEEK_RELATIVE);
if (bread < (int)len)
@@ -96,10 +96,10 @@ static Eina_Bool _update_samplerate_cb(void *data EINA_UNUSED, const Eo_Event *e
int samplerate = 0;
double speed = 0;
- eo_do(event->obj, samplerate = ecore_audio_obj_in_samplerate_get());
- eo_do(event->obj, speed = ecore_audio_obj_in_speed_get());
+ samplerate = ecore_audio_obj_in_samplerate_get(event->obj);
+ speed = ecore_audio_obj_in_speed_get(event->obj);
- eo_do(event->obj, stream = eo_key_data_get("pulse_data"));
+ stream = eo_key_data_get(event->obj, "pulse_data");
pa_operation_unref(pa_stream_update_sample_rate(stream, samplerate * speed, NULL, NULL));
@@ -115,28 +115,28 @@ static Eina_Bool _input_attach_internal(Eo *eo_obj, Eo *in)
Eina_Bool ret = EINA_FALSE;
Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_CLASS);
- eo_do_super(eo_obj, MY_CLASS, ret = ecore_audio_obj_out_input_attach(in));
+ ret = ecore_audio_obj_out_input_attach(eo_super(eo_obj, MY_CLASS), in);
if (!ret)
return EINA_FALSE;
ss.format = PA_SAMPLE_FLOAT32LE;
- eo_do(in, ss.rate = ecore_audio_obj_in_samplerate_get());
- eo_do(in, speed = ecore_audio_obj_in_speed_get());
- eo_do(in, ss.channels = ecore_audio_obj_in_channels_get());
- eo_do(in, name = ecore_audio_obj_name_get());
+ ss.rate = ecore_audio_obj_in_samplerate_get(in);
+ speed = ecore_audio_obj_in_speed_get(in);
+ ss.channels = ecore_audio_obj_in_channels_get(in);
+ name = ecore_audio_obj_name_get(in);
ss.rate = ss.rate * speed;
stream = pa_stream_new(class_vars.context, name, &ss, NULL);
if (!stream) {
ERR("Could not create stream");
- eo_do_super(eo_obj, MY_CLASS, ecore_audio_obj_out_input_detach(in));
+ ecore_audio_obj_out_input_detach(eo_super(eo_obj, MY_CLASS), in);
return EINA_FALSE;
}
- eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, _update_samplerate_cb, eo_obj));
+ eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, _update_samplerate_cb, eo_obj);
- eo_do(in, eo_key_data_set("pulse_data", stream));
+ eo_key_data_set(in, "pulse_data", stream);
pa_stream_set_write_callback(stream, _write_cb, in);
@@ -151,7 +151,7 @@ static Eina_Bool _input_attach_internal(Eo *eo_obj, Eo *in)
static Eina_Bool _delayed_attach_cb(void *data, const Eo_Event *event)
{
Eo *in = data;
- eo_do(event->obj, eo_event_callback_del(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, _delayed_attach_cb, in));
+ eo_event_callback_del(event->obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, _delayed_attach_cb, in);
_input_attach_internal(event->obj, in);
@@ -165,7 +165,7 @@ _ecore_audio_out_pulse_ecore_audio_out_input_attach(Eo *eo_obj, Ecore_Audio_Out_
if (class_vars.state != PA_CONTEXT_READY) {
DBG("Delaying input_attach because PA context is not ready.");
- eo_do(eo_obj, eo_event_callback_add(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, _delayed_attach_cb, in));
+ eo_event_callback_add(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, _delayed_attach_cb, in);
} else {
retval = _input_attach_internal(eo_obj, in);
}
@@ -186,11 +186,11 @@ _ecore_audio_out_pulse_ecore_audio_out_input_detach(Eo *eo_obj, Ecore_Audio_Out_
Eina_Bool ret2 = EINA_FALSE;
pa_operation *op;
- eo_do_super(eo_obj, MY_CLASS, ret2 = ecore_audio_obj_out_input_detach(in));
+ ret2 = ecore_audio_obj_out_input_detach(eo_super(eo_obj, MY_CLASS), in);
if (!ret2)
return EINA_FALSE;
- eo_do(in, stream = eo_key_data_get("pulse_data"));
+ stream = eo_key_data_get(in, "pulse_data");
pa_stream_set_write_callback(stream, NULL, NULL);
op = pa_stream_drain(stream, _drain_cb, NULL);
@@ -221,12 +221,12 @@ static void _state_cb(pa_context *context, void *data EINA_UNUSED)
if (state == PA_CONTEXT_READY) {
DBG("PA context ready.");
EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) {
- eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, NULL));
+ eo_event_callback_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, NULL);
}
} else if ((state == PA_CONTEXT_FAILED) || (state == PA_CONTEXT_TERMINATED)) {
DBG("PA context fail.");
EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) {
- eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL));
+ eo_event_callback_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL);
}
} else {
DBG("Connection state %i", state);
@@ -252,7 +252,7 @@ static void _state_job(void *data EINA_UNUSED)
}
// the callback here can delete things in the list..
EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) {
- eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL));
+ eo_event_callback_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL);
}
// now unref everything safely
EINA_LIST_FOREACH_SAFE(class_vars.outputs, out, tmp, eo_obj) {
@@ -269,7 +269,7 @@ _ecore_audio_out_pulse_eo_base_constructor(Eo *eo_obj, Ecore_Audio_Out_Pulse_Dat
char **argv;
Ecore_Audio_Output *out_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OUT_CLASS);
- eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
+ eo_obj = eo_constructor(eo_super(eo_obj, MY_CLASS));
out_obj->need_writer = EINA_FALSE;
@@ -296,7 +296,7 @@ EOLIAN static void
_ecore_audio_out_pulse_eo_base_destructor(Eo *eo_obj, Ecore_Audio_Out_Pulse_Data *_pd EINA_UNUSED)
{
class_vars.outputs = eina_list_remove(class_vars.outputs, eo_obj);
- eo_do_super(eo_obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(eo_obj, MY_CLASS));
}
#include "ecore_audio_out_pulse.eo.c"
diff --git a/src/lib/ecore_audio/ecore_audio_obj_out_sndfile.c b/src/lib/ecore_audio/ecore_audio_obj_out_sndfile.c
index d986b67dbf..e24cfeb0f7 100644
--- a/src/lib/ecore_audio/ecore_audio_obj_out_sndfile.c
+++ b/src/lib/ecore_audio/ecore_audio_obj_out_sndfile.c
@@ -43,7 +43,7 @@ static Eina_Bool _write_cb(void *data)
/* TODO: Support mixing of multiple inputs */
in = eina_list_data_get(out_obj->inputs);
- eo_do(in, bread = ecore_audio_obj_in_read(buf, 4*1024));
+ bread = ecore_audio_obj_in_read(in, buf, 4*1024);
if (bread == 0) {
sf_write_sync(obj->handle);
@@ -66,19 +66,19 @@ _ecore_audio_out_sndfile_ecore_audio_out_input_attach(Eo *eo_obj, Ecore_Audio_Ou
Ecore_Audio_Output *out_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OUT_CLASS);
Eina_Bool ret2 = EINA_FALSE;
- eo_do_super(eo_obj, MY_CLASS, ret2 = ecore_audio_obj_out_input_attach(in));
+ ret2 = ecore_audio_obj_out_input_attach(eo_super(eo_obj, MY_CLASS), in);
if (!ret2)
return EINA_FALSE;
- eo_do(in, obj->sfinfo.samplerate = ecore_audio_obj_in_samplerate_get());
- eo_do(in, obj->sfinfo.channels = ecore_audio_obj_in_channels_get());
+ obj->sfinfo.samplerate = ecore_audio_obj_in_samplerate_get(in);
+ obj->sfinfo.channels = ecore_audio_obj_in_channels_get(in);
obj->handle = sf_open(ea_obj->source, SFM_WRITE, &obj->sfinfo);
if (!obj->handle) {
eina_stringshare_del(ea_obj->source);
ea_obj->source = NULL;
- eo_do_super(eo_obj, MY_CLASS, ecore_audio_obj_out_input_detach(in));
+ ecore_audio_obj_out_input_detach(eo_super(eo_obj, MY_CLASS), in);
return EINA_FALSE;
}
@@ -163,9 +163,9 @@ _ecore_audio_out_sndfile_eo_base_constructor(Eo *eo_obj, Ecore_Audio_Out_Sndfile
{
Ecore_Audio_Output *out_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OUT_CLASS);
- eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
+ eo_obj = eo_constructor(eo_super(eo_obj, MY_CLASS));
- eo_do(eo_obj, ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_OGG));
+ ecore_audio_obj_format_set(eo_obj, ECORE_AUDIO_FORMAT_OGG);
// FIXME: Use writer from output
out_obj->need_writer = EINA_FALSE;
@@ -182,7 +182,7 @@ _ecore_audio_out_sndfile_eo_base_destructor(Eo *eo_obj, Ecore_Audio_Out_Sndfile_
if (out_obj->write_idler)
ecore_idler_del(out_obj->write_idler);
- eo_do_super(eo_obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(eo_obj, MY_CLASS));
}
#include "ecore_audio_out_sndfile.eo.c"
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index a08a15186a..8dd9d822cc 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -109,7 +109,7 @@ static const char *_ecore_con_pretty_ip(struct sockaddr *client_addr);
#define EO_CONSTRUCTOR_CHECK_RETURN(obj) do { \
Eina_Bool finalized; \
- if (eo_do_ret(obj, finalized, eo_finalized_get())) \
+ if (eo_finalized_get(obj)) \
{ \
ERR("This function is only allowed during construction."); \
return; \
@@ -306,10 +306,7 @@ _efl_network_base_lookup(Eo *kls_obj EINA_UNUSED, void *pd EINA_UNUSED, const ch
if (!name || !done_cb)
return EINA_FALSE;
- obj = eo_add(EFL_NETWORK_CONNECTOR_CLASS, NULL,
- efl_network_server_connection_type_set(ECORE_CON_REMOTE_TCP),
- efl_network_server_name_set(name),
- efl_network_base_port_set(1025));
+ obj = eo_add(EFL_NETWORK_CONNECTOR_CLASS, NULL, efl_network_server_connection_type_set(eoid, ECORE_CON_REMOTE_TCP), efl_network_server_name_set(eoid, name), efl_network_base_port_set(eoid, 1025));
lk = malloc(sizeof (Ecore_Con_Lookup));
if (!lk)
@@ -363,10 +360,7 @@ ecore_con_server_add(Ecore_Con_Type compl_type,
/* local system socket: FILE: /tmp/.ecore_service|[name]|[port] */
/* remote system socket: TCP/IP: [name]:[port] */
- obj = eo_add(EFL_NETWORK_SERVER_CLASS, NULL,
- efl_network_server_connection_type_set(compl_type),
- efl_network_server_name_set(name),
- efl_network_base_port_set(port));
+ obj = eo_add(EFL_NETWORK_SERVER_CLASS, NULL, efl_network_server_connection_type_set(eoid, compl_type), efl_network_server_name_set(eoid, name), efl_network_base_port_set(eoid, port));
ecore_con_server_data_set(obj, (void *) data);
@@ -376,7 +370,7 @@ ecore_con_server_add(Ecore_Con_Type compl_type,
EOLIAN static Eo *
_efl_network_server_eo_base_constructor(Ecore_Con_Server *obj, Efl_Network_Server_Data *svr)
{
- obj = eo_do_super_ret(obj, EFL_NETWORK_SERVER_CLASS, obj, eo_constructor());
+ obj = eo_constructor(eo_super(obj, EFL_NETWORK_SERVER_CLASS));
svr->fd = -1;
svr->reject_excess_clients = EINA_FALSE;
@@ -392,7 +386,7 @@ _efl_network_server_eo_base_finalize(Ecore_Con_Server *obj, Efl_Network_Server_D
Ecore_Con_Type compl_type = svr->type;
Ecore_Con_Type type;
- eo_do_super(obj, EFL_NETWORK_SERVER_CLASS, eo_finalize());
+ eo_finalize(eo_super(obj, EFL_NETWORK_SERVER_CLASS));
svr->created = EINA_TRUE;
svr->ppid = getpid();
@@ -462,10 +456,7 @@ ecore_con_server_connect(Ecore_Con_Type compl_type,
/* local user socket: FILE: ~/.ecore/[name]/[port] */
/* local system socket: FILE: /tmp/.ecore_service|[name]|[port] */
/* remote system socket: TCP/IP: [name]:[port] */
- obj = eo_add(EFL_NETWORK_CONNECTOR_CLASS, NULL,
- efl_network_server_connection_type_set(compl_type),
- efl_network_server_name_set(name),
- efl_network_base_port_set(port));
+ obj = eo_add(EFL_NETWORK_CONNECTOR_CLASS, NULL, efl_network_server_connection_type_set(eoid, compl_type), efl_network_server_name_set(eoid, name), efl_network_base_port_set(eoid, port));
ecore_con_server_data_set(obj, (void *) data);
@@ -481,7 +472,7 @@ _efl_network_connector_eo_base_finalize(Ecore_Con_Server *obj, void *pd EINA_UNU
/* XXX: We intentionally put SERVER class here and not connector, as we'd
* like to skip that one. */
- eo_do_super(obj, EFL_NETWORK_SERVER_CLASS, eo_finalize());
+ eo_finalize(eo_super(obj, EFL_NETWORK_SERVER_CLASS));
svr->use_cert = (compl_type & ECORE_CON_SSL & ECORE_CON_LOAD_CERT) == ECORE_CON_LOAD_CERT;
svr->disable_proxy = (compl_type & ECORE_CON_SUPER_SSL & ECORE_CON_NO_PROXY) == ECORE_CON_NO_PROXY;
@@ -548,7 +539,7 @@ error:
EAPI void
ecore_con_server_timeout_set(Ecore_Con *obj, double timeout)
{
- eo_do((Ecore_Con *)obj, efl_network_base_timeout_set(timeout));
+ efl_network_base_timeout_set((Ecore_Con *)obj, timeout);
}
EOLIAN static void
@@ -566,7 +557,7 @@ EAPI double
ecore_con_server_timeout_get(const Ecore_Con *obj)
{
double ret;
- return eo_do_ret((Ecore_Con *)obj, ret, efl_network_base_timeout_get());
+ return efl_network_base_timeout_get((Ecore_Con *)obj);
}
EOLIAN static double
@@ -620,7 +611,7 @@ EAPI Eina_Bool
ecore_con_server_connected_get(const Ecore_Con *obj)
{
Eina_Bool ret;
- return eo_do_ret((Ecore_Con *)obj, ret, efl_network_base_connected_get());
+ return efl_network_base_connected_get((Ecore_Con *)obj);
}
EOLIAN static Eina_Bool
@@ -670,7 +661,7 @@ EAPI int
ecore_con_server_port_get(const Ecore_Con *obj)
{
int ret;
- return eo_do_ret((Ecore_Con *)obj, ret, efl_network_base_port_get());
+ return efl_network_base_port_get((Ecore_Con *)obj);
}
EOLIAN static void
@@ -691,7 +682,7 @@ EAPI int
ecore_con_server_send(Ecore_Con *obj, const void *data, int size)
{
int ret;
- return eo_do_ret((Ecore_Con *)obj, ret, efl_network_base_send(data, size));
+ return efl_network_base_send((Ecore_Con *)obj, data, size);
}
EOLIAN static int
@@ -748,7 +739,7 @@ EAPI const char *
ecore_con_server_ip_get(const Ecore_Con *obj)
{
const char *ret;
- return eo_do_ret(obj, ret, efl_network_base_ip_get());
+ return efl_network_base_ip_get(obj);
}
EOLIAN static const char *
@@ -761,7 +752,7 @@ EAPI double
ecore_con_server_uptime_get(const Ecore_Con *obj)
{
double ret;
- return eo_do_ret(obj, ret, efl_network_base_uptime_get());
+ return efl_network_base_uptime_get(obj);
}
EOLIAN static double
@@ -773,7 +764,7 @@ _efl_network_server_efl_network_base_uptime_get(Eo *obj EINA_UNUSED, Efl_Network
EAPI void
ecore_con_server_flush(Ecore_Con *obj)
{
- eo_do((Ecore_Con *)obj, efl_network_base_flush());
+ efl_network_base_flush((Ecore_Con *)obj);
}
EOLIAN static void
@@ -803,7 +794,7 @@ EAPI int
ecore_con_client_send(Ecore_Con *obj, const void *data, int size)
{
int ret;
- return eo_do_ret((Ecore_Con *)obj, ret, efl_network_base_send(data, size));
+ return efl_network_base_send((Ecore_Con *)obj, data, size);
}
EOLIAN static int
@@ -871,7 +862,7 @@ EAPI Eina_Bool
ecore_con_client_connected_get(const Ecore_Con *obj)
{
Eina_Bool ret;
- return eo_do_ret((Ecore_Con *)obj, ret, efl_network_base_connected_get());
+ return efl_network_base_connected_get((Ecore_Con *)obj);
}
EOLIAN static void
@@ -885,7 +876,7 @@ _efl_network_client_efl_network_base_timeout_set(Eo *obj, Efl_Network_Client_Dat
EAPI void
ecore_con_client_timeout_set(Ecore_Con *obj, double timeout)
{
- eo_do((Ecore_Con *)obj, efl_network_base_timeout_set(timeout));
+ efl_network_base_timeout_set((Ecore_Con *)obj, timeout);
}
EOLIAN static double
@@ -898,7 +889,7 @@ EAPI double
ecore_con_client_timeout_get(const Ecore_Con *obj)
{
double ret;
- return eo_do_ret((Ecore_Con *)obj, ret, efl_network_base_timeout_get());
+ return efl_network_base_timeout_get((Ecore_Con *)obj);
}
EAPI void *
@@ -950,7 +941,7 @@ EAPI const char *
ecore_con_client_ip_get(const Ecore_Con *obj)
{
const char *ret;
- return eo_do_ret(obj, ret, efl_network_base_ip_get());
+ return efl_network_base_ip_get(obj);
}
EOLIAN static int
@@ -978,7 +969,7 @@ EAPI int
ecore_con_client_port_get(const Ecore_Con *obj)
{
int ret;
- return eo_do_ret((Ecore_Con *)obj, ret, efl_network_base_port_get());
+ return efl_network_base_port_get((Ecore_Con *)obj);
}
EOLIAN static double
@@ -991,7 +982,7 @@ EAPI double
ecore_con_client_uptime_get(const Ecore_Con *obj)
{
double ret;
- return eo_do_ret(obj, ret, efl_network_base_uptime_get());
+ return efl_network_base_uptime_get(obj);
}
EOLIAN static void
@@ -1003,14 +994,14 @@ _efl_network_client_efl_network_base_flush(Eo *obj, Efl_Network_Client_Data *cl
EAPI void
ecore_con_client_flush(Ecore_Con *obj)
{
- eo_do((Ecore_Con *)obj, efl_network_base_flush());
+ efl_network_base_flush((Ecore_Con *)obj);
}
EAPI int
ecore_con_server_fd_get(const Ecore_Con *obj)
{
int ret;
- return eo_do_ret((Ecore_Con *)obj, ret, efl_network_base_fd_get());
+ return efl_network_base_fd_get((Ecore_Con *)obj);
}
EOLIAN static int
@@ -1031,7 +1022,7 @@ EAPI int
ecore_con_client_fd_get(const Ecore_Con *obj)
{
int ret;
- return eo_do_ret((Ecore_Con *)obj, ret, efl_network_base_fd_get());
+ return efl_network_base_fd_get((Ecore_Con *)obj);
}
/**
@@ -1077,7 +1068,7 @@ ecore_con_event_server_add(Ecore_Con_Server *obj)
if (svr->upgrade) ev = ECORE_CON_EVENT_SERVER_UPGRADE;
ecore_event_add(ev, e,
_ecore_con_event_server_add_free, NULL);
- eo_do(obj, eo_event_callback_call(EFL_NETWORK_BASE_EVENT_CONNECTION_UPGRADED, NULL));
+ eo_event_callback_call(obj, EFL_NETWORK_BASE_EVENT_CONNECTION_UPGRADED, NULL);
_ecore_con_event_count++;
}
@@ -1156,7 +1147,7 @@ ecore_con_event_server_data(Ecore_Con_Server *obj, unsigned char *buf, int num,
Ecore_Con_Event_Data_Received event_info = { NULL, 0 };
event_info.data = e->data;
event_info.size = e->size;
- eo_do(obj, eo_event_callback_call(EFL_NETWORK_BASE_EVENT_DATA_RECEIVED, &event_info));
+ eo_event_callback_call(obj, EFL_NETWORK_BASE_EVENT_DATA_RECEIVED, &event_info);
}
_ecore_con_event_count++;
}
@@ -1181,7 +1172,7 @@ ecore_con_event_client_add(Ecore_Con_Client *obj)
if (cl->upgrade) ev = ECORE_CON_EVENT_CLIENT_UPGRADE;
ecore_event_add(ev, e,
(Ecore_End_Cb)_ecore_con_event_client_add_free, cl->host_server);
- eo_do(obj, eo_event_callback_call(EFL_NETWORK_BASE_EVENT_CONNECTION_UPGRADED, NULL));
+ eo_event_callback_call(obj, EFL_NETWORK_BASE_EVENT_CONNECTION_UPGRADED, NULL);
_ecore_con_event_count++;
}
@@ -1263,7 +1254,7 @@ ecore_con_event_client_data(Ecore_Con_Client *obj, unsigned char *buf, int num,
Ecore_Con_Event_Data_Received event_info = { NULL, 0 };
event_info.data = e->data;
event_info.size = e->size;
- eo_do(obj, eo_event_callback_call(EFL_NETWORK_BASE_EVENT_DATA_RECEIVED, &event_info));
+ eo_event_callback_call(obj, EFL_NETWORK_BASE_EVENT_DATA_RECEIVED, &event_info);
}
_ecore_con_event_count++;
}
@@ -1289,7 +1280,7 @@ _ecore_con_event_server_error(Ecore_Con_Server *obj, char *error, Eina_Bool dupl
DBG("%s", error);
svr->event_count = eina_list_append(svr->event_count, e);
ecore_event_add(ECORE_CON_EVENT_SERVER_ERROR, e, (Ecore_End_Cb)_ecore_con_event_server_error_free, NULL);
- eo_do(obj, eo_event_callback_call(EFL_NETWORK_BASE_EVENT_CONNECTION_ERROR, e->error));
+ eo_event_callback_call(obj, EFL_NETWORK_BASE_EVENT_CONNECTION_ERROR, e->error);
_ecore_con_event_count++;
}
@@ -1310,7 +1301,7 @@ ecore_con_event_client_error(Ecore_Con_Client *obj, const char *error)
cl->event_count = eina_list_append(cl->event_count, e);
host_server->event_count = eina_list_append(host_server->event_count, e);
ecore_event_add(ECORE_CON_EVENT_CLIENT_ERROR, e, (Ecore_End_Cb)_ecore_con_event_client_error_free, cl->host_server);
- eo_do(obj, eo_event_callback_call(EFL_NETWORK_BASE_EVENT_CONNECTION_ERROR, e->error));
+ eo_event_callback_call(obj, EFL_NETWORK_BASE_EVENT_CONNECTION_ERROR, e->error);
_ecore_con_event_count++;
}
@@ -1397,7 +1388,7 @@ _efl_network_server_eo_base_destructor(Eo *obj, Efl_Network_Server_Data *svr)
servers = eina_list_remove(servers, obj);
svr->data = NULL;
- eo_do_super(obj, EFL_NETWORK_SERVER_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, EFL_NETWORK_SERVER_CLASS));
end:
return;
}
@@ -1460,7 +1451,7 @@ _efl_network_client_eo_base_destructor(Eo *obj, Efl_Network_Client_Data *cl)
eina_stringshare_del(cl->ip);
cl->data = NULL;
- eo_do_super(obj, EFL_NETWORK_CLIENT_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, EFL_NETWORK_CLIENT_CLASS));
}
static Eina_Bool
diff --git a/src/lib/ecore_con/ecore_con_eet.c b/src/lib/ecore_con/ecore_con_eet.c
index 9720b5799f..800770c636 100644
--- a/src/lib/ecore_con/ecore_con_eet.c
+++ b/src/lib/ecore_con/ecore_con_eet.c
@@ -580,7 +580,7 @@ _ecore_con_eet_base_register(Eo *obj EINA_UNUSED, Ecore_Con_Eet_Base_Data *pd, c
EOLIAN static Eo_Base *
_ecore_con_eet_server_obj_eo_base_constructor(Eo *obj, Ecore_Con_Eet_Server_Obj_Data *pd EINA_UNUSED)
{
- obj = eo_do_super_ret(obj, ECORE_CON_EET_SERVER_OBJ_CLASS, obj, eo_constructor());
+ obj = eo_constructor(eo_super(obj, ECORE_CON_EET_SERVER_OBJ_CLASS));
if (!obj) return NULL;
@@ -615,13 +615,13 @@ _ecore_con_eet_server_obj_eo_base_destructor(Eo *obj, Ecore_Con_Eet_Server_Obj_D
ecore_event_handler_del(pd->handler_del);
ecore_event_handler_del(pd->handler_data);
- eo_do_super(obj, ECORE_CON_EET_SERVER_OBJ_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, ECORE_CON_EET_SERVER_OBJ_CLASS));
}
EOLIAN static Eo_Base *
_ecore_con_eet_client_obj_eo_base_constructor(Eo *obj, Ecore_Con_Eet_Client_Obj_Data *pd EINA_UNUSED)
{
- obj = eo_do_super_ret(obj, ECORE_CON_EET_CLIENT_OBJ_CLASS, obj, eo_constructor());
+ obj = eo_constructor(eo_super(obj, ECORE_CON_EET_CLIENT_OBJ_CLASS));
if (!obj) return NULL;
@@ -654,13 +654,13 @@ _ecore_con_eet_client_obj_eo_base_destructor(Eo *obj, Ecore_Con_Eet_Client_Obj_D
ecore_event_handler_del(pd->handler_del);
ecore_event_handler_del(pd->handler_data);
- eo_do_super(obj, ECORE_CON_EET_CLIENT_OBJ_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, ECORE_CON_EET_CLIENT_OBJ_CLASS));
}
EOLIAN static Eo_Base *
_ecore_con_eet_base_eo_base_constructor(Eo *obj, Ecore_Con_Eet_Base_Data *pd)
{
- obj = eo_do_super_ret(obj, ECORE_CON_EET_BASE_CLASS, obj, eo_constructor());
+ obj = eo_constructor(eo_super(obj, ECORE_CON_EET_BASE_CLASS));
if (!obj) return NULL;
@@ -675,7 +675,7 @@ _ecore_con_eet_base_eo_base_constructor(Eo *obj, Ecore_Con_Eet_Base_Data *pd)
EOLIAN static void
_ecore_con_eet_base_eo_base_destructor(Eo *obj, Ecore_Con_Eet_Base_Data *pd)
{
- eo_do_super(obj, ECORE_CON_EET_BASE_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, ECORE_CON_EET_BASE_CLASS));
eet_data_descriptor_free(pd->edd);
eet_data_descriptor_free(pd->matching);
@@ -722,8 +722,7 @@ ecore_con_eet_server_new(Ecore_Con_Server *server)
if (!server) return NULL;
- ece_obj = eo_add(ECORE_CON_EET_SERVER_OBJ_CLASS, NULL,
- ecore_con_eet_base_server_set(server));
+ ece_obj = eo_add(ECORE_CON_EET_SERVER_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(eoid, server));
return ece_obj;
}
@@ -735,8 +734,7 @@ ecore_con_eet_client_new(Ecore_Con_Server *server)
if (!server) return NULL;
- ece_obj = eo_add(ECORE_CON_EET_CLIENT_OBJ_CLASS, NULL,
- ecore_con_eet_base_server_set(server));
+ ece_obj = eo_add(ECORE_CON_EET_CLIENT_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(eoid, server));
return ece_obj;
}
@@ -750,31 +748,31 @@ ecore_con_eet_server_free(Ecore_Con_Eet *r)
EAPI void
ecore_con_eet_register(Ecore_Con_Eet *ece, const char *name, Eet_Data_Descriptor *edd)
{
- eo_do(ece, ecore_con_eet_base_register(name, edd));
+ ecore_con_eet_base_register(ece, name, edd);
}
EAPI void
ecore_con_eet_data_callback_add(Ecore_Con_Eet *ece, const char *name, Ecore_Con_Eet_Data_Cb func, const void *data)
{
- eo_do(ece, ecore_con_eet_base_data_callback_set(name, func, data));
+ ecore_con_eet_base_data_callback_set(ece, name, func, data);
}
EAPI void
ecore_con_eet_data_callback_del(Ecore_Con_Eet *ece, const char *name)
{
- eo_do(ece, ecore_con_eet_base_data_callback_del(name));
+ ecore_con_eet_base_data_callback_del(ece, name);
}
EAPI void
ecore_con_eet_raw_data_callback_add(Ecore_Con_Eet *ece, const char *name, Ecore_Con_Eet_Raw_Data_Cb func, const void *data)
{
- eo_do(ece, ecore_con_eet_base_raw_data_callback_set(name, func, data));
+ ecore_con_eet_base_raw_data_callback_set(ece, name, func, data);
}
EAPI void
ecore_con_eet_raw_data_callback_del(Ecore_Con_Eet *ece, const char *name)
{
- eo_do(ece, ecore_con_eet_base_raw_data_callback_del(name));
+ ecore_con_eet_base_raw_data_callback_del(ece, name);
}
EAPI void
@@ -920,7 +918,7 @@ ecore_con_eet_server_disconnect_callback_del(Ecore_Con_Eet *ece, Ecore_Con_Eet_S
EAPI void
ecore_con_eet_data_set(Ecore_Con_Eet *ece, const void *data)
{
- eo_do(ece,eo_key_data_set(ECORE_CON_EET_DATA_KEY, data));
+ eo_key_data_set(ece, ECORE_CON_EET_DATA_KEY, data);
}
EAPI const void *
@@ -928,7 +926,7 @@ ecore_con_eet_data_get(Ecore_Con_Eet *ece)
{
const void *temp;
- return eo_do_ret(ece, temp, eo_key_data_get(ECORE_CON_EET_DATA_KEY));
+ return eo_key_data_get(ece, ECORE_CON_EET_DATA_KEY);
}
EAPI Ecore_Con_Eet *
@@ -941,15 +939,13 @@ ecore_con_eet_reply(Ecore_Con_Reply *reply)
EAPI void
ecore_con_eet_send(Ecore_Con_Reply *reply, const char *name, void *value)
{
- eo_do(reply->ece, ecore_con_eet_base_send(reply, name, value));
+ ecore_con_eet_base_send(reply->ece, reply, name, value);
}
EAPI void
ecore_con_eet_raw_send(Ecore_Con_Reply *reply, const char *protocol_name, const char *section, void *value, unsigned int length)
{
- eo_do(reply->ece,
- ecore_con_eet_base_raw_send(reply, protocol_name, section, value,
- length));
+ ecore_con_eet_base_raw_send(reply->ece, reply, protocol_name, section, value, length);
}
#include "ecore_con_eet_base.eo.c"
diff --git a/src/lib/ecore_con/ecore_con_legacy.c b/src/lib/ecore_con/ecore_con_legacy.c
index 0b84b90d45..fd05522dd4 100644
--- a/src/lib/ecore_con/ecore_con_legacy.c
+++ b/src/lib/ecore_con/ecore_con_legacy.c
@@ -5,7 +5,7 @@ EAPI Eina_Bool
ecore_con_url_url_set(Ecore_Con_Url *obj, const char *url)
{
Eina_Bool ret;
- eo_do((Ecore_Con_Url *)obj, ret = efl_network_url_set(url));
+ ret = efl_network_url_set((Ecore_Con_Url *)obj, url);
return ret;
}
@@ -13,7 +13,7 @@ EAPI const char *
ecore_con_url_url_get(const Ecore_Con_Url *obj)
{
const char * ret;
- eo_do((Ecore_Con_Url *)obj, ret = efl_network_url_get());
+ ret = efl_network_url_get((Ecore_Con_Url *)obj);
return ret;
}
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index 049d4f2a7e..000bf4d016 100644
--- a/src/lib/ecore_con/ecore_con_url.c
+++ b/src/lib/ecore_con/ecore_con_url.c
@@ -225,12 +225,9 @@ EAPI Ecore_Con_Url *
ecore_con_url_new(const char *url)
{
Ecore_Con_Url *url_obj;
- url_obj = eo_add(EFL_NETWORK_URL_CLASS, NULL,
- efl_network_url_set(url));
+ url_obj = eo_add(EFL_NETWORK_URL_CLASS, NULL, efl_network_url_set(eoid, url));
- eo_do(url_obj,
- eo_event_callback_array_add(efl_network_url_event_table_callbacks(),
- NULL));
+ eo_event_callback_array_add(url_obj, efl_network_url_event_table_callbacks(), NULL);
return url_obj;
}
@@ -238,7 +235,7 @@ ecore_con_url_new(const char *url)
EOLIAN static Eo *
_efl_network_url_eo_base_constructor(Efl_Network_Url *url_obj, Efl_Network_Url_Data *url_con EINA_UNUSED)
{
- url_obj = eo_do_super_ret(url_obj, MY_CLASS, url_obj, eo_constructor());
+ url_obj = eo_constructor(eo_super(url_obj, MY_CLASS));
if (!_init_count || !_c_init())
{
@@ -338,7 +335,7 @@ _efl_network_url_eo_base_finalize(Efl_Network_Url *url_obj, Efl_Network_Url_Data
*/
_c->curl_easy_setopt(url_con->curl_easy, CURLOPT_CONNECTTIMEOUT, 30);
_c->curl_easy_setopt(url_con->curl_easy, CURLOPT_FOLLOWLOCATION, 1);
- return eo_do_super_ret(url_obj, MY_CLASS, url_obj, eo_finalize());
+ return eo_finalize(eo_super(url_obj, MY_CLASS));
}
EAPI Ecore_Con_Url *
@@ -375,9 +372,7 @@ ecore_con_url_free(Ecore_Con_Url *url_obj)
if (!eo_isa(url_obj, EFL_NETWORK_URL_CLASS))
return;
- eo_do(url_obj,
- eo_event_callback_array_del(efl_network_url_event_table_callbacks(),
- NULL));
+ eo_event_callback_array_del(url_obj, efl_network_url_event_table_callbacks(), NULL);
eo_del(url_obj);
}
@@ -400,7 +395,7 @@ _ecore_con_url_free_internal(Ecore_Con_Url *url_obj)
EOLIAN static void
_efl_network_url_eo_base_destructor(Efl_Network_Url *url_obj, Efl_Network_Url_Data *url_con)
{
- eo_do_super(url_obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(url_obj, MY_CLASS));
if (!_c) return;
if (url_con->curl_easy)
@@ -1145,7 +1140,7 @@ _ecore_con_url_event_url_complete(Ecore_Con_Url *url_obj, CURLMsg *curlmsg)
e.status = status;
e.url_con = url_obj;
url_con->event_count++;
- eo_do(url_obj, eo_event_callback_call(EFL_NETWORK_URL_EVENT_COMPLETE, &e));
+ eo_event_callback_call(url_obj, EFL_NETWORK_URL_EVENT_COMPLETE, &e);
}
static void
@@ -1206,7 +1201,7 @@ _ecore_con_url_data_cb(void *buffer, size_t size, size_t nitems, void *userp)
e.size = real_size;
e.data = buffer;
url_con->event_count++;
- eo_do(url_obj, eo_event_callback_call(EFL_NETWORK_URL_EVENT_DATA, &e));
+ eo_event_callback_call(url_obj, EFL_NETWORK_URL_EVENT_DATA, &e);
}
else
{
@@ -1265,7 +1260,7 @@ _ecore_con_url_progress_cb(void *clientp, double dltotal, double dlnow, double u
e.up.total = ultotal;
e.up.now = ulnow;
url_con->event_count++;
- eo_do(url_obj, eo_event_callback_call(EFL_NETWORK_URL_EVENT_PROGRESS, &e));
+ eo_event_callback_call(url_obj, EFL_NETWORK_URL_EVENT_PROGRESS, &e);
return 0;
}
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 7b5a3a5851..2a135f95b5 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -3087,7 +3087,7 @@ ecore_evas_animator_tick(Ecore_Evas *ee, Eina_Rectangle *viewport)
a.update_area = *viewport;
}
- eo_do(ee->evas, eo_event_callback_call(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, &a));
+ eo_event_callback_call(ee->evas, EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, &a);
// FIXME: We do not support partial animator in the subcanvas
EINA_LIST_FOREACH(ee->sub_ecore_evas, l, subee)
@@ -3219,7 +3219,7 @@ _ecore_evas_register(Ecore_Evas *ee)
ecore_evases = (Ecore_Evas *)eina_inlist_prepend
(EINA_INLIST_GET(ecore_evases), EINA_INLIST_GET(ee));
- eo_do(ee->evas, eo_event_callback_array_add(animator_watch(), ee));
+ eo_event_callback_array_add(ee->evas, animator_watch(), ee);
#ifdef RENDER_SYNC
ecore_evas_first = EINA_TRUE;
diff --git a/src/lib/ector/cairo/ector_cairo_private.h b/src/lib/ector/cairo/ector_cairo_private.h
index 4b9ac0cdc5..1b38e34cff 100644
--- a/src/lib/ector/cairo/ector_cairo_private.h
+++ b/src/lib/ector/cairo/ector_cairo_private.h
@@ -65,7 +65,7 @@ _ector_cairo_symbol_get(Ector_Renderer_Generic_Base_Data *base,
{
void *sym;
- eo_do(base->surface, sym = ector_cairo_surface_symbol_get(name));
+ sym = ector_cairo_surface_symbol_get(base->surface, name);
return sym;
}
diff --git a/src/lib/ector/cairo/ector_cairo_software_surface.c b/src/lib/ector/cairo/ector_cairo_software_surface.c
index ef4100f561..2ce001e9f4 100644
--- a/src/lib/ector/cairo/ector_cairo_software_surface.c
+++ b/src/lib/ector/cairo/ector_cairo_software_surface.c
@@ -18,8 +18,7 @@ _ector_cairo_symbol_get(Eo *ector_surface, const char *name)
{
void *sym;
- eo_do(ector_surface,
- sym = ector_cairo_surface_symbol_get(name));
+ sym = ector_cairo_surface_symbol_get(ector_surface, name);
return sym;
}
@@ -74,9 +73,7 @@ _ector_cairo_software_surface_ector_generic_buffer_pixels_set(Eo *obj, Ector_Cai
cairo_surface_destroy(pd->surface);
pd->surface = NULL;
- eo_do_super(obj, MY_CLASS,
- ok = ector_buffer_pixels_set(pixels, width, height, stride,
- cspace, writable, l, r, t, b));
+ ok = ector_buffer_pixels_set(eo_super(obj, MY_CLASS), pixels, width, height, stride, cspace, writable, l, r, t, b);
if (ok && pixels)
{
@@ -90,7 +87,7 @@ _ector_cairo_software_surface_ector_generic_buffer_pixels_set(Eo *obj, Ector_Cai
end:
/* evas_common_cpu_end_opt(); // do we need this? */
- eo_do(obj, ector_cairo_surface_context_set(ctx));
+ ector_cairo_surface_context_set(obj, ctx);
return ok;
}
@@ -105,7 +102,7 @@ _ector_cairo_software_surface_surface_get(Eo *obj EINA_UNUSED, Ector_Cairo_Softw
static Eo_Base *
_ector_cairo_software_surface_eo_base_constructor(Eo *obj, Ector_Cairo_Software_Surface_Data *pd)
{
- eo_do_super(obj, MY_CLASS, obj = eo_constructor());
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
if (!obj) return NULL;
pd->base = eo_data_ref(obj, ECTOR_SOFTWARE_BUFFER_BASE_MIXIN);
@@ -118,7 +115,7 @@ EOLIAN static void
_ector_cairo_software_surface_eo_base_destructor(Eo *obj, Ector_Cairo_Software_Surface_Data *pd)
{
eo_data_unref(obj, pd->base);
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
#include "ector_cairo_software_surface.eo.c"
diff --git a/src/lib/ector/cairo/ector_cairo_surface.c b/src/lib/ector/cairo/ector_cairo_surface.c
index 12538e7763..3cc47e3460 100644
--- a/src/lib/ector/cairo/ector_cairo_surface.c
+++ b/src/lib/ector/cairo/ector_cairo_surface.c
@@ -62,14 +62,11 @@ _ector_cairo_surface_ector_generic_surface_renderer_factory_new(Eo *obj,
const Eo_Class *type)
{
if (type == ECTOR_RENDERER_GENERIC_SHAPE_MIXIN)
- return eo_add(ECTOR_RENDERER_CAIRO_SHAPE_CLASS, NULL,
- ector_renderer_surface_set(obj));
+ return eo_add(ECTOR_RENDERER_CAIRO_SHAPE_CLASS, NULL, ector_renderer_surface_set(eoid, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN)
- return eo_add(ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, NULL,
- ector_renderer_surface_set(obj));
+ return eo_add(ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, NULL, ector_renderer_surface_set(eoid, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN)
- return eo_add(ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, NULL,
- ector_renderer_surface_set(obj));
+ return eo_add(ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, NULL, ector_renderer_surface_set(eoid, obj));
ERR("Couldn't find class for type: %s\n", eo_class_name_get(type));
return NULL;
@@ -124,7 +121,7 @@ _ector_cairo_surface_eo_base_constructor(Eo *obj,
USE(obj, cairo_image_surface_create, NULL);
USE(obj, cairo_create, NULL);
- eo_do_super(obj, ECTOR_CAIRO_SURFACE_CLASS, obj = eo_constructor());
+ obj = eo_constructor(eo_super(obj, ECTOR_CAIRO_SURFACE_CLASS));
if (!obj) return NULL;
_cairo_count++;
@@ -138,7 +135,7 @@ static void
_ector_cairo_surface_eo_base_destructor(Eo *obj EINA_UNUSED,
Ector_Cairo_Surface_Data *pd EINA_UNUSED)
{
- eo_do_super(obj, ECTOR_CAIRO_SURFACE_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, ECTOR_CAIRO_SURFACE_CLASS));
if (--_cairo_count) return ;
if (_cairo_so) eina_module_free(_cairo_so);
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_base.c b/src/lib/ector/cairo/ector_renderer_cairo_base.c
index 24acfa071e..1afc3d587f 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_base.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_base.c
@@ -182,7 +182,7 @@ _ector_renderer_cairo_base_ector_renderer_generic_base_draw(Eo *obj EINA_UNUSED,
static Eo *
_ector_renderer_cairo_base_eo_base_constructor(Eo *obj, Ector_Renderer_Cairo_Base_Data *pd EINA_UNUSED)
{
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_BASE_CLASS, obj = eo_constructor());
+ obj = eo_constructor(eo_super(obj, ECTOR_RENDERER_CAIRO_BASE_CLASS));
if (!obj) return NULL;
pd->generic = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, obj);
@@ -193,7 +193,7 @@ _ector_renderer_cairo_base_eo_base_constructor(Eo *obj, Ector_Renderer_Cairo_Bas
static Eo_Base *
_ector_renderer_cairo_base_eo_base_finalize(Eo *obj, Ector_Renderer_Cairo_Base_Data *pd)
{
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_BASE_CLASS, obj = eo_finalize());
+ obj = eo_finalize(eo_super(obj, ECTOR_RENDERER_CAIRO_BASE_CLASS));
if (!obj) return NULL;
USE(pd->generic, cairo_matrix_init, NULL);
@@ -223,7 +223,7 @@ _ector_renderer_cairo_base_eo_base_destructor(Eo *obj, Ector_Renderer_Cairo_Base
free(pd->m);
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_BASE_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, ECTOR_RENDERER_CAIRO_BASE_CLASS));
}
#include "ector_renderer_cairo_base.eo.c"
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c b/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c
index 21ec2c3053..1d9c72da78 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_linear.c
@@ -48,7 +48,7 @@ static Eina_Bool
_ector_renderer_cairo_gradient_linear_ector_renderer_generic_base_prepare(Eo *obj,
Ector_Renderer_Cairo_Gradient_Linear_Data *pd)
{
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, ector_renderer_prepare());
+ ector_renderer_prepare(eo_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS));
if (!pd->parent)
{
@@ -78,7 +78,7 @@ _ector_renderer_cairo_gradient_linear_ector_renderer_generic_base_draw(Eo *obj,
pat = _ector_renderer_cairo_gradient_linear_prepare(obj, gld, gd, mul_col);
if (!pat) return EINA_FALSE;
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, ector_renderer_draw(op, clips, mul_col));
+ ector_renderer_draw(eo_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS), op, clips, mul_col);
cairo_rectangle(pd->parent->cairo, gld->start.x, gld->start.y,
gld->end.x - gld->start.x,
@@ -134,7 +134,7 @@ _ector_renderer_cairo_gradient_linear_eo_base_finalize(Eo *obj, Ector_Renderer_C
{
Ector_Renderer_Generic_Base_Data *base;
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, obj = eo_finalize());
+ obj = eo_finalize(eo_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS));
if (!obj) return NULL;
base = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS);
@@ -161,7 +161,7 @@ _ector_renderer_cairo_gradient_linear_eo_base_destructor(Eo *obj,
base = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS);
eo_data_xunref(base->surface, pd->parent, obj);
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS));
}
static void
@@ -170,8 +170,7 @@ _ector_renderer_cairo_gradient_linear_efl_gfx_gradient_base_stop_set(Eo *obj,
const Efl_Gfx_Gradient_Stop *colors,
unsigned int length)
{
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS,
- efl_gfx_gradient_stop_set(colors, length));
+ efl_gfx_gradient_stop_set(eo_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS), colors, length);
}
static unsigned int
@@ -181,8 +180,7 @@ _ector_renderer_cairo_gradient_linear_ector_renderer_generic_base_crc_get(Eo *ob
Ector_Renderer_Generic_Gradient_Data *gd;
unsigned int crc;
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS,
- crc = ector_renderer_crc_get());
+ crc = ector_renderer_crc_get(eo_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS));
gld = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN);
gd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_MIXIN);
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
index 6c4906c4ea..b075f886b2 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_gradient_radial.c
@@ -34,7 +34,7 @@ struct _Ector_Renderer_Cairo_Gradient_Radial_Data
static Eina_Bool
_ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_prepare(Eo *obj, Ector_Renderer_Cairo_Gradient_Radial_Data *pd)
{
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, ector_renderer_prepare());
+ ector_renderer_prepare(eo_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS));
if (!pd->parent)
{
@@ -82,7 +82,7 @@ _ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_draw(Eo *obj,
pat = _ector_renderer_cairo_gradient_radial_prepare(obj, grd, gd, mul_col);
if (!pat) return EINA_FALSE;
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, ector_renderer_draw(op, clips, mul_col));
+ ector_renderer_draw(eo_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS), op, clips, mul_col);
cairo_arc(pd->parent->cairo,
grd->radial.x, grd->radial.y,
@@ -139,7 +139,7 @@ _ector_renderer_cairo_gradient_radial_eo_base_finalize(Eo *obj, Ector_Renderer_C
{
Ector_Renderer_Generic_Base_Data *base;
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, obj = eo_finalize());
+ obj = eo_finalize(eo_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS));
if (!obj) return NULL;
base = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS);
@@ -165,7 +165,7 @@ _ector_renderer_cairo_gradient_radial_eo_base_destructor(Eo *obj,
base = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS);
eo_data_xunref(base->surface, pd->parent, obj);
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS));
}
static void
@@ -174,8 +174,7 @@ _ector_renderer_cairo_gradient_radial_efl_gfx_gradient_base_stop_set(Eo *obj,
const Efl_Gfx_Gradient_Stop *colors,
unsigned int length)
{
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS,
- efl_gfx_gradient_stop_set(colors, length));
+ efl_gfx_gradient_stop_set(eo_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS), colors, length);
}
static unsigned int
@@ -185,8 +184,7 @@ _ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_crc_get(Eo *ob
Ector_Renderer_Generic_Gradient_Data *gd;
unsigned int crc;
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS,
- crc = ector_renderer_crc_get());
+ crc = ector_renderer_crc_get(eo_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS));
grd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN);
gd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_MIXIN);
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.c b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
index 2292155425..99e3016b87 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_shape.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
@@ -92,14 +92,14 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_prepare(Eo *obj, Ector_R
const Efl_Gfx_Path_Command *cmds = NULL;
const double *pts = NULL;
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, ector_renderer_prepare());
+ ector_renderer_prepare(eo_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS));
if (pd->shape->fill)
- eo_do(pd->shape->fill, ector_renderer_prepare());
+ ector_renderer_prepare(pd->shape->fill);
if (pd->shape->stroke.fill)
- eo_do(pd->shape->stroke.fill, ector_renderer_prepare());
+ ector_renderer_prepare(pd->shape->stroke.fill);
if (pd->shape->stroke.marker)
- eo_do(pd->shape->stroke.marker, ector_renderer_prepare());
+ ector_renderer_prepare(pd->shape->stroke.marker);
// shouldn't that be moved to the cairo base object
if (!pd->parent)
@@ -110,7 +110,7 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_prepare(Eo *obj, Ector_R
pd->parent = eo_data_xref(base->surface, ECTOR_CAIRO_SURFACE_CLASS, obj);
}
- eo_do(obj, efl_gfx_shape_path_get(&cmds, &pts));
+ efl_gfx_shape_path_get(obj, &cmds, &pts);
if (!pd->path && cmds)
{
cairo_new_path(pd->parent->cairo);
@@ -163,26 +163,26 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rend
cairo_save(pd->parent->cairo);
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, ector_renderer_draw(op, clips, mul_col));
+ ector_renderer_draw(eo_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS), op, clips, mul_col);
cairo_new_path(pd->parent->cairo);
cairo_append_path(pd->parent->cairo, pd->path);
- eo_do(obj, fill_rule = efl_gfx_shape_fill_rule_get());
+ fill_rule = efl_gfx_shape_fill_rule_get(obj);
if (fill_rule == EFL_GFX_FILL_RULE_ODD_EVEN)
cairo_set_fill_rule(pd->parent->cairo, CAIRO_FILL_RULE_EVEN_ODD);
else
cairo_set_fill_rule(pd->parent->cairo, CAIRO_FILL_RULE_WINDING);
if (pd->shape->fill)
- eo_do(pd->shape->fill, ector_renderer_cairo_base_fill(mul_col));
+ ector_renderer_cairo_base_fill(pd->shape->fill, mul_col);
if (pd->shape->stroke.fill || pd->public_shape->stroke.color.a > 0)
{
cairo_fill_preserve(pd->parent->cairo);
if (pd->shape->stroke.fill)
- eo_do(pd->shape->stroke.fill, ector_renderer_cairo_base_fill(mul_col));
+ ector_renderer_cairo_base_fill(pd->shape->stroke.fill, mul_col);
else
{
r = (((pd->public_shape->stroke.color.r * R_VAL(&mul_col)) + 0xff) >> 8);
@@ -240,7 +240,7 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_bounds_get(Eo *obj,
Ector_Renderer_Cairo_Base_Data *bd;
// FIXME: It should be possible to actually ask cairo about that
- eo_do(obj, efl_gfx_shape_bounds_get(r));
+ efl_gfx_shape_bounds_get(obj, r);
bd = eo_data_scope_get(obj, ECTOR_RENDERER_CAIRO_BASE_CLASS);
r->x += bd->generic->origin.x;
@@ -250,7 +250,7 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_bounds_get(Eo *obj,
Eo *
_ector_renderer_cairo_shape_eo_base_constructor(Eo *obj, Ector_Renderer_Cairo_Shape_Data *pd)
{
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, obj = eo_constructor());
+ obj = eo_constructor(eo_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS));
if (!obj) return NULL;
@@ -258,8 +258,7 @@ _ector_renderer_cairo_shape_eo_base_constructor(Eo *obj, Ector_Renderer_Cairo_Sh
pd->shape = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_SHAPE_MIXIN, obj);
pd->base = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, obj);
- eo_do(obj,
- eo_event_callback_add(EFL_GFX_PATH_CHANGED, _ector_renderer_cairo_shape_path_changed, pd));
+ eo_event_callback_add(obj, EFL_GFX_PATH_CHANGED, _ector_renderer_cairo_shape_path_changed, pd);
return obj;
}
@@ -267,7 +266,7 @@ _ector_renderer_cairo_shape_eo_base_constructor(Eo *obj, Ector_Renderer_Cairo_Sh
static Eo_Base *
_ector_renderer_cairo_shape_eo_base_finalize(Eo *obj, Ector_Renderer_Cairo_Shape_Data *pd)
{
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, obj = eo_finalize());
+ obj = eo_finalize(eo_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS));
if (!obj) return NULL;
USE(pd->base, cairo_path_destroy, NULL);
@@ -300,7 +299,7 @@ _ector_renderer_cairo_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Cairo_Sha
//FIXME, As base class destructor can't call destructor of mixin class.
// call explicit API to free shape data.
- eo_do(obj, efl_gfx_shape_reset());
+ efl_gfx_shape_reset(obj);
base = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS);
eo_data_xunref(base->surface, pd->parent, obj);
@@ -308,7 +307,7 @@ _ector_renderer_cairo_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Cairo_Sha
eo_data_xunref(obj, pd->shape, obj);
eo_data_xunref(obj, pd->base, obj);
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS));
if (pd->path) cairo_path_destroy(pd->path);
}
@@ -319,8 +318,7 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_crc_get(Eo *obj,
{
unsigned int crc;
- eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS,
- crc = ector_renderer_crc_get());
+ crc = ector_renderer_crc_get(eo_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS));
crc = eina_crc((void*) &pd->shape->stroke.marker, sizeof (pd->shape->stroke.marker), crc, EINA_FALSE);
crc = eina_crc((void*) &pd->public_shape->stroke.scale, sizeof (pd->public_shape->stroke.scale) * 3, crc, EINA_FALSE); // scale, width, centered
diff --git a/src/lib/ector/ector_private.h b/src/lib/ector/ector_private.h
index 7278566427..013b1de9be 100644
--- a/src/lib/ector/ector_private.h
+++ b/src/lib/ector/ector_private.h
@@ -134,7 +134,7 @@ _renderer_crc_get(Eo *obj, unsigned int crc)
{
unsigned int id;
- eo_do(obj, id = ector_renderer_crc_get());
+ id = ector_renderer_crc_get(obj);
crc = eina_crc((void*) &id, sizeof (id), crc, EINA_FALSE);
return crc;
}
diff --git a/src/lib/ector/ector_renderer_generic_base.c b/src/lib/ector/ector_renderer_generic_base.c
index 66423bff9a..085d945677 100644
--- a/src/lib/ector/ector_renderer_generic_base.c
+++ b/src/lib/ector/ector_renderer_generic_base.c
@@ -15,7 +15,7 @@ _ector_renderer_generic_base_eo_base_destructor(Eo *obj, Ector_Renderer_Generic_
if (pd->m) free(pd->m);
eo_unref(pd->surface);
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
static Eo_Base *
@@ -27,7 +27,7 @@ _ector_renderer_generic_base_eo_base_finalize(Eo *obj, Ector_Renderer_Generic_Ba
return NULL;
}
pd->finalized = EINA_TRUE;
- return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
+ return eo_finalize(eo_super(obj, MY_CLASS));
}
static Ector_Generic_Surface *
@@ -163,7 +163,7 @@ _ector_renderer_generic_base_prepare(Eo *obj EINA_UNUSED,
Ector_Renderer_Generic_Base_Data *pd)
{
if (pd->mask)
- eo_do(pd->mask, ector_renderer_prepare());
+ ector_renderer_prepare(pd->mask);
return EINA_TRUE;
}
diff --git a/src/lib/ector/ector_renderer_generic_buffer.c b/src/lib/ector/ector_renderer_generic_buffer.c
index 0814dedfc9..5359970867 100644
--- a/src/lib/ector/ector_renderer_generic_buffer.c
+++ b/src/lib/ector/ector_renderer_generic_buffer.c
@@ -59,7 +59,7 @@ _ector_renderer_generic_buffer_eo_base_constructor(Eo *obj, Ector_Renderer_Gener
{
Eo_Base *ret;
- eo_do_super(obj, MY_CLASS, ret = eo_constructor());
+ ret = eo_constructor(eo_super(obj, MY_CLASS));
pd->fill.spread = EFL_GFX_FILL_REPEAT;
return ret;
diff --git a/src/lib/ector/gl/ector_gl_surface.c b/src/lib/ector/gl/ector_gl_surface.c
index 14302e3bf4..2ad665306b 100644
--- a/src/lib/ector/gl/ector_gl_surface.c
+++ b/src/lib/ector/gl/ector_gl_surface.c
@@ -45,14 +45,11 @@ _ector_gl_surface_ector_generic_surface_renderer_factory_new(Eo *obj,
const Eo_Class *type)
{
if (type == ECTOR_RENDERER_GENERIC_SHAPE_MIXIN)
- return eo_add(ECTOR_RENDERER_GL_SHAPE_CLASS, NULL,
- ector_renderer_surface_set(obj));
+ return eo_add(ECTOR_RENDERER_GL_SHAPE_CLASS, NULL, ector_renderer_surface_set(eoid, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN)
- return eo_add(ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS, NULL,
- ector_renderer_surface_set(obj));
+ return eo_add(ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS, NULL, ector_renderer_surface_set(eoid, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN)
- return eo_add(ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS, NULL,
- ector_renderer_surface_set(obj));
+ return eo_add(ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS, NULL, ector_renderer_surface_set(eoid, obj));
ERR("Couldn't find class for type: %s\n", eo_class_name_get(type));
return NULL;
@@ -77,7 +74,7 @@ _ector_gl_surface_push(Eo *obj,
{
unsigned int prog;
- eo_do(obj, prog = ector_gl_surface_shader_get(flags));
+ prog = ector_gl_surface_shader_get(obj, flags);
// FIXME: Not using mapp/unmap buffer yet, nor any pipe
// FIXME: Move some of the state change to surface drawing start ?
@@ -328,7 +325,7 @@ _ector_gl_surface_shader_get(Eo *obj EINA_UNUSED, Ector_GL_Surface_Data *pd EINA
static void
_ector_gl_surface_eo_base_destructor(Eo *obj, Ector_GL_Surface_Data *pd EINA_UNUSED)
{
- eo_do_super(obj, ECTOR_GL_SURFACE_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, ECTOR_GL_SURFACE_CLASS));
eina_hash_free(shader_cache);
shader_cache = NULL;
@@ -341,7 +338,7 @@ _ector_gl_surface_eo_base_constructor(Eo *obj, Ector_GL_Surface_Data *pd EINA_UN
{
Eina_Strbuf *file_path = NULL;
- eo_do_super(obj, ECTOR_GL_SURFACE_CLASS, obj = eo_constructor());
+ obj = eo_constructor(eo_super(obj, ECTOR_GL_SURFACE_CLASS));
if (!obj) return NULL;
if (shader_cache) return obj;
diff --git a/src/lib/ector/gl/ector_renderer_gl_base.c b/src/lib/ector/gl/ector_renderer_gl_base.c
index a659d3dfb6..75829cf576 100644
--- a/src/lib/ector/gl/ector_renderer_gl_base.c
+++ b/src/lib/ector/gl/ector_renderer_gl_base.c
@@ -31,8 +31,7 @@ _ector_renderer_gl_base_ector_renderer_generic_base_draw(Eo *obj EINA_UNUSED,
{
Eina_Bool r;
- eo_do(pd->base->surface,
- r = ector_gl_surface_state_define(op, clips));
+ r = ector_gl_surface_state_define(pd->base->surface, op, clips);
return r;
}
@@ -40,7 +39,7 @@ _ector_renderer_gl_base_ector_renderer_generic_base_draw(Eo *obj EINA_UNUSED,
static Eo_Base *
_ector_renderer_gl_base_eo_base_constructor(Eo *obj, Ector_Renderer_GL_Base_Data *pd)
{
- eo_do_super(obj, ECTOR_RENDERER_GL_BASE_CLASS, obj = eo_constructor());
+ obj = eo_constructor(eo_super(obj, ECTOR_RENDERER_GL_BASE_CLASS));
if (!obj) return NULL;
pd->base = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, obj);
diff --git a/src/lib/ector/gl/ector_renderer_gl_gradient_linear.c b/src/lib/ector/gl/ector_renderer_gl_gradient_linear.c
index 6920ac1ad1..5bff84437e 100644
--- a/src/lib/ector/gl/ector_renderer_gl_gradient_linear.c
+++ b/src/lib/ector/gl/ector_renderer_gl_gradient_linear.c
@@ -31,8 +31,7 @@ _ector_renderer_gl_gradient_linear_ector_renderer_generic_base_prepare(Eo *obj,
static Eina_Bool
_ector_renderer_gl_gradient_linear_ector_renderer_generic_base_draw(Eo *obj, Ector_Renderer_GL_Gradient_Linear_Data *pd, Efl_Gfx_Render_Op op, Eina_Array *clips, unsigned int mul_col)
{
- eo_do_super(obj, ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS,
- ector_renderer_draw(op, clips, mul_col));
+ ector_renderer_draw(eo_super(obj, ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS), op, clips, mul_col);
// FIXME: draw something !
(void) pd;
@@ -70,7 +69,7 @@ _ector_renderer_gl_gradient_linear_ector_renderer_gl_base_fill(Eo *obj, Ector_Re
static Eo_Base *
_ector_renderer_gl_gradient_linear_eo_base_constructor(Eo *obj, Ector_Renderer_GL_Gradient_Linear_Data *pd)
{
- eo_do_super(obj, ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS, obj = eo_constructor());
+ obj = eo_constructor(eo_super(obj, ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS));
if (!obj) return NULL;
@@ -92,8 +91,7 @@ _ector_renderer_gl_gradient_linear_eo_base_destructor(Eo *obj, Ector_Renderer_GL
static void
_ector_renderer_gl_gradient_linear_efl_gfx_gradient_base_stop_set(Eo *obj, Ector_Renderer_GL_Gradient_Linear_Data *pd EINA_UNUSED, const Efl_Gfx_Gradient_Stop *colors, unsigned int length)
{
- eo_do_super(obj, ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS,
- efl_gfx_gradient_stop_set(colors, length));
+ efl_gfx_gradient_stop_set(eo_super(obj, ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS), colors, length);
}
static unsigned int
@@ -101,8 +99,7 @@ _ector_renderer_gl_gradient_linear_ector_renderer_generic_base_crc_get(Eo *obj,
{
unsigned int crc;
- eo_do_super(obj, ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS,
- crc = ector_renderer_crc_get());
+ crc = ector_renderer_crc_get(eo_super(obj, ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS));
crc = eina_crc((void*) pd->gradient->s, sizeof (Efl_Gfx_Gradient_Spread), crc, EINA_FALSE);
if (pd->gradient->colors_count)
diff --git a/src/lib/ector/gl/ector_renderer_gl_gradient_radial.c b/src/lib/ector/gl/ector_renderer_gl_gradient_radial.c
index 9d7d65c886..9ba402fc60 100644
--- a/src/lib/ector/gl/ector_renderer_gl_gradient_radial.c
+++ b/src/lib/ector/gl/ector_renderer_gl_gradient_radial.c
@@ -30,8 +30,7 @@ _ector_renderer_gl_gradient_radial_ector_renderer_generic_base_prepare(Eo *obj,
static Eina_Bool
_ector_renderer_gl_gradient_radial_ector_renderer_generic_base_draw(Eo *obj, Ector_Renderer_GL_Gradient_Radial_Data *pd, Efl_Gfx_Render_Op op, Eina_Array *clips, unsigned int mul_col)
{
- eo_do_super(obj, ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS,
- ector_renderer_draw(op, clips, mul_col));
+ ector_renderer_draw(eo_super(obj, ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS), op, clips, mul_col);
// FIXME: draw something !
(void) pd;
@@ -70,8 +69,7 @@ _ector_renderer_gl_gradient_radial_ector_renderer_generic_base_crc_get(Eo *obj,
{
unsigned int crc;
- eo_do_super(obj, ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS,
- crc = ector_renderer_crc_get());
+ crc = ector_renderer_crc_get(eo_super(obj, ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS));
crc = eina_crc((void*) pd->gradient->s, sizeof (Efl_Gfx_Gradient_Spread), crc, EINA_FALSE);
if (pd->gradient->colors_count)
@@ -84,7 +82,7 @@ _ector_renderer_gl_gradient_radial_ector_renderer_generic_base_crc_get(Eo *obj,
static Eo_Base *
_ector_renderer_gl_gradient_radial_eo_base_constructor(Eo *obj, Ector_Renderer_GL_Gradient_Radial_Data *pd)
{
- eo_do_super(obj, ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS, obj = eo_constructor());
+ obj = eo_constructor(eo_super(obj, ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS));
if (!obj) return NULL;
@@ -106,8 +104,7 @@ _ector_renderer_gl_gradient_radial_eo_base_destructor(Eo *obj, Ector_Renderer_GL
static void
_ector_renderer_gl_gradient_radial_efl_gfx_gradient_base_stop_set(Eo *obj, Ector_Renderer_GL_Gradient_Radial_Data *pd EINA_UNUSED, const Efl_Gfx_Gradient_Stop *colors, unsigned int length)
{
- eo_do_super(obj, ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS,
- efl_gfx_gradient_stop_set(colors, length));
+ efl_gfx_gradient_stop_set(eo_super(obj, ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS), colors, length);
}
#include "ector_renderer_gl_gradient_radial.eo.c"
diff --git a/src/lib/ector/gl/ector_renderer_gl_shape.c b/src/lib/ector/gl/ector_renderer_gl_shape.c
index b0927128cd..59aaadf057 100644
--- a/src/lib/ector/gl/ector_renderer_gl_shape.c
+++ b/src/lib/ector/gl/ector_renderer_gl_shape.c
@@ -39,9 +39,9 @@ _ector_renderer_gl_shape_ector_renderer_generic_base_prepare(Eo *obj, Ector_Rend
if (pd->vertex) return EINA_TRUE;
- eo_do_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS, r = ector_renderer_prepare());
+ r = ector_renderer_prepare(eo_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS));
- eo_do(obj, ector_renderer_bounds_get(&bounding_box));
+ ector_renderer_bounds_get(obj, &bounding_box);
pd->vertex = malloc(sizeof (GLshort) * 6 * 3);
@@ -74,7 +74,7 @@ _ector_renderer_gl_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rendere
{
uint64_t flags = 0;
- eo_do_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS, ector_renderer_draw(op, clips, mul_col));
+ ector_renderer_draw(eo_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS), op, clips, mul_col);
// FIXME: adjust flags content correctly
// FIXME: should not ignore clips (idea is that the geometry will be cliped here and the
@@ -82,12 +82,11 @@ _ector_renderer_gl_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rendere
if (pd->shape->fill)
{
- eo_do(pd->shape->fill, ector_renderer_gl_base_fill(flags, pd->vertex, 6, mul_col));
+ ector_renderer_gl_base_fill(pd->shape->fill, flags, pd->vertex, 6, mul_col);
}
else
{
- eo_do(pd->base->surface,
- ector_gl_surface_push(flags, pd->vertex, 6, mul_col));
+ ector_gl_surface_push(pd->base->surface, flags, pd->vertex, 6, mul_col);
}
return EINA_TRUE;
@@ -110,7 +109,7 @@ _ector_renderer_gl_shape_ector_renderer_gl_base_fill(Eo *obj EINA_UNUSED,
static void
_ector_renderer_gl_shape_ector_renderer_generic_base_bounds_get(Eo *obj, Ector_Renderer_GL_Shape_Data *pd, Eina_Rectangle *r)
{
- eo_do(obj, efl_gfx_shape_bounds_get(r));
+ efl_gfx_shape_bounds_get(obj, r);
r->x += pd->base->origin.x;
r->y += pd->base->origin.y;
@@ -121,8 +120,7 @@ _ector_renderer_gl_shape_ector_renderer_generic_base_crc_get(Eo *obj, Ector_Rend
{
unsigned int crc;
- eo_do_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS,
- crc = ector_renderer_crc_get());
+ crc = ector_renderer_crc_get(eo_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS));
// This code should be shared with other implementation
crc = eina_crc((void*) &pd->shape->stroke.marker, sizeof (pd->shape->stroke.marker), crc, EINA_FALSE);
@@ -145,7 +143,7 @@ _ector_renderer_gl_shape_ector_renderer_generic_base_crc_get(Eo *obj, Ector_Rend
static Eo_Base *
_ector_renderer_gl_shape_eo_base_constructor(Eo *obj, Ector_Renderer_GL_Shape_Data *pd)
{
- eo_do_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS, obj = eo_constructor());
+ obj = eo_constructor(eo_super(obj, ECTOR_RENDERER_GL_SHAPE_CLASS));
if (!obj) return NULL;
@@ -153,8 +151,7 @@ _ector_renderer_gl_shape_eo_base_constructor(Eo *obj, Ector_Renderer_GL_Shape_Da
pd->shape = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_SHAPE_MIXIN, obj);
pd->base = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, obj);
- eo_do(obj,
- eo_event_callback_add(EFL_GFX_PATH_CHANGED, _ector_renderer_gl_shape_path_changed, pd));
+ eo_event_callback_add(obj, EFL_GFX_PATH_CHANGED, _ector_renderer_gl_shape_path_changed, pd);
return obj;
}
diff --git a/src/lib/ector/software/ector_renderer_software_buffer.c b/src/lib/ector/software/ector_renderer_software_buffer.c
index cfd13c0aa0..d07c1971b1 100644
--- a/src/lib/ector/software/ector_renderer_software_buffer.c
+++ b/src/lib/ector/software/ector_renderer_software_buffer.c
@@ -54,7 +54,7 @@ _ector_renderer_software_buffer_ector_renderer_generic_base_crc_get(Eo *obj, Ect
Ector_Software_Buffer_Base_Data *buffer = eo_data_scope_get(pd->eo_buffer, ECTOR_SOFTWARE_BUFFER_BASE_MIXIN);
unsigned int crc;
- eo_do_super(obj, MY_CLASS, crc = ector_renderer_crc_get());
+ crc = ector_renderer_crc_get(eo_super(obj, MY_CLASS));
crc = eina_crc((const char *) buffer, sizeof(*buffer), crc, EINA_FALSE);
if (pd->surface)
crc = eina_crc((const char *) pd->surface, sizeof(*pd->surface), crc, EINA_FALSE);
@@ -66,7 +66,7 @@ EOLIAN static void
_ector_renderer_software_buffer_eo_base_destructor(Eo *obj, Ector_Renderer_Software_Buffer_Data *pd)
{
eo_data_xunref(pd->base->surface, pd->surface, obj);
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
#include "ector_renderer_software_buffer.eo.c"
diff --git a/src/lib/ector/software/ector_renderer_software_gradient_linear.c b/src/lib/ector/software/ector_renderer_software_gradient_linear.c
index 3a35a08a5f..46ec2e5bf7 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_linear.c
+++ b/src/lib/ector/software/ector_renderer_software_gradient_linear.c
@@ -66,7 +66,7 @@ static Eo *
_ector_renderer_software_gradient_linear_eo_base_constructor(Eo *obj,
Ector_Renderer_Software_Gradient_Data *pd)
{
- obj = eo_do_super_ret(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, obj, eo_constructor());
+ obj = eo_constructor(eo_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS));
if (!obj) return NULL;
pd->gd = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_GRADIENT_MIXIN, obj);
@@ -89,14 +89,13 @@ _ector_renderer_software_gradient_linear_eo_base_destructor(Eo *obj,
eo_data_xunref(obj, pd->gd, obj);
eo_data_xunref(obj, pd->gld, obj);
- eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS));
}
void
_ector_renderer_software_gradient_linear_efl_gfx_gradient_base_stop_set(Eo *obj, Ector_Renderer_Software_Gradient_Data *pd, const Efl_Gfx_Gradient_Stop *colors, unsigned int length)
{
- eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS,
- efl_gfx_gradient_stop_set(colors, length));
+ efl_gfx_gradient_stop_set(eo_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS), colors, length);
destroy_color_table(pd);
}
@@ -106,8 +105,7 @@ _ector_renderer_software_gradient_linear_ector_renderer_generic_base_crc_get(Eo
{
unsigned int crc;
- eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS,
- crc = ector_renderer_crc_get());
+ crc = ector_renderer_crc_get(eo_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS));
crc = eina_crc((void*) pd->gd->s, sizeof (Efl_Gfx_Gradient_Spread), crc, EINA_FALSE);
if (pd->gd->colors_count)
diff --git a/src/lib/ector/software/ector_renderer_software_gradient_radial.c b/src/lib/ector/software/ector_renderer_software_gradient_radial.c
index 6f7f5dd3b2..64d0a9df1f 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_radial.c
+++ b/src/lib/ector/software/ector_renderer_software_gradient_radial.c
@@ -76,7 +76,7 @@ Eo *
_ector_renderer_software_gradient_radial_eo_base_constructor(Eo *obj,
Ector_Renderer_Software_Gradient_Data *pd)
{
- obj = eo_do_super_ret(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, obj, eo_constructor());
+ obj = eo_constructor(eo_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS));
pd->gd = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_GRADIENT_MIXIN, obj);
pd->gld = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN, obj);
@@ -97,14 +97,13 @@ _ector_renderer_software_gradient_radial_eo_base_destructor(Eo *obj,
eo_data_xunref(obj, pd->gd, obj);
eo_data_xunref(obj, pd->gld, obj);
- eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS));
}
void
_ector_renderer_software_gradient_radial_efl_gfx_gradient_base_stop_set(Eo *obj, Ector_Renderer_Software_Gradient_Data *pd, const Efl_Gfx_Gradient_Stop *colors, unsigned int length)
{
- eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS,
- efl_gfx_gradient_stop_set(colors, length));
+ efl_gfx_gradient_stop_set(eo_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS), colors, length);
destroy_color_table(pd);
}
@@ -114,8 +113,7 @@ _ector_renderer_software_gradient_radial_ector_renderer_generic_base_crc_get(Eo
{
unsigned int crc;
- eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS,
- crc = ector_renderer_crc_get());
+ crc = ector_renderer_crc_get(eo_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS));
crc = eina_crc((void*) pd->gd->s, sizeof (Efl_Gfx_Gradient_Spread), crc, EINA_FALSE);
if (pd->gd->colors_count)
diff --git a/src/lib/ector/software/ector_renderer_software_shape.c b/src/lib/ector/software/ector_renderer_software_shape.c
index beaf043da8..978ccaae5d 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.c
+++ b/src/lib/ector/software/ector_renderer_software_shape.c
@@ -520,9 +520,8 @@ _update_rle(Eo *obj, Ector_Renderer_Software_Shape_Data *pd)
Efl_Gfx_Fill_Rule fill_rule;
Outline *outline, *dash_outline;
- eo_do(obj,
- efl_gfx_shape_path_get(&cmds, &pts),
- fill_rule = efl_gfx_shape_fill_rule_get());
+ efl_gfx_shape_path_get(obj, &cmds, &pts);
+ fill_rule = efl_gfx_shape_fill_rule_get(obj);
if (cmds && (_generate_stroke_data(pd) || _generate_shape_data(pd)))
{
outline = _outline_create();
@@ -577,11 +576,11 @@ _ector_renderer_software_shape_ector_renderer_generic_base_prepare(Eo *obj,
{
// FIXME: shouldn't that be part of the shape generic implementation ?
if (pd->shape->fill)
- eo_do(pd->shape->fill, ector_renderer_prepare());
+ ector_renderer_prepare(pd->shape->fill);
if (pd->shape->stroke.fill)
- eo_do(pd->shape->stroke.fill, ector_renderer_prepare());
+ ector_renderer_prepare(pd->shape->stroke.fill);
if (pd->shape->stroke.marker)
- eo_do(pd->shape->stroke.marker, ector_renderer_prepare());
+ ector_renderer_prepare(pd->shape->stroke.marker);
// shouldn't that be moved to the software base object
if (!pd->surface)
@@ -611,7 +610,7 @@ _ector_renderer_software_shape_ector_renderer_generic_base_draw(Eo *obj,
if (pd->shape->fill)
{
- eo_do(pd->shape->fill, ector_renderer_software_base_fill());
+ ector_renderer_software_base_fill(pd->shape->fill);
ector_software_rasterizer_draw_rle_data(pd->surface->rasterizer,
x, y, mul_col, op,
pd->shape_data);
@@ -633,7 +632,7 @@ _ector_renderer_software_shape_ector_renderer_generic_base_draw(Eo *obj,
if (pd->shape->stroke.fill)
{
- eo_do(pd->shape->stroke.fill, ector_renderer_software_base_fill());
+ ector_renderer_software_base_fill(pd->shape->stroke.fill);
ector_software_rasterizer_draw_rle_data(pd->surface->rasterizer,
x, y, mul_col, op,
pd->outline_data);
@@ -676,7 +675,7 @@ _ector_renderer_software_shape_efl_gfx_shape_path_set(Eo *obj,
pd->shape_data = NULL;
pd->outline_data = NULL;
- eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, efl_gfx_shape_path_set(op, points));
+ efl_gfx_shape_path_set(eo_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS), op, points);
}
@@ -697,14 +696,13 @@ _ector_renderer_software_shape_path_changed(void *data, const Eo_Event *event EI
static Eo *
_ector_renderer_software_shape_eo_base_constructor(Eo *obj, Ector_Renderer_Software_Shape_Data *pd)
{
- eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, obj = eo_constructor());
+ obj = eo_constructor(eo_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS));
if (!obj) return NULL;
pd->public_shape = eo_data_xref(obj, EFL_GFX_SHAPE_MIXIN, obj);
pd->shape = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_SHAPE_MIXIN, obj);
pd->base = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, obj);
- eo_do(obj,
- eo_event_callback_add(EFL_GFX_PATH_CHANGED, _ector_renderer_software_shape_path_changed, pd));
+ eo_event_callback_add(obj, EFL_GFX_PATH_CHANGED, _ector_renderer_software_shape_path_changed, pd);
return obj;
}
@@ -714,7 +712,7 @@ _ector_renderer_software_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Softwa
{
//FIXME, As base class destructor can't call destructor of mixin class.
// call explicit API to free shape data.
- eo_do(obj, efl_gfx_shape_reset());
+ efl_gfx_shape_reset(obj);
if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
@@ -722,7 +720,7 @@ _ector_renderer_software_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Softwa
eo_data_xunref(pd->base->surface, pd->surface, obj);
eo_data_xunref(obj, pd->shape, obj);
eo_data_xunref(obj, pd->base, obj);
- eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS));
}
@@ -732,7 +730,7 @@ _ector_renderer_software_shape_ector_renderer_generic_base_crc_get(Eo *obj,
{
unsigned int crc;
- eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, crc = ector_renderer_crc_get());
+ crc = ector_renderer_crc_get(eo_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS));
crc = eina_crc((void*) &pd->shape->stroke.marker,
sizeof (pd->shape->stroke.marker),
diff --git a/src/lib/ector/software/ector_software_buffer.c b/src/lib/ector/software/ector_software_buffer.c
index b846761de1..ecbac54373 100644
--- a/src/lib/ector/software/ector_software_buffer.c
+++ b/src/lib/ector/software/ector_software_buffer.c
@@ -69,7 +69,7 @@ _ector_software_buffer_base_pixels_clear(Eo *obj, Ector_Software_Buffer_Base_Dat
return;
}
- eo_do(obj, eo_event_callback_call(ECTOR_GENERIC_BUFFER_EVENT_DETACHED, pd->pixels.u8));
+ eo_event_callback_call(obj, ECTOR_GENERIC_BUFFER_EVENT_DETACHED, pd->pixels.u8);
if (!pd->nofree)
{
free(pd->pixels.u8);
@@ -336,7 +336,7 @@ EOLIAN static Eo_Base *
_ector_software_buffer_eo_base_constructor(Eo *obj, void *data EINA_UNUSED)
{
Ector_Software_Buffer_Base_Data *pd;
- eo_do_super(obj, MY_CLASS, obj = eo_constructor());
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
pd = eo_data_scope_get(obj, ECTOR_SOFTWARE_BUFFER_BASE_MIXIN);
pd->generic = eo_data_ref(obj, ECTOR_GENERIC_BUFFER_MIXIN);
pd->generic->eo = obj;
@@ -349,7 +349,7 @@ _ector_software_buffer_eo_base_destructor(Eo *obj, void *data EINA_UNUSED)
Ector_Software_Buffer_Base_Data *pd = eo_data_scope_get(obj, ECTOR_SOFTWARE_BUFFER_BASE_MIXIN);
_ector_software_buffer_base_pixels_clear(obj, pd);
eo_data_unref(obj, pd->generic);
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
if (pd->internal.maps)
{
ERR("Pixel data is still mapped during destroy! Check your code!");
diff --git a/src/lib/ector/software/ector_software_rasterizer.c b/src/lib/ector/software/ector_software_rasterizer.c
index a25a039490..f3b31f5c72 100644
--- a/src/lib/ector/software/ector_software_rasterizer.c
+++ b/src/lib/ector/software/ector_software_rasterizer.c
@@ -102,9 +102,9 @@ _blend_image_argb(int count, const SW_FT_Span *spans, void *user_data)
while (length)
{
l = MIN(length, data->buffer->generic->w);
- eo_do(data->buffer->generic->eo, src8 = ector_buffer_span_get(0, sy, l, EFL_GFX_COLORSPACE_ARGB8888, NULL));
+ src8 = ector_buffer_span_get(data->buffer->generic->eo, 0, sy, l, EFL_GFX_COLORSPACE_ARGB8888, NULL);
comp_func(target, (uint32_t *) src8, l, data->mul_col, spans->coverage);
- eo_do(data->buffer->generic->eo, ector_buffer_span_free(src8));
+ ector_buffer_span_free(data->buffer->generic->eo, src8);
target += l;
length -= l;
}
diff --git a/src/lib/ector/software/ector_software_surface.c b/src/lib/ector/software/ector_software_surface.c
index 6ad79053ae..f67b1947d2 100644
--- a/src/lib/ector/software/ector_software_surface.c
+++ b/src/lib/ector/software/ector_software_surface.c
@@ -16,17 +16,13 @@ _ector_software_surface_ector_generic_surface_renderer_factory_new(Eo *obj,
const Eo_Class *type)
{
if (type == ECTOR_RENDERER_GENERIC_SHAPE_MIXIN)
- return eo_add(ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, NULL,
- ector_renderer_surface_set(obj));
+ return eo_add(ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, NULL, ector_renderer_surface_set(eoid, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN)
- return eo_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, NULL,
- ector_renderer_surface_set(obj));
+ return eo_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, NULL, ector_renderer_surface_set(eoid, obj));
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN)
- return eo_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, NULL,
- ector_renderer_surface_set(obj));
+ return eo_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, NULL, ector_renderer_surface_set(eoid, obj));
else if (type == ECTOR_RENDERER_GENERIC_BUFFER_MIXIN)
- return eo_add(ECTOR_RENDERER_SOFTWARE_BUFFER_CLASS, NULL,
- ector_renderer_surface_set(obj));
+ return eo_add(ECTOR_RENDERER_SOFTWARE_BUFFER_CLASS, NULL, ector_renderer_surface_set(eoid, obj));
ERR("Couldn't find class for type: %s\n", eo_class_name_get(type));
return NULL;
}
@@ -34,7 +30,7 @@ _ector_software_surface_ector_generic_surface_renderer_factory_new(Eo *obj,
static Eo *
_ector_software_surface_eo_base_constructor(Eo *obj, Ector_Software_Surface_Data *pd)
{
- obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
pd->rasterizer = (Software_Rasterizer *) calloc(1, sizeof(Software_Rasterizer));
ector_software_rasterizer_init(pd->rasterizer);
pd->rasterizer->fill_data.raster_buffer = eo_data_ref(obj, ECTOR_SOFTWARE_BUFFER_BASE_MIXIN);
@@ -48,7 +44,7 @@ _ector_software_surface_eo_base_destructor(Eo *obj, Ector_Software_Surface_Data
eo_data_unref(obj, pd->rasterizer->fill_data.raster_buffer);
free(pd->rasterizer);
pd->rasterizer = NULL;
- eo_do_super(obj, ECTOR_SOFTWARE_SURFACE_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, ECTOR_SOFTWARE_SURFACE_CLASS));
}
static void
diff --git a/src/lib/edje/edje_callbacks.c b/src/lib/edje/edje_callbacks.c
index 8678933664..c0e08b5cd6 100644
--- a/src/lib/edje/edje_callbacks.c
+++ b/src/lib/edje/edje_callbacks.c
@@ -460,28 +460,28 @@ EO_CALLBACKS_ARRAY_DEFINE(edje_focus_callbacks,
void
_edje_callbacks_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp)
{
- eo_do(obj, eo_event_callback_array_add(edje_callbacks(), ed));
+ eo_event_callback_array_add(obj, edje_callbacks(), ed);
evas_object_data_set(obj, "real_part", rp);
}
void
_edje_callbacks_del(Evas_Object *obj, Edje *ed)
{
- eo_do(obj, eo_event_callback_array_del(edje_callbacks(), ed));
+ eo_event_callback_array_del(obj, edje_callbacks(), ed);
evas_object_data_del(obj, "real_part");
}
void
_edje_callbacks_focus_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp)
{
- eo_do(obj, eo_event_callback_array_add(edje_focus_callbacks(), ed));
+ eo_event_callback_array_add(obj, edje_focus_callbacks(), ed);
evas_object_data_set(obj, "real_part", rp);
}
void
_edje_callbacks_focus_del(Evas_Object *obj, Edje *ed)
{
- eo_do(obj, eo_event_callback_array_del(edje_focus_callbacks(), ed));
+ eo_event_callback_array_del(obj, edje_focus_callbacks(), ed);
evas_object_data_del(obj, "real_part");
}
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 8bacc49a5b..3934392965 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -152,7 +152,7 @@ _edje_edit_evas_object_smart_del(Eo *obj, Edje_Edit *eed)
{
_edje_edit_data_clean(eed);
- eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
+ evas_obj_smart_del(eo_super(obj, MY_CLASS));
}
static void
@@ -190,7 +190,7 @@ _edje_edit_efl_file_file_set(Eo *obj, Edje_Edit *eed, const char *file, const ch
* groups).
*/
Eina_Bool int_ret = EINA_FALSE;
- eo_do_super(obj, MY_CLASS, int_ret = efl_file_set(file, group));
+ int_ret = efl_file_set(eo_super(obj, MY_CLASS), file, group);
if (!int_ret)
return ret;
@@ -240,13 +240,13 @@ _edje_edit_eo_base_constructor(Eo *obj, Edje_Edit *eed)
{
eed->base = eo_data_ref(obj, EDJE_OBJECT_CLASS);
- return eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
+ return eo_constructor(eo_super(obj, MY_CLASS));
}
EOLIAN static void
_edje_edit_eo_base_destructor(Eo *obj, Edje_Edit *class_data EINA_UNUSED)
{
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
eo_data_unref(obj, class_data);
}
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index be94d784df..87bbbf0afd 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -793,35 +793,30 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
Evas_Canvas3D_Material *material = NULL;
Edje_Part_Description_Mesh_Node *pd_mesh_node;
- rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
+ rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, ed->base->evas);
- eo_do(rp->node, evas_canvas3d_node_mesh_add(mesh));
+ evas_canvas3d_node_mesh_add(rp->node, mesh);
pd_mesh_node = (Edje_Part_Description_Mesh_Node*) rp->chosen_description;
if (pd_mesh_node->mesh_node.mesh.primitive == EVAS_CANVAS3D_MESH_PRIMITIVE_NONE)
{
- eo_do(mesh,
- efl_file_set(ed->file->model_dir->entries[pd_mesh_node->mesh_node.mesh.id].entry, NULL));
+ efl_file_set(mesh, ed->file->model_dir->entries[pd_mesh_node->mesh_node.mesh.id].entry, NULL);
}
else
{
- eo_do(mesh,
- evas_canvas3d_mesh_frame_add(0));
+ evas_canvas3d_mesh_frame_add(mesh, 0);
}
material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, ed->base->evas);
- eo_do(mesh,
- evas_canvas3d_mesh_frame_material_set(0, material));
+ evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
if (pd_mesh_node->mesh_node.texture.need_texture && pd_mesh_node->mesh_node.texture.textured)
{
Evas_Canvas3D_Texture *texture = NULL;
texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, ed->base->evas);
- eo_do(material,
- evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture));
+ evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
}
rp->object = NULL;
}
@@ -831,10 +826,9 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
{
Evas_Canvas3D_Light *light = NULL;
- rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, ed->base->evas);
- eo_do(rp->node, evas_canvas3d_node_light_set(light));
+ evas_canvas3d_node_light_set(rp->node, light);
rp->object = NULL;
break;
@@ -844,10 +838,9 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
{
Evas_Canvas3D_Camera *camera = NULL;
- rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas,
- evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, ed->base->evas);
- eo_do(rp->node, evas_canvas3d_node_camera_set(camera));
+ evas_canvas3d_node_camera_set(rp->node, camera);
rp->object = evas_object_image_filled_add(ed->base->evas);
evas_object_resize(rp->object, ed->collection->scene_size.width, ed->collection->scene_size.height);
@@ -869,7 +862,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
}
if (ep->no_render)
- eo_do(rp->object, evas_obj_no_render_set(1));
+ evas_obj_no_render_set(rp->object, 1);
if (st_nested && st_nested->nested_children_count) /* Add this to list of children */
{
@@ -922,9 +915,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
evas_object_pass_events_set(rp->object, 1);
evas_object_pointer_mode_set(rp->object, EVAS_OBJECT_POINTER_MODE_NOGRAB);
}
- eo_do(rp->object,
- evas_obj_anti_alias_set(ep->anti_alias),
- evas_obj_precise_is_inside_set(ep->precise_is_inside));
+ evas_obj_anti_alias_set(rp->object, ep->anti_alias);
+ evas_obj_precise_is_inside_set(rp->object, ep->precise_is_inside);
}
if (rp->part->clip_to_id < 0)
evas_object_clip_set(rp->object, ed->base->clipper);
@@ -1718,7 +1710,7 @@ _edje_file_del(Edje *ed)
free(runp);
}
_edje_animators = eina_list_remove(_edje_animators, ed);
- eo_do(ed->obj, eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _edje_timer_cb, ed));
+ eo_event_callback_del(ed->obj, EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _edje_timer_cb, ed);
ecore_animator_del(ed->animator);
ed->animator = NULL;
diff --git a/src/lib/edje/edje_multisense.c b/src/lib/edje/edje_multisense.c
index 273f6aa891..df981573f0 100644
--- a/src/lib/edje/edje_multisense.c
+++ b/src/lib/edje/edje_multisense.c
@@ -202,18 +202,13 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
eet_data->vio.tell = eet_snd_file_tell;
eet_data->offset = 0;
- in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL,
- ecore_audio_obj_name_set(snd_id_str),
- ecore_audio_obj_in_speed_set(speed),
- ecore_audio_obj_vio_set(&eet_data->vio, eet_data, _free),
- eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL));
+ in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL, ecore_audio_obj_name_set(eoid, snd_id_str), ecore_audio_obj_in_speed_set(eoid, speed), ecore_audio_obj_vio_set(eoid, &eet_data->vio, eet_data, _free), eo_event_callback_add(eoid, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL));
if (!out)
{
#if HAVE_COREAUDIO
out = eo_add(ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
#elif HAVE_PULSE
- out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL,
- eo_event_callback_add(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
+ out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, eo_event_callback_add(eoid, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
#endif
if (out) outs++;
}
@@ -227,7 +222,7 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
eo_del(in);
return EINA_FALSE;
}
- eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
+ ret = ecore_audio_obj_out_input_attach(out, in);
if (!ret)
{
ERR("Could not attach input");
@@ -275,23 +270,22 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
if (!strcmp(tone->name, tone_name))
{
in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
- eo_do(in, ecore_audio_obj_name_set("tone"));
- eo_do(in, eo_key_data_set(ECORE_AUDIO_ATTR_TONE_FREQ, &tone->value));
- eo_do(in, ecore_audio_obj_in_length_set(duration));
- eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL));
+ ecore_audio_obj_name_set(in, "tone");
+ eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &tone->value);
+ ecore_audio_obj_in_length_set(in, duration);
+ eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL);
if (!out)
{
#if HAVE_COREAUDIO
out = eo_add(ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
#elif HAVE_PULSE
- out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL,
- eo_event_callback_add(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
+ out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, eo_event_callback_add(eoid, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
#endif
if (out) outs++;
}
- eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
+ ret = ecore_audio_obj_out_input_attach(out, in);
if (!ret)
{
ERR("Could not attach input");
diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c
index 8f601bfa66..aa99063a00 100644
--- a/src/lib/edje/edje_program.c
+++ b/src/lib/edje/edje_program.c
@@ -267,7 +267,7 @@ edje_object_signal_callback_del(Evas_Object *obj, const char *emission, const ch
{
if (!obj) return NULL;
void *ret = NULL;
- eo_do(obj, ret = edje_obj_signal_callback_del(emission, source, (Edje_Signal_Cb)func, NULL));
+ ret = edje_obj_signal_callback_del(obj, emission, source, (Edje_Signal_Cb)func, NULL);
return ret;
}
@@ -296,7 +296,7 @@ edje_object_signal_callback_del_full(Evas_Object *obj, const char *emission, con
{
if (!obj) return NULL;
void *ret = NULL;
- eo_do(obj, ret = edje_obj_signal_callback_del(emission, source, func, data));
+ ret = edje_obj_signal_callback_del(obj, emission, source, func, data);
return ret;
}
@@ -433,7 +433,7 @@ _edje_program_run_cleanup(Edje *ed, Edje_Running_Program *runp)
ed->actions = eina_list_remove(ed->actions, runp);
if (!ed->actions)
{
- eo_do(ed->obj, eo_event_callback_del(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _edje_timer_cb, ed));
+ eo_event_callback_del(ed->obj, EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _edje_timer_cb, ed);
ecore_animator_del(ed->animator);
ed->animator = NULL;
}
@@ -737,7 +737,7 @@ low_mem_current:
if (!ed->actions)
{
if (ed->canvas_animator)
- eo_do(ed->obj, eo_event_callback_add(EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _edje_timer_cb, ed));
+ eo_event_callback_add(ed->obj, EFL_CORE_ANIMATOR_EVENT_ANIMATOR_TICK, _edje_timer_cb, ed);
else
ed->animator = ecore_animator_add(_edje_animator_cb, ed);
}
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index fd06cc2b55..e571ecf48a 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -34,11 +34,11 @@ _edje_object_eo_base_constructor(Eo *obj, Edje *ed)
ed->base = eo_data_ref(obj, EVAS_SMART_CLIPPED_CLASS);
ed->duration_scale = 1.0;
- obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
- eo_do(obj, evas_obj_type_set(MY_CLASS_NAME_LEGACY));
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
+ evas_obj_type_set(obj, MY_CLASS_NAME_LEGACY);
_edje_lib_ref();
- eo_do(obj, parent = eo_parent_get());
+ parent = eo_parent_get(obj);
e = evas_object_evas_get(parent);
tmp = ecore_evas_ecore_evas_get(e);
@@ -50,23 +50,23 @@ _edje_object_eo_base_constructor(Eo *obj, Edje *ed)
EOLIAN static void
_edje_object_eo_base_destructor(Eo *obj, Edje *class_data)
{
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
eo_data_unref(obj, class_data->base);
}
EOLIAN static void
_edje_object_eo_base_dbg_info_get(Eo *eo_obj, Edje *_pd EINA_UNUSED, Eo_Dbg_Info *root) EINA_ARG_NONNULL(3)
{
- eo_do_super(eo_obj, MY_CLASS, eo_dbg_info_get(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);
const char *file, *edje_group;
- eo_do(eo_obj, efl_file_get(&file, &edje_group));
+ efl_file_get(eo_obj, &file, &edje_group);
EO_DBG_INFO_APPEND(group, "File", EINA_VALUE_TYPE_STRING, file);
EO_DBG_INFO_APPEND(group, "Group", EINA_VALUE_TYPE_STRING, edje_group);
Edje_Load_Error error = EDJE_LOAD_ERROR_NONE;
- eo_do(eo_obj, error = edje_obj_load_error_get());
+ error = edje_obj_load_error_get(eo_obj);
if (error != EDJE_LOAD_ERROR_NONE)
{
EO_DBG_INFO_APPEND(group, "Error", EINA_VALUE_TYPE_STRING,
@@ -110,7 +110,7 @@ _edje_object_evas_object_smart_add(Eo *obj, Edje *ed)
evas_event_freeze(tev);
- eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
+ evas_obj_smart_add(eo_super(obj, MY_CLASS));
ed->is_rtl = EINA_FALSE;
ed->have_objects = EINA_TRUE;
@@ -291,7 +291,7 @@ _edje_object_evas_object_smart_show(Eo *obj, Edje *ed)
Eina_List *l;
Edje *edg;
- eo_do_super(obj, MY_CLASS, evas_obj_smart_show());
+ evas_obj_smart_show(eo_super(obj, MY_CLASS));
if (evas_object_visible_get(obj)) return;
if (_edje_lua_script_only(ed))
{
@@ -319,7 +319,7 @@ _edje_object_evas_object_smart_hide(Eo *obj, Edje *ed)
Eina_List *l;
Edje *edg;
- eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
+ evas_obj_smart_hide(eo_super(obj, MY_CLASS));
if (!evas_object_visible_get(obj)) return;
if (_edje_lua_script_only(ed))
{
@@ -403,32 +403,32 @@ edje_object_mmap_set(Edje_Object *obj, const Eina_File *file, const char *group)
{
Eina_Bool ret;
- return eo_do_ret(obj, ret, efl_file_mmap_set(file, group));
+ return efl_file_mmap_set(obj, file, group);
}
EAPI Eina_Bool
edje_object_file_set(Edje_Object *obj, const char *file, const char *group)
{
Eina_Bool ret = 0;
- eo_do(obj, ret = efl_file_set(file, group));
+ ret = efl_file_set(obj, file, group);
return ret;
}
EAPI void
edje_object_file_get(const Edje_Object *obj, const char **file, const char **group)
{
- eo_do((Edje_Object *)obj, efl_file_get(file, group));
+ efl_file_get((Edje_Object *)obj, file, group);
}
EOLIAN static void
_edje_object_evas_object_paragraph_direction_set(Eo *obj, Edje *ed, Evas_BiDi_Direction dir)
{
- eo_do_super(obj, MY_CLASS, evas_obj_paragraph_direction_set(dir));
+ evas_obj_paragraph_direction_set(eo_super(obj, MY_CLASS), dir);
/* Make it dirty to recalculate edje.
It needs to move text objects according to new paragraph direction */
ed->dirty = EINA_TRUE;
- eo_do(obj, evas_obj_smart_need_recalculate_set(1));
+ evas_obj_smart_need_recalculate_set(obj, 1);
}
#include "edje_object.eo.c"
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 6b91c03c14..d1add9b23d 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -6313,9 +6313,8 @@ _edje_real_part_swallow(Edje *ed,
else
evas_object_pass_events_set(obj_swallow, 1);
_edje_callbacks_focus_add(rp->typedata.swallow->swallowed_object, ed, rp);
- eo_do(obj_swallow,
- evas_obj_anti_alias_set(rp->part->anti_alias),
- evas_obj_precise_is_inside_set(rp->part->precise_is_inside));
+ evas_obj_anti_alias_set(obj_swallow, rp->part->anti_alias);
+ evas_obj_precise_is_inside_set(obj_swallow, rp->part->precise_is_inside);
ed->dirty = EINA_TRUE;
ed->recalc_call = EINA_TRUE;
diff --git a/src/lib/efl/interfaces/efl_gfx_shape.c b/src/lib/efl/interfaces/efl_gfx_shape.c
index 9fe4d9eb33..6a23dd4d36 100644
--- a/src/lib/efl/interfaces/efl_gfx_shape.c
+++ b/src/lib/efl/interfaces/efl_gfx_shape.c
@@ -185,9 +185,8 @@ _efl_gfx_shape_path_set(Eo *obj, Efl_Gfx_Shape_Data *pd,
&pd->current_ctrl.x, &pd->current_ctrl.y);
end:
- eo_do(obj,
- eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
- eo_event_callback_call(EFL_GFX_CHANGED, NULL));
+ eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
+ eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
}
static void
@@ -301,15 +300,14 @@ struct _Efl_Gfx_Property
static inline void
_efl_gfx_property_get(const Eo *obj, Efl_Gfx_Property *property)
{
- eo_do(obj,
- property->scale = efl_gfx_shape_stroke_scale_get(),
- efl_gfx_shape_stroke_color_get(&property->r, &property->g, &property->b, &property->a),
- efl_gfx_color_get(&property->fr, &property->fg, &property->fb, &property->fa),
- property->w = efl_gfx_shape_stroke_width_get(),
- property->centered = efl_gfx_shape_stroke_location_get(),
- efl_gfx_shape_stroke_dash_get(&property->dash, &property->dash_length),
- property->c = efl_gfx_shape_stroke_cap_get(),
- property->j = efl_gfx_shape_stroke_join_get());
+ property->scale = efl_gfx_shape_stroke_scale_get(obj);
+ efl_gfx_shape_stroke_color_get(obj, &property->r, &property->g, &property->b, &property->a);
+ efl_gfx_color_get(obj, &property->fr, &property->fg, &property->fb, &property->fa);
+ property->w = efl_gfx_shape_stroke_width_get(obj);
+ property->centered = efl_gfx_shape_stroke_location_get(obj);
+ efl_gfx_shape_stroke_dash_get(obj, &property->dash, &property->dash_length);
+ property->c = efl_gfx_shape_stroke_cap_get(obj);
+ property->j = efl_gfx_shape_stroke_join_get(obj);
}
static Eina_Bool
@@ -398,24 +396,16 @@ _efl_gfx_shape_interpolate(Eo *obj, Efl_Gfx_Shape_Data *pd,
}
- eo_do(obj,
- efl_gfx_shape_stroke_scale_set(interpolate(property_to.scale, property_from.scale, pos_map)),
- efl_gfx_shape_stroke_color_set(interpolatei(property_to.r, property_from.r, pos_map),
- interpolatei(property_to.g, property_from.g, pos_map),
- interpolatei(property_to.b, property_from.b, pos_map),
- interpolatei(property_to.a, property_from.a, pos_map)),
- efl_gfx_color_set(interpolatei(property_to.fr, property_from.fr, pos_map),
- interpolatei(property_to.fg, property_from.fg, pos_map),
- interpolatei(property_to.fb, property_from.fb, pos_map),
- interpolatei(property_to.fa, property_from.fa, pos_map)),
- efl_gfx_shape_stroke_width_set(interpolate(property_to.w, property_from.w, pos_map)),
- efl_gfx_shape_stroke_location_set(interpolate(property_to.centered, property_from.centered, pos_map)),
- efl_gfx_shape_stroke_dash_set(dash, property_to.dash_length),
- efl_gfx_shape_stroke_cap_set(pos_map < 0.5 ? property_from.c : property_to.c),
- efl_gfx_shape_stroke_join_set(pos_map < 0.5 ? property_from.j : property_to.j),
-
- eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
- eo_event_callback_call(EFL_GFX_CHANGED, NULL));
+ efl_gfx_shape_stroke_scale_set(obj, interpolate(property_to.scale, property_from.scale, pos_map));
+ efl_gfx_shape_stroke_color_set(obj, interpolatei(property_to.r, property_from.r, pos_map), interpolatei(property_to.g, property_from.g, pos_map), interpolatei(property_to.b, property_from.b, pos_map), interpolatei(property_to.a, property_from.a, pos_map));
+ efl_gfx_color_set(obj, interpolatei(property_to.fr, property_from.fr, pos_map), interpolatei(property_to.fg, property_from.fg, pos_map), interpolatei(property_to.fb, property_from.fb, pos_map), interpolatei(property_to.fa, property_from.fa, pos_map));
+ efl_gfx_shape_stroke_width_set(obj, interpolate(property_to.w, property_from.w, pos_map));
+ efl_gfx_shape_stroke_location_set(obj, interpolate(property_to.centered, property_from.centered, pos_map));
+ efl_gfx_shape_stroke_dash_set(obj, dash, property_to.dash_length);
+ efl_gfx_shape_stroke_cap_set(obj, pos_map < 0.5 ? property_from.c : property_to.c);
+ efl_gfx_shape_stroke_join_set(obj, pos_map < 0.5 ? property_from.j : property_to.j);
+ eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
+ eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
return EINA_TRUE;
}
@@ -449,9 +439,8 @@ _efl_gfx_shape_reset(Eo *obj, Efl_Gfx_Shape_Data *pd)
pd->current_ctrl.x = 0;
pd->current_ctrl.y = 0;
pd->convex = EINA_FALSE;
- eo_do(obj,
- eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
- eo_event_callback_call(EFL_GFX_CHANGED, NULL));
+ eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
+ eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
}
static void
@@ -470,9 +459,8 @@ _efl_gfx_shape_append_move_to(Eo *obj, Efl_Gfx_Shape_Data *pd,
pd->current.x = x;
pd->current.y = y;
- eo_do(obj,
- eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
- eo_event_callback_call(EFL_GFX_CHANGED, NULL));
+ eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
+ eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
}
static void
@@ -491,9 +479,8 @@ _efl_gfx_shape_append_line_to(Eo *obj, Efl_Gfx_Shape_Data *pd,
pd->current.x = x;
pd->current.y = y;
- eo_do(obj,
- eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
- eo_event_callback_call(EFL_GFX_CHANGED, NULL));
+ eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
+ eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
}
static void
@@ -520,9 +507,8 @@ _efl_gfx_shape_append_cubic_to(Eo *obj, Efl_Gfx_Shape_Data *pd,
pd->current_ctrl.x = ctrl_x1;
pd->current_ctrl.y = ctrl_y1;
- eo_do(obj,
- eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
- eo_event_callback_call(EFL_GFX_CHANGED, NULL));
+ eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
+ eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
}
static void
@@ -1090,9 +1076,8 @@ _efl_gfx_shape_append_close(Eo *obj, Efl_Gfx_Shape_Data *pd)
efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_CLOSE,
pd, &offset_point);
- eo_do(obj,
- eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
- eo_event_callback_call(EFL_GFX_CHANGED, NULL));
+ eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
+ eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
}
static void
@@ -1815,9 +1800,8 @@ _efl_gfx_shape_dup(Eo *obj, Efl_Gfx_Shape_Data *pd, const Eo *dup_from)
_efl_gfx_shape_stroke_dash_set(obj, pd, from->public.stroke.dash, from->public.stroke.dash_length);
_efl_gfx_shape_path_set(obj, pd, from->commands, from->points);
- eo_do(obj,
- eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
- eo_event_callback_call(EFL_GFX_CHANGED, NULL));
+ eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL);
+ eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL);
}
#include "interfaces/efl_gfx_shape.eo.c"
diff --git a/src/lib/efl/interfaces/efl_model_common.c b/src/lib/efl/interfaces/efl_model_common.c
index 5f3e057b87..90d515c1c7 100644
--- a/src/lib/efl/interfaces/efl_model_common.c
+++ b/src/lib/efl/interfaces/efl_model_common.c
@@ -43,7 +43,7 @@ efl_model_load_set(Efl_Model_Base *model, Efl_Model_Load *load, Efl_Model_Load_S
if (load->status != new_load.status)
{
load->status = new_load.status;
- eo_do(model, eo_event_callback_call(EFL_MODEL_BASE_EVENT_LOAD_STATUS, load));
+ eo_event_callback_call(model, EFL_MODEL_BASE_EVENT_LOAD_STATUS, load);
}
}
@@ -77,7 +77,7 @@ EAPI void
efl_model_error_notify(Efl_Model_Base *model)
{
Efl_Model_Load load = {.status = EFL_MODEL_LOAD_STATUS_ERROR};
- eo_do(model, eo_event_callback_call(EFL_MODEL_BASE_EVENT_LOAD_STATUS, &load));
+ eo_event_callback_call(model, EFL_MODEL_BASE_EVENT_LOAD_STATUS, &load);
}
EAPI void
@@ -90,7 +90,7 @@ efl_model_property_changed_notify(Efl_Model_Base *model, const char *property)
EINA_SAFETY_ON_FALSE_GOTO(ret, on_error);
Efl_Model_Property_Event evt = {.changed_properties = changed_properties};
- eo_do(model, eo_event_callback_call(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt));
+ eo_event_callback_call(model, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt);
on_error:
eina_array_free(changed_properties);
@@ -106,7 +106,7 @@ efl_model_property_invalidated_notify(Efl_Model_Base *model, const char *propert
EINA_SAFETY_ON_FALSE_GOTO(ret, on_error);
Efl_Model_Property_Event evt = {.invalidated_properties = invalidated_properties};
- eo_do(model, eo_event_callback_call(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt));
+ eo_event_callback_call(model, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt);
on_error:
eina_array_free(invalidated_properties);
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index 5ff288ea0b..1d96750cc3 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -51,7 +51,7 @@ _load_set(Eio_Model_Data *priv, Efl_Model_Load_Status status)
if (priv->load.status != load.status)
{
priv->load.status = load.status;
- eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_LOAD_STATUS, &load));
+ eo_event_callback_call(priv->obj, EFL_MODEL_BASE_EVENT_LOAD_STATUS, &load);
}
}
@@ -75,7 +75,7 @@ _eio_stat_done_cb(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat *st
eina_value_set(priv->properties_value[EIO_MODEL_PROP_SIZE], eio_file_size(stat));
evt.changed_properties = priv->properties_name;
- eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt));
+ eo_event_callback_call(priv->obj, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt);
_load_set(priv, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES);
@@ -112,7 +112,7 @@ _eio_move_done_cb(void *data, Eio_File *handler EINA_UNUSED)
eina_array_push(properties, _eio_model_prop_names[EIO_MODEL_PROP_FILENAME]);
evt.changed_properties = properties;
- eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt));
+ eo_event_callback_call(priv->obj, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt);
eina_array_free(properties);
}
@@ -147,16 +147,16 @@ _efl_model_evt_added_ecore_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void
Efl_Model_Children_Event cevt;
Eina_Value path;
- cevt.child = eo_add_ref(EIO_MODEL_CLASS, priv->obj, eio_model_path_set(evt->filename));
+ cevt.child = eo_add_ref(EIO_MODEL_CLASS, priv->obj, eio_model_path_set(eoid, evt->filename));
priv->children_list = eina_list_append(priv->children_list, cevt.child);
cevt.index = eina_list_count(priv->children_list);
eina_value_setup(&path, EINA_VALUE_TYPE_STRING);
eina_value_set(&path, evt->filename);
- eo_do(cevt.child, eio_model_children_filter_set(priv->filter_cb, priv->filter_userdata));
+ eio_model_children_filter_set(cevt.child, priv->filter_cb, priv->filter_userdata);
eina_value_flush(&path);
- eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILD_ADDED, &cevt));
+ eo_event_callback_call(priv->obj, EFL_MODEL_BASE_EVENT_CHILD_ADDED, &cevt);
return EINA_TRUE;
}
@@ -185,7 +185,7 @@ _efl_model_evt_deleted_ecore_cb(void *data EINA_UNUSED, int type EINA_UNUSED, vo
cevt.index = i;
cevt.child = cur->data;
- eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILD_REMOVED, &cevt));
+ eo_event_callback_call(priv->obj, EFL_MODEL_BASE_EVENT_CHILD_REMOVED, &cevt);
priv->children_list = eina_list_remove_list(priv->children_list, cur);
eo_unref(cevt.child);
@@ -407,10 +407,10 @@ _eio_main_children_load_cb(void *data, Eio_File *handler EINA_UNUSED, const Eina
Eio_Model_Data *priv = data;
EINA_SAFETY_ON_NULL_RETURN(priv);
- child = eo_add(MY_CLASS, NULL, eio_model_path_set(info->path));
+ child = eo_add(MY_CLASS, NULL, eio_model_path_set(eoid, info->path));
eina_spinlock_take(&priv->filter_lock);
if (priv->filter_cb)
- eo_do(child, eio_model_children_filter_set(priv->filter_cb, priv->filter_userdata));
+ eio_model_children_filter_set(child, priv->filter_cb, priv->filter_userdata);
eina_spinlock_release(&priv->filter_lock);
priv->children_list = eina_list_append(priv->children_list, child);
@@ -426,7 +426,7 @@ _eio_done_children_load_cb(void *data, Eio_File *handler EINA_UNUSED)
count = eina_list_count(priv->children_list);
_load_set(priv, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN);
- eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count));
+ eo_event_callback_call(priv->obj, EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count);
}
static void
@@ -626,7 +626,7 @@ _eio_model_efl_model_base_children_slice_get(Eo *obj EINA_UNUSED, Eio_Model_Data
static Eo *
_eio_model_eo_base_constructor(Eo *obj, Eio_Model_Data *priv)
{
- obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
unsigned int i;
priv->obj = obj;
@@ -684,7 +684,7 @@ _eio_model_eo_base_destructor(Eo *obj , Eio_Model_Data *priv)
eo_unref(child);
free(priv->path);
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
#include "eio_model.eo.c"
diff --git a/src/lib/eldbus/eldbus_model_arguments.c b/src/lib/eldbus/eldbus_model_arguments.c
index 36682b65b9..50bbc80e8d 100644
--- a/src/lib/eldbus/eldbus_model_arguments.c
+++ b/src/lib/eldbus/eldbus_model_arguments.c
@@ -30,7 +30,7 @@ _eldbus_model_arguments_hash_free(Eina_Value *value)
static Eo_Base*
_eldbus_model_arguments_eo_base_constructor(Eo *obj, Eldbus_Model_Arguments_Data *pd)
{
- obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
pd->obj = obj;
pd->load.status = EFL_MODEL_LOAD_STATUS_UNLOADED;
@@ -68,7 +68,7 @@ _eldbus_model_arguments_eo_base_destructor(Eo *obj, Eldbus_Model_Arguments_Data
eina_stringshare_del(pd->name);
eldbus_proxy_unref(pd->proxy);
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
static Efl_Model_Load_Status
@@ -184,8 +184,8 @@ _eldbus_model_arguments_efl_model_base_property_get(Eo *obj EINA_UNUSED,
static void
_eldbus_model_arguments_efl_model_base_load(Eo *obj, Eldbus_Model_Arguments_Data *pd EINA_UNUSED)
{
- eo_do(obj, efl_model_properties_load());
- eo_do(obj, efl_model_children_load());
+ efl_model_properties_load(obj);
+ efl_model_children_load(obj);
}
static Efl_Model_Load_Status
@@ -329,7 +329,7 @@ eldbus_model_arguments_process_arguments(Eldbus_Model_Arguments_Data *pd,
if (eina_array_count(changed_properties))
{
Efl_Model_Property_Event evt = {.changed_properties = changed_properties};
- eo_do(pd->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt));
+ eo_event_callback_call(pd->obj, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt);
}
result = EINA_TRUE;
diff --git a/src/lib/eldbus/eldbus_model_connection.c b/src/lib/eldbus/eldbus_model_connection.c
index 6325a5ac0b..ebd758be2b 100644
--- a/src/lib/eldbus/eldbus_model_connection.c
+++ b/src/lib/eldbus/eldbus_model_connection.c
@@ -20,7 +20,7 @@ static void _eldbus_model_connection_clear(Eldbus_Model_Connection_Data *);
static Eo_Base*
_eldbus_model_connection_eo_base_constructor(Eo *obj, Eldbus_Model_Connection_Data *pd)
{
- obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
pd->obj = obj;
pd->load.status = EFL_MODEL_LOAD_STATUS_UNLOADED;
@@ -55,7 +55,7 @@ _eldbus_model_connection_eo_base_destructor(Eo *obj, Eldbus_Model_Connection_Dat
_eldbus_model_connection_clear(pd);
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
static Efl_Model_Load_Status
@@ -345,8 +345,7 @@ _eldbus_model_connection_names_list_cb(void *data,
{
DBG("(%p): bus = %s", pd->obj, bus);
- Eo *child = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL,
- eldbus_model_object_connection_constructor(pd->connection, bus, "/"));
+ Eo *child = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_connection_constructor(eoid, pd->connection, bus, "/"));
pd->children_list = eina_list_append(pd->children_list, child);
}
@@ -355,7 +354,7 @@ _eldbus_model_connection_names_list_cb(void *data,
count = eina_list_count(pd->children_list);
if (count)
- eo_do(pd->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count));
+ eo_event_callback_call(pd->obj, EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count);
}
#include "eldbus_model_connection.eo.c"
diff --git a/src/lib/eldbus/eldbus_model_method.c b/src/lib/eldbus/eldbus_model_method.c
index 7c0c3d60e2..d62b8eb9c7 100644
--- a/src/lib/eldbus/eldbus_model_method.c
+++ b/src/lib/eldbus/eldbus_model_method.c
@@ -19,7 +19,7 @@ static void _eldbus_model_method_call_cb(void *, const Eldbus_Message *, Eldbus_
static Eo_Base*
_eldbus_model_method_eo_base_constructor(Eo *obj, Eldbus_Model_Method_Data *pd)
{
- obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
pd->obj = obj;
pd->method = NULL;
@@ -35,7 +35,7 @@ _eldbus_model_method_constructor(Eo *obj EINA_UNUSED,
EINA_SAFETY_ON_NULL_RETURN(proxy);
EINA_SAFETY_ON_NULL_RETURN(method);
- eo_do_super(obj, MY_CLASS, eldbus_model_arguments_constructor(proxy, method->name, method->arguments));
+ eldbus_model_arguments_constructor(eo_super(obj, MY_CLASS), proxy, method->name, method->arguments);
pd->method = method;
}
@@ -96,7 +96,7 @@ _eldbus_model_method_call_cb(void *data, const Eldbus_Message *msg, Eldbus_Pendi
Eldbus_Model_Arguments_Data *args_data = eo_data_scope_get(pd->obj, ELDBUS_MODEL_ARGUMENTS_CLASS);
if (eldbus_model_arguments_process_arguments(args_data, msg, pending))
- eo_do(pd->obj, eo_event_callback_call(ELDBUS_MODEL_METHOD_EVENT_SUCCESSFUL_CALL, NULL));
+ eo_event_callback_call(pd->obj, ELDBUS_MODEL_METHOD_EVENT_SUCCESSFUL_CALL, NULL);
}
#include "eldbus_model_method.eo.c"
diff --git a/src/lib/eldbus/eldbus_model_object.c b/src/lib/eldbus/eldbus_model_object.c
index 115330e956..240d657e77 100644
--- a/src/lib/eldbus/eldbus_model_object.c
+++ b/src/lib/eldbus/eldbus_model_object.c
@@ -26,7 +26,7 @@ static void _eldbus_model_object_create_children(Eldbus_Model_Object_Data *, Eld
static Eo_Base*
_eldbus_model_object_eo_base_constructor(Eo *obj, Eldbus_Model_Object_Data *pd)
{
- obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
pd->obj = obj;
pd->load.status = EFL_MODEL_LOAD_STATUS_UNLOADED;
@@ -90,7 +90,7 @@ _eldbus_model_object_eo_base_destructor(Eo *obj, Eldbus_Model_Object_Data *pd)
_eldbus_model_object_clear(pd);
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
static Efl_Model_Load_Status
@@ -462,7 +462,7 @@ _eldbus_model_object_introspect_cb(void *data,
count = eina_list_count(pd->children_list);
if (count)
- eo_do(pd->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count));
+ eo_event_callback_call(pd->obj, EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count);
}
}
@@ -532,8 +532,7 @@ _eldbus_model_object_create_children(Eldbus_Model_Object_Data *pd, Eldbus_Object
WRN("(%p) Creating child: bus = %s, path = %s, interface = %s", pd->obj, pd->bus, current_path, interface->name);
// TODO: increment reference to keep 'interface' in memory
- child = eo_add_ref(ELDBUS_MODEL_PROXY_CLASS, NULL,
- eldbus_model_proxy_constructor(object, interface));
+ child = eo_add_ref(ELDBUS_MODEL_PROXY_CLASS, NULL, eldbus_model_proxy_constructor(eoid, object, interface));
pd->children_list = eina_list_append(pd->children_list, child);
}
diff --git a/src/lib/eldbus/eldbus_model_proxy.c b/src/lib/eldbus/eldbus_model_proxy.c
index fd385a6bfe..2e660f4116 100644
--- a/src/lib/eldbus/eldbus_model_proxy.c
+++ b/src/lib/eldbus/eldbus_model_proxy.c
@@ -47,7 +47,7 @@ _eldbus_model_proxy_hash_free(Eina_Value *value)
static Eo_Base*
_eldbus_model_proxy_eo_base_constructor(Eo *obj, Eldbus_Model_Proxy_Data *pd)
{
- obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
pd->obj = obj;
pd->load.status = EFL_MODEL_LOAD_STATUS_UNLOADED;
@@ -88,7 +88,7 @@ _eldbus_model_proxy_eo_base_destructor(Eo *obj, Eldbus_Model_Proxy_Data *pd)
eina_stringshare_del(pd->name);
eldbus_object_unref(pd->object);
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
static Efl_Model_Load_Status
@@ -294,7 +294,7 @@ _eldbus_model_proxy_efl_model_base_children_load(Eo *obj EINA_UNUSED, Eldbus_Mod
count = eina_list_count(pd->children_list);
if (count)
- eo_do(pd->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count));
+ eo_event_callback_call(pd->obj, EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count);
}
static void
@@ -325,8 +325,7 @@ _eldbus_model_proxy_create_methods_children(Eldbus_Model_Proxy_Data *pd)
INF("(%p) Creating method child: bus = %s, path = %s, method = %s::%s", pd->obj, bus, path, interface_name, method_name);
- child = eo_add(ELDBUS_MODEL_METHOD_CLASS, NULL,
- eldbus_model_method_constructor(pd->proxy, method));
+ child = eo_add(ELDBUS_MODEL_METHOD_CLASS, NULL, eldbus_model_method_constructor(eoid, pd->proxy, method));
pd->children_list = eina_list_append(pd->children_list, child);
}
@@ -360,8 +359,7 @@ _eldbus_model_proxy_create_signals_children(Eldbus_Model_Proxy_Data *pd)
DBG("(%p) Creating signal child: bus = %s, path = %s, signal = %s::%s", pd->obj, bus, path, interface_name, signal_name);
- child = eo_add(ELDBUS_MODEL_SIGNAL_CLASS, NULL,
- eldbus_model_signal_constructor(pd->proxy, signal));
+ child = eo_add(ELDBUS_MODEL_SIGNAL_CLASS, NULL, eldbus_model_signal_constructor(eoid, pd->proxy, signal));
pd->children_list = eina_list_append(pd->children_list, child);
}
@@ -587,7 +585,7 @@ _eldbus_model_proxy_property_get_all_cb(void *data,
.changed_properties = changed_properties
};
- eo_do(pd->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt));
+ eo_event_callback_call(pd->obj, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt);
}
efl_model_load_set(pd->obj, &pd->load, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES);
@@ -628,7 +626,7 @@ _eldbus_model_proxy_property_set_cb(void *data,
Efl_Model_Property_Event evt = {
.changed_properties = pd->properties_array
};
- eo_do(pd->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt));
+ eo_event_callback_call(pd->obj, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt);
efl_model_property_changed_notify(pd->obj, property_set_data->property);
}
diff --git a/src/lib/eldbus/eldbus_model_signal.c b/src/lib/eldbus/eldbus_model_signal.c
index 4ef32bb906..406c451398 100644
--- a/src/lib/eldbus/eldbus_model_signal.c
+++ b/src/lib/eldbus/eldbus_model_signal.c
@@ -18,7 +18,7 @@ static void _eldbus_model_signal_callback_del(Eldbus_Model_Signal_Data *);
static Eo_Base*
_eldbus_model_signal_eo_base_constructor(Eo *obj, Eldbus_Model_Signal_Data *pd)
{
- eo_do_super(obj, MY_CLASS, eo_constructor());
+ eo_constructor(eo_super(obj, MY_CLASS));
pd->obj = obj;
pd->handler = NULL;
@@ -35,7 +35,7 @@ _eldbus_model_signal_constructor(Eo *obj EINA_UNUSED,
EINA_SAFETY_ON_NULL_RETURN(proxy);
EINA_SAFETY_ON_NULL_RETURN(signal);
- eo_do_super(obj, MY_CLASS, eldbus_model_arguments_constructor(proxy, signal->name, signal->arguments));
+ eldbus_model_arguments_constructor(eo_super(obj, MY_CLASS), proxy, signal->name, signal->arguments);
pd->signal = signal;
}
@@ -45,7 +45,7 @@ _eldbus_model_signal_eo_base_destructor(Eo *obj, Eldbus_Model_Signal_Data *pd)
{
_eldbus_model_signal_callback_del(pd);
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
static void
@@ -59,14 +59,14 @@ _eldbus_model_signal_efl_model_base_properties_load(Eo *obj, Eldbus_Model_Signal
_eldbus_model_signal_callback_add(pd);
- eo_do_super(obj, MY_CLASS, efl_model_properties_load());
+ efl_model_properties_load(eo_super(obj, MY_CLASS));
}
static void
_eldbus_model_signal_efl_model_base_unload(Eo *obj EINA_UNUSED, Eldbus_Model_Signal_Data *pd)
{
_eldbus_model_signal_callback_del(pd);
- eo_do_super(obj, MY_CLASS, efl_model_unload());
+ efl_model_unload(eo_super(obj, MY_CLASS));
}
static void
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index 26b440d840..231a81efac 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -243,8 +243,8 @@ emotion_object_add(Evas *evas)
EOLIAN static Eo *
_emotion_object_eo_base_constructor(Eo *obj, Emotion_Object_Data *pd EINA_UNUSED)
{
- obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
- eo_do(obj, evas_obj_type_set(E_OBJ_NAME));
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
+ evas_obj_type_set(obj, E_OBJ_NAME);
return obj;
}
@@ -350,7 +350,7 @@ EAPI Eina_Bool
emotion_object_file_set(Evas_Object *obj, const char *file)
{
Eina_Bool ret;
- return eo_do_ret(obj, ret, efl_file_set(file, NULL));
+ return efl_file_set(obj, file, NULL);
}
EOLIAN static Eina_Bool
@@ -413,7 +413,7 @@ EAPI const char *
emotion_object_file_get(const Evas_Object *obj)
{
const char *file = NULL;
- eo_do(obj, efl_file_get(&file, NULL));
+ efl_file_get(obj, &file, NULL);
return file;
}
@@ -624,7 +624,7 @@ emotion_object_keep_aspect_get(const Evas_Object *obj)
EAPI void
emotion_object_play_set(Evas_Object *obj, Eina_Bool play)
{
- eo_do(obj, efl_player_play_set(play));
+ efl_player_play_set(obj, play);
}
EOLIAN static void
@@ -649,7 +649,7 @@ EAPI Eina_Bool
emotion_object_play_get(const Evas_Object *obj)
{
Eina_Bool ret;
- return eo_do_ret(obj, ret, efl_player_play_get());
+ return efl_player_play_get(obj);
}
EOLIAN static Eina_Bool
@@ -662,7 +662,7 @@ _emotion_object_efl_player_play_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd
EAPI void
emotion_object_position_set(Evas_Object *obj, double sec)
{
- eo_do(obj, efl_player_position_set(sec));
+ efl_player_position_set(obj, sec);
}
EOLIAN static void
@@ -688,7 +688,7 @@ EAPI double
emotion_object_position_get(const Evas_Object *obj)
{
double ret;
- return eo_do_ret(obj, ret, efl_player_position_get());
+ return efl_player_position_get(obj);
}
EOLIAN static double
@@ -713,7 +713,7 @@ EAPI Eina_Bool
emotion_object_seekable_get(const Evas_Object *obj)
{
Eina_Bool ret;
- return eo_do_ret(obj, ret, efl_player_seekable_get());
+ return efl_player_seekable_get(obj);
}
EAPI Eina_Bool
@@ -740,7 +740,7 @@ EAPI double
emotion_object_play_length_get(const Evas_Object *obj)
{
double ret;
- return eo_do_ret(obj, ret, efl_player_length_get());
+ return efl_player_length_get(obj);
}
EAPI void
@@ -749,7 +749,7 @@ emotion_object_size_get(const Evas_Object *obj, int *iw, int *ih)
if (iw) *iw = 0;
if (ih) *ih = 0;
- eo_do(obj, efl_image_load_size_get(iw, ih));
+ efl_image_load_size_get(obj, iw, ih);
}
EOLIAN static void
@@ -762,7 +762,7 @@ _emotion_object_efl_image_load_size_get(Eo *obj EINA_UNUSED, Emotion_Object_Data
EAPI void
emotion_object_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth)
{
- eo_do(obj, efl_image_smooth_scale_set(smooth));
+ efl_image_smooth_scale_set(obj, smooth);
}
EOLIAN static void
@@ -775,7 +775,7 @@ EAPI Eina_Bool
emotion_object_smooth_scale_get(const Evas_Object *obj)
{
Eina_Bool ret;
- return eo_do_ret(obj, ret, efl_image_smooth_scale_get());
+ return efl_image_smooth_scale_get(obj);
}
EOLIAN static Eina_Bool
@@ -788,7 +788,7 @@ EAPI double
emotion_object_ratio_get(const Evas_Object *obj)
{
double ret;
- return eo_do_ret(obj, ret, efl_image_ratio_get());
+ return efl_image_ratio_get(obj);
}
EOLIAN static double
@@ -814,7 +814,7 @@ emotion_object_event_simple_send(Evas_Object *obj, Emotion_Event ev)
EAPI void
emotion_object_audio_volume_set(Evas_Object *obj, double vol)
{
- eo_do(obj, efl_player_audio_volume_set(vol));
+ efl_player_audio_volume_set(obj, vol);
}
EOLIAN static void
@@ -829,7 +829,7 @@ EAPI double
emotion_object_audio_volume_get(const Evas_Object *obj)
{
double ret;
- return eo_do_ret(obj, ret, efl_player_audio_volume_get());
+ return efl_player_audio_volume_get(obj);
}
EOLIAN static double
@@ -842,7 +842,7 @@ _emotion_object_efl_player_audio_volume_get(Eo *obj EINA_UNUSED, Emotion_Object_
EAPI void
emotion_object_audio_mute_set(Evas_Object *obj, Eina_Bool mute)
{
- eo_do(obj, efl_player_audio_mute_set(mute));
+ efl_player_audio_mute_set(obj, mute);
}
EOLIAN static void
@@ -857,7 +857,7 @@ EAPI Eina_Bool
emotion_object_audio_mute_get(const Evas_Object *obj)
{
Eina_Bool ret;
- return eo_do_ret(obj, ret, efl_player_audio_mute_get());
+ return efl_player_audio_mute_get(obj);
}
EOLIAN static Eina_Bool
@@ -1148,7 +1148,7 @@ EAPI double
emotion_object_progress_status_get(const Evas_Object *obj)
{
double ret;
- return eo_do_ret(obj, ret, efl_player_progress_get());
+ return efl_player_progress_get(obj);
}
EOLIAN static double
@@ -1318,8 +1318,7 @@ _eio_load_xattr_done(void *data, Eio_File *handler, double xattr_double)
Emotion_Object_Data *sd = data;
emotion_object_position_set(evas_object_smart_parent_get(sd->obj), xattr_double);
- eo_do(evas_object_smart_parent_get(sd->obj),
- eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL));
+ eo_event_callback_call(evas_object_smart_parent_get(sd->obj), EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL);
_eio_load_xattr_cleanup(sd, handler);
}
@@ -1328,8 +1327,7 @@ _eio_load_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
{
Emotion_Object_Data *sd = data;
- eo_do(evas_object_smart_parent_get(sd->obj),
- eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL));
+ eo_event_callback_call(evas_object_smart_parent_get(sd->obj), EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL);
_eio_load_xattr_cleanup(sd, handler);
}
#endif
@@ -1364,10 +1362,10 @@ emotion_object_last_position_load(Evas_Object *obj)
if (eina_xattr_double_get(tmp, "user.e.time_seek", &xattr))
{
emotion_object_position_set(obj, xattr);
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL);
}
else
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL);
#endif
}
@@ -1390,7 +1388,7 @@ _eio_save_xattr_done(void *data, Eio_File *handler)
{
Emotion_Object_Data *sd = data;
- eo_do(sd->obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL));
+ eo_event_callback_call(sd->obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL);
_eio_save_xattr_cleanup(sd, handler);
}
@@ -1399,7 +1397,7 @@ _eio_save_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
{
Emotion_Object_Data *sd = data;
- eo_do(sd->obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL));
+ eo_event_callback_call(sd->obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL);
_eio_save_xattr_cleanup(sd, handler);
}
#endif
@@ -1429,9 +1427,9 @@ emotion_object_last_position_save(Evas_Object *obj)
sd);
#else
if (eina_xattr_double_set(tmp, "user.e.time_seek", emotion_object_position_get(obj), 0))
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL);
else
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL);
#endif
}
@@ -1493,7 +1491,7 @@ _emotion_frame_anim(void *data)
_emotion_video_pos_update(obj,
emotion_engine_instance_pos_get(sd->engine_instance),
emotion_engine_instance_len_get(sd->engine_instance));
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_FRAME_DECODE, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_FRAME_DECODE, NULL);
return EINA_FALSE;
}
@@ -1517,10 +1515,8 @@ _emotion_video_pos_update(Evas_Object *obj, double pos, double len)
if (len != sd->len) nlen = 1;
sd->pos = pos;
sd->len = len;
- if (npos) eo_do(obj,
- eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_UPDATE, NULL));
- if (nlen) eo_do(obj,
- eo_event_callback_call(EMOTION_OBJECT_EVENT_LENGTH_CHANGE, NULL));
+ if (npos) eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_UPDATE, NULL);
+ if (nlen) eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_LENGTH_CHANGE, NULL);
}
EAPI void
@@ -1549,7 +1545,7 @@ _emotion_frame_resize(Evas_Object *obj, int w, int h, double ratio)
if (changed)
{
evas_object_size_hint_request_set(obj, w, h);
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_FRAME_RESIZE, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_FRAME_RESIZE, NULL);
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
_emotion_object_aspect_border_apply(obj, sd, w, h);
}
@@ -1573,7 +1569,7 @@ _emotion_decode_stop(Evas_Object *obj)
if (sd->play)
{
sd->play = 0;
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_DECODE_STOP, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_DECODE_STOP, NULL);
}
}
@@ -1589,26 +1585,26 @@ _emotion_open_done(Evas_Object *obj)
emotion_object_position_set(obj, sd->remember_jump);
if (sd->remember_play != sd->play)
emotion_object_play_set(obj, sd->remember_play);
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_OPEN_DONE, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_OPEN_DONE, NULL);
}
EAPI void
_emotion_playback_started(Evas_Object *obj)
{
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, NULL);
}
EAPI void
_emotion_playback_finished(Evas_Object *obj)
{
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, NULL);
}
EAPI void
_emotion_audio_level_change(Evas_Object *obj)
{
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_AUDIO_LEVEL_CHANGE, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_AUDIO_LEVEL_CHANGE, NULL);
}
EAPI void
@@ -1617,7 +1613,7 @@ _emotion_channels_change(Evas_Object *obj)
Emotion_Object_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_CHANNELS_CHANGE, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_CHANNELS_CHANGE, NULL);
}
EAPI void
@@ -1627,7 +1623,7 @@ _emotion_title_set(Evas_Object *obj, char *title)
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
eina_stringshare_replace(&sd->title, title);
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_TITLE_CHANGE, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_TITLE_CHANGE, NULL);
}
@@ -1639,7 +1635,7 @@ _emotion_progress_set(Evas_Object *obj, char *info, double st)
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
eina_stringshare_replace(&sd->progress.info, info);
sd->progress.stat = st;
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, NULL);
}
EAPI void
@@ -1650,7 +1646,7 @@ _emotion_file_ref_set(Evas_Object *obj, const char *file, int num)
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
eina_stringshare_replace(&sd->ref.file, file);
sd->ref.num = num;
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_REF_CHANGE, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_REF_CHANGE, NULL);
}
EAPI void
@@ -1660,7 +1656,7 @@ _emotion_spu_button_num_set(Evas_Object *obj, int num)
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
sd->spu.button_num = num;
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_BUTTON_NUM_CHANGE, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_BUTTON_NUM_CHANGE, NULL);
}
EAPI void
@@ -1670,7 +1666,7 @@ _emotion_spu_button_set(Evas_Object *obj, int button)
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
sd->spu.button = button;
- eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_BUTTON_CHANGE, NULL));
+ eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_BUTTON_CHANGE, NULL);
}
EAPI void
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c
index acf588341e..5af26b38b3 100644
--- a/src/lib/eo/eo_base_class.c
+++ b/src/lib/eo/eo_base_class.c
@@ -66,7 +66,7 @@ _eo_base_key_data_set(Eo *obj, Eo_Base_Data *pd,
if (!key) return;
- eo_do(obj, eo_key_data_del(key); );
+ eo_key_data_del(obj, key);
node = malloc(sizeof(Eo_Generic_Data_Node));
if (!node) return;
@@ -103,9 +103,9 @@ _eo_base_parent_set(Eo *obj, Eo_Base_Data *pd, Eo *parent_id)
if (pd->parent == parent_id)
return;
- if (eo_do_ret(obj, tmp, eo_composite_part_is()) && pd->parent)
+ if (eo_composite_part_is(obj) && pd->parent)
{
- eo_do(pd->parent, eo_composite_detach(obj));
+ eo_composite_detach(pd->parent, obj);
}
if (pd->parent)
@@ -574,7 +574,7 @@ _eo_base_event_callback_priority_add(Eo *obj, Eo_Base_Data *pd,
cb->priority = priority;
_eo_callbacks_sorted_insert(pd, cb);
- eo_do(obj, eo_event_callback_call(EO_BASE_EVENT_CALLBACK_ADD, (void *)arr));
+ eo_event_callback_call(obj, EO_BASE_EVENT_CALLBACK_ADD, (void *)arr);
return EINA_TRUE;
}
@@ -597,7 +597,7 @@ _eo_base_event_callback_del(Eo *obj, Eo_Base_Data *pd,
cb->delete_me = EINA_TRUE;
pd->deletions_waiting = EINA_TRUE;
_eo_callbacks_clear(pd);
- eo_do(obj, eo_event_callback_call(EO_BASE_EVENT_CALLBACK_DEL, (void *)arr); );
+ eo_event_callback_call(obj, EO_BASE_EVENT_CALLBACK_DEL, (void *)arr);
return EINA_TRUE;
}
}
@@ -627,7 +627,7 @@ _eo_base_event_callback_array_priority_add(Eo *obj, Eo_Base_Data *pd,
cb->func_array = EINA_TRUE;
_eo_callbacks_sorted_insert(pd, cb);
- eo_do(obj, eo_event_callback_call(EO_BASE_EVENT_CALLBACK_ADD, (void *)array); );
+ eo_event_callback_call(obj, EO_BASE_EVENT_CALLBACK_ADD, (void *)array);
return EINA_TRUE;
}
@@ -648,7 +648,7 @@ _eo_base_event_callback_array_del(Eo *obj, Eo_Base_Data *pd,
pd->deletions_waiting = EINA_TRUE;
_eo_callbacks_clear(pd);
- eo_do(obj, eo_event_callback_call(EO_BASE_EVENT_CALLBACK_DEL, (void *)array); );
+ eo_event_callback_call(obj, EO_BASE_EVENT_CALLBACK_DEL, (void *)array);
return EINA_TRUE;
}
}
@@ -738,7 +738,7 @@ _eo_event_forwarder_callback(void *data, const Eo_Event *event)
Eo *new_obj = (Eo *) data;
Eina_Bool ret = EINA_FALSE;
- eo_do(new_obj, ret = eo_event_callback_call(event->desc, event->event_info); );
+ ret = eo_event_callback_call(new_obj, event->desc, event->event_info);
return ret;
}
@@ -752,7 +752,7 @@ _eo_base_event_callback_forwarder_add(Eo *obj, Eo_Base_Data *pd EINA_UNUSED,
/* FIXME: Add it EO_MAGIC_RETURN(new_obj, EO_EINA_MAGIC); */
- eo_do(obj, eo_event_callback_add(desc, _eo_event_forwarder_callback, new_obj); );
+ eo_event_callback_add(obj, desc, _eo_event_forwarder_callback, new_obj);
}
EOLIAN static void
@@ -763,7 +763,7 @@ _eo_base_event_callback_forwarder_del(Eo *obj, Eo_Base_Data *pd EINA_UNUSED,
/* FIXME: Add it EO_MAGIC_RETURN(new_obj, EO_EINA_MAGIC); */
- eo_do(obj, eo_event_callback_del(desc, _eo_event_forwarder_callback, new_obj); );
+ eo_event_callback_del(obj, desc, _eo_event_forwarder_callback, new_obj);
}
EOLIAN static void
@@ -838,7 +838,7 @@ _eo_base_composite_attach(Eo *parent_id, Eo_Base_Data *pd EINA_UNUSED, Eo *comp_
comp_obj->composite = EINA_TRUE;
parent->composite_objects = eina_list_prepend(parent->composite_objects, comp_obj_id);
- eo_do(comp_obj_id, eo_parent_set(parent_id));
+ eo_parent_set(comp_obj_id, parent_id);
return EINA_TRUE;
}
@@ -854,7 +854,7 @@ _eo_base_composite_detach(Eo *parent_id, Eo_Base_Data *pd EINA_UNUSED, Eo *comp_
comp_obj->composite = EINA_FALSE;
parent->composite_objects = eina_list_remove(parent->composite_objects, comp_obj_id);
- eo_do(comp_obj_id, eo_parent_set(NULL));
+ eo_parent_set(comp_obj_id, NULL);
return EINA_TRUE;
}
@@ -990,14 +990,14 @@ _eo_base_destructor(Eo *obj, Eo_Base_Data *pd)
while (pd->children)
{
child = eina_list_data_get(pd->children);
- eo_do(child, eo_parent_set(NULL));
+ eo_parent_set(child, NULL);
}
if (pd->parent)
{
ERR("Object '%p' still has a parent at the time of destruction.", obj);
eo_ref(obj);
- eo_do(obj, eo_parent_set(NULL));
+ eo_parent_set(obj, NULL);
}
_eo_generic_data_del_all(pd);
diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index 8db7adc5fd..6f2108f810 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -1685,11 +1685,10 @@ EAPI Evas_Object *evas_object_rectangle_add(Evas *e) EINA_WARN_UNUSED_RESULT EIN
* Efl_Gfx_Path_Command *path_cmd = NULL;
* double *points = NULL;
* efl_gfx_path_append_circle(&path_cmd, &points);
- * eo_do(shape,
- * evas_vg_node_origin_set(10, 10),
- * efl_gfx_shape_stroke_width_set(1.0),
- * evas_vg_node_color_set(128, 128, 128, 80),
- * efl_gfx_shape_path_set(path_cmd, points));
+ * * evas_vg_node_origin_set(shape, 10, 10);
+ * * efl_gfx_shape_stroke_width_set(shape, 1.0);
+ * * evas_vg_node_color_set(shape, 128, 128, 128, 80);
+ * * efl_gfx_shape_path_set(shape, path_cmd, points);
* @endcode
*
* @since 1.14
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index d4d578932c..db08309982 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -128,8 +128,7 @@ evas_object_event_callback_all_del(Evas_Object *eo_obj)
if (!obj->callbacks) return;
EINA_INLIST_FOREACH_SAFE(obj->callbacks, itr, info)
{
- eo_do(eo_obj, eo_event_callback_del(
- _legacy_evas_callback_table[info->type], _eo_evas_object_cb, info));
+ eo_event_callback_del(eo_obj, _legacy_evas_callback_table[info->type], _eo_evas_object_cb, info);
obj->callbacks =
eina_inlist_remove(obj->callbacks, EINA_INLIST_GET(info));
@@ -155,8 +154,7 @@ evas_event_callback_all_del(Evas *eo_e)
EINA_INLIST_FOREACH_SAFE(e->callbacks, itr, info)
{
- eo_do(eo_e, eo_event_callback_del(
- _legacy_evas_callback_table[info->type], _eo_evas_cb, info));
+ eo_event_callback_del(eo_e, _legacy_evas_callback_table[info->type], _eo_evas_cb, info);
e->callbacks =
eina_inlist_remove(e->callbacks, EINA_INLIST_GET(info));
@@ -173,7 +171,7 @@ evas_event_callback_cleanup(Evas *eo_e)
void
evas_event_callback_call(Evas *eo_e, Evas_Callback_Type type, void *event_info)
{
- eo_do(eo_e, eo_event_callback_call(_legacy_evas_callback_table[type], event_info));
+ eo_event_callback_call(eo_e, _legacy_evas_callback_table[type], event_info);
}
void
@@ -239,7 +237,7 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
break;
}
- eo_do(eo_obj, eo_event_callback_call(_legacy_evas_callback_table[type], event_info));
+ eo_event_callback_call(eo_obj, _legacy_evas_callback_table[type], event_info);
if (type == EVAS_CALLBACK_MOUSE_DOWN)
{
@@ -291,7 +289,7 @@ evas_object_event_callback_priority_add(Evas_Object *eo_obj, Evas_Callback_Type
cb_info->type = type;
const Eo_Event_Description *desc = _legacy_evas_callback_table[type];
- eo_do(eo_obj, eo_event_callback_priority_add(desc, priority, _eo_evas_object_cb, cb_info));
+ eo_event_callback_priority_add(eo_obj, desc, priority, _eo_evas_object_cb, cb_info);
obj->callbacks =
eina_inlist_append(obj->callbacks, EINA_INLIST_GET(cb_info));
@@ -317,8 +315,7 @@ evas_object_event_callback_del(Evas_Object *eo_obj, Evas_Callback_Type type, Eva
if ((info->func == func) && (info->type == type))
{
void *tmp = info->data;
- eo_do(eo_obj, eo_event_callback_del(
- _legacy_evas_callback_table[type], _eo_evas_object_cb, info));
+ eo_event_callback_del(eo_obj, _legacy_evas_callback_table[type], _eo_evas_object_cb, info);
obj->callbacks =
eina_inlist_remove(obj->callbacks, EINA_INLIST_GET(info));
@@ -349,8 +346,7 @@ evas_object_event_callback_del_full(Evas_Object *eo_obj, Evas_Callback_Type type
if ((info->func == func) && (info->type == type) && info->data == data)
{
void *tmp = info->data;
- eo_do(eo_obj, eo_event_callback_del(
- _legacy_evas_callback_table[type], _eo_evas_object_cb, info));
+ eo_event_callback_del(eo_obj, _legacy_evas_callback_table[type], _eo_evas_object_cb, info);
obj->callbacks =
eina_inlist_remove(obj->callbacks, EINA_INLIST_GET(info));
@@ -385,7 +381,7 @@ evas_event_callback_priority_add(Evas *eo_e, Evas_Callback_Type type, Evas_Callb
cb_info->type = type;
const Eo_Event_Description *desc = _legacy_evas_callback_table[type];
- eo_do(eo_e, eo_event_callback_priority_add(desc, priority, _eo_evas_cb, cb_info));
+ eo_event_callback_priority_add(eo_e, desc, priority, _eo_evas_cb, cb_info);
e->callbacks = eina_inlist_append(e->callbacks, EINA_INLIST_GET(cb_info));
}
@@ -410,8 +406,7 @@ evas_event_callback_del(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func)
if ((info->func == func) && (info->type == type))
{
void *tmp = info->data;
- eo_do(eo_e, eo_event_callback_del(
- _legacy_evas_callback_table[type], _eo_evas_cb, info));
+ eo_event_callback_del(eo_e, _legacy_evas_callback_table[type], _eo_evas_cb, info);
e->callbacks =
eina_inlist_remove(e->callbacks, EINA_INLIST_GET(info));
@@ -442,8 +437,7 @@ evas_event_callback_del_full(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb
if ((info->func == func) && (info->type == type) && (info->data == data))
{
void *tmp = info->data;
- eo_do(eo_e, eo_event_callback_del(
- _legacy_evas_callback_table[type], _eo_evas_cb, info));
+ eo_event_callback_del(eo_e, _legacy_evas_callback_table[type], _eo_evas_cb, info);
e->callbacks =
eina_inlist_remove(e->callbacks, EINA_INLIST_GET(info));
diff --git a/src/lib/evas/canvas/evas_canvas3d_camera.c b/src/lib/evas/canvas/evas_canvas3d_camera.c
index c8ed312d23..d631df6917 100644
--- a/src/lib/evas/canvas/evas_canvas3d_camera.c
+++ b/src/lib/evas/canvas/evas_canvas3d_camera.c
@@ -8,7 +8,7 @@ _camera_node_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
void *data EINA_UNUSED, void *fdata)
{
Evas_Canvas3D_Node *n = *(Evas_Canvas3D_Node **)key;
- eo_do(n, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_CAMERA, (Evas_Canvas3D_Object *)fdata));
+ evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_CAMERA, (Evas_Canvas3D_Object *)fdata);
return EINA_TRUE;
}
@@ -66,8 +66,8 @@ EOLIAN static Eo *
_evas_canvas3d_camera_eo_base_constructor(Eo *obj,
Evas_Canvas3D_Camera_Data *pd EINA_UNUSED)
{
- obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
- eo_do(obj, evas_canvas3d_object_type_set(EVAS_CANVAS3D_OBJECT_TYPE_CAMERA));
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
+ evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_CAMERA);
return obj;
}
@@ -92,7 +92,7 @@ _evas_canvas3d_camera_eo_base_destructor(Eo *obj,
eina_hash_free(pd->nodes);
}
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
EAPI Evas_Canvas3D_Camera *
@@ -110,7 +110,7 @@ _evas_canvas3d_camera_projection_matrix_set(Eo *obj, Evas_Canvas3D_Camera_Data *
const Evas_Real *matrix)
{
eina_matrix4_array_set(&pd->projection, matrix);
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL);
}
EOLIAN static void
@@ -133,7 +133,7 @@ _evas_canvas3d_camera_projection_perspective_set(Eo *obj, Evas_Canvas3D_Camera_D
xmax = ymax * aspect;
evas_mat4_frustum_set(&pd->projection, -xmax, xmax, -ymax, ymax, dnear, dfar);
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL);
}
EOLIAN static void
@@ -143,7 +143,7 @@ _evas_canvas3d_camera_projection_frustum_set(Eo *obj, Evas_Canvas3D_Camera_Data
Evas_Real dnear, Evas_Real dfar)
{
evas_mat4_frustum_set(&pd->projection, left, right, bottom, top, dnear, dfar);
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL);
}
EOLIAN static void
@@ -153,7 +153,7 @@ _evas_canvas3d_camera_projection_ortho_set(Eo *obj, Evas_Canvas3D_Camera_Data *p
Evas_Real dnear, Evas_Real dfar)
{
eina_matrix4_ortho_set(&pd->projection, left, right, bottom, top, dnear, dfar);
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL);
}
EOLIAN static Eina_Bool
diff --git a/src/lib/evas/canvas/evas_canvas3d_light.c b/src/lib/evas/canvas/evas_canvas3d_light.c
index 2d7facd175..11e9c81965 100644
--- a/src/lib/evas/canvas/evas_canvas3d_light.c
+++ b/src/lib/evas/canvas/evas_canvas3d_light.c
@@ -8,7 +8,7 @@ _light_node_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
void *data EINA_UNUSED, void *fdata)
{
Evas_Canvas3D_Node *n = *(Evas_Canvas3D_Node **)key;
- eo_do(n, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_LIGHT, (Evas_Canvas3D_Object *)fdata));
+ evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_LIGHT, (Evas_Canvas3D_Object *)fdata);
return EINA_TRUE;
}
@@ -79,8 +79,8 @@ evas_canvas3d_light_add(Evas *e)
EOLIAN static Eo *
_evas_canvas3d_light_eo_base_constructor(Eo *obj, Evas_Canvas3D_Light_Data *pd)
{
- obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
- eo_do(obj, evas_canvas3d_object_type_set(EVAS_CANVAS3D_OBJECT_TYPE_LIGHT));
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
+ evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_LIGHT);
evas_color_set(&pd->ambient, 0.0, 0.0, 0.0, 1.0);
evas_color_set(&pd->diffuse, 1.0, 1.0, 1.0, 1.0);
evas_color_set(&pd->specular, 1.0, 1.0, 1.0, 1.0);
@@ -115,7 +115,7 @@ _evas_canvas3d_light_eo_base_destructor(Eo *obj, Evas_Canvas3D_Light_Data *pd)
eina_hash_free(pd->nodes);
}
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
@@ -125,7 +125,7 @@ _evas_canvas3d_light_directional_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Eina
if (pd->directional != directional)
{
pd->directional = directional;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_ANY, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_ANY, NULL);
}
}
@@ -143,7 +143,7 @@ _evas_canvas3d_light_ambient_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Rea
pd->ambient.b = b;
pd->ambient.a = a;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_LIGHT_AMBIENT, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_AMBIENT, NULL);
}
EOLIAN static void
@@ -163,7 +163,7 @@ _evas_canvas3d_light_diffuse_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Rea
pd->diffuse.b = b;
pd->diffuse.a = a;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_LIGHT_DIFFUSE, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_DIFFUSE, NULL);
}
EOLIAN static void
@@ -183,7 +183,7 @@ _evas_canvas3d_light_specular_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Re
pd->specular.b = b;
pd->specular.a = a;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_LIGHT_SPECULAR, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_SPECULAR, NULL);
}
EOLIAN static void
@@ -199,7 +199,7 @@ EOLIAN static void
_evas_canvas3d_light_spot_exponent_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Real exponent)
{
pd->spot_exp = exponent;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_LIGHT_SPOT_EXP, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_SPOT_EXP, NULL);
}
EOLIAN static Evas_Real
@@ -213,7 +213,7 @@ _evas_canvas3d_light_spot_cutoff_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas
{
pd->spot_cutoff = cutoff;
pd->spot_cutoff_cos = cos(cutoff * M_PI / 180.0);
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_LIGHT_SPOT_CUTOFF, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_SPOT_CUTOFF, NULL);
}
EOLIAN static Evas_Real
@@ -228,7 +228,7 @@ _evas_canvas3d_light_attenuation_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas
pd->atten_const = constant;
pd->atten_linear = linear;
pd->atten_quad = quadratic;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_LIGHT_ATTENUATION, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_ATTENUATION, NULL);
}
EOLIAN static void
@@ -245,7 +245,7 @@ _evas_canvas3d_light_attenuation_enable_set(Eo *obj, Evas_Canvas3D_Light_Data *p
if (pd->enable_attenuation != enable)
{
pd->enable_attenuation = enable;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_LIGHT_ATTENUATION, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_ATTENUATION, NULL);
}
}
@@ -260,7 +260,7 @@ _evas_canvas3d_light_projection_matrix_set(Eo *obj, Evas_Canvas3D_Light_Data *pd
const Evas_Real *matrix)
{
eina_matrix4_array_set(&pd->projection, matrix);
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL);
}
EOLIAN static void
@@ -283,7 +283,7 @@ _evas_canvas3d_light_projection_perspective_set(Eo *obj, Evas_Canvas3D_Light_Dat
xmax = ymax * aspect;
evas_mat4_frustum_set(&pd->projection, -xmax, xmax, -ymax, ymax, dnear, dfar);
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL);
}
EOLIAN static void
@@ -293,7 +293,7 @@ _evas_canvas3d_light_projection_frustum_set(Eo *obj, Evas_Canvas3D_Light_Data *p
Evas_Real dnear, Evas_Real dfar)
{
evas_mat4_frustum_set(&pd->projection, left, right, bottom, top, dnear, dfar);
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL);
}
EOLIAN static void
@@ -303,7 +303,7 @@ _evas_canvas3d_light_projection_ortho_set(Eo *obj, Evas_Canvas3D_Light_Data *pd,
Evas_Real dnear, Evas_Real dfar)
{
eina_matrix4_ortho_set(&pd->projection, left, right, bottom, top, dnear, dfar);
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL);
}
diff --git a/src/lib/evas/canvas/evas_canvas3d_material.c b/src/lib/evas/canvas/evas_canvas3d_material.c
index 8ce248670a..5070d44450 100644
--- a/src/lib/evas/canvas/evas_canvas3d_material.c
+++ b/src/lib/evas/canvas/evas_canvas3d_material.c
@@ -8,7 +8,7 @@ _material_mesh_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
void *data EINA_UNUSED, void *fdata)
{
Evas_Canvas3D_Mesh *m = *(Evas_Canvas3D_Mesh **)key;
- eo_do(m, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_MATERIAL, (Evas_Canvas3D_Object *)fdata));
+ evas_canvas3d_object_change(m, EVAS_CANVAS3D_STATE_MESH_MATERIAL, (Evas_Canvas3D_Object *)fdata);
return EINA_TRUE;
}
@@ -29,7 +29,7 @@ _evas_canvas3d_material_evas_canvas3d_object_update_notify(Eo *obj EINA_UNUSED,
{
if (pd->attribs[i].texture)
{
- eo_do(pd->attribs[i].texture, evas_canvas3d_object_update());
+ evas_canvas3d_object_update(pd->attribs[i].texture);
}
}
}
@@ -91,8 +91,8 @@ evas_canvas3d_material_add(Evas *e)
EOLIAN static Eo *
_evas_canvas3d_material_eo_base_constructor(Eo *obj EINA_UNUSED, Evas_Canvas3D_Material_Data *pd)
{
- obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
- eo_do(obj, evas_canvas3d_object_type_set(EVAS_CANVAS3D_OBJECT_TYPE_MATERIAL));
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
+ evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_MATERIAL);
evas_color_set(&pd->attribs[EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT].color, 0.2, 0.2, 0.2, 1.0);
evas_color_set(&pd->attribs[EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE].color, 0.8, 0.8, 0.8, 1.0);
@@ -136,7 +136,7 @@ _evas_canvas3d_material_eo_base_destructor(Eo *obj, Evas_Canvas3D_Material_Data
evas_canvas3d_texture_material_del(pd->attribs[i].texture, obj);
}
}
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
EOLIAN static void
@@ -155,7 +155,7 @@ EOLIAN static void
_evas_canvas3d_material_color_set(Eo *obj, Evas_Canvas3D_Material_Data *pd, Evas_Canvas3D_Material_Attrib attrib, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
{
evas_color_set(&pd->attribs[attrib].color, r, g, b, a);
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MATERIAL_COLOR, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MATERIAL_COLOR, NULL);
}
EOLIAN static void
@@ -195,7 +195,7 @@ _evas_canvas3d_material_texture_set(Eo *obj, Evas_Canvas3D_Material_Data *pd, Ev
eo_ref(texture);
}
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MATERIAL_TEXTURE, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MATERIAL_TEXTURE, NULL);
}
EOLIAN static Evas_Canvas3D_Texture *
diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.c b/src/lib/evas/canvas/evas_canvas3d_mesh.c
index 84403c3983..d19a1fc39a 100644
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.c
+++ b/src/lib/evas/canvas/evas_canvas3d_mesh.c
@@ -163,7 +163,7 @@ _mesh_node_geometry_change_notify(const Eina_Hash *hash EINA_UNUSED, const void
void *data EINA_UNUSED, void *fdata)
{
Evas_Canvas3D_Node *n = *(Evas_Canvas3D_Node **)key;
- eo_do(n, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_MESH_GEOMETRY, (Evas_Canvas3D_Object *)fdata));
+ evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_MESH_GEOMETRY, (Evas_Canvas3D_Object *)fdata);
return EINA_TRUE;
}
@@ -172,7 +172,7 @@ _mesh_node_material_change_notify(const Eina_Hash *hash EINA_UNUSED, const void
void *data EINA_UNUSED, void *fdata)
{
Evas_Canvas3D_Node *n = *(Evas_Canvas3D_Node **)key;
- eo_do(n, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_MESH_MATERIAL, (Evas_Canvas3D_Object *)fdata));
+ evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_MESH_MATERIAL, (Evas_Canvas3D_Object *)fdata);
return EINA_TRUE;
}
@@ -201,7 +201,7 @@ _evas_canvas3d_mesh_evas_canvas3d_object_update_notify(Eo *obj EINA_UNUSED, Evas
{
if (f->material)
{
- eo_do(f->material, evas_canvas3d_object_update());
+ evas_canvas3d_object_update(f->material);
}
}
}
@@ -261,8 +261,8 @@ evas_canvas3d_mesh_add(Evas *e)
EOLIAN static Eo *
_evas_canvas3d_mesh_eo_base_constructor(Eo *obj, Evas_Canvas3D_Mesh_Data *pd)
{
- obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
- eo_do (obj, evas_canvas3d_object_type_set(EVAS_CANVAS3D_OBJECT_TYPE_MESH));
+ obj = eo_constructor(eo_super(obj, MY_CLASS));
+ evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_MESH);
_mesh_init(pd);
return obj;
@@ -272,7 +272,7 @@ EOLIAN static void
_evas_canvas3d_mesh_eo_base_destructor(Eo *obj, Evas_Canvas3D_Mesh_Data *pd)
{
_mesh_fini(pd);
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
EOLIAN static void
@@ -281,7 +281,7 @@ _evas_canvas3d_mesh_shade_mode_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Mesh_Data
if (pd->shade_mode != mode)
{
pd->shade_mode = mode;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_SHADE_MODE, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_SHADE_MODE, NULL);
}
}
@@ -295,7 +295,7 @@ EOLIAN static void
_evas_canvas3d_mesh_vertex_count_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, unsigned int count)
{
pd->vertex_count = count;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_VERTEX_COUNT, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_VERTEX_COUNT, NULL);
}
EOLIAN static unsigned int
@@ -333,7 +333,7 @@ _evas_canvas3d_mesh_frame_add(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, int frame)
f->frame = frame;
pd->frames = eina_list_append(pd->frames, f);
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_FRAME, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_FRAME, NULL);
}
EOLIAN static void
@@ -349,7 +349,7 @@ _evas_canvas3d_mesh_frame_del(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, int frame)
pd->frames = eina_list_remove(pd->frames, f);
evas_canvas3d_mesh_frame_free(f);
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_FRAME, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_FRAME, NULL);
}
EOLIAN static void
@@ -374,7 +374,7 @@ _evas_canvas3d_mesh_frame_material_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, int
f->material = material;
eo_ref(material);
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_MATERIAL, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_MATERIAL, NULL);
evas_canvas3d_material_mesh_add(material, obj);
}
@@ -477,7 +477,7 @@ _evas_canvas3d_mesh_frame_vertex_data_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd,
f->vertices[attrib].owns_data = EINA_FALSE;
f->vertices[attrib].element_count = element_count;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_VERTEX_DATA, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_VERTEX_DATA, NULL);
}
EOLIAN static void
@@ -601,7 +601,7 @@ _evas_canvas3d_mesh_frame_vertex_data_copy_set(Eo *obj, Evas_Canvas3D_Mesh_Data
ERR("Axis-Aligned Bounding Box wasn't added in frame %d ", frame);
}
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_VERTEX_DATA, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_VERTEX_DATA, NULL);
}
EOLIAN static void *
@@ -671,7 +671,7 @@ _evas_canvas3d_mesh_index_data_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Evas_Ca
pd->indices = (void *)indices;
pd->owns_indices = EINA_FALSE;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_INDEX_DATA, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_INDEX_DATA, NULL);
}
EOLIAN static void
@@ -758,7 +758,7 @@ EOLIAN static void
_evas_canvas3d_mesh_vertex_assembly_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Evas_Canvas3D_Vertex_Assembly assembly)
{
pd->assembly = assembly;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_VERTEX_ASSEMBLY, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_VERTEX_ASSEMBLY, NULL);
}
EOLIAN static Evas_Canvas3D_Vertex_Assembly
@@ -771,7 +771,7 @@ EOLIAN static void
_evas_canvas3d_mesh_fog_color_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
{
evas_color_set(&pd->fog_color, r, g, b, a);
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_FOG, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_FOG, NULL);
}
EOLIAN static void
@@ -788,7 +788,7 @@ EOLIAN static void
_evas_canvas3d_mesh_fog_enable_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Eina_Bool enabled)
{
pd->fog_enabled = enabled;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_FOG, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_FOG, NULL);
}
EOLIAN static Eina_Bool
@@ -801,7 +801,7 @@ EOLIAN static void
_evas_canvas3d_mesh_blending_enable_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Eina_Bool blending)
{
pd->blending = blending;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_BLENDING, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_BLENDING, NULL);
}
EOLIAN static Eina_Bool
@@ -815,7 +815,7 @@ _evas_canvas3d_mesh_blending_func_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Evas
{
pd->blend_sfactor = sfactor;
pd->blend_dfactor = dfactor;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_BLENDING, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_BLENDING, NULL);
}
EOLIAN static void
@@ -834,7 +834,7 @@ _evas_canvas3d_mesh_alpha_func_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Evas_Ca
return;
pd->alpha_comparison = comparison;
pd->alpha_ref_value = ref_value;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_ALPHA_TEST, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_ALPHA_TEST, NULL);
}
EOLIAN static void
@@ -850,7 +850,7 @@ EOLIAN static void
_evas_canvas3d_mesh_alpha_test_enable_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, Eina_Bool enabled)
{
pd->alpha_test_enabled = enabled;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_ALPHA_TEST, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_ALPHA_TEST, NULL);
}
EOLIAN static Eina_Bool
@@ -1087,7 +1087,7 @@ _evas_canvas3d_mesh_color_pick_enable_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd,
{
if (pd->color_pick_enabled != enabled)
pd->color_pick_enabled = enabled;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_COLOR_PICK, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_COLOR_PICK, NULL);
}
EOLIAN static void
@@ -1098,7 +1098,7 @@ _evas_canvas3d_mesh_shadows_edges_filtering_set(Eo *obj, Evas_Canvas3D_Mesh_Data
pd->shadows_edges_filtering_level = blur_level;
if (edges_size >= 0)
pd->shadows_edges_size = edges_size;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_SHADOWS_EDGES_FILTERING, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_SHADOWS_EDGES_FILTERING, NULL);
}
EOLIAN static void
@@ -1116,7 +1116,7 @@ _evas_canvas3d_mesh_shadows_constant_bias_set(Eo *obj EINA_UNUSED, Evas_Canvas3D
if (pd->shadows_constant_bias != bias)
{
pd->shadows_constant_bias = bias;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_MESH_SHADOWS_CONSTANT_BIAS, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_MESH_SHADOWS_CONSTANT_BIAS, NULL);
}
}
diff --git a/src/lib/evas/canvas/evas_canvas3d_node.c b/src/lib/evas/canvas/evas_canvas3d_node.c
index 965e0906ac..010d161201 100644
--- a/src/lib/evas/canvas/evas_canvas3d_node.c
+++ b/src/lib/evas/canvas/evas_canvas3d_node.c
@@ -70,7 +70,7 @@ _evas_canvas3d_node_private_callback_collision(void *data, const Eo_Event *event
{
pd = eo_data_scope_get(n, EVAS_CANVAS3D_NODE_CLASS);
if (box_intersection_box(&pd_target->aabb, &pd->aabb))
- eo_do(target_node, ret = eo_event_callback_call(eo_desc, n));
+ ret = eo_event_callback_call(target_node, eo_desc, n);
}
return ret;
}
@@ -81,7 +81,7 @@ _evas_canvas3d_node_private_callback_clicked(void *data EINA_UNUSED, const Eo_Ev
{
Eina_Bool ret = EINA_FALSE;
const Eo_Event_Description *eo_desc = eo_base_legacy_only_event_description_get("clicked");
- eo_do((Eo *)event->event_info, ret = eo_event_callback_call(eo_desc, event->event_info));
+ ret = eo_event_callback_call((Eo *)event->event_info, eo_desc, event->event_info);
return ret;
}
@@ -121,7 +121,7 @@ _node_scene_root_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *ke
void *data EINA_UNUSED, void *fdata)
{
Evas_Canvas3D_Scene *s = *(Evas_Canvas3D_Scene **)key;
- eo_do(s, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_SCENE_ROOT_NODE, (Evas_Canvas3D_Object *)fdata));
+ evas_canvas3d_object_change(s, EVAS_CANVAS3D_STATE_SCENE_ROOT_NODE, (Evas_Canvas3D_Object *)fdata);
return EINA_TRUE;
}
@@ -130,7 +130,7 @@ _node_scene_camera_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *
void *data EINA_UNUSED, void *fdata)
{
Evas_Canvas3D_Scene *s = *(Evas_Canvas3D_Scene **)key;
- eo_do(s, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_SCENE_CAMERA_NODE, (Evas_Canvas3D_Object *)fdata));
+ evas_canvas3d_object_change(s, EVAS_CANVAS3D_STATE_SCENE_CAMERA_NODE, (Evas_Canvas3D_Object *)fdata);
return EINA_TRUE;
}
@@ -158,7 +158,7 @@ _evas_canvas3d_node_evas_canvas3d_object_change_notify(Eo *obj, Evas_Canvas3D_No
/* Notify parent that a member has changed. */
if (pd->parent && !parent_change)
{
- eo_do(pd->parent, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_MEMBER, obj));
+ evas_canvas3d_object_change(pd->parent, EVAS_CANVAS3D_STATE_NODE_MEMBER, obj);
}
orientation = (state == EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION)
@@ -172,7 +172,7 @@ _evas_canvas3d_node_evas_canvas3d_object_change_notify(Eo *obj, Evas_Canvas3D_No
if (scale)
EINA_LIST_FOREACH(pd->members, l, n)
{
- eo_do(n, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE, obj));
+ evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE, obj);
}
if (orientation && !(pd->billboard_target))
EINA_LIST_FOREACH(pd->members, l, n)
@@ -181,12 +181,12 @@ _evas_canvas3d_node_evas_canvas3d_object_change_notify(Eo *obj, Evas_Canvas3D_No
Evas_Canvas3D_Node_Data *pdm = eo_data_scope_get(n, EVAS_CANVAS3D_NODE_CLASS);
if (pdm->billboard_target)
continue;
- eo_do(n, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION, obj));
+ evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION, obj);
}
if (position)
EINA_LIST_FOREACH(pd->members, l, n)
{
- eo_do(n, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION, obj));
+ evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION, obj);
}
}
@@ -199,8 +199,7 @@ _evas_canvas3d_node_evas_canvas3d_object_callback_register(Eo *obj, Evas_Canvas3
GET_CALLBACK_TYPE(tcb, event)
if (tcb != PRIVATE_CALLBACK_NONE)
- eo_do(obj, eo_event_callback_add(&evas_canvas3d_node_private_event_desc[tcb],
- evas_canvas3d_node_private_callback_functions[tcb], data));
+ eo_event_callback_add(obj, &evas_canvas3d_node_private_event_desc[tcb], evas_canvas3d_node_private_callback_functions[tcb], data);
}
@@ -213,8 +212,7 @@ _evas_canvas3d_node_evas_canvas3d_object_callback_unregister(Eo *obj, Evas_Canva
GET_CALLBACK_TYPE(tcb, event)
if (tcb != PRIVATE_CALLBACK_NONE)
- eo_do(obj, eo_event_callback_del(&evas_canvas3d_node_private_event_desc[tcb],
- evas_canvas3d_node_private_callback_functions[tcb], NULL));
+ eo_event_callback_del(obj, &evas_canvas3d_node_private_event_desc[tcb], evas_canvas3d_node_private_callback_functions[tcb], NULL);
}
static Eina_Bool
@@ -223,13 +221,12 @@ _node_transform_update(Evas_Canvas3D_Node *node, void *data EINA_UNUSED)
Evas_Canvas3D_Node_Data *pd = eo_data_scope_get(node, MY_CLASS);
Eina_Bool transform_dirty = EINA_FALSE, parent_dirty = EINA_FALSE;
- eo_do(node,
- transform_dirty = evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION),
- transform_dirty|= evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_NODE_TRANSFORM_POSITION),
- transform_dirty|= evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_NODE_TRANSFORM_SCALE),
- parent_dirty = evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION),
- parent_dirty |= evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION),
- parent_dirty |= evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE));
+ transform_dirty = evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION);
+ transform_dirty|= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_POSITION);
+ transform_dirty|= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_SCALE);
+ parent_dirty = evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION);
+ parent_dirty |= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION);
+ parent_dirty |= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE);
if (transform_dirty || parent_dirty)
{
@@ -355,14 +352,14 @@ _node_item_update(Evas_Canvas3D_Node *node, void *data EINA_UNUSED)
{
if (pd->data.camera.camera)
{
- eo_do(pd->data.camera.camera, evas_canvas3d_object_update());
+ evas_canvas3d_object_update(pd->data.camera.camera);
}
}
else if (pd->type == EVAS_CANVAS3D_NODE_TYPE_LIGHT)
{
if (pd->data.light.light)
{
- eo_do(pd->data.light.light, evas_canvas3d_object_update());
+ evas_canvas3d_object_update(pd->data.light.light);
}
}
else if (pd->type == EVAS_CANVAS3D_NODE_TYPE_MESH)
@@ -371,7 +368,7 @@ _node_item_update(Evas_Canvas3D_Node *node, void *data EINA_UNUSED)
Evas_Canvas3D_Mesh *m;
EINA_LIST_FOREACH(pd->data.mesh.meshes, l, m)
{
- eo_do(m, evas_canvas3d_object_update());
+ evas_canvas3d_object_update(m);
}
}
@@ -390,10 +387,10 @@ _pack_meshes_vertex_data(Evas_Canvas3D_Node *node, Eina_Vector3 **vertices, int
Evas_Real pos_weight;
*count = 0;
- eo_do(node, m = (Eina_List *)evas_canvas3d_node_mesh_list_get());
+ m = (Eina_List *)evas_canvas3d_node_mesh_list_get(node);
EINA_LIST_FOREACH(m, l, mesh)
{
- eo_do(node, frame = evas_canvas3d_node_mesh_frame_get(mesh));
+ frame = evas_canvas3d_node_mesh_frame_get(node, mesh);
evas_canvas3d_mesh_interpolate_vertex_buffer_get(mesh, frame, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION,
&pos0, &pos1, &pos_weight);
if(!pos0.data) continue;
@@ -416,7 +413,7 @@ _pack_meshes_vertex_data(Evas_Canvas3D_Node *node, Eina_Vector3 **vertices, int
EINA_LIST_FOREACH(m, l, mesh)
{
- eo_do(node, frame = evas_canvas3d_node_mesh_frame_get(mesh));
+ frame = evas_canvas3d_node_mesh_frame_get(node, mesh);
evas_canvas3d_mesh_interpolate_vertex_buffer_get(mesh, frame, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION,
&pos0, &pos1, &pos_weight);
if(!pos0.data) continue;
@@ -461,15 +458,14 @@ _update_node_shapes(Evas_Canvas3D_Node *node)
return;
}
- eo_do(node,
- transform_orientation_dirty = evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION),
- transform_orientation_dirty |= evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION),
- transform_position_dirty = evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_NODE_TRANSFORM_POSITION),
- transform_position_dirty |= evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION),
- transform_scale_dirty = evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_NODE_TRANSFORM_SCALE),
- transform_scale_dirty |= evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE),
- mesh_geom_dirty = evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_NODE_MESH_GEOMETRY),
- mesh_geom_dirty |= evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_NODE_MESH_FRAME));
+ transform_orientation_dirty = evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION);
+ transform_orientation_dirty |= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION);
+ transform_position_dirty = evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_POSITION);
+ transform_position_dirty |= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION);
+ transform_scale_dirty = evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_SCALE);
+ transform_scale_dirty |= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE);
+ mesh_geom_dirty = evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_MESH_GEOMETRY);
+ mesh_geom_dirty |= evas_canvas3d_object_dirty_get(node, EVAS_CANVAS3D_STATE_NODE_MESH_FRAME);
_pack_meshes_vertex_data(node, &vertices, &count);
@@ -510,7 +506,7 @@ node_aabb_update(Evas_Canvas3D_Node *node, void *data EINA_UNUSED)
evas_build_sphere(&pd->aabb, &pd->bsphere);
eo_desc = eo_base_legacy_only_event_description_get("collision,private");
- eo_do(node, eo_event_callback_call(eo_desc, (void *)node));
+ eo_event_callback_call(node, eo_desc, (void *)node);
return EINA_TRUE;
}
@@ -569,7 +565,7 @@ _node_free(Evas_Canvas3D_Object *obj)
if (pd->parent)
{
- eo_do(pd->parent, evas_canvas3d_node_member_del(obj));
+ evas_canvas3d_node_member_del(pd->parent, obj);
}
if (pd->type == EVAS_CANVAS3D_NODE_TYPE_MESH && pd->data.mesh.meshes)
@@ -898,7 +894,7 @@ evas_canvas3d_node_mesh_collect(Evas_Canvas3D_Node *node, void *data)
scene_data->mesh_nodes = eina_list_append(scene_data->mesh_nodes, node);
/* calculation of tangent space for all meshes */
- eo_do (node, list_meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get());
+ list_meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get(node);
EINA_LIST_FOREACH(list_meshes, l, mesh)
{
mesh_pd = eo_data_scope_get(mesh, MY_CLASS);
@@ -937,7 +933,7 @@ evas_canvas3d_node_mesh_collect(Evas_Canvas3D_Node *node, void *data)
evas_tangent_space_get(vertex_data, tex_data, normal_data, index, mesh_pd->vertex_count,
mesh_pd->index_count, stride, tex_stride, normal_stride, &tangent_data);
- eo_do(mesh, evas_canvas3d_mesh_frame_vertex_data_copy_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TANGENT, 3 * sizeof(float), tangent_data));
+ evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TANGENT, 3 * sizeof(float), tangent_data);
free(tangent_data);
}
}
@@ -967,16 +963,14 @@ evas_canvas3d_node_color_node_mesh_collect(Evas_Canvas3D_Node *node, void *data)
Eina_Array *arr;
if (pd->type == EVAS_CANVAS3D_NODE_TYPE_MESH)
{
- eo_do(camera,
- visible = evas_canvas3d_camera_node_visible_get(scene_data->camera_node,
- node, EVAS_CANVAS3D_FRUSTUM_MODE_BSPHERE));
+ visible = evas_canvas3d_camera_node_visible_get(camera, scene_data->camera_node, node, EVAS_CANVAS3D_FRUSTUM_MODE_BSPHERE);
if (visible)
{
- eo_do (node, list_meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get());
+ list_meshes = (Eina_List *)evas_canvas3d_node_mesh_list_get(node);
EINA_LIST_FOREACH(list_meshes, l, mesh)
{
Eina_Bool tmp;
- if (eo_do_ret(mesh, tmp, evas_canvas3d_mesh_color_pick_enable_get()))
+ if (evas_canvas3d_mesh_color_pick_enable_get(mesh))
{
color = calloc(1, sizeof(Evas_Color));
@@ -1019,14 +1013,14 @@ evas_canvas3d_node_add(Evas *e, Evas_Canvas3D_Node_Type type)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(MY_CLASS, e, evas_canvas3d_node_constructor(type));
+ Evas_Object *eo_obj = eo_add(MY_CLASS, e, evas_canvas3d_node_constructor(eoid, type));
return eo_obj;
}
EOLIAN static void
_evas_canvas3d_node_constructor(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas3D_Node_Type type)
{
- eo_do(obj, evas_canvas3d_object_type_set(EVAS_CANVAS3D_OBJECT_TYPE_NODE));
+ evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_NODE);
eina_vector3_set(&pd->position, 0.0, 0.0, 0.0);
eina_quaternion_set(&pd->orientation, 0.0, 0.0, 0.0, 1.0);
@@ -1062,7 +1056,7 @@ _evas_canvas3d_node_eo_base_destructor(Eo *obj, Evas_Canvas3D_Node_Data *pd EINA
{
_node_free(obj);
- eo_do_super(obj, MY_CLASS, eo_destructor());
+ eo_destructor(eo_super(obj, MY_CLASS));
}
EOLIAN static Evas_Canvas3D_Node_Type
@@ -1090,7 +1084,7 @@ _evas_canvas3d_node_member_add(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas
pdmemberparent->members = eina_list_remove(pdmemberparent->members, member);
/* Mark changed. */
- eo_do(pdmember->parent, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_MEMBER, NULL));
+ evas_canvas3d_object_change(pdmember->parent, EVAS_CANVAS3D_STATE_NODE_MEMBER, NULL);
}
else
{
@@ -1103,10 +1097,10 @@ _evas_canvas3d_node_member_add(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas
pdmember->parent = obj;
/* Mark changed. */
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_MEMBER, NULL));
- eo_do(member, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION, NULL));
- eo_do(member, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION, NULL));
- eo_do(member, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_MEMBER, NULL);
+ evas_canvas3d_object_change(member, EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION, NULL);
+ evas_canvas3d_object_change(member, EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION, NULL);
+ evas_canvas3d_object_change(member, EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE, NULL);
}
EOLIAN static void
@@ -1124,10 +1118,10 @@ _evas_canvas3d_node_member_del(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Canvas
pdmember->parent = NULL;
/* Mark modified object as changed. */
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_MEMBER, NULL));
- eo_do(member, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION, NULL));
- eo_do(member, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION, NULL));
- eo_do(member, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_MEMBER, NULL);
+ evas_canvas3d_object_change(member, EVAS_CANVAS3D_STATE_NODE_PARENT_ORIENTATION, NULL);
+ evas_canvas3d_object_change(member, EVAS_CANVAS3D_STATE_NODE_PARENT_POSITION, NULL);
+ evas_canvas3d_object_change(member, EVAS_CANVAS3D_STATE_NODE_PARENT_SCALE, NULL);
/* Decrease reference count. */
eo_unref(member);
@@ -1152,7 +1146,7 @@ _evas_canvas3d_node_position_set(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Real
pd->position.y = y;
pd->position.z = z;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_TRANSFORM_POSITION, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_POSITION, NULL);
}
EOLIAN static void
@@ -1163,7 +1157,7 @@ _evas_canvas3d_node_orientation_set(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_R
pd->orientation.z = z;
pd->orientation.w = w;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION, NULL);
}
EOLIAN static void
@@ -1182,7 +1176,7 @@ _evas_canvas3d_node_orientation_angle_axis_set(Eo *obj, Evas_Canvas3D_Node_Data
pd->orientation.y = s * axis.y;
pd->orientation.z = s * axis.z;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_ORIENTATION, NULL);
}
EOLIAN static void
@@ -1192,7 +1186,7 @@ _evas_canvas3d_node_scale_set(Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_Real x,
pd->scale.y = y;
pd->scale.z = z;
- eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_TRANSFORM_SCALE, NULL));
+ evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_NODE_TRANSFORM_SCALE, NULL);
}
EOLIAN static void
@@ -1213,7 +1207,7 @@ _evas_canvas3d_node_position_get(const Eo *obj, Evas_Canvas3D_Node_Data *pd, Eva
}
else if (space == EVAS_CANVAS3D_SPACE_WORLD)
{
- eo_do(obj, evas_canvas3d_object_update());
+ evas_canvas3d_object_update(obj);
if (x) *x = pd->position_world.x;
if (y) *y = pd->position_world.y;
@@ -1241,7 +1235,7 @@ _evas_canvas3d_node_orientation_get(const Eo *obj, Evas_Canvas3D_Node_Data *pd,
}
else if (space == EVAS_CANVAS3D_SPACE_WORLD)
{
- eo_do(obj, evas_canvas3d_object_update());
+ evas_canvas3d_object_update(obj);
if (x) *x = pd->orientation_world.x;
if (y) *y = pd->orientation_world.y;
@@ -1269,7 +1263,7 @@ _evas_canvas3d_node_scale_get(const Eo *obj, Evas_Canvas3D_Node_Data *pd, Evas_C
}
else if (space == EVAS_CANVAS3D_SPACE_WORLD)
{
- eo_do(obj, evas_canvas3d_object_update());
+ evas_canvas3d_object_update(obj);
if (x) *x = pd->scale_world.x;
if (y) *y = pd->scale_world.y;
@@ -1281,21 +1275,21 @@ EOLIAN static void
_evas_canvas3d_