summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-11 12:24:08 +0000
committerTom Hacohen <tom@stosb.com>2016-03-11 12:29:03 +0000
commitf24210caac8d50940ddef858994571be59179c10 (patch)
treecfc8b264e77abbab9827517d1827f9a4fb4dcd50
parent9fdac37187e35f45570c3808011d0283c658652d (diff)
Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757b6332306264d7f126b15ba7bfd37d4.
-rw-r--r--src/benchmarks/eo/eo_bench_callbacks.c3
-rw-r--r--src/benchmarks/eo/eo_bench_eo_do.c18
-rw-r--r--src/examples/ecore/ecore_audio_custom.c4
-rw-r--r--src/examples/ecore/ecore_audio_playback.c6
-rw-r--r--src/examples/ecore/ecore_audio_to_ogg.c4
-rw-r--r--src/examples/eldbus/dbusmodel.c2
-rw-r--r--src/examples/evas/evas-3d-aabb.c32
-rw-r--r--src/examples/evas/evas-3d-blending.c31
-rw-r--r--src/examples/evas/evas-3d-colorpick.c10
-rw-r--r--src/examples/evas/evas-3d-cube-rotate.c20
-rw-r--r--src/examples/evas/evas-3d-cube.c24
-rw-r--r--src/examples/evas/evas-3d-cube2.c34
-rw-r--r--src/examples/evas/evas-3d-eet.c24
-rw-r--r--src/examples/evas/evas-3d-fog.c34
-rw-r--r--src/examples/evas/evas-3d-frustum.c33
-rw-r--r--src/examples/evas/evas-3d-hull.c36
-rw-r--r--src/examples/evas/evas-3d-md2.c24
-rw-r--r--src/examples/evas/evas-3d-mmap-set.c18
-rw-r--r--src/examples/evas/evas-3d-obj.c20
-rw-r--r--src/examples/evas/evas-3d-parallax-occlusion.c32
-rw-r--r--src/examples/evas/evas-3d-pick.c21
-rw-r--r--src/examples/evas/evas-3d-ply.c18
-rw-r--r--src/examples/evas/evas-3d-proxy.c28
-rw-r--r--src/examples/evas/evas-3d-shadows.c78
-rw-r--r--src/examples/evas/evas-vg-simple.c34
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter-header.c10
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter.c20
-rw-r--r--src/lib/ecore/ecore.c2
-rw-r--r--src/lib/ecore/ecore_anim.c4
-rw-r--r--src/lib/ecore/ecore_exe.c3
-rw-r--r--src/lib/ecore/ecore_idle_enterer.c4
-rw-r--r--src/lib/ecore/ecore_idle_exiter.c2
-rw-r--r--src/lib/ecore/ecore_idler.c3
-rw-r--r--src/lib/ecore/ecore_job.c3
-rw-r--r--src/lib/ecore/ecore_main.c2
-rw-r--r--src/lib/ecore/ecore_poller.c2
-rw-r--r--src/lib/ecore/ecore_timer.c4
-rw-r--r--src/lib/ecore_con/ecore_con.c10
-rw-r--r--src/lib/ecore_con/ecore_con_eet.c4
-rw-r--r--src/lib/ecore_con/ecore_con_local_win32.c3
-rw-r--r--src/lib/ecore_con/ecore_con_url.c2
-rw-r--r--src/lib/edje/edje_calc.c2
-rw-r--r--src/lib/edje/edje_edit.c2
-rw-r--r--src/lib/edje/edje_load.c16
-rw-r--r--src/lib/edje/edje_multisense.c12
-rw-r--r--src/lib/edje/edje_smart.c2
-rw-r--r--src/lib/eio/eio_model.c7
-rw-r--r--src/lib/eldbus/eldbus_model_connection.c3
-rw-r--r--src/lib/eldbus/eldbus_model_object.c2
-rw-r--r--src/lib/eldbus/eldbus_model_proxy.c4
-rw-r--r--src/lib/emotion/emotion_smart.c2
-rw-r--r--src/lib/evas/Evas_Legacy.h3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_camera.c3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_light.c3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_material.c3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.c3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_node.c3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_primitive.c3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_scene.c3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_texture.c3
-rw-r--r--src/lib/evas/canvas/evas_main.c3
-rw-r--r--src/lib/evas/canvas/evas_object_box.c3
-rw-r--r--src/lib/evas/canvas/evas_object_grid.c3
-rw-r--r--src/lib/evas/canvas/evas_object_image.c3
-rw-r--r--src/lib/evas/canvas/evas_object_line.c3
-rw-r--r--src/lib/evas/canvas/evas_object_polygon.c3
-rw-r--r--src/lib/evas/canvas/evas_object_rectangle.c3
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c2
-rw-r--r--src/lib/evas/canvas/evas_object_table.c3
-rw-r--r--src/lib/evas/canvas/evas_object_text.c3
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c3
-rw-r--r--src/lib/evas/canvas/evas_object_textgrid.c3
-rw-r--r--src/lib/evas/canvas/evas_object_vg.c5
-rw-r--r--src/lib/evas/canvas/evas_out.c3
-rw-r--r--src/lib/evas/canvas/evas_vg_container.c6
-rw-r--r--src/lib/evas/canvas/evas_vg_node.c2
-rw-r--r--src/lib/evas/canvas/evas_vg_shape.c9
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c12
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c8
-rw-r--r--src/modules/evas/model_loaders/eet/evas_model_load_eet.c2
-rw-r--r--src/tests/ecore/ecore_test_animator.c4
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c36
-rw-r--r--src/tests/eio/eio_model_test_file.c2
-rw-r--r--src/tests/eio/eio_model_test_monitor_add.c2
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model.c6
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_method.c2
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_signal.c2
-rw-r--r--src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c2
-rw-r--r--src/tests/emotion/emotion_test_main-eo.c4
-rw-r--r--src/tests/eo/access/access_main.c3
-rw-r--r--src/tests/eo/children/children_main.c14
-rw-r--r--src/tests/eo/composite_objects/composite_objects_comp.c3
-rw-r--r--src/tests/eo/composite_objects/composite_objects_main.c3
-rw-r--r--src/tests/eo/constructors/constructors_main.c21
-rw-r--r--src/tests/eo/function_overrides/function_overrides_main.c9
-rw-r--r--src/tests/eo/interface/interface_main.c3
-rw-r--r--src/tests/eo/mixin/mixin_main.c5
-rw-r--r--src/tests/eo/signals/signals_main.c3
-rw-r--r--src/tests/eo/suite/eo_test_call_errors.c9
-rw-r--r--src/tests/eo/suite/eo_test_class_behaviour_errors.c6
-rw-r--r--src/tests/eo/suite/eo_test_class_simple.c3
-rw-r--r--src/tests/eo/suite/eo_test_threaded_calls.c2
-rw-r--r--src/tests/eo/suite/eo_test_value.c3
-rw-r--r--src/tests/eolian_js/eolian_js_test_constructor_method_impl.c6
-rw-r--r--src/tests/evas/evas_test_mesh.c4
105 files changed, 477 insertions, 507 deletions
diff --git a/src/benchmarks/eo/eo_bench_callbacks.c b/src/benchmarks/eo/eo_bench_callbacks.c
index 2114234..ab779f8 100644
--- a/src/benchmarks/eo/eo_bench_callbacks.c
+++ b/src/benchmarks/eo/eo_bench_callbacks.c
@@ -17,8 +17,7 @@ static void
17bench_eo_callbacks_add(int request) 17bench_eo_callbacks_add(int request)
18{ 18{
19 int i; 19 int i;
20 Eo *obj = NULL; 20 Eo *obj = eo_add(SIMPLE_CLASS, NULL);
21 eo_add(&obj, SIMPLE_CLASS, NULL);
22 21
23 for (i = 0 ; i < request ; i++) 22 for (i = 0 ; i < request ; i++)
24 { 23 {
diff --git a/src/benchmarks/eo/eo_bench_eo_do.c b/src/benchmarks/eo/eo_bench_eo_do.c
index 9160507..9f84535 100644
--- a/src/benchmarks/eo/eo_bench_eo_do.c
+++ b/src/benchmarks/eo/eo_bench_eo_do.c
@@ -10,8 +10,7 @@ static void
10bench_eo_do_simple(int request) 10bench_eo_do_simple(int request)
11{ 11{
12 int i; 12 int i;
13 Eo *obj = NULL; 13 Eo *obj = eo_add(SIMPLE_CLASS, NULL);
14 eo_add(&obj, SIMPLE_CLASS, NULL);
15 for (i = 0 ; i < request ; i++) 14 for (i = 0 ; i < request ; i++)
16 { 15 {
17 simple_a_set(obj, i); 16 simple_a_set(obj, i);
@@ -24,10 +23,8 @@ static void
24bench_eo_do_two_objs(int request) 23bench_eo_do_two_objs(int request)
25{ 24{
26 int i; 25 int i;
27 Eo *obj = NULL; 26 Eo *obj = eo_add(SIMPLE_CLASS, NULL);
28 eo_add(&obj, SIMPLE_CLASS, NULL); 27 Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
29 Eo *obj2 = NULL;
30 eo_add(&obj2, SIMPLE_CLASS, NULL);
31 for (i = 0 ; i < request ; i++) 28 for (i = 0 ; i < request ; i++)
32 { 29 {
33 simple_a_set(obj, i); 30 simple_a_set(obj, i);
@@ -42,10 +39,8 @@ static void
42bench_eo_do_two_objs_growing_stack(int request) 39bench_eo_do_two_objs_growing_stack(int request)
43{ 40{
44 int i; 41 int i;
45 Eo *obj = NULL; 42 Eo *obj = eo_add(SIMPLE_CLASS, NULL);
46 eo_add(&obj, SIMPLE_CLASS, NULL); 43 Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
47 Eo *obj2 = NULL;
48 eo_add(&obj2, SIMPLE_CLASS, NULL);
49 for (i = 0 ; i < request ; i++) 44 for (i = 0 ; i < request ; i++)
50 { 45 {
51 simple_other_call(obj, obj2, 20); 46 simple_other_call(obj, obj2, 20);
@@ -83,8 +78,7 @@ bench_eo_do_super(int request)
83 cur_klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL); 78 cur_klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL);
84 79
85 int i; 80 int i;
86 Eo *obj = NULL; 81 Eo *obj = eo_add(cur_klass, NULL);
87 eo_add(&obj, cur_klass, NULL);
88 for (i = 0 ; i < request ; i++) 82 for (i = 0 ; i < request ; i++)
89 { 83 {
90 simple_a_set(obj, i); 84 simple_a_set(obj, i);
diff --git a/src/examples/ecore/ecore_audio_custom.c b/src/examples/ecore/ecore_audio_custom.c
index 6eb1add..2570a9e 100644
--- a/src/examples/ecore/ecore_audio_custom.c
+++ b/src/examples/ecore/ecore_audio_custom.c
@@ -56,9 +56,9 @@ main(int argc, const char *argv[])
56 56
57 ecore_app_args_set(argc, argv); 57 ecore_app_args_set(argc, argv);
58 58
59 eo_add(&out, ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL); 59 out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
60 60
61 eo_add(&in, ECORE_AUDIO_OBJ_IN_CLASS, NULL); 61 in = eo_add(ECORE_AUDIO_OBJ_IN_CLASS, NULL);
62 if (!in) 62 if (!in)
63 { 63 {
64 printf("error when creating ecore audio source.\n"); 64 printf("error when creating ecore audio source.\n");
diff --git a/src/examples/ecore/ecore_audio_playback.c b/src/examples/ecore/ecore_audio_playback.c
index a6e6c5e..f1624e0 100644
--- a/src/examples/ecore/ecore_audio_playback.c
+++ b/src/examples/ecore/ecore_audio_playback.c
@@ -252,7 +252,7 @@ main(int argc, const char *argv[])
252 { 252 {
253 if (!strncmp(argv[i], "tone:", 5)) 253 if (!strncmp(argv[i], "tone:", 5))
254 { 254 {
255 eo_add(&in, ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL); 255 in = eo_add(ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL);
256 if (!in) 256 if (!in)
257 { 257 {
258 printf("error when creating ecore audio source.\n"); 258 printf("error when creating ecore audio source.\n");
@@ -276,7 +276,7 @@ main(int argc, const char *argv[])
276 } 276 }
277 else 277 else
278 { 278 {
279 eo_add(&in, ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL); 279 in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
280 if (!in) 280 if (!in)
281 { 281 {
282 printf("error when creating ecore audio source.\n"); 282 printf("error when creating ecore audio source.\n");
@@ -307,7 +307,7 @@ main(int argc, const char *argv[])
307 307
308 printf("Start: %s (%0.2fs)\n", name, length); 308 printf("Start: %s (%0.2fs)\n", name, length);
309 309
310 eo_add(&out, ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL); 310 out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
311 ret = ecore_audio_obj_out_input_attach(out, in); 311 ret = ecore_audio_obj_out_input_attach(out, in);
312 if (!ret) 312 if (!ret)
313 printf("Could not attach input %s\n", name); 313 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 62e721b..fceed59 100644
--- a/src/examples/ecore/ecore_audio_to_ogg.c
+++ b/src/examples/ecore/ecore_audio_to_ogg.c
@@ -49,7 +49,7 @@ main(int argc, char *argv[])
49 ecore_audio_init(); 49 ecore_audio_init();
50 50
51 51
52 eo_add(&in, ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL); 52 in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
53 ecore_audio_obj_name_set(in, basename(argv[1])); 53 ecore_audio_obj_name_set(in, basename(argv[1]));
54 ret = ecore_audio_obj_source_set(in, argv[1]); 54 ret = ecore_audio_obj_source_set(in, argv[1]);
55 if (!ret) { 55 if (!ret) {
@@ -60,7 +60,7 @@ main(int argc, char *argv[])
60 60
61 eo_event_callback_add(in, ECORE_AUDIO_EV_IN_STOPPED, _play_finished, NULL); 61 eo_event_callback_add(in, ECORE_AUDIO_EV_IN_STOPPED, _play_finished, NULL);
62 62
63 eo_add(&out, ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL); 63 out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
64 ret = ecore_audio_obj_source_set(out, argv[2]); 64 ret = ecore_audio_obj_source_set(out, argv[2]);
65 if (!ret) { 65 if (!ret) {
66 printf("Could not set %s as output\n", argv[2]); 66 printf("Could not set %s as output\n", argv[2]);
diff --git a/src/examples/eldbus/dbusmodel.c b/src/examples/eldbus/dbusmodel.c
index 3e4063e..b34799b 100644
--- a/src/examples/eldbus/dbusmodel.c
+++ b/src/examples/eldbus/dbusmodel.c
@@ -102,7 +102,7 @@ main(int argc, char **argv EINA_UNUSED)
102 if (argc > 1) bus = argv[1]; 102 if (argc > 1) bus = argv[1];
103 if (argc > 2) path = argv[2]; 103 if (argc > 2) path = argv[2];
104 104
105 eo_add_ref(&root, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(root, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, bus, path)); 105 root = eo_add_ref(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, bus, path));
106 106
107 eo_event_callback_add(root, EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_load_status_cb, NULL); 107 eo_event_callback_add(root, EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_load_status_cb, NULL);
108 efl_model_load(root); 108 efl_model_load(root);
diff --git a/src/examples/evas/evas-3d-aabb.c b/src/examples/evas/evas-3d-aabb.c
index a676185..d02668b 100644
--- a/src/examples/evas/evas-3d-aabb.c
+++ b/src/examples/evas/evas-3d-aabb.c
@@ -142,38 +142,40 @@ main(void)
142 142
143 evas = ecore_evas_get(ecore_evas); 143 evas = ecore_evas_get(ecore_evas);
144 144
145 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 145 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
146 146
147 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 147 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
148 148
149 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 149 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
150 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0); 150 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
151 151
152 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 152 camera_node =
153 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
153 evas_canvas3d_node_camera_set(camera_node, camera); 154 evas_canvas3d_node_camera_set(camera_node, camera);
154 evas_canvas3d_node_member_add(root_node, camera_node); 155 evas_canvas3d_node_member_add(root_node, camera_node);
155 evas_canvas3d_node_position_set(camera_node, 100.0, 50.0, 20.0); 156 evas_canvas3d_node_position_set(camera_node, 100.0, 50.0, 20.0);
156 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); 157 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);
157 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 158 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
158 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 159 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
159 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0); 160 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
160 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0); 161 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
161 evas_canvas3d_light_directional_set(light, EINA_TRUE); 162 evas_canvas3d_light_directional_set(light, EINA_TRUE);
162 163
163 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 164 light_node =
165 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
164 evas_canvas3d_node_light_set(light_node, light); 166 evas_canvas3d_node_light_set(light_node, light);
165 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0); 167 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
166 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); 168 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);
167 evas_canvas3d_node_member_add(root_node, light_node); 169 evas_canvas3d_node_member_add(root_node, light_node);
168 170
169 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 171 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
170 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 172 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
171 173
172 efl_file_set(mesh, model_path, NULL); 174 efl_file_set(mesh, model_path, NULL);
173 evas_canvas3d_mesh_frame_material_set(mesh, 0, material); 175 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
174 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 176 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
175 177
176 eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 178 texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
177 evas_canvas3d_texture_file_set(texture, image_path, NULL); 179 evas_canvas3d_texture_file_set(texture, image_path, NULL);
178 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 180 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
179 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 181 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -187,16 +189,16 @@ main(void)
187 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 189 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
188 evas_canvas3d_material_shininess_set(material, 50.0); 190 evas_canvas3d_material_shininess_set(material, 50.0);
189 191
190 eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 192 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
191 eo_add(&mesh_box_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_box_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 193 mesh_box_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
192 194
193 eo_add(&material_box, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 195 material_box = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
194 evas_canvas3d_material_enable_set(material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 196 evas_canvas3d_material_enable_set(material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
195 197
196 eo_add(&cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 198 cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
197 evas_canvas3d_primitive_form_set(cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 199 evas_canvas3d_primitive_form_set(cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
198 200
199 eo_add(&mesh_box, EVAS_CANVAS3D_MESH_CLASS, evas); 201 mesh_box = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
200 evas_canvas3d_mesh_from_primitive_set(mesh_box, 0, cube); 202 evas_canvas3d_mesh_from_primitive_set(mesh_box, 0, cube);
201 evas_canvas3d_mesh_vertex_assembly_set(mesh_box, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES); 203 evas_canvas3d_mesh_vertex_assembly_set(mesh_box, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
202 evas_canvas3d_mesh_shade_mode_set(mesh_box, EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR); 204 evas_canvas3d_mesh_shade_mode_set(mesh_box, EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR);
@@ -213,7 +215,7 @@ main(void)
213 evas_canvas3d_scene_camera_node_set(scene, camera_node); 215 evas_canvas3d_scene_camera_node_set(scene, camera_node);
214 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 216 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
215 217
216 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 218 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
217 efl_gfx_color_set(background, 0, 0, 0, 255); 219 efl_gfx_color_set(background, 0, 0, 0, 255);
218 efl_gfx_size_set(background, WIDTH, HEIGHT); 220 efl_gfx_size_set(background, WIDTH, HEIGHT);
219 efl_gfx_visible_set(background, EINA_TRUE); 221 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-blending.c b/src/examples/evas/evas-3d-blending.c
index 90ee461..db7c7a1 100644
--- a/src/examples/evas/evas-3d-blending.c
+++ b/src/examples/evas/evas-3d-blending.c
@@ -143,11 +143,12 @@ _animate_scene(void *data)
143static void 143static void
144_camera_setup(Scene_Data *data) 144_camera_setup(Scene_Data *data)
145{ 145{
146 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 146 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
147 147
148 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0); 148 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
149 149
150 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 150 data->camera_node =
151 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
151 152
152 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 153 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
153 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0); 154 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
@@ -159,12 +160,13 @@ _camera_setup(Scene_Data *data)
159static void 160static void
160_light_setup(Scene_Data *data) 161_light_setup(Scene_Data *data)
161{ 162{
162 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 163 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
163 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 164 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
164 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 165 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
165 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 166 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
166 167
167 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 168 data->light_node =
169 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
168 evas_canvas3d_node_light_set(data->light_node, data->light); 170 evas_canvas3d_node_light_set(data->light_node, data->light);
169 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 171 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
170 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); 172 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);
@@ -182,7 +184,7 @@ _set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material)
182static void 184static void
183_mesh_setup(Scene_Data *data) 185_mesh_setup(Scene_Data *data)
184{ 186{
185 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 187 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
186 188
187 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 189 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
188 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 190 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -192,7 +194,7 @@ _mesh_setup(Scene_Data *data)
192 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2); 194 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2);
193 evas_canvas3d_material_shininess_set(data->material, 100.0); 195 evas_canvas3d_material_shininess_set(data->material, 100.0);
194 196
195 eo_add(&data->material1, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 197 data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
196 198
197 evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 199 evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
198 evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 200 evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -202,22 +204,24 @@ _mesh_setup(Scene_Data *data)
202 evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2); 204 evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2);
203 evas_canvas3d_material_shininess_set(data->material1, 100.0); 205 evas_canvas3d_material_shininess_set(data->material1, 100.0);
204 206
205 eo_add(&data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 207 data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
206 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 208 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
207 evas_canvas3d_primitive_precision_set(data->sphere, 50); 209 evas_canvas3d_primitive_precision_set(data->sphere, 50);
208 210
209 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 211 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
210 eo_add(&data->mesh1, EVAS_CANVAS3D_MESH_CLASS, evas); 212 data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
211 213
212 _set_ball(data->mesh, data->sphere, data->material); 214 _set_ball(data->mesh, data->sphere, data->material);
213 _set_ball(data->mesh1, data->sphere, data->material1); 215 _set_ball(data->mesh1, data->sphere, data->material1);
214 216
215 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 217 data->mesh_node =
218 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
216 219
217 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 220 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
218 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 221 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
219 222
220 eo_add(&data->mesh_node1, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node1, EVAS_CANVAS3D_NODE_TYPE_MESH)); 223 data->mesh_node1 =
224 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
221 225
222 evas_canvas3d_node_member_add(data->root_node, data->mesh_node1); 226 evas_canvas3d_node_member_add(data->root_node, data->mesh_node1);
223 evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1); 227 evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1);
@@ -233,12 +237,13 @@ _mesh_setup(Scene_Data *data)
233static void 237static void
234_scene_setup(Scene_Data *data) 238_scene_setup(Scene_Data *data)
235{ 239{
236 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 240 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
237 241
238 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 242 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
239 evas_canvas3d_scene_background_color_set(data->scene, 0.5, 0.5, 0.5, 1); 243 evas_canvas3d_scene_background_color_set(data->scene, 0.5, 0.5, 0.5, 1);
240 244
241 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 245 data->root_node =
246 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
242 247
243 _camera_setup(data); 248 _camera_setup(data);
244 _light_setup(data); 249 _light_setup(data);
diff --git a/src/examples/evas/evas-3d-colorpick.c b/src/examples/evas/evas-3d-colorpick.c
index 4a7594b..885a53b 100644
--- a/src/examples/evas/evas-3d-colorpick.c
+++ b/src/examples/evas/evas-3d-colorpick.c
@@ -237,9 +237,9 @@ Eina_Bool
237_init_sphere(void *this, const char *texture) 237_init_sphere(void *this, const char *texture)
238{ 238{
239 Test_object *sphere = (Test_object *)this; 239 Test_object *sphere = (Test_object *)this;
240 eo_add(&sphere->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 240 sphere->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
241 eo_add(&sphere->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 241 sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
242 eo_add(&sphere->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 242 sphere->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
243 evas_canvas3d_primitive_form_set(sphere->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 243 evas_canvas3d_primitive_form_set(sphere->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
244 evas_canvas3d_primitive_precision_set(sphere->primitive, 50); 244 evas_canvas3d_primitive_precision_set(sphere->primitive, 50);
245 evas_canvas3d_mesh_from_primitive_set(sphere->mesh, 0, sphere->primitive); 245 evas_canvas3d_mesh_from_primitive_set(sphere->mesh, 0, sphere->primitive);
@@ -248,7 +248,7 @@ _init_sphere(void *this, const char *texture)
248 248
249 evas_canvas3d_mesh_color_pick_enable_set(sphere->mesh, EINA_TRUE); 249 evas_canvas3d_mesh_color_pick_enable_set(sphere->mesh, EINA_TRUE);
250 250
251 eo_add(&sphere->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 251 sphere->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
252 evas_canvas3d_texture_file_set(sphere->texture, texture, NULL); 252 evas_canvas3d_texture_file_set(sphere->texture, texture, NULL);
253 evas_canvas3d_texture_filter_set(sphere->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 253 evas_canvas3d_texture_filter_set(sphere->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
254 evas_canvas3d_texture_wrap_set(sphere->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 254 evas_canvas3d_texture_wrap_set(sphere->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -313,7 +313,7 @@ _init_scene(const char *texture)
313 m->material = spheretmp->material; 313 m->material = spheretmp->material;
314 m->texture = spheretmp->texture; 314 m->texture = spheretmp->texture;
315 } 315 }
316 eo_add(&m->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(m->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 316 m->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
317 m->speed = tmp; 317 m->speed = tmp;
318 m->sphere_animate = _animate_sphere; 318 m->sphere_animate = _animate_sphere;
319 m->animate = ecore_timer_add(m->speed, m->sphere_animate, m); 319 m->animate = ecore_timer_add(m->speed, m->sphere_animate, m);
diff --git a/src/examples/evas/evas-3d-cube-rotate.c b/src/examples/evas/evas-3d-cube-rotate.c
index 74525cc..e393c14 100644
--- a/src/examples/evas/evas-3d-cube-rotate.c
+++ b/src/examples/evas/evas-3d-cube-rotate.c
@@ -148,10 +148,10 @@ _animate_scene(void *data)
148static void 148static void
149_camera_setup(Scene_Data *data) 149_camera_setup(Scene_Data *data)
150{ 150{
151 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 151 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
152 evas_canvas3d_camera_projection_perspective_set(data->camera, 20.0, 1.0, 2.0, 50.0); 152 evas_canvas3d_camera_projection_perspective_set(data->camera, 20.0, 1.0, 2.0, 50.0);
153 153
154 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 154 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
155 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 155 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
156 evas_canvas3d_node_position_set(data->camera_node, 3.0, 3.0, 10.0); 156 evas_canvas3d_node_position_set(data->camera_node, 3.0, 3.0, 10.0);
157 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); 157 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);
@@ -162,13 +162,13 @@ _camera_setup(Scene_Data *data)
162static void 162static void
163_light_setup(Scene_Data *data) 163_light_setup(Scene_Data *data)
164{ 164{
165 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 165 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
166 166
167 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 167 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
168 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 168 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
169 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 169 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
170 170
171 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 171 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
172 172
173 evas_canvas3d_node_light_set(data->light_node, data->light); 173 evas_canvas3d_node_light_set(data->light_node, data->light);
174 evas_canvas3d_node_position_set(data->light_node, 5.0, 5.0, 10.0); 174 evas_canvas3d_node_position_set(data->light_node, 5.0, 5.0, 10.0);
@@ -181,7 +181,7 @@ static void
181_mesh_setup(Scene_Data *data) 181_mesh_setup(Scene_Data *data)
182{ 182{
183 /* Setup material. */ 183 /* Setup material. */
184 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 184 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
185 185
186 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 186 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
187 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 187 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -192,16 +192,16 @@ _mesh_setup(Scene_Data *data)
192 evas_canvas3d_material_shininess_set(data->material, 100.0); 192 evas_canvas3d_material_shininess_set(data->material, 100.0);
193 193
194 /* Setup primitive */ 194 /* Setup primitive */
195 eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 195 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
196 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 196 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
197 197
198 /* Setup mesh. */ 198 /* Setup mesh. */
199 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 199 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
200 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube); 200 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
201 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 201 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
202 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material); 202 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
203 203
204 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 204 data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
205 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 205 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
206 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 206 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
207} 207}
@@ -209,8 +209,8 @@ _mesh_setup(Scene_Data *data)
209static void 209static void
210_scene_setup(Scene_Data *data) 210_scene_setup(Scene_Data *data)
211{ 211{
212 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 212 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
213 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 213 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
214 214
215 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 215 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
216 evas_canvas3d_scene_background_color_set(scene, 0.0, 0.0, 0.0, 0.0); 216 evas_canvas3d_scene_background_color_set(scene, 0.0, 0.0, 0.0, 0.0);
diff --git a/src/examples/evas/evas-3d-cube.c b/src/examples/evas/evas-3d-cube.c
index be29e04..6f6f420 100644
--- a/src/examples/evas/evas-3d-cube.c
+++ b/src/examples/evas/evas-3d-cube.c
@@ -133,11 +133,12 @@ _animate_scene(void *data)
133static void 133static void
134_camera_setup(Scene_Data *data) 134_camera_setup(Scene_Data *data)
135{ 135{
136 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 136 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
137 137
138 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0); 138 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
139 139
140 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 140 data->camera_node =
141 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
141 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 142 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
142 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0); 143 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
143 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); 144 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);
@@ -147,12 +148,13 @@ _camera_setup(Scene_Data *data)
147static void 148static void
148_light_setup(Scene_Data *data) 149_light_setup(Scene_Data *data)
149{ 150{
150 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 151 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
151 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 152 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
152 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 153 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
153 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 154 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
154 155
155 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 156 data->light_node =
157 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
156 evas_canvas3d_node_light_set(data->light_node, data->light); 158 evas_canvas3d_node_light_set(data->light_node, data->light);
157 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 159 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
158 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); 160 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);
@@ -162,7 +164,7 @@ static void
162_mesh_setup(Scene_Data *data) 164_mesh_setup(Scene_Data *data)
163{ 165{
164 /* Setup material. */ 166 /* Setup material. */
165 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 167 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
166 168
167 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 169 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
168 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 170 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -173,7 +175,7 @@ _mesh_setup(Scene_Data *data)
173 evas_canvas3d_material_shininess_set(data->material, 100.0); 175 evas_canvas3d_material_shininess_set(data->material, 100.0);
174 176
175 /* Setup mesh. */ 177 /* Setup mesh. */
176 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 178 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
177 evas_canvas3d_mesh_vertex_count_set(data->mesh, 24); 179 evas_canvas3d_mesh_vertex_count_set(data->mesh, 24);
178 evas_canvas3d_mesh_frame_add(data->mesh, 0); 180 evas_canvas3d_mesh_frame_add(data->mesh, 0);
179 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]); 181 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]);
@@ -185,7 +187,8 @@ _mesh_setup(Scene_Data *data)
185 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 187 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
186 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material); 188 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
187 189
188 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 190 data->mesh_node =
191 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
189 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 192 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
190 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 193 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
191} 194}
@@ -193,11 +196,12 @@ _mesh_setup(Scene_Data *data)
193static void 196static void
194_scene_setup(Scene_Data *data) 197_scene_setup(Scene_Data *data)
195{ 198{
196 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 199 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
197 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 200 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
198 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 201 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
199 202
200 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 203 data->root_node =
204 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
201 205
202 _camera_setup(data); 206 _camera_setup(data);
203 _light_setup(data); 207 _light_setup(data);
@@ -229,7 +233,7 @@ main(void)
229 _scene_setup(&data); 233 _scene_setup(&data);
230 234
231 /* Add a background rectangle objects. */ 235 /* Add a background rectangle objects. */
232 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 236 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
233 efl_gfx_color_set(background, 0, 0, 0, 255); 237 efl_gfx_color_set(background, 0, 0, 0, 255);
234 efl_gfx_size_set(background, WIDTH, HEIGHT); 238 efl_gfx_size_set(background, WIDTH, HEIGHT);
235 efl_gfx_visible_set(background, EINA_TRUE); 239 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-cube2.c b/src/examples/evas/evas-3d-cube2.c
index 387edd8..e46c2f7 100644
--- a/src/examples/evas/evas-3d-cube2.c
+++ b/src/examples/evas/evas-3d-cube2.c
@@ -111,10 +111,11 @@ _animate_scene(void *data)
111static void 111static void
112_camera_setup(Scene_Data *data) 112_camera_setup(Scene_Data *data)
113{ 113{
114 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 114 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
115 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0); 115 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
116 116
117 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 117 data->camera_node =
118 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
118 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 119 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
119 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 3.0); 120 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 3.0);
120 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); 121 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);
@@ -124,12 +125,13 @@ _camera_setup(Scene_Data *data)
124static void 125static void
125_light_setup(Scene_Data *data) 126_light_setup(Scene_Data *data)
126{ 127{
127 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 128 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
128 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 129 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
129 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 130 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
130 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 131 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
131 132
132 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 133 data->light_node =
134 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
133 evas_canvas3d_node_light_set(data->light_node, data->light); 135 evas_canvas3d_node_light_set(data->light_node, data->light);
134 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 136 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
135 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); 137 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);
@@ -140,8 +142,8 @@ static void
140_mesh_setup(Scene_Data *data) 142_mesh_setup(Scene_Data *data)
141{ 143{
142 /* Setup material. */ 144 /* Setup material. */
143 eo_add(&data->material0, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 145 data->material0 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
144 eo_add(&data->material1, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 146 data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
145 147
146 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 148 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
147 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 149 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -161,9 +163,9 @@ _mesh_setup(Scene_Data *data)
161 evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 163 evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
162 evas_canvas3d_material_shininess_set(data->material1, 100.0); 164 evas_canvas3d_material_shininess_set(data->material1, 100.0);
163 165
164 eo_add(&data->texture0, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 166 data->texture0 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
165 eo_add(&data->texture1, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 167 data->texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
166 eo_add(&data->texture_normal, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 168 data->texture_normal = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
167 169
168 evas_canvas3d_texture_data_set(data->texture0, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]); 170 evas_canvas3d_texture_data_set(data->texture0, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]);
169 evas_canvas3d_texture_data_set(data->texture1, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels1[0]); 171 evas_canvas3d_texture_data_set(data->texture1, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels1[0]);
@@ -174,18 +176,19 @@ _mesh_setup(Scene_Data *data)
174 evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_normal); 176 evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_normal);
175 177
176 /* Set data of primitive */ 178 /* Set data of primitive */
177 eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 179 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
178 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 180 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
179 181
180 /* Setup mesh. */ 182 /* Setup mesh. */
181 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 183 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
182 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube); 184 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
183 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material0); 185 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material0);
184 evas_canvas3d_mesh_frame_add(data->mesh, 20); 186 evas_canvas3d_mesh_frame_add(data->mesh, 20);
185 evas_canvas3d_mesh_frame_material_set(data->mesh, 20, data->material1); 187 evas_canvas3d_mesh_frame_material_set(data->mesh, 20, data->material1);
186 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP); 188 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
187 189
188 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 190 data->mesh_node =
191 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
189 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 192 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
190 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 193 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
191} 194}
@@ -193,11 +196,12 @@ _mesh_setup(Scene_Data *data)
193static void 196static void
194_scene_setup(Scene_Data *data) 197_scene_setup(Scene_Data *data)
195{ 198{
196 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 199 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
197 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 200 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
198 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 201 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
199 202
200 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 203 data->root_node =
204 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
201 205
202 _camera_setup(data); 206 _camera_setup(data);
203 _light_setup(data); 207 _light_setup(data);
@@ -230,7 +234,7 @@ main(void)
230 _scene_setup(&data); 234 _scene_setup(&data);
231 235
232 /* Add a background rectangle objects. */ 236 /* Add a background rectangle objects. */
233 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 237 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
234 efl_gfx_color_set(background, 0, 0, 0, 255); 238 efl_gfx_color_set(background, 0, 0, 0, 255);
235 efl_gfx_size_set(background, WIDTH, HEIGHT); 239 efl_gfx_size_set(background, WIDTH, HEIGHT);
236 efl_gfx_visible_set(background, EINA_TRUE); 240 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-eet.c b/src/examples/evas/evas-3d-eet.c
index 69fca12..dc09191 100644
--- a/src/examples/evas/evas-3d-eet.c
+++ b/src/examples/evas/evas-3d-eet.c
@@ -115,37 +115,37 @@ main(void)
115 evas = ecore_evas_get(ecore_evas); 115 evas = ecore_evas_get(ecore_evas);
116 116
117 /* Add a scene object .*/ 117 /* Add a scene object .*/
118 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 118 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
119 119
120 /* Add the root node for the scene. */ 120 /* Add the root node for the scene. */
121 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 121 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
122 122
123 /* Add the camera. */ 123 /* Add the camera. */
124 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 124 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
125 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0); 125 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
126 126
127 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 127 camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
128 evas_canvas3d_node_camera_set(camera_node, camera); 128 evas_canvas3d_node_camera_set(camera_node, camera);
129 evas_canvas3d_node_member_add(root_node, camera_node); 129 evas_canvas3d_node_member_add(root_node, camera_node);
130 evas_canvas3d_node_position_set(camera_node, 200.0, 0.0, 40.0); 130 evas_canvas3d_node_position_set(camera_node, 200.0, 0.0, 40.0);
131 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); 131 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);
132 /* Add the light. */ 132 /* Add the light. */
133 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 133 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
134 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 134 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
135 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0); 135 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
136 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0); 136 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
137 evas_canvas3d_light_directional_set(light, EINA_TRUE); 137 evas_canvas3d_light_directional_set(light, EINA_TRUE);
138 138
139 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 139 light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
140 evas_canvas3d_node_light_set(light_node, light); 140 evas_canvas3d_node_light_set(light_node, light);
141 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0); 141 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
142 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); 142 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);
143 evas_canvas3d_node_member_add(root_node, light_node); 143 evas_canvas3d_node_member_add(root_node, light_node);
144 144
145 /* Add the meshes. */ 145 /* Add the meshes. */
146 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 146 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
147 eo_add(&mesh2, EVAS_CANVAS3D_MESH_CLASS, evas); 147 mesh2 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
148 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 148 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
149 149
150 efl_file_set(mesh, input_model_path, NULL); 150 efl_file_set(mesh, input_model_path, NULL);
151 evas_canvas3d_mesh_frame_material_set(mesh, 0, material); 151 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
@@ -169,13 +169,13 @@ main(void)
169 efl_file_set(mesh2, output_model_path, NULL); 169 efl_file_set(mesh2, output_model_path, NULL);
170 evas_canvas3d_mesh_shade_mode_set(mesh2, EVAS_CANVAS3D_SHADE_MODE_PHONG); 170 evas_canvas3d_mesh_shade_mode_set(mesh2, EVAS_CANVAS3D_SHADE_MODE_PHONG);
171 171
172 eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 172 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
173 173
174 evas_canvas3d_node_member_add(root_node, mesh_node); 174 evas_canvas3d_node_member_add(root_node, mesh_node);
175 evas_canvas3d_node_mesh_add(mesh_node, mesh); 175 evas_canvas3d_node_mesh_add(mesh_node, mesh);
176 evas_canvas3d_node_position_set(mesh_node, 0.0, -40.0, 0.0); 176 evas_canvas3d_node_position_set(mesh_node, 0.0, -40.0, 0.0);
177 177
178 eo_add(&mesh_node2, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node2, EVAS_CANVAS3D_NODE_TYPE_MESH)); 178 mesh_node2 = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
179 evas_canvas3d_node_member_add(root_node, mesh_node2); 179 evas_canvas3d_node_member_add(root_node, mesh_node2);
180 evas_canvas3d_node_mesh_add(mesh_node2, mesh2); 180 evas_canvas3d_node_mesh_add(mesh_node2, mesh2);
181 evas_canvas3d_node_position_set(mesh_node2, 0.0, 40.0, 0.0); 181 evas_canvas3d_node_position_set(mesh_node2, 0.0, 40.0, 0.0);
@@ -186,7 +186,7 @@ main(void)
186 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 186 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
187 187
188 /* Add a background rectangle objects. */ 188 /* Add a background rectangle objects. */
189 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 189 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
190 efl_gfx_color_set(background, 0, 0, 0, 255); 190 efl_gfx_color_set(background, 0, 0, 0, 255);
191 efl_gfx_size_set(background, WIDTH, HEIGHT); 191 efl_gfx_size_set(background, WIDTH, HEIGHT);
192 efl_gfx_visible_set(background, EINA_TRUE); 192 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-fog.c b/src/examples/evas/evas-3d-fog.c
index bc33f92..33bd05c 100644
--- a/src/examples/evas/evas-3d-fog.c
+++ b/src/examples/evas/evas-3d-fog.c
@@ -81,11 +81,12 @@ _animate_scene(void *data)
81static void 81static void
82_camera_setup(Scene_Data *data) 82_camera_setup(Scene_Data *data)
83{ 83{
84 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 84 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
85 85
86 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0); 86 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
87 87
88 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 88 data->camera_node =
89 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
89 90
90 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 91 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
91 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 7.0); 92 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 7.0);
@@ -97,12 +98,13 @@ _camera_setup(Scene_Data *data)
97static void 98static void
98_light_setup(Scene_Data *data) 99_light_setup(Scene_Data *data)
99{ 100{
100 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 101 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
101 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 102 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
102 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 103 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
103 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 104 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
104 105
105 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 106 data->light_node =
107 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
106 evas_canvas3d_node_light_set(data->light_node, data->light); 108 evas_canvas3d_node_light_set(data->light_node, data->light);
107 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 109 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
108 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); 110 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);
@@ -121,7 +123,7 @@ _set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material)
121static void 123static void
122_mesh_setup(Scene_Data *data) 124_mesh_setup(Scene_Data *data)
123{ 125{
124 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 126 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
125 127
126 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 128 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
127 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 129 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -131,26 +133,29 @@ _mesh_setup(Scene_Data *data)
131 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 133 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
132 evas_canvas3d_material_shininess_set(data->material, 100.0); 134 evas_canvas3d_material_shininess_set(data->material, 100.0);
133 135
134 eo_add(&data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 136 data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
135 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 137 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
136 evas_canvas3d_primitive_precision_set(data->sphere, 50); 138 evas_canvas3d_primitive_precision_set(data->sphere, 50);
137 139
138 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 140 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
139 eo_add(&data->mesh1, EVAS_CANVAS3D_MESH_CLASS, evas); 141 data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
140 142
141 _set_ball(data->mesh, data->sphere, data->material); 143 _set_ball(data->mesh, data->sphere, data->material);
142 _set_ball(data->mesh1, data->sphere, data->material); 144 _set_ball(data->mesh1, data->sphere, data->material);
143 145
144 eo_add(&data->animation_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->animation_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 146 data->animation_node =
147 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
145 148
146 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 149 data->mesh_node =
150 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
147 151
148 evas_canvas3d_node_member_add(data->animation_node, data->mesh_node); 152 evas_canvas3d_node_member_add(data->animation_node, data->mesh_node);
149 evas_canvas3d_node_member_add(data->root_node, data->animation_node); 153 evas_canvas3d_node_member_add(data->root_node, data->animation_node);
150 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 154 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
151 evas_canvas3d_node_position_set(data->mesh_node, 0.0, 0.0, 3.0); 155 evas_canvas3d_node_position_set(data->mesh_node, 0.0, 0.0, 3.0);
152 156
153 eo_add(&data->mesh_node1, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node1, EVAS_CANVAS3D_NODE_TYPE_MESH)); 157 data->mesh_node1 =
158 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
154 159
155 evas_canvas3d_node_member_add(data->root_node, data->mesh_node1); 160 evas_canvas3d_node_member_add(data->root_node, data->mesh_node1);
156 evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1); 161 evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1);
@@ -165,12 +170,13 @@ _mesh_setup(Scene_Data *data)
165static void 170static void
166_scene_setup(Scene_Data *data) 171_scene_setup(Scene_Data *data)
167{ 172{
168 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 173 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
169 174
170 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 175 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
171 evas_canvas3d_scene_background_color_set(data->scene, FOG_COLOR, 1); 176 evas_canvas3d_scene_background_color_set(data->scene, FOG_COLOR, 1);
172 177
173 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 178 data->root_node =
179 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
174 180
175 _camera_setup(data); 181 _camera_setup(data);
176 _light_setup(data); 182 _light_setup(data);
@@ -203,7 +209,7 @@ main(void)
203 _scene_setup(&data); 209 _scene_setup(&data);
204 210
205 /* Add a background rectangle objects. */ 211 /* Add a background rectangle objects. */
206 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 212 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
207 efl_gfx_color_set(background, 0, 0, 0, 255); 213 efl_gfx_color_set(background, 0, 0, 0, 255);
208 efl_gfx_size_set(background, WIDTH, HEIGHT); 214 efl_gfx_size_set(background, WIDTH, HEIGHT);
209 efl_gfx_visible_set(background, EINA_TRUE); 215 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-frustum.c b/src/examples/evas/evas-3d-frustum.c
index 25cfc5b..4e1323f 100644
--- a/src/examples/evas/evas-3d-frustum.c
+++ b/src/examples/evas/evas-3d-frustum.c
@@ -279,8 +279,8 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void
279static void 279static void
280_camera_setup(Scene_Data *data) 280_camera_setup(Scene_Data *data)
281{ 281{
282 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 282 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
283 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 283 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
284 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 284 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
285 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 300.0); 285 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 300.0);
286 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); 286 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);
@@ -293,12 +293,12 @@ _camera_setup(Scene_Data *data)
293static void 293static void
294_light_setup(Scene_Data *data) 294_light_setup(Scene_Data *data)
295{ 295{
296 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 296 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
297 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 297 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
298 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 298 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
299 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 299 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
300 300
301 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 301 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
302 evas_canvas3d_node_light_set(data->light_node, data->light); 302 evas_canvas3d_node_light_set(data->light_node, data->light);
303 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 200.0); 303 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 200.0);
304 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); 304 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);
@@ -309,7 +309,7 @@ _light_setup(Scene_Data *data)
309static void 309static void
310_mesh_setup(Scene_Data *data) 310_mesh_setup(Scene_Data *data)
311{ 311{
312 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 312 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
313 313
314 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 314 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
315 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 315 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -319,26 +319,27 @@ _mesh_setup(Scene_Data *data)
319 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 319 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
320 evas_canvas3d_material_shininess_set(data->material, 100.0); 320 evas_canvas3d_material_shininess_set(data->material, 100.0);
321 321
322 eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 322 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
323 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 323 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
324 324
325 eo_add(&data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 325 data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
326 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 326 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
327 evas_canvas3d_primitive_precision_set(data->sphere, 20); 327 evas_canvas3d_primitive_precision_set(data->sphere, 20);
328 328
329 eo_add(&data->mesh_aabb, EVAS_CANVAS3D_MESH_CLASS, evas); 329 data->mesh_aabb = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
330 evas_canvas3d_mesh_from_primitive_set(data->mesh_aabb, 0, data->cube); 330 evas_canvas3d_mesh_from_primitive_set(data->mesh_aabb, 0, data->cube);
331 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_aabb, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES); 331 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_aabb, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
332 evas_canvas3d_mesh_shade_mode_set(data->mesh_aabb, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE); 332 evas_canvas3d_mesh_shade_mode_set(data->mesh_aabb, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
333 evas_canvas3d_mesh_frame_material_set(data->mesh_aabb, 0, data->material); 333 evas_canvas3d_mesh_frame_material_set(data->mesh_aabb, 0, data->material);
334 334
335 eo_add(&data->mesh_sphere, EVAS_CANVAS3D_MESH_CLASS, evas); 335 data->mesh_sphere = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
336 evas_canvas3d_mesh_from_primitive_set(data->mesh_sphere, 0, data->sphere); 336 evas_canvas3d_mesh_from_primitive_set(data->mesh_sphere, 0, data->sphere);
337 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_sphere, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES); 337 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_sphere, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
338 evas_canvas3d_mesh_shade_mode_set(data->mesh_sphere, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE); 338 evas_canvas3d_mesh_shade_mode_set(data->mesh_sphere, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
339 evas_canvas3d_mesh_frame_material_set(data->mesh_sphere, 0, data->material); 339 evas_canvas3d_mesh_frame_material_set(data->mesh_sphere, 0, data->material);
340 340
341 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 341 data->mesh_node =
342 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
342 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 343 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
343 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_aabb); 344 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_aabb);
344} 345}
@@ -346,9 +347,9 @@ _mesh_setup(Scene_Data *data)
346static void 347static void
347_mesh_setup_model(Scene_Data *data) 348_mesh_setup_model(Scene_Data *data)
348{ 349{
349 eo_add(&data->mesh_model, EVAS_CANVAS3D_MESH_CLASS, evas); 350 data->mesh_model = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
350 eo_add(&data->material_model, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 351 data->material_model = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
351 eo_add(&data->texture_model, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 352 data->texture_model = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
352 353
353 evas_canvas3d_texture_file_set(data->texture_model, texture_path, NULL); 354 evas_canvas3d_texture_file_set(data->texture_model, texture_path, NULL);
354 evas_canvas3d_texture_filter_set(data->texture_model, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 355 evas_canvas3d_texture_filter_set(data->texture_model, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
@@ -373,15 +374,15 @@ _mesh_setup_model(Scene_Data *data)
373static void 374static void
374_scene_setup(Scene_Data *data) 375_scene_setup(Scene_Data *data)
375{ 376{
376 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 377 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
377 378
378 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 379 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
379 380
380 _light_setup(data); 381 _light_setup(data);
381 _mesh_setup_model(data); 382 _mesh_setup_model(data);
382 _camera_setup(data); 383 _camera_setup(data);
383 384
384 eo_add(&data->mesh_node_model, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node_model, EVAS_CANVAS3D_NODE_TYPE_MESH)); 385 data->mesh_node_model = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
385 evas_canvas3d_node_position_set(data->mesh_node_model, obj_x, obj_y, obj_z); 386 evas_canvas3d_node_position_set(data->mesh_node_model, obj_x, obj_y, obj_z);
386 evas_canvas3d_node_orientation_angle_axis_set(data->mesh_node_model, -90, 1.0, 0.0, 0.0); 387 evas_canvas3d_node_orientation_angle_axis_set(data->mesh_node_model, -90, 1.0, 0.0, 0.0);
387 evas_canvas3d_node_scale_set(data->mesh_node_model, obj_sc_x, obj_sc_y, obj_sc_z); 388 evas_canvas3d_node_scale_set(data->mesh_node_model, obj_sc_x, obj_sc_y, obj_sc_z);
diff --git a/src/examples/evas/evas-3d-hull.c b/src/examples/evas/evas-3d-hull.c
index 130ad37..57602b6 100644
--- a/src/examples/evas/evas-3d-hull.c
+++ b/src/examples/evas/evas-3d-hull.c
@@ -255,11 +255,12 @@ _key_down(void *data,
255static void 255static void
256_camera_setup(Scene_Data *data) 256_camera_setup(Scene_Data *data)
257{ 257{
258 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 258 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
259 259
260 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0); 260 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
261 261
262 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 262 data->camera_node =
263 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
263 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 264 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
264 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0); 265 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
265 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); 266 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);
@@ -269,12 +270,13 @@ _camera_setup(Scene_Data *data)
269static void 270static void
270_light_setup(Scene_Data *data) 271_light_setup(Scene_Data *data)
271{ 272{
272 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 273 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
273 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 274 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
274 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 275 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
275 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 276 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
276 277
277 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 278 data->light_node =
279 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
278 evas_canvas3d_node_light_set(data->light_node, data->light); 280 evas_canvas3d_node_light_set(data->light_node, data->light);
279 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 281 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
280 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); 282 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);
@@ -290,7 +292,7 @@ _mesh_setup(Scene_Data *data)
290 Eo *primitive = NULL; 292 Eo *primitive = NULL;
291 /* Setup material. */ 293 /* Setup material. */
292 294
293 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 295 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
294 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 296 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
295 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 297 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
296 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE); 298 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
@@ -300,17 +302,17 @@ _mesh_setup(Scene_Data *data)
300 evas_canvas3d_material_shininess_set(data->material, 100.0); 302 evas_canvas3d_material_shininess_set(data->material, 100.0);
301 303
302 /* Setup mesh sphere */ 304 /* Setup mesh sphere */
303 eo_add(&primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 305 primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
304 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 306 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
305 evas_canvas3d_primitive_precision_set(primitive, 10); 307 evas_canvas3d_primitive_precision_set(primitive, 10);
306 eo_add(&data->mesh_sphere, EVAS_CANVAS3D_MESH_CLASS, evas); 308 data->mesh_sphere = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
307 evas_canvas3d_mesh_from_primitive_set(data->mesh_sphere, 0, primitive); 309 evas_canvas3d_mesh_from_primitive_set(data->mesh_sphere, 0, primitive);
308 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_sphere, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES); 310 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_sphere, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
309 evas_canvas3d_mesh_shade_mode_set(data->mesh_sphere, EVAS_CANVAS3D_SHADE_MODE_PHONG); 311 evas_canvas3d_mesh_shade_mode_set(data->mesh_sphere, EVAS_CANVAS3D_SHADE_MODE_PHONG);
310 evas_canvas3d_mesh_frame_material_set(data->mesh_sphere, 0, data->material); 312 evas_canvas3d_mesh_frame_material_set(data->mesh_sphere, 0, data->material);
311 313
312 /* Setup mesh torus */ 314 /* Setup mesh torus */
313 eo_add(&data->mesh_torus, EVAS_CANVAS3D_MESH_CLASS, evas); 315 data->mesh_torus = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
314 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_TORUS); 316 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_TORUS);
315 evas_canvas3d_primitive_precision_set(primitive, 50); 317 evas_canvas3d_primitive_precision_set(primitive, 50);
316 evas_canvas3d_mesh_from_primitive_set(data->mesh_torus, 0, primitive); 318 evas_canvas3d_mesh_from_primitive_set(data->mesh_torus, 0, primitive);
@@ -319,7 +321,7 @@ _mesh_setup(Scene_Data *data)
319 evas_canvas3d_mesh_frame_material_set(data->mesh_torus, 0, data->material); 321 evas_canvas3d_mesh_frame_material_set(data->mesh_torus, 0, data->material);
320 322
321 /* Setup mesh cube */ 323 /* Setup mesh cube */
322 eo_add(&data->mesh_cube, EVAS_CANVAS3D_MESH_CLASS, evas); 324 data->mesh_cube = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
323 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 325 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
324 evas_canvas3d_primitive_precision_set(primitive, 50); 326 evas_canvas3d_primitive_precision_set(primitive, 50);
325 evas_canvas3d_mesh_from_primitive_set(data->mesh_cube, 0, primitive); 327 evas_canvas3d_mesh_from_primitive_set(data->mesh_cube, 0, primitive);
@@ -351,7 +353,8 @@ _mesh_setup(Scene_Data *data)
351 MODEL_MESH_INIT(blender_test_eagle, eagle_test, DIFFUSE) 353 MODEL_MESH_INIT(blender_test_eagle, eagle_test, DIFFUSE)
352 MODEL_MESH_INIT(blender_test_sonic, sonic_test, DIFFUSE) 354 MODEL_MESH_INIT(blender_test_sonic, sonic_test, DIFFUSE)
353 355
354 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 356 data->mesh_node =
357 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
355 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 358 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
356 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_sphere); 359 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_sphere);
357 evas_canvas3d_node_scale_set(data->mesh_node, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE); 360 evas_canvas3d_node_scale_set(data->mesh_node, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
@@ -368,13 +371,15 @@ _mesh_setup(Scene_Data *data)
368 371
369 _print_result(data->mesh_sphere_ch, data->mesh_blender_test_sphere); 372 _print_result(data->mesh_sphere_ch, data->mesh_blender_test_sphere);
370 373
371 eo_add(&data->mesh_node_convex_hull, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node_convex_hull, EVAS_CANVAS3D_NODE_TYPE_MESH)); 374 data->mesh_node_convex_hull =
375 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
372 evas_canvas3d_node_member_add(data->root_node, data->mesh_node_convex_hull); 376 evas_canvas3d_node_member_add(data->root_node, data->mesh_node_convex_hull);
373 evas_canvas3d_node_position_set(data->mesh_node_convex_hull, 0.0, 0.0, 0.0); 377 evas_canvas3d_node_position_set(data->mesh_node_convex_hull, 0.0, 0.0, 0.0);
374 evas_canvas3d_node_scale_set(data->mesh_node_convex_hull, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE); 378 evas_canvas3d_node_scale_set(data->mesh_node_convex_hull, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
375 evas_canvas3d_node_mesh_add(data->mesh_node_convex_hull, data->mesh_sphere_ch); 379 evas_canvas3d_node_mesh_add(data->mesh_node_convex_hull, data->mesh_sphere_ch);
376 380
377 eo_add(&data->mesh_node_blender, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node_blender, EVAS_CANVAS3D_NODE_TYPE_MESH)); 381 data->mesh_node_blender =
382 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
378 evas_canvas3d_node_member_add(data->root_node, data->mesh_node_blender); 383 evas_canvas3d_node_member_add(data->root_node, data->mesh_node_blender);
379 evas_canvas3d_node_position_set(data->mesh_node_blender, -3.0, 0.0, 0.0); 384 evas_canvas3d_node_position_set(data->mesh_node_blender, -3.0, 0.0, 0.0);
380 evas_canvas3d_node_scale_set(data->mesh_node_blender, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE); 385 evas_canvas3d_node_scale_set(data->mesh_node_blender, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
@@ -384,11 +389,12 @@ _mesh_setup(Scene_Data *data)
384static void 389static void
385_scene_setup(Scene_Data *data) 390_scene_setup(Scene_Data *data)
386{ 391{
387 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 392 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
388 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 393 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
389 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 394 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
390 395
391 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 396 data->root_node =
397 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
392 398
393 _camera_setup(data); 399 _camera_setup(data);
394 _light_setup(data); 400 _light_setup(data);
@@ -423,7 +429,7 @@ main(void)
423 _scene_setup(&data); 429 _scene_setup(&data);
424 430
425 /* Add a background rectangle objects. */ 431 /* Add a background rectangle objects. */
426 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 432 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
427 efl_gfx_color_set(background, 0, 0, 0, 255); 433 efl_gfx_color_set(background, 0, 0, 0, 255);
428 efl_gfx_size_set(background, WIDTH, HEIGHT); 434 efl_gfx_size_set(background, WIDTH, HEIGHT);
429 efl_gfx_visible_set(background, EINA_TRUE); 435 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-md2.c b/src/examples/evas/evas-3d-md2.c
index 443271a..e19dfd6 100644
--- a/src/examples/evas/evas-3d-md2.c
+++ b/src/examples/evas/evas-3d-md2.c
@@ -91,42 +91,44 @@ main(void)
91 evas = ecore_evas_get(ecore_evas); 91 evas = ecore_evas_get(ecore_evas);
92 92
93 /* Add a scene object .*/ 93 /* Add a scene object .*/
94 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 94 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
95 95
96 /* Add the root node for the scene. */ 96 /* Add the root node for the scene. */
97 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 97 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
98 98
99 /* Add the camera. */ 99 /* Add the camera. */
100 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 100 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
101 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0); 101 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
102 102
103 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 103 camera_node =
104 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
104 evas_canvas3d_node_camera_set(camera_node, camera); 105 evas_canvas3d_node_camera_set(camera_node, camera);
105 evas_canvas3d_node_member_add(root_node, camera_node); 106 evas_canvas3d_node_member_add(root_node, camera_node);
106 evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 20.0); 107 evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 20.0);
107 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); 108 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);
108 /* Add the light. */ 109 /* Add the light. */
109 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 110 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
110 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 111 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
111 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0); 112 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
112 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0); 113 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
113 evas_canvas3d_light_directional_set(light, EINA_TRUE); 114 evas_canvas3d_light_directional_set(light, EINA_TRUE);
114 115
115 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 116 light_node =
117 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
116 evas_canvas3d_node_light_set(light_node, light); 118 evas_canvas3d_node_light_set(light_node, light);
117 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0); 119 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
118 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); 120 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);
119 evas_canvas3d_node_member_add(root_node, light_node); 121 evas_canvas3d_node_member_add(root_node, light_node);
120 122
121 /* Add the mesh. */ 123 /* Add the mesh. */
122 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 124 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
123 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 125 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
124 126
125 efl_file_set(mesh, model_path, NULL); 127 efl_file_set(mesh, model_path, NULL);
126 evas_canvas3d_mesh_frame_material_set(mesh, 0, material); 128 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
127 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 129 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
128 130
129 eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 131 texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
130 evas_canvas3d_texture_file_set(texture, image_path, NULL); 132 evas_canvas3d_texture_file_set(texture, image_path, NULL);
131 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 133 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
132 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 134 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -140,7 +142,7 @@ main(void)
140 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 142 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
141 evas_canvas3d_material_shininess_set(material, 50.0); 143 evas_canvas3d_material_shininess_set(material, 50.0);
142 144
143 eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 145 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
144 evas_canvas3d_node_member_add(root_node, mesh_node); 146 evas_canvas3d_node_member_add(root_node, mesh_node);
145 evas_canvas3d_node_mesh_add(mesh_node, mesh); 147 evas_canvas3d_node_mesh_add(mesh_node, mesh);
146 148
@@ -150,7 +152,7 @@ main(void)
150 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 152 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
151 153
152 /* Add a background rectangle objects. */ 154 /* Add a background rectangle objects. */
153 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 155 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
154 efl_gfx_color_set(background, 0, 0, 0, 255); 156 efl_gfx_color_set(background, 0, 0, 0, 255);
155 efl_gfx_size_set(background, WIDTH, HEIGHT); 157 efl_gfx_size_set(background, WIDTH, HEIGHT);
156 efl_gfx_visible_set(background, EINA_TRUE); 158 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-mmap-set.c b/src/examples/evas/evas-3d-mmap-set.c
index 2432a4b..000204d 100644
--- a/src/examples/evas/evas-3d-mmap-set.c
+++ b/src/examples/evas/evas-3d-mmap-set.c
@@ -181,34 +181,36 @@ main(void)
181 evas = ecore_evas_get(ecore_evas); 181 evas = ecore_evas_get(ecore_evas);
182 182
183 /* Add a scene object .*/ 183 /* Add a scene object .*/
184 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 184 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
185 185
186 /* Add the root node for the scene. */ 186 /* Add the root node for the scene. */
187 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 187 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
188 188
189 /* Add the camera. */ 189 /* Add the camera. */
190 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 190 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
191 evas_canvas3d_camera_projection_perspective_set(camera, 10.0, 1.0, 1.0, 500.0); 191 evas_canvas3d_camera_projection_perspective_set(camera, 10.0, 1.0, 1.0, 500.0);
192 192
193 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 193 camera_node =
194 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
194 evas_canvas3d_node_camera_set(camera_node, camera); 195 evas_canvas3d_node_camera_set(camera_node, camera);
195 evas_canvas3d_node_member_add(root_node, camera_node); 196 evas_canvas3d_node_member_add(root_node, camera_node);
196 evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 100.0); 197 evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 100.0);
197 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); 198 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);
198 /* Add the light. */ 199 /* Add the light. */
199 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 200 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
200 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 201 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
201 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0); 202 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
202 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0); 203 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
203 evas_canvas3d_light_directional_set(light, EINA_TRUE); 204 evas_canvas3d_light_directional_set(light, EINA_TRUE);
204 205
205 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 206 light_node =
207 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
206 evas_canvas3d_node_light_set(light_node, light); 208 evas_canvas3d_node_light_set(light_node, light);
207 evas_canvas3d_node_position_set(light_node, 1.0, 0.0, 100.0); 209 evas_canvas3d_node_position_set(light_node, 1.0, 0.0, 100.0);
208 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); 210 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);
209 evas_canvas3d_node_member_add(root_node, light_node); 211 evas_canvas3d_node_member_add(root_node, light_node);
210 212
211 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 213 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
212 214
213 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 215 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
214 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 216 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -231,7 +233,7 @@ main(void)
231 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 233 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
232 234
233 /* Add a background rectangle objects. */ 235 /* Add a background rectangle objects. */
234 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 236 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
235 efl_gfx_color_set(background, 20, 20, 200, 255); 237 efl_gfx_color_set(background, 20, 20, 200, 255);
236 efl_gfx_size_set(background, WIDTH, HEIGHT); 238 efl_gfx_size_set(background, WIDTH, HEIGHT);
237 efl_gfx_visible_set(background, EINA_TRUE); 239 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-obj.c b/src/examples/evas/evas-3d-obj.c
index f2623f4..b9a6b69 100644
--- a/src/examples/evas/evas-3d-obj.c
+++ b/src/examples/evas/evas-3d-obj.c
@@ -63,7 +63,7 @@
63 ADD_OBJ_MESH(buffer, Y + COPY_OFFSET, Z, num + 4, shade_mode, name_of_material) 63 ADD_OBJ_MESH(buffer, Y + COPY_OFFSET, Z, num + 4, shade_mode, name_of_material)
64 64
65#define ADD_TEXTURE(name, path) \ 65#define ADD_TEXTURE(name, path) \
66 eo_add(&name, EVAS_CANVAS3D_TEXTURE_CLASS, evas); \ 66 name = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
67 evas_canvas3d_texture_file_set(name, path, NULL); \ 67 evas_canvas3d_texture_file_set(name, path, NULL); \
68 evas_canvas3d_texture_filter_set(name, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \ 68 evas_canvas3d_texture_filter_set(name, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
69 EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \ 69 EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \
@@ -71,7 +71,7 @@
71 EVAS_CANVAS3D_WRAP_MODE_REPEAT); 71 EVAS_CANVAS3D_WRAP_MODE_REPEAT);
72 72
73#define ADD_MATERIAL(name) \ 73#define ADD_MATERIAL(name) \
74 eo_add(&name, EVAS_CANVAS3D_MATERIAL_CLASS, evas); \ 74 name = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); \
75 evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); \ 75 evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); \
76 evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); \ 76 evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); \
77 evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE); \ 77 evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE); \
@@ -157,28 +157,30 @@ main(void)
157 evas = ecore_evas_get(ecore_evas); 157 evas = ecore_evas_get(ecore_evas);
158 158
159 /* Add a scene object .*/ 159 /* Add a scene object .*/
160 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 160 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
161 161
162 /* Add the root node for the scene. */ 162 /* Add the root node for the scene. */
163 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 163 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
164 164
165 /* Add the camera. */ 165 /* Add the camera. */
166 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 166 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
167 evas_canvas3d_camera_projection_perspective_set(camera, 20.0, 1.0, 1.0, 500.0); 167 evas_canvas3d_camera_projection_perspective_set(camera, 20.0, 1.0, 1.0, 500.0);
168 168
169 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 169 camera_node =
170 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
170 evas_canvas3d_node_camera_set(camera_node, camera); 171 evas_canvas3d_node_camera_set(camera_node, camera);
171 evas_canvas3d_node_member_add(root_node, camera_node); 172 evas_canvas3d_node_member_add(root_node, camera_node);
172 evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 0.0); 173 evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 0.0);
173 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); 174 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);
174 /* Add the light. */ 175 /* Add the light. */
175 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 176 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
176 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 177 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
177 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0); 178 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
178 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0); 179 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
179 evas_canvas3d_light_directional_set(light, EINA_TRUE); 180 evas_canvas3d_light_directional_set(light, EINA_TRUE);
180 181
181 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 182 light_node =
183 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
182 evas_canvas3d_node_light_set(light_node, light); 184 evas_canvas3d_node_light_set(light_node, light);
183 evas_canvas3d_node_position_set(light_node, 10.0, 0.0, 0.0); 185 evas_canvas3d_node_position_set(light_node, 10.0, 0.0, 0.0);
184 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); 186 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);
@@ -210,7 +212,7 @@ main(void)
210 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 212 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
211 213
212 /* Add a background rectangle MESHES. */ 214 /* Add a background rectangle MESHES. */
213 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 215 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
214 efl_gfx_color_set(background, 0, 0, 0, 255); 216 efl_gfx_color_set(background, 0, 0, 0, 255);
215 efl_gfx_size_set(background, WIDTH, HEIGHT); 217 efl_gfx_size_set(background, WIDTH, HEIGHT);
216 efl_gfx_visible_set(background, EINA_TRUE); 218 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-parallax-occlusion.c b/src/examples/evas/evas-3d-parallax-occlusion.c
index b096dc8..67be665 100644
--- a/src/examples/evas/evas-3d-parallax-occlusion.c
+++ b/src/examples/evas/evas-3d-parallax-occlusion.c
@@ -104,11 +104,11 @@ _animate_scene(void *data)
104static void 104static void
105_camera_setup(Scene_Data *data) 105_camera_setup(Scene_Data *data)
106{ 106{
107 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 107 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
108 108
109 evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0); 109 evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0);
110 110
111 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 111 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
112 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 112 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
113 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0); 113 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
114 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); 114 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);
@@ -118,12 +118,12 @@ _camera_setup(Scene_Data *data)
118static void 118static void
119_light_setup(Scene_Data *data) 119_light_setup(Scene_Data *data)
120{ 120{
121 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 121 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
122 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 122 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
123 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 123 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
124 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 124 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
125 125
126 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 126 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
127 evas_canvas3d_node_light_set(data->light_node, data->light); 127 evas_canvas3d_node_light_set(data->light_node, data->light);
128 evas_canvas3d_node_position_set(data->light_node, -20.0, 20.0, 50.0); 128 evas_canvas3d_node_position_set(data->light_node, -20.0, 20.0, 50.0);
129 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); 129 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);
@@ -134,10 +134,10 @@ static void
134_mesh_setup(Scene_Data *data) 134_mesh_setup(Scene_Data *data)
135{ 135{
136 /* Setup material. */ 136 /* Setup material. */
137 eo_add(&data->material_rocks, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 137 data->material_rocks = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
138 138
139 eo_add(&data->texture_rocks, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 139 data->texture_rocks = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
140 eo_add(&data->texture_rocks_n, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 140 data->texture_rocks_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
141 evas_canvas3d_texture_file_set(data->texture_rocks, rock_diffuse, NULL); 141 evas_canvas3d_texture_file_set(data->texture_rocks, rock_diffuse, NULL);
142 evas_canvas3d_texture_wrap_set(data->texture_rocks, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 142 evas_canvas3d_texture_wrap_set(data->texture_rocks, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
143 evas_canvas3d_texture_file_set(data->texture_rocks_n, rock_n_and_height_map, NULL); 143 evas_canvas3d_texture_file_set(data->texture_rocks_n, rock_n_and_height_map, NULL);
@@ -156,10 +156,10 @@ _mesh_setup(Scene_Data *data)
156 evas_canvas3d_material_color_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 156 evas_canvas3d_material_color_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
157 evas_canvas3d_material_shininess_set(data->material_rocks, 100.0); 157 evas_canvas3d_material_shininess_set(data->material_rocks, 100.0);
158 158
159 eo_add(&data->material_wood, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 159 data->material_wood = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
160 160
161 eo_add(&data->texture_wood, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 161 data->texture_wood = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
162 eo_add(&data->texture_four_n, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 162 data->texture_four_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
163 evas_canvas3d_texture_file_set(data->texture_wood, wood_diffuse, NULL); 163 evas_canvas3d_texture_file_set(data->texture_wood, wood_diffuse, NULL);
164 evas_canvas3d_texture_wrap_set(data->texture_wood, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 164 evas_canvas3d_texture_wrap_set(data->texture_wood, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
165 evas_canvas3d_texture_file_set(data->texture_four_n, wood_n_and_height_map, NULL); 165 evas_canvas3d_texture_file_set(data->texture_four_n, wood_n_and_height_map, NULL);
@@ -179,11 +179,11 @@ _mesh_setup(Scene_Data *data)
179 evas_canvas3d_material_shininess_set(data->material_wood, 100.0); 179 evas_canvas3d_material_shininess_set(data->material_wood, 100.0);
180 180
181 /* Set data of primitive */ 181 /* Set data of primitive */
182 eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 182 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
183 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 183 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
184 184
185 /* Setup mesh. */ 185 /* Setup mesh. */
186 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 186 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
187 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube); 187 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
188 evas_canvas3d_mesh_from_primitive_set(data->mesh, 100, data->cube); 188 evas_canvas3d_mesh_from_primitive_set(data->mesh, 100, data->cube);
189 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PARALLAX_OCCLUSION); 189 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PARALLAX_OCCLUSION);
@@ -191,7 +191,7 @@ _mesh_setup(Scene_Data *data)
191 191
192 evas_canvas3d_mesh_frame_material_set(data->mesh, 100, data->material_wood); 192 evas_canvas3d_mesh_frame_material_set(data->mesh, 100, data->material_wood);
193 193
194 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 194 data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
195 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 195 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
196 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 196 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
197 evas_canvas3d_node_scale_set(data->mesh_node, 3, 3, 3); 197 evas_canvas3d_node_scale_set(data->mesh_node, 3, 3, 3);
@@ -200,11 +200,11 @@ _mesh_setup(Scene_Data *data)
200static void 200static void
201_scene_setup(Scene_Data *data) 201_scene_setup(Scene_Data *data)
202{ 202{
203 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 203 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
204 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 204 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
205 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 205 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
206 206
207 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 207 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
208 208
209 _camera_setup(data); 209 _camera_setup(data);
210 _light_setup(data); 210 _light_setup(data);
@@ -237,7 +237,7 @@ main(void)
237 _scene_setup(&data); 237 _scene_setup(&data);
238 238
239 /* Add a background rectangle objects. */ 239 /* Add a background rectangle objects. */
240 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 240 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
241 efl_gfx_color_set(background, 0, 0, 0, 255); 241 efl_gfx_color_set(background, 0, 0, 0, 255);
242 efl_gfx_size_set(background, WIDTH, HEIGHT); 242 efl_gfx_size_set(background, WIDTH, HEIGHT);
243 efl_gfx_visible_set(background, EINA_TRUE); 243 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-pick.c b/src/examples/evas/evas-3d-pick.c
index 86ee222..1ae79a8 100644
--- a/src/examples/evas/evas-3d-pick.c
+++ b/src/examples/evas/evas-3d-pick.c
@@ -132,31 +132,32 @@ main(void)
132 evas = ecore_evas_get(ecore_evas); 132 evas = ecore_evas_get(ecore_evas);
133 133
134 /* Add a scene object .*/ 134 /* Add a scene object .*/
135 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 135 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
136 136
137 /* Add the root node for the scene. */ 137 /* Add the root node for the scene. */
138 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 138 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
139 139
140 /* Add the camera. */ 140 /* Add the camera. */
141 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 141 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
142 evas_canvas3d_camera_projection_perspective_set(camera, 30.0, 1.0, 1.0, 100.0); 142 evas_canvas3d_camera_projection_perspective_set(camera, 30.0, 1.0, 1.0, 100.0);
143 143
144 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 144 camera_node =
145 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
145 evas_canvas3d_node_camera_set(camera_node, camera); 146 evas_canvas3d_node_camera_set(camera_node, camera);
146 evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 2.5); 147 evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 2.5);
147 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); 148 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);
148 evas_canvas3d_node_member_add(root_node, camera_node); 149 evas_canvas3d_node_member_add(root_node, camera_node);
149 150
150 eo_add(&sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 151 sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
151 evas_canvas3d_primitive_form_set(sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 152 evas_canvas3d_primitive_form_set(sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
152 evas_canvas3d_primitive_precision_set(sphere, 50); 153 evas_canvas3d_primitive_precision_set(sphere, 50);
153 154
154 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 155 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
155 evas_canvas3d_mesh_from_primitive_set(mesh, 0, sphere); 156 evas_canvas3d_mesh_from_primitive_set(mesh, 0, sphere);
156 157
157 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 158 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
158 159
159 eo_add(&texture_diffuse, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 160 texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
160 evas_canvas3d_texture_file_set(texture_diffuse, image_path, NULL); 161 evas_canvas3d_texture_file_set(texture_diffuse, image_path, NULL);
161 evas_canvas3d_texture_filter_set(texture_diffuse, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR); 162 evas_canvas3d_texture_filter_set(texture_diffuse, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR);
162 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse); 163 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse);
@@ -168,7 +169,7 @@ main(void)
168 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 169 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
169 evas_canvas3d_material_shininess_set(material, 50.0); 170 evas_canvas3d_material_shininess_set(material, 50.0);
170 171
171 eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 172 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
172 173
173 evas_canvas3d_node_member_add(root_node, mesh_node); 174 evas_canvas3d_node_member_add(root_node, mesh_node);
174 evas_canvas3d_node_mesh_add(mesh_node, mesh); 175 evas_canvas3d_node_mesh_add(mesh_node, mesh);
@@ -181,7 +182,7 @@ main(void)
181 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 182 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
182 183
183 /* Add evas objects. */ 184 /* Add evas objects. */
184 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 185 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
185 efl_gfx_color_set(background, 0, 0, 0, 255); 186 efl_gfx_color_set(background, 0, 0, 0, 255);
186 efl_gfx_size_set(background, WIDTH, HEIGHT); 187 efl_gfx_size_set(background, WIDTH, HEIGHT);
187 efl_gfx_visible_set(background, EINA_TRUE); 188 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-ply.c b/src/examples/evas/evas-3d-ply.c
index 65f4fe5..b34b2cc 100644
--- a/src/examples/evas/evas-3d-ply.c
+++ b/src/examples/evas/evas-3d-ply.c
@@ -130,35 +130,35 @@ main(void)
130 evas = ecore_evas_get(ecore_evas); 130 evas = ecore_evas_get(ecore_evas);
131 131
132 /* Add a scene object .*/ 132 /* Add a scene object .*/
133 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 133 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
134 134
135 /* Add the root node for the scene. */ 135 /* Add the root node for the scene. */
136 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 136 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
137 137
138 /* Add the camera. */ 138 /* Add the camera. */
139 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 139 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
140 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0); 140 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
141 141
142 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 142 camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
143 evas_canvas3d_node_camera_set(camera_node, camera); 143 evas_canvas3d_node_camera_set(camera_node, camera);
144 evas_canvas3d_node_member_add(root_node, camera_node); 144 evas_canvas3d_node_member_add(root_node, camera_node);
145 evas_canvas3d_node_position_set(camera_node, 15.0, 0.0, 0.0); 145 evas_canvas3d_node_position_set(camera_node, 15.0, 0.0, 0.0);
146 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); 146 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);
147 /* Add the light. */ 147 /* Add the light. */
148 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 148 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
149 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 149 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
150 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0); 150 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
151 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0); 151 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
152 evas_canvas3d_light_directional_set(light, EINA_TRUE); 152 evas_canvas3d_light_directional_set(light, EINA_TRUE);
153 153
154 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 154 light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
155 evas_canvas3d_node_light_set(light_node, light); 155 evas_canvas3d_node_light_set(light_node, light);
156 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0); 156 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
157 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); 157 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);
158 evas_canvas3d_node_member_add(root_node, light_node); 158 evas_canvas3d_node_member_add(root_node, light_node);
159 159
160 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 160 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
161 eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 161 texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
162 evas_canvas3d_texture_file_set(texture, image_path, NULL); 162 evas_canvas3d_texture_file_set(texture, image_path, NULL);
163 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 163 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
164 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 164 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -208,7 +208,7 @@ main(void)
208 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 208 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
209 209
210 /* Add a background rectangle objects. */ 210 /* Add a background rectangle objects. */
211 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 211 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
212 efl_gfx_color_set(background, 100, 100, 100, 255); 212 efl_gfx_color_set(background, 100, 100, 100, 255);
213 efl_gfx_size_set(background, WIDTH, HEIGHT); 213 efl_gfx_size_set(background, WIDTH, HEIGHT);
214 efl_gfx_visible_set(background, EINA_TRUE); 214 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-proxy.c b/src/examples/evas/evas-3d-proxy.c
index 7ec50bc..901c52b 100644
--- a/src/examples/evas/evas-3d-proxy.c
+++ b/src/examples/evas/evas-3d-proxy.c
@@ -97,10 +97,11 @@ _animate_scene(void *data)
97static void 97static void
98_camera_setup(Scene_Data *data) 98_camera_setup(Scene_Data *data)
99{ 99{
100 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 100 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
101 evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0); 101 evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0);
102 102
103 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 103 data->camera_node =
104 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
104 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 105 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
105 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 5.0); 106 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 5.0);
106 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); 107 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);
@@ -110,12 +111,13 @@ _camera_setup(Scene_Data *data)
110static void 111static void
111_light_setup(Scene_Data *data) 112_light_setup(Scene_Data *data)
112{ 113{
113 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 114 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
114 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 115 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
115 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 116 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
116 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 117 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
117 118
118 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 119 data->light_node =
120 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
119 evas_canvas3d_node_light_set(data->light_node, data->light); 121 evas_canvas3d_node_light_set(data->light_node, data->light);
120 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 122 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
121 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); 123 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);
@@ -126,8 +128,8 @@ static void
126_mesh_setup(Scene_Data *data) 128_mesh_setup(Scene_Data *data)
127{ 129{
128 /* Setup material. */ 130 /* Setup material. */
129 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 131 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
130 eo_add(&data->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 132 data->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
131 133
132 evas_canvas3d_texture_source_set(data->texture, source); 134 evas_canvas3d_texture_source_set(data->texture, source);
133 evas_canvas3d_texture_source_visible_set(data->texture, EINA_TRUE); 135 evas_canvas3d_texture_source_visible_set(data->texture, EINA_TRUE);
@@ -142,16 +144,17 @@ _mesh_setup(Scene_Data *data)
142 evas_canvas3d_material_texture_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture); 144 evas_canvas3d_material_texture_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture);
143 145
144 /* Set data of primitive */ 146 /* Set data of primitive */
145 eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 147 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
146 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 148 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
147 149
148 /* Setup mesh. */ 150 /* Setup mesh. */
149 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 151 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
150 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube); 152 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
151 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_FLAT); 153 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_FLAT);
152 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material); 154 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
153 155
154 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 156 data->mesh_node =
157 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
155 158
156 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 159 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
157 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 160 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
@@ -160,11 +163,12 @@ _mesh_setup(Scene_Data *data)
160static void 163static void
161_scene_setup(Scene_Data *data) 164_scene_setup(Scene_Data *data)
162{ 165{
163 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 166 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
164 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 167 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
165 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 168 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
166 169
167 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 170 data->root_node =
171 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
168 172
169 _camera_setup(data); 173 _camera_setup(data);
170 _light_setup(data); 174 _light_setup(data);
@@ -195,7 +199,7 @@ main(void)
195 evas = ecore_evas_get(ecore_evas); 199 evas = ecore_evas_get(ecore_evas);
196 200
197 /* Add a background rectangle objects. */ 201 /* Add a background rectangle objects. */
198 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 202 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
199 efl_gfx_color_set(background, 0, 0, 0, 255); 203 efl_gfx_color_set(background, 0, 0, 0, 255);
200 efl_gfx_size_set(background, WIDTH, HEIGHT); 204 efl_gfx_size_set(background, WIDTH, HEIGHT);
201 efl_gfx_visible_set(background, EINA_TRUE); 205 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-3d-shadows.c b/src/examples/evas/evas-3d-shadows.c
index 90a71465..f70d7e4 100644
--- a/src/examples/evas/evas-3d-shadows.c
+++ b/src/examples/evas/evas-3d-shadows.c
@@ -174,7 +174,7 @@ _on_canvas_resize(Ecore_Evas *ee)
174static void 174static void
175_body_material_set(Body_3D *body, float r, float g, float b) 175_body_material_set(Body_3D *body, float r, float g, float b)
176{ 176{
177 eo_add(&body->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 177 body->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
178 178
179 evas_canvas3d_material_enable_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 179 evas_canvas3d_material_enable_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
180 evas_canvas3d_material_enable_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 180 evas_canvas3d_material_enable_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -191,32 +191,33 @@ _body_material_set(Body_3D *body, float r, float g, float b)
191static void 191static void
192_sphere_setup(Body_3D *sphere) 192_sphere_setup(Body_3D *sphere)
193{ 193{
194 eo_add(&sphere->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 194 sphere->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
195 evas_canvas3d_primitive_form_set(sphere->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 195 evas_canvas3d_primitive_form_set(sphere->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
196 evas_canvas3d_primitive_precision_set(sphere->primitive, 50); 196 evas_canvas3d_primitive_precision_set(sphere->primitive, 50);
197 197
198 eo_add(&sphere->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 198 sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
199 evas_canvas3d_mesh_from_primitive_set(sphere->mesh, 0, sphere->primitive); 199 evas_canvas3d_mesh_from_primitive_set(sphere->mesh, 0, sphere->primitive);
200 200
201 _body_material_set(sphere, 1, 0.0, 0.0); 201 _body_material_set(sphere, 1, 0.0, 0.0);
202 202
203 eo_add(&sphere->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(sphere->node, EVAS_CANVAS3D_NODE_TYPE_MESH), evas_canvas3d_node_position_set(sphere->node, 3.0, 3.0, 0.0)); 203 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));
204 evas_canvas3d_node_mesh_add(sphere->node, sphere->mesh); 204 evas_canvas3d_node_mesh_add(sphere->node, sphere->mesh);
205} 205}
206 206
207static void 207static void
208_cone_setup(Body_3D *cone) 208_cone_setup(Body_3D *cone)
209{ 209{
210 eo_add(&cone->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 210 cone->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
211 evas_canvas3d_primitive_form_set(cone->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CONE); 211 evas_canvas3d_primitive_form_set(cone->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CONE);
212 evas_canvas3d_primitive_precision_set(cone->primitive, 50); 212 evas_canvas3d_primitive_precision_set(cone->primitive, 50);
213 213
214 eo_add(&cone->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 214 cone->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
215 evas_canvas3d_mesh_from_primitive_set(cone->mesh, 0, cone->primitive); 215 evas_canvas3d_mesh_from_primitive_set(cone->mesh, 0, cone->primitive);
216 216
217 _body_material_set(cone, 0.8, 0.5, 0.5); 217 _body_material_set(cone, 0.8, 0.5, 0.5);
218 218
219 eo_add(&cone->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(cone->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 219 cone->node =
220 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
220 evas_canvas3d_node_mesh_add(cone->node, cone->mesh); 221 evas_canvas3d_node_mesh_add(cone->node, cone->mesh);
221 evas_canvas3d_node_orientation_angle_axis_set(cone->node, -90.0, 1.0, 0.0, 0.0); 222 evas_canvas3d_node_orientation_angle_axis_set(cone->node, -90.0, 1.0, 0.0, 0.0);
222 evas_canvas3d_node_position_set(cone->node, -4.0, 0.0, -3.0); 223 evas_canvas3d_node_position_set(cone->node, -4.0, 0.0, -3.0);
@@ -225,16 +226,17 @@ _cone_setup(Body_3D *cone)
225static void 226static void
226_cylinder_setup(Body_3D *cylinder) 227_cylinder_setup(Body_3D *cylinder)
227{ 228{
228 eo_add(&cylinder->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 229 cylinder->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
229 evas_canvas3d_primitive_form_set(cylinder->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER); 230 evas_canvas3d_primitive_form_set(cylinder->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER);
230 evas_canvas3d_primitive_precision_set(cylinder->primitive, 50); 231 evas_canvas3d_primitive_precision_set(cylinder->primitive, 50);
231 232
232 eo_add(&cylinder->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 233 cylinder->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
233 evas_canvas3d_mesh_from_primitive_set(cylinder->mesh, 0, cylinder->primitive); 234 evas_canvas3d_mesh_from_primitive_set(cylinder->mesh, 0, cylinder->primitive);
234 235
235 _body_material_set(cylinder, 0.0, 0.0, 1.0); 236 _body_material_set(cylinder, 0.0, 0.0, 1.0);
236 237
237 eo_add(&cylinder->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(cylinder->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 238 cylinder->node =
239 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
238 evas_canvas3d_node_mesh_add(cylinder->node, cylinder->mesh); 240 evas_canvas3d_node_mesh_add(cylinder->node, cylinder->mesh);
239 evas_canvas3d_node_orientation_angle_axis_set(cylinder->node, -90.0, 1.0, 0.0, 0.0); 241 evas_canvas3d_node_orientation_angle_axis_set(cylinder->node, -90.0, 1.0, 0.0, 0.0);
240 evas_canvas3d_node_position_set(cylinder->node, -2.0, 3.0, 1.0); 242 evas_canvas3d_node_position_set(cylinder->node, -2.0, 3.0, 1.0);
@@ -244,19 +246,17 @@ static void
244_fence_setup(Body_3D *fence) 246_fence_setup(Body_3D *fence)
245{ 247{
246 248
247 Eo *texture = NULL; 249 Eo *texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
248 eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
249 evas_canvas3d_texture_atlas_enable_set(texture, EINA_FALSE); 250 evas_canvas3d_texture_atlas_enable_set(texture, EINA_FALSE);
250 evas_canvas3d_texture_file_set(texture, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL); 251 evas_canvas3d_texture_file_set(texture, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL);
251 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 252 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
252 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 253 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
253 Eo *texture1 = NULL; 254 Eo *texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
254 eo_add(&texture1, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
255 evas_canvas3d_texture_atlas_enable_set(texture1, EINA_FALSE); 255 evas_canvas3d_texture_atlas_enable_set(texture1, EINA_FALSE);
256 evas_canvas3d_texture_file_set(texture1, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid_n.png", NULL); 256 evas_canvas3d_texture_file_set(texture1, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid_n.png", NULL);
257 evas_canvas3d_texture_filter_set(texture1, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 257 evas_canvas3d_texture_filter_set(texture1, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
258 evas_canvas3d_texture_wrap_set(texture1, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 258 evas_canvas3d_texture_wrap_set(texture1, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
259 eo_add(&fence->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 259 fence->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
260 260
261 evas_canvas3d_material_texture_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture); 261 evas_canvas3d_material_texture_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
262 evas_canvas3d_material_texture_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, texture); 262 evas_canvas3d_material_texture_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, texture);
@@ -270,20 +270,21 @@ _fence_setup(Body_3D *fence)
270 evas_canvas3d_material_color_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 270 evas_canvas3d_material_color_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
271 evas_canvas3d_material_shininess_set(fence->material, 100.0); 271 evas_canvas3d_material_shininess_set(fence->material, 100.0);
272 272
273 eo_add(&fence->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 273 fence->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
274 evas_canvas3d_primitive_form_set(fence->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER); 274 evas_canvas3d_primitive_form_set(fence->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER);
275 evas_canvas3d_primitive_mode_set(fence->primitive, EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE); 275 evas_canvas3d_primitive_mode_set(fence->primitive, EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE);
276 evas_canvas3d_primitive_tex_scale_set(fence->primitive, 160.0, 12.0); 276 evas_canvas3d_primitive_tex_scale_set(fence->primitive, 160.0, 12.0);
277 evas_canvas3d_primitive_precision_set(fence->primitive, 50); 277 evas_canvas3d_primitive_precision_set(fence->primitive, 50);
278 278
279 eo_add(&fence->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 279 fence->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
280 evas_canvas3d_mesh_from_primitive_set(fence->mesh, 0, fence->primitive); 280 evas_canvas3d_mesh_from_primitive_set(fence->mesh, 0, fence->primitive);
281 281
282 evas_canvas3d_mesh_frame_material_set(fence->mesh, 0, fence->material); 282 evas_canvas3d_mesh_frame_material_set(fence->mesh, 0, fence->material);
283 evas_canvas3d_mesh_alpha_func_set(fence->mesh, EVAS_CANVAS3D_COMPARISON_GREATER, 0); 283 evas_canvas3d_mesh_alpha_func_set(fence->mesh, EVAS_CANVAS3D_COMPARISON_GREATER, 0);
284 evas_canvas3d_mesh_alpha_test_enable_set(fence->mesh, EINA_TRUE); 284 evas_canvas3d_mesh_alpha_test_enable_set(fence->mesh, EINA_TRUE);
285 evas_canvas3d_mesh_shade_mode_set(fence->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP); 285 evas_canvas3d_mesh_shade_mode_set(fence->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
286 eo_add(&fence->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(fence->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 286 fence->node =
287 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
287 evas_canvas3d_node_mesh_add(fence->node, fence->mesh); 288 evas_canvas3d_node_mesh_add(fence->node, fence->mesh);
288 evas_canvas3d_node_orientation_angle_axis_set(fence->node, -90.0, 1.0, 0.0, 0.0); 289 evas_canvas3d_node_orientation_angle_axis_set(fence->node, -90.0, 1.0, 0.0, 0.0);
289 evas_canvas3d_node_scale_set(fence->node, 10.0, 10.0, 5.0); 290 evas_canvas3d_node_scale_set(fence->node, 10.0, 10.0, 5.0);
@@ -293,15 +294,16 @@ _fence_setup(Body_3D *fence)
293static void 294static void
294_square_setup(Body_3D *square) 295_square_setup(Body_3D *square)
295{ 296{
296 eo_add(&square->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 297 square->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
297 evas_canvas3d_primitive_form_set(square->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE); 298 evas_canvas3d_primitive_form_set(square->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE);
298 299
299 eo_add(&square->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 300 square->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
300 evas_canvas3d_mesh_from_primitive_set(square->mesh, 0, square->primitive); 301 evas_canvas3d_mesh_from_primitive_set(square->mesh, 0, square->primitive);
301 302
302 _body_material_set(square, 0.4, 0.4, 0.4); 303 _body_material_set(square, 0.4, 0.4, 0.4);
303 304
304 eo_add(&square->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(square->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 305 square->node =
306 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
305 evas_canvas3d_node_mesh_add(square->node, square->mesh); 307 evas_canvas3d_node_mesh_add(square->node, square->mesh);
306 evas_canvas3d_node_position_set(square->node, 0.0, -1.0, 0.0); 308 evas_canvas3d_node_position_set(square->node, 0.0, -1.0, 0.0);
307 evas_canvas3d_node_scale_set(square->node, 30.0, 30.0, 30.0); 309 evas_canvas3d_node_scale_set(square->node, 30.0, 30.0, 30.0);
@@ -311,15 +313,15 @@ _square_setup(Body_3D *square)
311static void 313static void
312_box_setup(Body_3D *box) 314_box_setup(Body_3D *box)
313{ 315{
314 eo_add(&box->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 316 box->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
315 evas_canvas3d_primitive_form_set(box->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 317 evas_canvas3d_primitive_form_set(box->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
316 318
317 eo_add(&box->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 319 box->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
318 evas_canvas3d_mesh_from_primitive_set(box->mesh, 0, box->primitive); 320 evas_canvas3d_mesh_from_primitive_set(box->mesh, 0, box->primitive);
319 321
320 _body_material_set(box, 0, 1, 0); 322 _body_material_set(box, 0, 1, 0);
321 323
322 eo_add(&box->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(box->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 324 box->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
323 evas_canvas3d_node_mesh_add(box->node, box->mesh); 325 evas_canvas3d_node_mesh_add(box->node, box->mesh);
324 evas_canvas3d_node_position_set(box->node, 3.0, 0.0, -3.0); 326 evas_canvas3d_node_position_set(box->node, 3.0, 0.0, -3.0);
325} 327}
@@ -327,11 +329,11 @@ _box_setup(Body_3D *box)
327static void 329static void
328_model_setup(Body_3D *model) 330_model_setup(Body_3D *model)
329{ 331{
330 eo_add(&model->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 332 model->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
331 evas_canvas3d_texture_file_set(model->texture, image_path, NULL); 333 evas_canvas3d_texture_file_set(model->texture, image_path, NULL);
332 evas_canvas3d_texture_filter_set(model->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 334 evas_canvas3d_texture_filter_set(model->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
333 evas_canvas3d_texture_wrap_set(model->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 335 evas_canvas3d_texture_wrap_set(model->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
334 eo_add(&model->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 336 model->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
335 337
336 evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, model->texture); 338 evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, model->texture);
337 evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, model->texture); 339 evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, model->texture);
@@ -341,12 +343,13 @@ _model_setup(Body_3D *model)
341 evas_canvas3d_material_shininess_set(model->material, 100.0); 343 evas_canvas3d_material_shininess_set(model->material, 100.0);
342 344
343 345
344 eo_add(&model->mesh, EVAS_CANVAS3D_MESH_CLASS, evas); 346 model->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
345 efl_file_set(model->mesh, model_path, NULL); 347 efl_file_set(model->mesh, model_path, NULL);
346 evas_canvas3d_mesh_frame_material_set(model->mesh, 0, model->material); 348 evas_canvas3d_mesh_frame_material_set(model->mesh, 0, model->material);
347 evas_canvas3d_mesh_shade_mode_set(model->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 349 evas_canvas3d_mesh_shade_mode_set(model->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
348 350
349 eo_add(&model->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(model->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 351 model->node =
352 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
350 evas_canvas3d_node_mesh_add(model->node, model->mesh); 353 evas_canvas3d_node_mesh_add(model->node, model->mesh);
351 evas_canvas3d_node_scale_set(model->node, 0.1, 0.1, 0.1); 354 evas_canvas3d_node_scale_set(model->node, 0.1, 0.1, 0.1);
352 evas_canvas3d_node_orientation_angle_axis_set(model->node, 120.0, -0.577, -0.577, -0.577); 355 evas_canvas3d_node_orientation_angle_axis_set(model->node, 120.0, -0.577, -0.577, -0.577);
@@ -388,12 +391,13 @@ _billboard_setup(Scene_Data *data)
388static void 391static void
389_camera_setup(Scene_Data *data) 392_camera_setup(Scene_Data *data)
390{ 393{
391 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 394 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
392 eo_add(&data->mediator, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mediator, EVAS_CANVAS3D_NODE_TYPE_NODE)); 395 data->mediator = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
393 396
394 evas_canvas3d_camera_projection_perspective_set(data->camera, 50.0, 1.0, 2.0, 100.0); 397 evas_canvas3d_camera_projection_perspective_set(data->camera, 50.0, 1.0, 2.0, 100.0);
395 398
396 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 399 data->camera_node =
400 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
397 401
398 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 402 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
399 403
@@ -408,14 +412,15 @@ _camera_setup(Scene_Data *data)
408static void 412static void
409_light_setup(Scene_Data *data) 413_light_setup(Scene_Data *data)
410{ 414{
411 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 415 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
412 evas_canvas3d_light_ambient_set(data->light, AMBIENT_LIGHT, 1.0); 416 evas_canvas3d_light_ambient_set(data->light, AMBIENT_LIGHT, 1.0);
413 evas_canvas3d_light_diffuse_set(data->light, DIFFUSE_LIGHT, 1.0); 417 evas_canvas3d_light_diffuse_set(data->light, DIFFUSE_LIGHT, 1.0);
414 evas_canvas3d_light_specular_set(data->light, SPECULAR_LIGHT, 1.0); 418 evas_canvas3d_light_specular_set(data->light, SPECULAR_LIGHT, 1.0);
415 evas_canvas3d_light_spot_cutoff_set(data->light, 20); 419 evas_canvas3d_light_spot_cutoff_set(data->light, 20);
416 evas_canvas3d_light_projection_perspective_set(data->light, 40.0, 1.0, 2.0, 1000.0); 420 evas_canvas3d_light_projection_perspective_set(data->light, 40.0, 1.0, 2.0, 1000.0);
417 421
418 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 422 data->light_node =
423 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
419 evas_canvas3d_node_light_set(data->light_node, data->light); 424 evas_canvas3d_node_light_set(data->light_node, data->light);
420 evas_canvas3d_node_position_set(data->light_node, 50.0, 50.0, 70.0); 425 evas_canvas3d_node_position_set(data->light_node, 50.0, 50.0, 70.0);
421 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); 426 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);
@@ -427,12 +432,13 @@ _scene_setup(Scene_Data *data)
427{ 432{
428 data->init = EINA_FALSE; 433 data->init = EINA_FALSE;
429 434
430 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 435 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
431 436
432 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 437 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
433 evas_canvas3d_scene_background_color_set(data->scene, BG_COLOR, 1); 438 evas_canvas3d_scene_background_color_set(data->scene, BG_COLOR, 1);
434 439
435 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 440 data->root_node =
441 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
436 442
437 443
438 _camera_setup(data); 444 _camera_setup(data);
@@ -604,7 +610,7 @@ main(void)
604 _scene_setup(&data); 610 _scene_setup(&data);
605 611
606 /* Add a background rectangle objects. */ 612 /* Add a background rectangle objects. */
607 eo_add(&background, EVAS_RECTANGLE_CLASS, evas); 613 background = eo_add(EVAS_RECTANGLE_CLASS, evas);
608 efl_gfx_color_set(background, 0, 0, 0, 255); 614 efl_gfx_color_set(background, 0, 0, 0, 255);
609 efl_gfx_size_set(background, WIDTH, HEIGHT); 615 efl_gfx_size_set(background, WIDTH, HEIGHT);
610 efl_gfx_visible_set(background, EINA_TRUE); 616 efl_gfx_visible_set(background, EINA_TRUE);
diff --git a/src/examples/evas/evas-vg-simple.c b/src/examples/evas/evas-vg-simple.c
index 9d22907..2c0c702 100644
--- a/src/examples/evas/evas-vg-simple.c
+++ b/src/examples/evas/evas-vg-simple.c
@@ -449,19 +449,15 @@ vector_set(int x, int y, int w, int h)
449 root = evas_object_vg_root_node_get(d.vg); 449 root = evas_object_vg_root_node_get(d.vg);
450 //evas_vg_node_transformation_set(root, &matrix); 450 //evas_vg_node_transformation_set(root, &matrix);
451 451
452 Efl_VG *bg = NULL; 452 Efl_VG *bg = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "bg"));
453 eo_add(&bg, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(bg, "bg"));
454 _rect_add(bg, 0, 0 , vg_w, vg_h); 453 _rect_add(bg, 0, 0 , vg_w, vg_h);
455 evas_vg_node_origin_set(bg, 0,0); 454 evas_vg_node_origin_set(bg, 0,0);
456 evas_vg_shape_stroke_width_set(bg, 1.0); 455 evas_vg_shape_stroke_width_set(bg, 1.0);
457 evas_vg_node_color_set(bg, 80, 80, 80, 80); 456 evas_vg_node_color_set(bg, 80, 80, 80, 80);
458 457
459 Efl_VG *shape = NULL; 458 Efl_VG *shape = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "shape"));
460 eo_add(&shape, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(shape, "shape")); 459 Efl_VG *rgradient = eo_add(EFL_VG_GRADIENT_RADIAL_CLASS, NULL, efl_vg_name_set(eoid, "rgradient"));
461 Efl_VG *rgradient = NULL; 460 Efl_VG *lgradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, NULL, efl_vg_name_set(eoid, "lgradient"));
462 eo_add(&rgradient, EFL_VG_GRADIENT_RADIAL_CLASS, NULL, efl_vg_name_set(rgradient, "rgradient"));
463 Efl_VG *lgradient = NULL;
464 eo_add(&lgradient, EFL_VG_GRADIENT_LINEAR_CLASS, NULL, efl_vg_name_set(lgradient, "lgradient"));
465 461
466 _arcto(shape, 0, 0, 100, 100, 25, 330); 462 _arcto(shape, 0, 0, 100, 100, 25, 330);
467 463
@@ -502,8 +498,7 @@ vector_set(int x, int y, int w, int h)
502 evas_vg_node_color_set(shape, 0, 0, 255, 255); 498 evas_vg_node_color_set(shape, 0, 0, 255, 255);
503 evas_vg_shape_stroke_color_set(shape, 0, 0, 255, 128); 499 evas_vg_shape_stroke_color_set(shape, 0, 0, 255, 128);
504 500
505 Efl_VG *rect = NULL; 501 Efl_VG *rect = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "rect"));
506 eo_add(&rect, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(rect, "rect"));
507 _rect_add(rect, 0, 0, 100, 100); 502 _rect_add(rect, 0, 0, 100, 100);
508 evas_vg_node_origin_set(rect, 100, 100); 503 evas_vg_node_origin_set(rect, 100, 100);
509 evas_vg_shape_fill_set(rect, lgradient); 504 evas_vg_shape_fill_set(rect, lgradient);
@@ -511,8 +506,7 @@ vector_set(int x, int y, int w, int h)
511 evas_vg_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND); 506 evas_vg_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND);
512 evas_vg_shape_stroke_color_set(rect, 255, 255, 255, 255); 507 evas_vg_shape_stroke_color_set(rect, 255, 255, 255, 255);
513 508
514 Efl_VG *rect1 = NULL; 509 Efl_VG *rect1 = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "rect1"));
515 eo_add(&rect1, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(rect1, "rect1"));
516 _rect_add(rect1, 0, 0, 70, 70); 510 _rect_add(rect1, 0, 0, 70, 70);
517 evas_vg_node_origin_set(rect1, 50, 70); 511 evas_vg_node_origin_set(rect1, 50, 70);
518 evas_vg_shape_stroke_scale_set(rect1, 2); 512 evas_vg_shape_stroke_scale_set(rect1, 2);
@@ -520,8 +514,7 @@ vector_set(int x, int y, int w, int h)
520 evas_vg_shape_stroke_join_set(rect1, EFL_GFX_JOIN_ROUND); 514 evas_vg_shape_stroke_join_set(rect1, EFL_GFX_JOIN_ROUND);
521 evas_vg_shape_stroke_color_set(rect1, 0, 100, 80, 100); 515 evas_vg_shape_stroke_color_set(rect1, 0, 100, 80, 100);
522 516
523 Efl_VG *circle = NULL; 517 Efl_VG *circle = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "circle"));
524 eo_add(&circle, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(circle, "circle"));
525 _arcto(circle, 0, 0, 250, 100, 30, 300); 518 _arcto(circle, 0, 0, 250, 100, 30, 300);
526 evas_vg_shape_fill_set(circle, lgradient); 519 evas_vg_shape_fill_set(circle, lgradient);
527 //evas_vg_node_transformation_set(&matrix), 520 //evas_vg_node_transformation_set(&matrix),
@@ -529,30 +522,27 @@ vector_set(int x, int y, int w, int h)
529 evas_vg_node_color_set(circle, 50, 0, 0, 50); 522 evas_vg_node_color_set(circle, 50, 0, 0, 50);
530 523
531 // Foreground 524 // Foreground
532 Efl_VG *fg = NULL; 525 Efl_VG *fg = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "fg"));
533 eo_add(&fg, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(fg, "fg"));
534 _rect_add(fg, 0, 0, vg_w, vg_h); 526 _rect_add(fg, 0, 0, vg_w, vg_h);
535 evas_vg_node_origin_set(fg, 0, 0); 527 evas_vg_node_origin_set(fg, 0, 0);
536 evas_vg_shape_stroke_width_set(fg, 5.0); 528 evas_vg_shape_stroke_width_set(fg, 5.0);
537 evas_vg_shape_stroke_join_set(fg, EFL_GFX_JOIN_ROUND); 529 evas_vg_shape_stroke_join_set(fg, EFL_GFX_JOIN_ROUND);
538 evas_vg_shape_stroke_color_set(fg, 70, 70, 0, 70); 530 evas_vg_shape_stroke_color_set(fg, 70, 70, 0, 70);
539 531
540 Efl_VG *tst = NULL; 532 Efl_VG *tst = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "tst"));
541 eo_add(&tst, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(tst, "tst"));
542 evas_vg_shape_shape_append_rect(tst, 50, 25, 200, 200, 3, 5); 533 evas_vg_shape_shape_append_rect(tst, 50, 25, 200, 200, 3, 5);
543 evas_vg_node_color_set(tst, 0, 0, 200, 200); 534 evas_vg_node_color_set(tst, 0, 0, 200, 200);
544 evas_vg_shape_stroke_width_set(tst, 2); 535 evas_vg_shape_stroke_width_set(tst, 2);
545 evas_vg_shape_stroke_color_set(tst, 255, 0, 0, 255); 536 evas_vg_shape_stroke_color_set(tst, 255, 0, 0, 255);
546 537
547 Efl_VG *vc = NULL; 538 Efl_VG *vc = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "vc"));
548 eo_add(&vc, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(vc, "vc"));
549 evas_vg_shape_shape_append_circle(vc, 100, 100, 23); 539 evas_vg_shape_shape_append_circle(vc, 100, 100, 23);
550 evas_vg_node_color_set(vc, 0, 200, 0, 255); 540 evas_vg_node_color_set(vc, 0, 200, 0, 255);
551 evas_vg_shape_stroke_width_set(vc, 4); 541 evas_vg_shape_stroke_width_set(vc, 4);
552 evas_vg_shape_stroke_color_set(vc, 255, 0, 0, 255); 542 evas_vg_shape_stroke_color_set(vc, 255, 0, 0, 255);
553 543
554 eo_add(&beginning, EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(beginning, root)); 544 beginning = eo_add(EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(eoid, root));
555 eo_add(&end, EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(end, root)); 545 end = eo_add(EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(eoid, root));
556 546
557 circle = efl_vg_container_child_get(end, "circle"); 547 circle = efl_vg_container_child_get(end, "circle");
558 efl_vg_transformation_set(circle, &matrix); 548 efl_vg_transformation_set(circle, &matrix);
diff --git a/src/examples/evas/shooter/evas-3d-shooter-header.c b/src/examples/evas/shooter/evas-3d-shooter-header.c
index 8529746..ee608ba 100644
--- a/src/examples/evas/shooter/evas-3d-shooter-header.c
+++ b/src/examples/evas/shooter/evas-3d-shooter-header.c
@@ -26,11 +26,11 @@ _distance(float x1, float z1, float x2, float z2)
26void 26void
27_camera_setup(Scene_Data *data) 27_camera_setup(Scene_Data *data)
28{ 28{
29 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas); 29 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
30 evas_canvas3d_camera_projection_perspective_set(data->camera, 65.0, 1.0, 1.0, 300.0); 30 evas_canvas3d_camera_projection_perspective_set(data->camera, 65.0, 1.0, 1.0, 300.0);
31 31
32 eo_add(&data->mediator_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mediator_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 32 data->mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
33 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 33 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
34 34
35 evas_canvas3d_node_member_add(data->root_node, data->mediator_node); 35 evas_canvas3d_node_member_add(data->root_node, data->mediator_node);
36 evas_canvas3d_node_member_add(data->mediator_node, data->camera_node); 36 evas_canvas3d_node_member_add(data->mediator_node, data->camera_node);
@@ -43,14 +43,14 @@ _camera_setup(Scene_Data *data)
43void 43void
44_light_setup(Scene_Data *data) 44_light_setup(Scene_Data *data)
45{ 45{
46 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas); 46 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
47 47
48 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 48 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
49 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 49 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
50 evas_canvas3d_light_specular_set(data->light, 0.2, 0.2, 0.2, 1.0); 50 evas_canvas3d_light_specular_set(data->light, 0.2, 0.2, 0.2, 1.0);
51 evas_canvas3d_light_projection_perspective_set(data->light, 100.0, 1.0, 1.0, 200.0); 51 evas_canvas3d_light_projection_perspective_set(data->light, 100.0, 1.0, 1.0, 200.0);
52 52
53 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 53 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
54 54
55 evas_canvas3d_node_light_set(data->light_node, data->light); 55 evas_canvas3d_node_light_set(data->light_node, data->light);
56 evas_canvas3d_node_position_set(data->light_node, -30.0, 70.0, 0.0); 56 evas_canvas3d_node_position_set(data->light_node, -30.0, 70.0, 0.0);
diff --git a/src/examples/evas/shooter/evas-3d-shooter.c b/src/examples/evas/shooter/evas-3d-shooter.c
index 4acf990..2e83fd8 100644
--- a/src/examples/evas/shooter/evas-3d-shooter.c
+++ b/src/examples/evas/shooter/evas-3d-shooter.c
@@ -802,7 +802,7 @@ _mesh_setup_gun_planet(Scene_Data *data)
802 evas_canvas3d_node_position_set(data->mesh_node_column_c, 10, 9.0, -12); 802 evas_canvas3d_node_position_set(data->mesh_node_column_c, 10, 9.0, -12);
803 803
804 /* Setup mesh for bounding sphere */ 804 /* Setup mesh for bounding sphere */
805 eo_add(&data->material_ball, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 805 data->material_ball = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
806 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 806 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
807 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 807 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
808 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE); 808 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
@@ -811,7 +811,7 @@ _mesh_setup_gun_planet(Scene_Data *data)
811 evas_canvas3d_material_color_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 811 evas_canvas3d_material_color_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
812 evas_canvas3d_material_shininess_set(data->material_ball, 50.0); 812 evas_canvas3d_material_shininess_set(data->material_ball, 50.0);
813 813
814 eo_add(&data->mesh_ball, EVAS_CANVAS3D_MESH_CLASS, evas); 814 data->mesh_ball = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
815 815
816 _set_ball(data->mesh_ball, 10); 816 _set_ball(data->mesh_ball, 10);
817 817
@@ -865,7 +865,7 @@ _mesh_setup_column(Scene_Data *data, int index)
865{ 865{
866 /* Setup mesh for column */ 866 /* Setup mesh for column */
867 867
868 eo_add(&data->material_column, EVAS_CANVAS3D_MATERIAL_CLASS, evas); 868 data->material_column = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
869 869
870 evas_canvas3d_material_enable_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 870 evas_canvas3d_material_enable_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
871 evas_canvas3d_material_enable_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 871 evas_canvas3d_material_enable_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -886,7 +886,7 @@ _mesh_setup_column(Scene_Data *data, int index)
886 evas_canvas3d_mesh_shade_mode_set(data->mesh_column[index], EVAS_CANVAS3D_SHADE_MODE_PHONG); 886 evas_canvas3d_mesh_shade_mode_set(data->mesh_column[index], EVAS_CANVAS3D_SHADE_MODE_PHONG);
887 evas_canvas3d_mesh_frame_material_set(data->mesh_column[index], 0, data->material_column); 887 evas_canvas3d_mesh_frame_material_set(data->mesh_column[index], 0, data->material_column);
888 888
889 eo_add(&data->texture_diffuse_column, EVAS_CANVAS3D_TEXTURE_CLASS, evas); 889 data->texture_diffuse_column = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
890 890
891 evas_canvas3d_texture_file_set(data->texture_diffuse_column, red_brick_path, NULL); 891 evas_canvas3d_texture_file_set(data->texture_diffuse_column, red_brick_path, NULL);
892 evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_column, EINA_FALSE); 892 evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_column, EINA_FALSE);
@@ -991,20 +991,20 @@ _scene_setup(Scene_Data *data)
991 for (i = 0; i < 4; i++) 991 for (i = 0; i < 4; i++)
992 motion_vec[i] = 0; 992 motion_vec[i] = 0;
993 993
994 eo_add(&data->cube_primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 994 data->cube_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
995 evas_canvas3d_primitive_form_set(data->cube_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 995 evas_canvas3d_primitive_form_set(data->cube_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
996 evas_canvas3d_primitive_precision_set(data->cube_primitive, 10); 996 evas_canvas3d_primitive_precision_set(data->cube_primitive, 10);
997 997
998 eo_add(&data->sphere_primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 998 data->sphere_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
999 evas_canvas3d_primitive_form_set(data->sphere_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 999 evas_canvas3d_primitive_form_set(data->sphere_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
1000 evas_canvas3d_primitive_precision_set(data->sphere_primitive, 50); 1000 evas_canvas3d_primitive_precision_set(data->sphere_primitive, 50);
1001 1001
1002 eo_add(&global_scene, EVAS_CANVAS3D_SCENE_CLASS, evas); 1002 global_scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
1003 1003
1004 evas_canvas3d_scene_size_set(global_scene, WIDTH, HEIGHT); 1004 evas_canvas3d_scene_size_set(global_scene, WIDTH, HEIGHT);
1005 evas_canvas3d_scene_background_color_set(global_scene, 0.5, 0.5, 0.9, 0.0); 1005 evas_canvas3d_scene_background_color_set(global_scene, 0.5, 0.5, 0.9, 0.0);
1006 1006
1007 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE)); 1007 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
1008 1008
1009 _camera_setup(data); 1009 _camera_setup(data);
1010 _light_setup(data); 1010 _light_setup(data);
@@ -1014,7 +1014,7 @@ _scene_setup(Scene_Data *data)
1014 for (i = 0; i < 10; i++) 1014 for (i = 0; i < 10; i++)
1015 _mesh_setup_rocket(data, i); 1015 _mesh_setup_rocket(data, i);
1016 1016
1017 eo_add(&data->cylinder_primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 1017 data->cylinder_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
1018 evas_canvas3d_primitive_mode_set(data->cylinder_primitive, EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE); 1018 evas_canvas3d_primitive_mode_set(data->cylinder_primitive, EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE);
1019 evas_canvas3d_primitive_form_set(data->cylinder_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER); 1019 evas_canvas3d_primitive_form_set(data->cylinder_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER);
1020 evas_canvas3d_primitive_tex_scale_set(data->cylinder_primitive, 1.0, 1.0); 1020 evas_canvas3d_primitive_tex_scale_set(data->cylinder_primitive, 1.0, 1.0);
@@ -1069,7 +1069,7 @@ _scene_setup(Scene_Data *data)
1069 } 1069 }
1070 } 1070 }
1071 1071
1072 eo_add(&data->carp_mediator_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->carp_mediator_node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 1072 data->carp_mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
1073 1073
1074 evas_canvas3d_node_member_add(data->carp_mediator_node, data->mesh_node_carpet); 1074 evas_canvas3d_node_member_add(data->carp_mediator_node, data->mesh_node_carpet);
1075 1075
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index f2376ff..247612b 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -265,7 +265,7 @@ ecore_init(void)
265#if defined(GLIB_INTEGRATION_ALWAYS) 265#if defined(GLIB_INTEGRATION_ALWAYS)
266 if (_ecore_glib_always_integrate) ecore_main_loop_glib_integrate(); 266 if (_ecore_glib_always_integrate) ecore_main_loop_glib_integrate();
267#endif 267#endif
268 eo_add(&_ecore_parent, ECORE_PARENT_CLASS, NULL); 268 _ecore_parent = eo_add(ECORE_PARENT_CLASS, NULL);
269 269
270#if defined(HAVE_MALLINFO) || defined(HAVE_MALLOC_INFO) 270#if defined(HAVE_MALLINFO) || defined(HAVE_MALLOC_INFO)
271 if (getenv("ECORE_MEM_STAT")) 271 if (getenv("ECORE_MEM_STAT"))
diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c
index bddd7ce..d54e92f 100644
--- a/src/lib/ecore/ecore_anim.c
+++ b/src/lib/ecore/ecore_anim.c
@@ -372,7 +372,7 @@ ecore_animator_add(Ecore_Task_Cb func,
372{ 372{
373 Ecore_Animator *animator = NULL; 373 Ecore_Animator *animator = NULL;
374 374
375 eo_add(&animator, MY_CLASS, _ecore_parent, ecore_animator_constructor(animator, func, data)); 375 animator = eo_add(MY_CLASS, _ecore_parent, ecore_animator_constructor(eoid, func, data));
376 return animator; 376 return animator;
377} 377}
378 378
@@ -388,7 +388,7 @@ ecore_animator_timeline_add(double runtime,
388 const void *data) 388 const void *data)
389{ 389{
390 Ecore_Animator *animator; 390 Ecore_Animator *animator;
391 eo_add(&animator, MY_CLASS, _ecore_parent, ecore_animator_timeline_constructor(animator, runtime, func, data)); 391 animator = eo_add(MY_CLASS, _ecore_parent, ecore_animator_timeline_constructor(eoid, runtime, func, data));
392 return animator; 392 return animator;
393} 393}
394 394
diff --git a/src/lib/ecore/ecore_exe.c b/src/lib/ecore/ecore_exe.c
index bbb2d65..75c577b 100644
--- a/src/lib/ecore/ecore_exe.c
+++ b/src/lib/ecore/ecore_exe.c
@@ -67,8 +67,7 @@ ecore_exe_pipe_run(const char *exe_cmd,
67 Ecore_Exe_Flags flags, 67 Ecore_Exe_Flags flags,
68 const void *data) 68 const void *data)
69{ 69{
70 Ecore_Exe *ret = NULL; 70 Ecore_Exe *ret = eo_add(MY_CLASS, NULL, ecore_obj_exe_command_set(eoid, exe_cmd, flags));
71 eo_add(&ret, MY_CLASS, NULL, ecore_obj_exe_command_set(ret, exe_cmd, flags));
72 if (ret) 71 if (ret)
73 { 72 {
74 Ecore_Exe_Data *pd = eo_data_scope_get(ret, MY_CLASS); 73 Ecore_Exe_Data *pd = eo_data_scope_get(ret, MY_CLASS);
diff --git a/src/lib/ecore/ecore_idle_enterer.c b/src/lib/ecore/ecore_idle_enterer.c
index d985550..a7cbfa5 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,
61 const void *data) 61 const void *data)
62{ 62{
63 Ecore_Idle_Enterer *ie = NULL; 63 Ecore_Idle_Enterer *ie = NULL;
64 eo_add(&ie, MY_CLASS, _ecore_parent, ecore_idle_enterer_after_constructor(ie, func, data)); 64 ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_after_constructor(eoid, func, data));
65 return ie; 65 return ie;
66} 66}
67 67
@@ -78,7 +78,7 @@ ecore_idle_enterer_before_add(Ecore_Task_Cb func,
78 const void *data) 78 const void *data)
79{ 79{
80 Ecore_Idle_Enterer *ie = NULL; 80 Ecore_Idle_Enterer *ie = NULL;
81 eo_add(&ie, MY_CLASS, _ecore_parent, ecore_idle_enterer_before_constructor(ie, func, data)); 81 ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_before_constructor(eoid, func, data));
82 return ie; 82 return ie;
83} 83}
84 84
diff --git a/src/lib/ecore/ecore_idle_exiter.c b/src/lib/ecore/ecore_idle_exiter.c
index 483f8df..5074b13 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,
37 const void *data) 37 const void *data)
38{ 38{
39 Ecore_Idle_Exiter *ie = NULL; 39 Ecore_Idle_Exiter *ie = NULL;
40 eo_add(&ie, MY_CLASS, _ecore_parent, ecore_idle_exiter_constructor(ie, func, data)); 40 ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_exiter_constructor(eoid, func, data));
41 return ie; 41 return ie;
42} 42}
43 43
diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c
index 00d60fb..f68d424 100644
--- a/src/lib/ecore/ecore_idler.c
+++ b/src/lib/ecore/ecore_idler.c
@@ -35,8 +35,7 @@ EAPI Ecore_Idler *
35ecore_idler_add(Ecore_Task_Cb func, 35ecore_idler_add(Ecore_Task_Cb func,
36 const void *data) 36 const void *data)
37{ 37{
38 Eo *ret = NULL; 38 return eo_add(MY_CLASS, _ecore_parent, ecore_idler_constructor(eoid, func, data));
39 return eo_add(&ret, MY_CLASS, _ecore_parent, ecore_idler_constructor(ret, func, data));
40} 39}
41 40
42EOLIAN static void 41EOLIAN static void
diff --git a/src/lib/ecore/ecore_job.c b/src/lib/ecore/ecore_job.c
index a9c4df5..1f459c7 100644
--- a/src/lib/ecore/ecore_job.c
+++ b/src/lib/ecore/ecore_job.c
@@ -49,8 +49,7 @@ EAPI Ecore_Job *
49ecore_job_add(Ecore_Cb func, 49ecore_job_add(Ecore_Cb func,
50 const void *data) 50 const void *data)
51{ 51{
52 Ecore_Job *job = NULL; 52 Ecore_Job *job = eo_add(MY_CLASS, _ecore_parent, ecore_job_constructor(eoid, func, data));
53 eo_add(&job, MY_CLASS, _ecore_parent, ecore_job_constructor(job, func, data));
54 return job; 53 return job;
55} 54}
56 55
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index d0b9a25..8175e63 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -2713,7 +2713,7 @@ EAPI Eo *ecore_main_loop_get(void)
2713{ 2713{
2714 if (!_mainloop_singleton) 2714 if (!_mainloop_singleton)
2715 { 2715 {
2716 eo_add(&_mainloop_singleton, ECORE_MAINLOOP_CLASS, NULL); 2716 _mainloop_singleton = eo_add(ECORE_MAINLOOP_CLASS, NULL);
2717 } 2717 }
2718 2718
2719 return _mainloop_singleton; 2719 return _mainloop_singleton;
diff --git a/src/lib/ecore/ecore_poller.c b/src/lib/ecore/ecore_poller.c
index 9b0b9a8..79f2a78 100644
--- a/src/lib/ecore/ecore_poller.c
+++ b/src/lib/ecore/ecore_poller.c
@@ -237,7 +237,7 @@ ecore_poller_add(Ecore_Poller_Type type EINA_UNUSED,
237 const void *data) 237 const void *data)
238{ 238{
239 Ecore_Poller *poller; 239 Ecore_Poller *poller;
240 eo_add(&poller, MY_CLASS, _ecore_parent, ecore_poller_constructor(poller, type, interval, func, data)); 240 poller = eo_add(MY_CLASS, _ecore_parent, ecore_poller_constructor(eoid, type, interval, func, data));
241 return poller; 241 return poller;
242} 242}
243 243
diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c
index 2c33648..7343a7f 100644
--- a/src/lib/ecore/ecore_timer.c
+++ b/src/lib/ecore/ecore_timer.c
@@ -93,7 +93,7 @@ ecore_timer_add(double in,
93 Ecore_Timer *timer = NULL; 93 Ecore_Timer *timer = NULL;
94 94
95 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); 95 EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
96 eo_add(&timer, MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(timer, in, func, data)); 96 timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(eoid, in, func, data));
97 return timer; 97 return timer;
98} 98}
99 99
@@ -357,7 +357,7 @@ _ecore_timer_loop_add(double in,
357 const void *data) 357 const void *data)
358{ 358{
359 Ecore_Timer *timer = NULL; 359 Ecore_Timer *timer = NULL;
360 eo_add(&timer, MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(timer, in, func, data)); 360 timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(eoid, in, func, data));
361 361
362 return timer; 362 return timer;
363} 363}
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 2bfca03..ba1a575 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -305,7 +305,7 @@ _efl_network_base_lookup(Eo *kls_obj EINA_UNUSED, void *pd EINA_UNUSED, const ch
305 if (!name || !done_cb) 305 if (!name || !done_cb)
306 return EINA_FALSE; 306 return EINA_FALSE;
307 307
308 eo_add(&obj, EFL_NETWORK_CONNECTOR_CLASS, NULL, efl_network_server_connection_type_set(obj, ECORE_CON_REMOTE_TCP), efl_network_server_name_set(obj, name), efl_network_base_port_set(obj, 1025)); 308 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));
309 309
310 lk = malloc(sizeof (Ecore_Con_Lookup)); 310 lk = malloc(sizeof (Ecore_Con_Lookup));
311 if (!lk) 311 if (!lk)
@@ -359,7 +359,7 @@ ecore_con_server_add(Ecore_Con_Type compl_type,
359 359
360 /* local system socket: FILE: /tmp/.ecore_service|[name]|[port] */ 360 /* local system socket: FILE: /tmp/.ecore_service|[name]|[port] */
361 /* remote system socket: TCP/IP: [name]:[port] */ 361 /* remote system socket: TCP/IP: [name]:[port] */
362 eo_add(&obj, EFL_NETWORK_SERVER_CLASS, NULL, efl_network_server_connection_type_set(obj, compl_type), efl_network_server_name_set(obj, name), efl_network_base_port_set(obj, port)); 362 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));
363 363
364 ecore_con_server_data_set(obj, (void *) data); 364 ecore_con_server_data_set(obj, (void *) data);
365 365
@@ -455,7 +455,7 @@ ecore_con_server_connect(Ecore_Con_Type compl_type,
455 /* local user socket: FILE: ~/.ecore/[name]/[port] */ 455 /* local user socket: FILE: ~/.ecore/[name]/[port] */
456 /* local system socket: FILE: /tmp/.ecore_service|[name]|[port] */ 456 /* local system socket: FILE: /tmp/.ecore_service|[name]|[port] */
457 /* remote system socket: TCP/IP: [name]:[port] */ 457 /* remote system socket: TCP/IP: [name]:[port] */
458 eo_add(&obj, EFL_NETWORK_CONNECTOR_CLASS, NULL, efl_network_server_connection_type_set(obj, compl_type), efl_network_server_name_set(obj, name), efl_network_base_port_set(obj, port)); 458 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));
459 459
460 ecore_con_server_data_set(obj, (void *) data); 460 ecore_con_server_data_set(obj, (void *) data);
461 461
@@ -2056,7 +2056,7 @@ _ecore_con_svr_tcp_handler(void *data,
2056 2056
2057 /* a new client */ 2057 /* a new client */
2058 2058
2059 eo_add(&obj, EFL_NETWORK_CLIENT_CLASS, NULL); 2059 obj = eo_add(EFL_NETWORK_CLIENT_CLASS, NULL);
2060 Efl_Network_Client_Data *cl = eo_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS); 2060 Efl_Network_Client_Data *cl = eo_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS);
2061 if (!cl) 2061 if (!cl)
2062 { 2062 {
@@ -2331,7 +2331,7 @@ _ecore_con_svr_udp_handler(void *data,
2331 } 2331 }
2332 2332
2333/* Create a new client for use in the client data event */ 2333/* Create a new client for use in the client data event */
2334 eo_add(&obj, EFL_NETWORK_CLIENT_CLASS, NULL); 2334 obj = eo_add(EFL_NETWORK_CLIENT_CLASS, NULL);
2335 Efl_Network_Client_Data *cl = eo_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS); 2335 Efl_Network_Client_Data *cl = eo_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS);
2336 EINA_SAFETY_ON_NULL_RETURN_VAL(cl, ECORE_CALLBACK_RENEW); 2336 EINA_SAFETY_ON_NULL_RETURN_VAL(cl, ECORE_CALLBACK_RENEW);
2337 2337
diff --git a/src/lib/ecore_con/ecore_con_eet.c b/src/lib/ecore_con/ecore_con_eet.c
index a652636..59a5b21 100644
--- a/src/lib/ecore_con/ecore_con_eet.c
+++ b/src/lib/ecore_con/ecore_con_eet.c
@@ -722,7 +722,7 @@ ecore_con_eet_server_new(Ecore_Con_Server *server)
722 722
723 if (!server) return NULL; 723 if (!server) return NULL;
724 724
725 eo_add(&ece_obj, ECORE_CON_EET_SERVER_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(ece_obj, server)); 725 ece_obj = eo_add(ECORE_CON_EET_SERVER_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(eoid, server));
726 726
727 return ece_obj; 727 return ece_obj;
728} 728}
@@ -734,7 +734,7 @@ ecore_con_eet_client_new(Ecore_Con_Server *server)
734 734
735 if (!server) return NULL; 735 if (!server) return NULL;
736 736
737 eo_add(&ece_obj, ECORE_CON_EET_CLIENT_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(ece_obj, server)); 737 ece_obj = eo_add(ECORE_CON_EET_CLIENT_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(eoid, server));
738 738
739 return ece_obj; 739 return ece_obj;
740} 740}
diff --git a/src/lib/ecore_con/ecore_con_local_win32.c b/src/lib/ecore_con/ecore_con_local_win32.c
index 9ab9b96..75d71c0 100644
--- a/src/lib/ecore_con/ecore_con_local_win32.c
+++ b/src/lib/ecore_con/ecore_con_local_win32.c
@@ -286,8 +286,7 @@ _ecore_con_local_win32_client_add(void *data, Ecore_Win32_Handler *wh)
286 (svr->client_count >= (unsigned int)svr->client_limit)) 286 (svr->client_count >= (unsigned int)svr->client_limit))
287 return ECORE_CALLBACK_CANCEL; 287 return ECORE_CALLBACK_CANCEL;
288 288
289 Ecore_Con_Client *cl_obj = NULL; 289 Ecore_Con_Client *cl_obj = eo_add(EFL_NETWORK_CLIENT_CLASS, NULL);
290 eo_add(&cl_obj, EFL_NETWORK_CLIENT_CLASS, NULL);
291 Efl_Network_Client_Data *cl = eo_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS); 290 Efl_Network_Client_Data *cl = eo_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS);
292 if (!cl) 291 if (!cl)
293 { 292 {
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index 3f12718..000bf4d 100644
--- a/src/lib/ecore_con/ecore_con_url.c
+++ b/src/lib/ecore_con/ecore_con_url.c
@@ -225,7 +225,7 @@ EAPI Ecore_Con_Url *
225ecore_con_url_new(const char *url) 225ecore_con_url_new(const char *url)
226{ 226{
227 Ecore_Con_Url *url_obj; 227 Ecore_Con_Url *url_obj;
228 eo_add(&url_obj, EFL_NETWORK_URL_CLASS, NULL, efl_network_url_set(url_obj, url)); 228 url_obj = eo_add(EFL_NETWORK_URL_CLASS, NULL, efl_network_url_set(eoid, url));
229 229
230 eo_event_callback_array_add(url_obj, efl_network_url_event_table_callbacks(), NULL); 230 eo_event_callback_array_add(url_obj, efl_network_url_event_table_callbacks(), NULL);
231 231
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index fe3764a..8b19443 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -4748,7 +4748,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4748 case EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE: 4748 case EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE:
4749 { 4749 {
4750 Eo *primitive = NULL; 4750 Eo *primitive = NULL;
4751 eo_add(&primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base->evas); 4751 primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base->evas);
4752 evas_canvas3d_primitive_form_set(primitive, pd_mesh_node->mesh_node.mesh.primitive); 4752 evas_canvas3d_primitive_form_set(primitive, pd_mesh_node->mesh_node.mesh.primitive);
4753 4753
4754 frame_exist = evas_canvas3d_mesh_frame_exist(mesh, pf->type.node.frame); 4754 frame_exist = evas_canvas3d_mesh_frame_exist(mesh, pf->type.node.frame);
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index d6b4608..3934392 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -231,7 +231,7 @@ EAPI Evas_Object *
231edje_edit_object_add(Evas *evas) 231edje_edit_object_add(Evas *evas)
232{ 232{
233 Evas_Object *e; 233 Evas_Object *e;
234 eo_add(&e, MY_CLASS, evas); 234 e = eo_add(MY_CLASS, evas);
235 return e; 235 return e;
236} 236}
237 237
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index 490ba17..ba164b7 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -793,9 +793,9 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
793 Evas_Canvas3D_Material *material = NULL; 793 Evas_Canvas3D_Material *material = NULL;
794 Edje_Part_Description_Mesh_Node *pd_mesh_node; 794 Edje_Part_Description_Mesh_Node *pd_mesh_node;
795 795
796 eo_add(&rp->node, EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(rp->node, EVAS_CANVAS3D_NODE_TYPE_MESH)); 796 rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
797 797
798 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, ed->base->evas); 798 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, ed->base->evas);
799 evas_canvas3d_node_mesh_add(rp->node, mesh); 799 evas_canvas3d_node_mesh_add(rp->node, mesh);
800 800
801 pd_mesh_node = (Edje_Part_Description_Mesh_Node*) rp->chosen_description; 801 pd_mesh_node = (Edje_Part_Description_Mesh_Node*) rp->chosen_description;
@@ -809,13 +809,13 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
809 evas_canvas3d_mesh_frame_add(mesh, 0); 809 evas_canvas3d_mesh_frame_add(mesh, 0);
810 } 810 }
811 811
812 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, ed->base->evas); 812 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, ed->base->evas);
813 evas_canvas3d_mesh_frame_material_set(mesh, 0, material); 813 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
814 if (pd_mesh_node->mesh_node.texture.need_texture && pd_mesh_node->mesh_node.texture.textured) 814 if (pd_mesh_node->mesh_node.texture.need_texture && pd_mesh_node->mesh_node.texture.textured)
815 { 815 {
816 Evas_Canvas3D_Texture *texture = NULL; 816 Evas_Canvas3D_Texture *texture = NULL;
817 817
818 eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, ed->base->evas); 818 texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, ed->base->evas);
819 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture); 819 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
820 } 820 }
821 rp->object = NULL; 821 rp->object = NULL;
@@ -826,8 +826,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
826 { 826 {
827 Evas_Canvas3D_Light *light = NULL; 827 Evas_Canvas3D_Light *light = NULL;
828 828
829 eo_add(&rp->node, EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(rp->node, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 829 rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
830 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, ed->base->evas); 830 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, ed->base->evas);
831 evas_canvas3d_node_light_set(rp->node, light); 831 evas_canvas3d_node_light_set(rp->node, light);
832 832
833 rp->object = NULL; 833 rp->object = NULL;
@@ -838,8 +838,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
838 { 838 {
839 Evas_Canvas3D_Camera *camera = NULL; 839 Evas_Canvas3D_Camera *camera = NULL;
840 840
841 eo_add(&rp->node, EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(rp->node, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 841 rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
842 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, ed->base->evas); 842 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, ed->base->evas);
843 evas_canvas3d_node_camera_set(rp->node, camera); 843 evas_canvas3d_node_camera_set(rp->node, camera);
844 844
845 rp->object = evas_object_image_filled_add(ed->base->evas); 845 rp->object = evas_object_image_filled_add(ed->base->evas);
diff --git a/src/lib/edje/edje_multisense.c b/src/lib/edje/edje_multisense.c
index 8b6f2fa..df98157 100644
--- a/src/lib/edje/edje_multisense.c
+++ b/src/lib/edje/edje_multisense.c
@@ -202,13 +202,13 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
202 eet_data->vio.tell = eet_snd_file_tell; 202 eet_data->vio.tell = eet_snd_file_tell;
203 eet_data->offset = 0; 203 eet_data->offset = 0;
204 204
205 eo_add(&in, ECORE_AUDIO_IN_SNDFILE_CLASS, NULL, ecore_audio_obj_name_set(in, snd_id_str), ecore_audio_obj_in_speed_set(in, speed), ecore_audio_obj_vio_set(in, &eet_data->vio, eet_data, _free), eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL)); 205 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));
206 if (!out) 206 if (!out)
207 { 207 {
208#if HAVE_COREAUDIO 208#if HAVE_COREAUDIO
209 eo_add(&out, ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL); 209 out = eo_add(ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
210#elif HAVE_PULSE 210#elif HAVE_PULSE
211 eo_add(&out, ECORE_AUDIO_OUT_PULSE_CLASS, NULL, eo_event_callback_add(out, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL)); 211 out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, eo_event_callback_add(eoid, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
212#endif 212#endif
213 if (out) outs++; 213 if (out) outs++;
214 } 214 }
@@ -269,7 +269,7 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
269 tone = &ed->file->sound_dir->tones[i]; 269 tone = &ed->file->sound_dir->tones[i];
270 if (!strcmp(tone->name, tone_name)) 270 if (!strcmp(tone->name, tone_name))
271 { 271 {
272 eo_add(&in, ECORE_AUDIO_IN_TONE_CLASS, NULL); 272 in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
273 ecore_audio_obj_name_set(in, "tone"); 273 ecore_audio_obj_name_set(in, "tone");
274 eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &tone->value); 274 eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &tone->value);
275 ecore_audio_obj_in_length_set(in, duration); 275 ecore_audio_obj_in_length_set(in, duration);
@@ -278,9 +278,9 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
278 if (!out) 278 if (!out)
279 { 279 {
280#if HAVE_COREAUDIO 280#if HAVE_COREAUDIO
281 eo_add(&out, ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL); 281 out = eo_add(ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
282#elif HAVE_PULSE 282#elif HAVE_PULSE
283 eo_add(&out, ECORE_AUDIO_OUT_PULSE_CLASS, NULL, eo_event_callback_add(out, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL)); 283 out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, eo_event_callback_add(eoid, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
284#endif 284#endif
285 if (out) outs++; 285 if (out) outs++;
286 } 286 }
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index eb5a9cb..ab42445 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -20,7 +20,7 @@ edje_object_add(Evas *evas)
20{ 20{
21 Evas_Object *e; 21 Evas_Object *e;
22 EINA_SAFETY_ON_NULL_RETURN_VAL(evas, NULL); 22 EINA_SAFETY_ON_NULL_RETURN_VAL(evas, NULL);
23 eo_add(&e, MY_CLASS, evas); 23 e = eo_add(MY_CLASS, evas);
24 return e; 24 return e;
25} 25}
26 26
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index 91235d2..1d96750 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -147,7 +147,7 @@ _efl_model_evt_added_ecore_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void
147 Efl_Model_Children_Event cevt; 147 Efl_Model_Children_Event cevt;
148 Eina_Value path; 148 Eina_Value path;
149 149
150 eo_add_ref(&cevt.child, EIO_MODEL_CLASS, priv->obj, eio_model_path_set(cevt.child, evt->filename)); 150 cevt.child = eo_add_ref(EIO_MODEL_CLASS, priv->obj, eio_model_path_set(eoid, evt->filename));
151 priv->children_list = eina_list_append(priv->children_list, cevt.child); 151 priv->children_list = eina_list_append(priv->children_list, cevt.child);
152 cevt.index = eina_list_count(priv->children_list); 152 cevt.index = eina_list_count(priv->children_list);
153 153
@@ -407,7 +407,7 @@ _eio_main_children_load_cb(void *data, Eio_File *handler EINA_UNUSED, const Eina
407 Eio_Model_Data *priv = data; 407 Eio_Model_Data *priv = data;
408 EINA_SAFETY_ON_NULL_RETURN(priv); 408 EINA_SAFETY_ON_NULL_RETURN(priv);
409 409
410 eo_add(&child, MY_CLASS, NULL, eio_model_path_set(child, info->path)); 410 child = eo_add(MY_CLASS, NULL, eio_model_path_set(eoid, info->path));
411 eina_spinlock_take(&priv->filter_lock); 411 eina_spinlock_take(&priv->filter_lock);
412 if (priv->filter_cb) 412 if (priv->filter_cb)
413 eio_model_children_filter_set(child, priv->filter_cb, priv->filter_userdata); 413 eio_model_children_filter_set(child, priv->filter_cb, priv->filter_userdata);
@@ -523,8 +523,7 @@ _eio_model_children_filter_set(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, Eio_Fi
523static Eo * 523static Eo *
524_eio_model_efl_model_base_child_add(Eo *obj EINA_UNUSED, Eio_Model_Data *priv EINA_UNUSED) 524_eio_model_efl_model_base_child_add(Eo *obj EINA_UNUSED, Eio_Model_Data *priv EINA_UNUSED)
525{ 525{
526 Eo *ret = NULL; 526 return eo_add(EIO_MODEL_CLASS, obj);
527 return eo_add(&ret, EIO_MODEL_CLASS, obj);
528} 527}
529 528
530static void 529static void
diff --git a/src/lib/eldbus/eldbus_model_connection.c b/src/lib/eldbus/eldbus_model_connection.c
index af7e9eb..ebd758b 100644
--- a/src/lib/eldbus/eldbus_model_connection.c
+++ b/src/lib/eldbus/eldbus_model_connection.c
@@ -345,8 +345,7 @@ _eldbus_model_connection_names_list_cb(void *data,
345 { 345 {
346 DBG("(%p): bus = %s", pd->obj, bus); 346 DBG("(%p): bus = %s", pd->obj, bus);
347 347
348 Eo *child = NULL; 348 Eo *child = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_connection_constructor(eoid, pd->connection, bus, "/"));
349 eo_add(&child, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_connection_constructor(child, pd->connection, bus, "/"));
350 349
351 pd->children_list = eina_list_append(pd->children_list, child); 350 pd->children_list = eina_list_append(pd->children_list, child);
352 } 351 }
diff --git a/src/lib/eldbus/eldbus_model_object.c b/src/lib/eldbus/eldbus_model_object.c
index 697a759..240d657e7 100644
--- a/src/lib/eldbus/eldbus_model_object.c
+++ b/src/lib/eldbus/eldbus_model_object.c
@@ -532,7 +532,7 @@ _eldbus_model_object_create_children(Eldbus_Model_Object_Data *pd, Eldbus_Object
532 WRN("(%p) Creating child: bus = %s, path = %s, interface = %s", pd->obj, pd->bus, current_path, interface->name); 532 WRN("(%p) Creating child: bus = %s, path = %s, interface = %s", pd->obj, pd->bus, current_path, interface->name);
533 533
534 // TODO: increment reference to keep 'interface' in memory 534 // TODO: increment reference to keep 'interface' in memory
535 eo_add_ref(&child, ELDBUS_MODEL_PROXY_CLASS, NULL, eldbus_model_proxy_constructor(child, object, interface)); 535 child = eo_add_ref(ELDBUS_MODEL_PROXY_CLASS, NULL, eldbus_model_proxy_constructor(eoid, object, interface));
536 536
537 pd->children_list = eina_list_append(pd->children_list, child); 537 pd->children_list = eina_list_append(pd->children_list, child);
538 } 538 }
diff --git a/src/lib/eldbus/eldbus_model_proxy.c b/src/lib/eldbus/eldbus_model_proxy.c
index d2a3c80..2e660f4 100644
--- a/src/lib/eldbus/eldbus_model_proxy.c
+++ b/src/lib/eldbus/eldbus_model_proxy.c
@@ -325,7 +325,7 @@ _eldbus_model_proxy_create_methods_children(Eldbus_Model_Proxy_Data *pd)
325 325
326 INF("(%p) Creating method child: bus = %s, path = %s, method = %s::%s", pd->obj, bus, path, interface_name, method_name); 326 INF("(%p) Creating method child: bus = %s, path = %s, method = %s::%s", pd->obj, bus, path, interface_name, method_name);
327 327
328 eo_add(&child, ELDBUS_MODEL_METHOD_CLASS, NULL, eldbus_model_method_constructor(child, pd->proxy, method)); 328 child = eo_add(ELDBUS_MODEL_METHOD_CLASS, NULL, eldbus_model_method_constructor(eoid, pd->proxy, method));
329 329
330 pd->children_list = eina_list_append(pd->children_list, child); 330 pd->children_list = eina_list_append(pd->children_list, child);
331 } 331 }
@@ -359,7 +359,7 @@ _eldbus_model_proxy_create_signals_children(Eldbus_Model_Proxy_Data *pd)
359 359
360 DBG("(%p) Creating signal child: bus = %s, path = %s, signal = %s::%s", pd->obj, bus, path, interface_name, signal_name); 360 DBG("(%p) Creating signal child: bus = %s, path = %s, signal = %s::%s", pd->obj, bus, path, interface_name, signal_name);
361 361
362 eo_add(&child, ELDBUS_MODEL_SIGNAL_CLASS, NULL, eldbus_model_signal_constructor(child, pd->proxy, signal)); 362 child = eo_add(ELDBUS_MODEL_SIGNAL_CLASS, NULL, eldbus_model_signal_constructor(eoid, pd->proxy, signal));
363 363
364 pd->children_list = eina_list_append(pd->children_list, child); 364 pd->children_list = eina_list_append(pd->children_list, child);
365 } 365 }
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index 5e7afa2..d0b0f32 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -236,7 +236,7 @@ EAPI Evas_Object *
236emotion_object_add(Evas *evas) 236emotion_object_add(Evas *evas)
237{ 237{
238 Evas_Object *e; 238 Evas_Object *e;
239 eo_add(&e, MY_CLASS, evas); 239 e = eo_add(MY_CLASS, evas);
240 return e; 240 return e;
241} 241}
242 242
diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index 9163047..6f2108f 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -1681,8 +1681,7 @@ EAPI Evas_Object *evas_object_rectangle_add(Evas *e) EINA_WARN_UNUSED_RESULT EIN
1681 * @code 1681 * @code
1682 * vector = evas_object_vg_add(canvas); 1682 * vector = evas_object_vg_add(canvas);
1683 * root = evas_obj_vg_root_node_get(vector); 1683 * root = evas_obj_vg_root_node_get(vector);
1684 * shape = NULL; 1684 * shape = eo_add(EVAS_VG_SHAPE_CLASS, root);
1685 eo_add(&shape, EVAS_VG_SHAPE_CLASS, root);
1686 * Efl_Gfx_Path_Command *path_cmd = NULL; 1685 * Efl_Gfx_Path_Command *path_cmd = NULL;
1687 * double *points = NULL; 1686 * double *points = NULL;
1688 * efl_gfx_path_append_circle(&path_cmd, &points); 1687 * efl_gfx_path_append_circle(&path_cmd, &points);
diff --git a/src/lib/evas/canvas/evas_canvas3d_camera.c b/src/lib/evas/canvas/evas_canvas3d_camera.c
index 9b1fc6c..d631df6 100644
--- a/src/lib/evas/canvas/evas_canvas3d_camera.c
+++ b/src/lib/evas/canvas/evas_canvas3d_camera.c
@@ -101,8 +101,7 @@ evas_canvas3d_camera_add(Evas *e)
101 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 101 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
102 return NULL; 102 return NULL;
103 MAGIC_CHECK_END(); 103 MAGIC_CHECK_END();
104 Evas_Object *eo_obj = NULL; 104 Evas_Object *eo_obj = eo_add(MY_CLASS, e);
105 eo_add(&eo_obj, MY_CLASS, e);
106 return eo_obj; 105 return eo_obj;
107} 106}
108 107
diff --git a/src/lib/evas/canvas/evas_canvas3d_light.c b/src/lib/evas/canvas/evas_canvas3d_light.c
index b9b186f..11e9c81 100644
--- a/src/lib/evas/canvas/evas_canvas3d_light.c
+++ b/src/lib/evas/canvas/evas_canvas3d_light.c
@@ -72,8 +72,7 @@ evas_canvas3d_light_add(Evas *e)
72 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 72 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
73 return NULL; 73 return NULL;
74 MAGIC_CHECK_END(); 74 MAGIC_CHECK_END();
75 Evas_Object *eo_obj = NULL; 75 Evas_Object *eo_obj = eo_add(MY_CLASS, e);
76 eo_add(&eo_obj, MY_CLASS, e);
77 return eo_obj; 76 return eo_obj;
78} 77}
79 78
diff --git a/src/lib/evas/canvas/evas_canvas3d_material.c b/src/lib/evas/canvas/evas_canvas3d_material.c
index 98a4e66..5070d44 100644
--- a/src/lib/evas/canvas/evas_canvas3d_material.c
+++ b/src/lib/evas/canvas/evas_canvas3d_material.c
@@ -84,8 +84,7 @@ evas_canvas3d_material_add(Evas *e)
84 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 84 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
85 return NULL; 85 return NULL;
86 MAGIC_CHECK_END(); 86 MAGIC_CHECK_END();
87 Evas_Object *eo_obj = NULL; 87 Evas_Object *eo_obj = eo_add(MY_CLASS, e);
88 eo_add(&eo_obj, MY_CLASS, e);
89 return eo_obj; 88 return eo_obj;
90} 89}
91 90
diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.c b/src/lib/evas/canvas/evas_canvas3d_mesh.c
index 5442eca..d19a1fc 100644
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.c
+++ b/src/lib/evas/canvas/evas_canvas3d_mesh.c
@@ -254,8 +254,7 @@ evas_canvas3d_mesh_add(Evas *e)
254 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 254 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
255 return NULL; 255 return NULL;
256 MAGIC_CHECK_END(); 256 MAGIC_CHECK_END();
257 Evas_Object *eo_obj = NULL; 257 Evas_Object *eo_obj = eo_add(MY_CLASS, e);
258 eo_add(&eo_obj, MY_CLASS, e);
259 return eo_obj; 258 return eo_obj;
260} 259}
261 260
diff --git a/src/lib/evas/canvas/evas_canvas3d_node.c b/src/lib/evas/canvas/evas_canvas3d_node.c
index 246450f..5e0944d 100644
--- a/src/lib/evas/canvas/evas_canvas3d_node.c
+++ b/src/lib/evas/canvas/evas_canvas3d_node.c
@@ -1012,8 +1012,7 @@ evas_canvas3d_node_add(Evas *e, Evas_Canvas3D_Node_Type type)
1012 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 1012 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1013 return NULL; 1013 return NULL;
1014 MAGIC_CHECK_END(); 1014 MAGIC_CHECK_END();
1015 Evas_Object *eo_obj = NULL; 1015 Evas_Object *eo_obj = eo_add(MY_CLASS, e, evas_canvas3d_node_constructor(eoid, type));
1016 eo_add(&eo_obj, MY_CLASS, e, evas_canvas3d_node_constructor(eo_obj, type));
1017 return eo_obj; 1016 return eo_obj;
1018} 1017}
1019 1018
diff --git a/src/lib/evas/canvas/evas_canvas3d_primitive.c b/src/lib/evas/canvas/evas_canvas3d_primitive.c
index ab07d13..76dcdd6 100644
--- a/src/lib/evas/canvas/evas_canvas3d_primitive.c
+++ b/src/lib/evas/canvas/evas_canvas3d_primitive.c
@@ -20,8 +20,7 @@ evas_canvas3d_primitive_add(Evas *e)
20 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 20 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
21 return NULL; 21 return NULL;
22 MAGIC_CHECK_END(); 22 MAGIC_CHECK_END();
23 Evas_Object *eo_obj = NULL; 23 Evas_Object *eo_obj = eo_add(MY_CLASS, e);
24 eo_add(&eo_obj, MY_CLASS, e);
25 return eo_obj; 24 return eo_obj;
26} 25}
27 26
diff --git a/src/lib/evas/canvas/evas_canvas3d_scene.c b/src/lib/evas/canvas/evas_canvas3d_scene.c
index e1a0295..cb7ffc3 100644
--- a/src/lib/evas/canvas/evas_canvas3d_scene.c
+++ b/src/lib/evas/canvas/evas_canvas3d_scene.c
@@ -61,8 +61,7 @@ evas_canvas3d_scene_add(Evas *e)
61 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 61 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
62 return NULL; 62 return NULL;
63 MAGIC_CHECK_END(); 63 MAGIC_CHECK_END();
64 Evas_Object *eo_obj = NULL; 64 Evas_Object *eo_obj = eo_add(MY_CLASS, e);
65 eo_add(&eo_obj, MY_CLASS, e);
66 return eo_obj; 65 return eo_obj;
67} 66}
68 67
diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.c b/src/lib/evas/canvas/evas_canvas3d_texture.c
index b058765..664de1c 100644
--- a/src/lib/evas/canvas/evas_canvas3d_texture.c
+++ b/src/lib/evas/canvas/evas_canvas3d_texture.c
@@ -313,8 +313,7 @@ evas_canvas3d_texture_add(Evas *e)
313 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 313 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
314 return NULL; 314 return NULL;
315 MAGIC_CHECK_END(); 315 MAGIC_CHECK_END();
316 Evas_Object *eo_obj = NULL; 316 Evas_Object *eo_obj = eo_add(MY_CLASS, e);
317 eo_add(&eo_obj, MY_CLASS, e);
318 return eo_obj; 317 return eo_obj;
319} 318}
320 319
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 56956a7..38e901a 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -151,8 +151,7 @@ evas_shutdown(void)
151EAPI Evas * 151EAPI Evas *
152evas_new(void) 152evas_new(void)
153{ 153{
154 Evas_Object *eo_obj = NULL; 154 Evas_Object *eo_obj = eo_add(EVAS_CANVAS_CLASS, NULL);
155 eo_add(&eo_obj, EVAS_CANVAS_CLASS, NULL);
156 return eo_obj; 155 return eo_obj;
157} 156}
158 157
diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c
index 739012e..55e7ca5 100644
--- a/src/lib/evas/canvas/evas_object_box.c
+++ b/src/lib/evas/canvas/evas_object_box.c
@@ -458,8 +458,7 @@ evas_object_box_add(Evas *evas)
458 MAGIC_CHECK(evas, Evas, MAGIC_EVAS); 458 MAGIC_CHECK(evas, Evas, MAGIC_EVAS);
459 return NULL; 459 return NULL;
460 MAGIC_CHECK_END(); 460 MAGIC_CHECK_END();
461 Evas_Object *obj = NULL; 461 Evas_Object *obj = eo_add(MY_CLASS, evas);
462 eo_add(&obj, MY_CLASS, evas);
463 return obj; 462 return obj;
464} 463}
465 464
diff --git a/src/lib/evas/canvas/evas_object_grid.c b/src/lib/evas/canvas/evas_object_grid.c
index 12b6d2b..0374b13 100644
--- a/src/lib/evas/canvas/evas_object_grid.c
+++ b/src/lib/evas/canvas/evas_object_grid.c
@@ -265,8 +265,7 @@ evas_object_grid_add(Evas *evas)
265 MAGIC_CHECK(evas, Evas, MAGIC_EVAS); 265 MAGIC_CHECK(evas, Evas, MAGIC_EVAS);
266 return NULL; 266 return NULL;
267 MAGIC_CHECK_END(); 267 MAGIC_CHECK_END();
268 Evas_Object *obj = NULL; 268 Evas_Object *obj = eo_add(MY_CLASS, evas);
269 eo_add(&obj, MY_CLASS, evas);
270 return obj; 269 return obj;
271} 270}
272 271
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 0367fa2..f3b1d77 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -383,8 +383,7 @@ evas_object_image_add(Evas *eo_e)
383 Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS); 383 Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
384 EINA_SAFETY_ON_NULL_RETURN_VAL(e, NULL); 384 EINA_SAFETY_ON_NULL_RETURN_VAL(e, NULL);
385 EINA_SAFETY_ON_NULL_RETURN_VAL(e->engine.func, NULL); 385 EINA_SAFETY_ON_NULL_RETURN_VAL(e->engine.func, NULL);
386 Evas_Object *eo_obj = NULL; 386 Evas_Object *eo_obj = eo_add(EVAS_IMAGE_CLASS, eo_e);
387 eo_add(&eo_obj, EVAS_IMAGE_CLASS, eo_e);
388 return eo_obj; 387 return eo_obj;
389} 388}
390 389
diff --git a/src/lib/evas/canvas/evas_object_line.c b/src/lib/evas/canvas/evas_object_line.c
index 07ef578..26dd5c7 100644
--- a/src/lib/evas/canvas/evas_object_line.c
+++ b/src/lib/evas/canvas/evas_object_line.c
@@ -97,8 +97,7 @@ evas_object_line_add(Evas *e)
97 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 97 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
98 return NULL; 98 return NULL;
99 MAGIC_CHECK_END(); 99 MAGIC_CHECK_END();
100 Evas_Object *eo_obj = NULL; 100 Evas_Object *eo_obj = eo_add(EVAS_LINE_CLASS, e);
101 eo_add(&eo_obj, EVAS_LINE_CLASS, e);
102 return eo_obj; 101 return eo_obj;
103} 102}
104 103
diff --git a/src/lib/evas/canvas/evas_object_polygon.c b/src/lib/evas/canvas/evas_object_polygon.c
index 10276ca..a154e37 100644
--- a/src/lib/evas/canvas/evas_object_polygon.c
+++ b/src/lib/evas/canvas/evas_object_polygon.c
@@ -98,8 +98,7 @@ evas_object_polygon_add(Evas *e)
98 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 98 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
99 return NULL; 99 return NULL;
100 MAGIC_CHECK_END(); 100 MAGIC_CHECK_END();
101 Evas_Object *eo_obj = NULL; 101 Evas_Object *eo_obj = eo_add(EVAS_POLYGON_CLASS, e);
102 eo_add(&eo_obj, EVAS_POLYGON_CLASS, e);
103 return eo_obj; 102 return eo_obj;
104} 103}
105 104
diff --git a/src/lib/evas/canvas/evas_object_rectangle.c b/src/lib/evas/canvas/evas_object_rectangle.c
index 212cda6..37f8266 100644
--- a/src/lib/evas/canvas/evas_object_rectangle.c
+++ b/src/lib/evas/canvas/evas_object_rectangle.c
@@ -95,8 +95,7 @@ evas_object_rectangle_add(Evas *e)
95 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 95 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
96 return NULL; 96 return NULL;
97 MAGIC_CHECK_END(); 97 MAGIC_CHECK_END();
98 Evas_Object *eo_obj = NULL; 98 Evas_Object *eo_obj = eo_add(EVAS_RECTANGLE_CLASS, e);
99 eo_add(&eo_obj, EVAS_RECTANGLE_CLASS, e);
100 return eo_obj; 99 return eo_obj;
101} 100}
102 101
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index b380f58..44c18f1 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -570,7 +570,7 @@ evas_object_smart_add(Evas *eo_e, Evas_Smart *s)
570 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS); 570 MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
571 return NULL; 571 return NULL;
572 MAGIC_CHECK_END(); 572 MAGIC_CHECK_END();
573 eo_add(&eo_obj, EVAS_OBJECT_SMART_CLASS, eo_e); 573 eo_obj = eo_add(EVAS_OBJECT_SMART_CLASS, eo_e);
574 evas_obj_smart_attach(eo_obj, s); 574 evas_obj_smart_attach(eo_obj, s);
575 return eo_obj; 575 return eo_obj;
576} 576}
diff --git a/src/lib/evas/canvas/evas_object_table.c b/src/lib/evas/canvas/evas_object_table.c
index ab71ad8..60a83fd 100644
--- a/src/lib/evas/canvas/evas_object_table.c
+++ b/src/lib/evas/canvas/evas_object_table.c
@@ -964,8 +964,7 @@ evas_object_table_add(Evas *evas)
964 MAGIC_CHECK(evas, Evas, MAGIC_EVAS); 964 MAGIC_CHECK(evas, Evas, MAGIC_EVAS);
965 return NULL; 965 return NULL;
966 MAGIC_CHECK_END(); 966 MAGIC_CHECK_END();
967 Evas_Object *obj = NULL; 967 Evas_Object *obj = eo_add(MY_CLASS, evas);
968 eo_add(&obj, MY_CLASS, evas);
969 return obj; 968 return obj;
970} 969}
971 970
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index 723c8b5..a492ebd 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -372,8 +372,7 @@ evas_object_text_add(Evas *e)
372 MAGIC_CHECK(e, Evas, MAGIC_EVAS); 372 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
373 return NULL; 373 return NULL;
374 MAGIC_CHECK_END(); 374 MAGIC_CHECK_END();
375 Evas_Object *eo_obj = NULL; 375 Evas_Object *eo_obj = eo_add(EVAS_TEXT_CLASS, e);
376 eo_add(&eo_obj, EVAS_TEXT_CLASS, e);
377 return eo_obj; 376 return eo_obj;
378} 377}
379 378
diff --git a/src/lib/evas/canvas/evas