summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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, 507 insertions, 477 deletions
diff --git a/src/benchmarks/eo/eo_bench_callbacks.c b/src/benchmarks/eo/eo_bench_callbacks.c
index ab779f8417..2114234411 100644
--- a/src/benchmarks/eo/eo_bench_callbacks.c
+++ b/src/benchmarks/eo/eo_bench_callbacks.c
@@ -17,7 +17,8 @@ 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 = eo_add(SIMPLE_CLASS, NULL); 20 Eo *obj = NULL;
21 eo_add(&obj, SIMPLE_CLASS, NULL);
21 22
22 for (i = 0 ; i < request ; i++) 23 for (i = 0 ; i < request ; i++)
23 { 24 {
diff --git a/src/benchmarks/eo/eo_bench_eo_do.c b/src/benchmarks/eo/eo_bench_eo_do.c
index 9f84535254..9160507c75 100644
--- a/src/benchmarks/eo/eo_bench_eo_do.c
+++ b/src/benchmarks/eo/eo_bench_eo_do.c
@@ -10,7 +10,8 @@ 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 = eo_add(SIMPLE_CLASS, NULL); 13 Eo *obj = NULL;
14 eo_add(&obj, SIMPLE_CLASS, NULL);
14 for (i = 0 ; i < request ; i++) 15 for (i = 0 ; i < request ; i++)
15 { 16 {
16 simple_a_set(obj, i); 17 simple_a_set(obj, i);
@@ -23,8 +24,10 @@ static void
23bench_eo_do_two_objs(int request) 24bench_eo_do_two_objs(int request)
24{ 25{
25 int i; 26 int i;
26 Eo *obj = eo_add(SIMPLE_CLASS, NULL); 27 Eo *obj = NULL;
27 Eo *obj2 = eo_add(SIMPLE_CLASS, NULL); 28 eo_add(&obj, SIMPLE_CLASS, NULL);
29 Eo *obj2 = NULL;
30 eo_add(&obj2, SIMPLE_CLASS, NULL);
28 for (i = 0 ; i < request ; i++) 31 for (i = 0 ; i < request ; i++)
29 { 32 {
30 simple_a_set(obj, i); 33 simple_a_set(obj, i);
@@ -39,8 +42,10 @@ static void
39bench_eo_do_two_objs_growing_stack(int request) 42bench_eo_do_two_objs_growing_stack(int request)
40{ 43{
41 int i; 44 int i;
42 Eo *obj = eo_add(SIMPLE_CLASS, NULL); 45 Eo *obj = NULL;
43 Eo *obj2 = eo_add(SIMPLE_CLASS, NULL); 46 eo_add(&obj, SIMPLE_CLASS, NULL);
47 Eo *obj2 = NULL;
48 eo_add(&obj2, SIMPLE_CLASS, NULL);
44 for (i = 0 ; i < request ; i++) 49 for (i = 0 ; i < request ; i++)
45 { 50 {
46 simple_other_call(obj, obj2, 20); 51 simple_other_call(obj, obj2, 20);
@@ -78,7 +83,8 @@ bench_eo_do_super(int request)
78 cur_klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL); 83 cur_klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL);
79 84
80 int i; 85 int i;
81 Eo *obj = eo_add(cur_klass, NULL); 86 Eo *obj = NULL;
87 eo_add(&obj, cur_klass, NULL);
82 for (i = 0 ; i < request ; i++) 88 for (i = 0 ; i < request ; i++)
83 { 89 {
84 simple_a_set(obj, i); 90 simple_a_set(obj, i);
diff --git a/src/examples/ecore/ecore_audio_custom.c b/src/examples/ecore/ecore_audio_custom.c
index 2570a9e20d..6eb1add105 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 out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL); 59 eo_add(&out, ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
60 60
61 in = eo_add(ECORE_AUDIO_OBJ_IN_CLASS, NULL); 61 eo_add(&in, 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 f1624e0e67..a6e6c5e20a 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 in = eo_add(ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL); 255 eo_add(&in, 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 in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL); 279 eo_add(&in, 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 out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL); 310 eo_add(&out, 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 fceed59045..62e721b061 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 in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL); 52 eo_add(&in, 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 out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL); 63 eo_add(&out, 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 b34799b4c5..3e4063ea6a 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 root = eo_add_ref(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, bus, path)); 105 eo_add_ref(&root, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(root, 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 d02668bed0..a6761855f6 100644
--- a/src/examples/evas/evas-3d-aabb.c
+++ b/src/examples/evas/evas-3d-aabb.c
@@ -142,40 +142,38 @@ main(void)
142 142
143 evas = ecore_evas_get(ecore_evas); 143 evas = ecore_evas_get(ecore_evas);
144 144
145 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 145 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
146 146
147 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 147 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
148 148
149 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 149 eo_add(&camera, 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 camera_node = 152 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
153 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
154 evas_canvas3d_node_camera_set(camera_node, camera); 153 evas_canvas3d_node_camera_set(camera_node, camera);
155 evas_canvas3d_node_member_add(root_node, camera_node); 154 evas_canvas3d_node_member_add(root_node, camera_node);
156 evas_canvas3d_node_position_set(camera_node, 100.0, 50.0, 20.0); 155 evas_canvas3d_node_position_set(camera_node, 100.0, 50.0, 20.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); 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);
158 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 157 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
159 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 158 evas_canvas3d_light_ambient_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); 159 evas_canvas3d_light_diffuse_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); 160 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
162 evas_canvas3d_light_directional_set(light, EINA_TRUE); 161 evas_canvas3d_light_directional_set(light, EINA_TRUE);
163 162
164 light_node = 163 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
165 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
166 evas_canvas3d_node_light_set(light_node, light); 164 evas_canvas3d_node_light_set(light_node, light);
167 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0); 165 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.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); 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);
169 evas_canvas3d_node_member_add(root_node, light_node); 167 evas_canvas3d_node_member_add(root_node, light_node);
170 168
171 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 169 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
172 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 170 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
173 171
174 efl_file_set(mesh, model_path, NULL); 172 efl_file_set(mesh, model_path, NULL);
175 evas_canvas3d_mesh_frame_material_set(mesh, 0, material); 173 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
176 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 174 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
177 175
178 texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 176 eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
179 evas_canvas3d_texture_file_set(texture, image_path, NULL); 177 evas_canvas3d_texture_file_set(texture, image_path, NULL);
180 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 178 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
181 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 179 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -189,16 +187,16 @@ main(void)
189 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 187 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
190 evas_canvas3d_material_shininess_set(material, 50.0); 188 evas_canvas3d_material_shininess_set(material, 50.0);
191 189
192 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 190 eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_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)); 191 eo_add(&mesh_box_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_box_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
194 192
195 material_box = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 193 eo_add(&material_box, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
196 evas_canvas3d_material_enable_set(material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 194 evas_canvas3d_material_enable_set(material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
197 195
198 cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 196 eo_add(&cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
199 evas_canvas3d_primitive_form_set(cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 197 evas_canvas3d_primitive_form_set(cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
200 198
201 mesh_box = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 199 eo_add(&mesh_box, EVAS_CANVAS3D_MESH_CLASS, evas);
202 evas_canvas3d_mesh_from_primitive_set(mesh_box, 0, cube); 200 evas_canvas3d_mesh_from_primitive_set(mesh_box, 0, cube);
203 evas_canvas3d_mesh_vertex_assembly_set(mesh_box, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES); 201 evas_canvas3d_mesh_vertex_assembly_set(mesh_box, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
204 evas_canvas3d_mesh_shade_mode_set(mesh_box, EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR); 202 evas_canvas3d_mesh_shade_mode_set(mesh_box, EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR);
@@ -215,7 +213,7 @@ main(void)
215 evas_canvas3d_scene_camera_node_set(scene, camera_node); 213 evas_canvas3d_scene_camera_node_set(scene, camera_node);
216 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 214 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
217 215
218 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 216 eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
219 efl_gfx_color_set(background, 0, 0, 0, 255); 217 efl_gfx_color_set(background, 0, 0, 0, 255);
220 efl_gfx_size_set(background, WIDTH, HEIGHT); 218 efl_gfx_size_set(background, WIDTH, HEIGHT);
221 efl_gfx_visible_set(background, EINA_TRUE); 219 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 db7c7a1590..90ee461389 100644
--- a/src/examples/evas/evas-3d-blending.c
+++ b/src/examples/evas/evas-3d-blending.c
@@ -143,12 +143,11 @@ _animate_scene(void *data)
143static void 143static void
144_camera_setup(Scene_Data *data) 144_camera_setup(Scene_Data *data)
145{ 145{
146 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 146 eo_add(&data->camera, 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 data->camera_node = 150 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
151 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
152 151
153 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 152 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
154 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0); 153 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
@@ -160,13 +159,12 @@ _camera_setup(Scene_Data *data)
160static void 159static void
161_light_setup(Scene_Data *data) 160_light_setup(Scene_Data *data)
162{ 161{
163 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 162 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
164 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 163 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
165 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 164 evas_canvas3d_light_diffuse_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); 165 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
167 166
168 data->light_node = 167 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
169 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
170 evas_canvas3d_node_light_set(data->light_node, data->light); 168 evas_canvas3d_node_light_set(data->light_node, data->light);
171 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 169 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.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); 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);
@@ -184,7 +182,7 @@ _set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material)
184static void 182static void
185_mesh_setup(Scene_Data *data) 183_mesh_setup(Scene_Data *data)
186{ 184{
187 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 185 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
188 186
189 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_AMBIENT, EINA_TRUE);
190 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 188 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -194,7 +192,7 @@ _mesh_setup(Scene_Data *data)
194 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2); 192 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2);
195 evas_canvas3d_material_shininess_set(data->material, 100.0); 193 evas_canvas3d_material_shininess_set(data->material, 100.0);
196 194
197 data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 195 eo_add(&data->material1, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
198 196
199 evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 197 evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
200 evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 198 evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -204,24 +202,22 @@ _mesh_setup(Scene_Data *data)
204 evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2); 202 evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2);
205 evas_canvas3d_material_shininess_set(data->material1, 100.0); 203 evas_canvas3d_material_shininess_set(data->material1, 100.0);
206 204
207 data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 205 eo_add(&data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
208 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 206 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
209 evas_canvas3d_primitive_precision_set(data->sphere, 50); 207 evas_canvas3d_primitive_precision_set(data->sphere, 50);
210 208
211 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 209 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
212 data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 210 eo_add(&data->mesh1, EVAS_CANVAS3D_MESH_CLASS, evas);
213 211
214 _set_ball(data->mesh, data->sphere, data->material); 212 _set_ball(data->mesh, data->sphere, data->material);
215 _set_ball(data->mesh1, data->sphere, data->material1); 213 _set_ball(data->mesh1, data->sphere, data->material1);
216 214
217 data->mesh_node = 215 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
218 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
219 216
220 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 217 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
221 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 218 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
222 219
223 data->mesh_node1 = 220 eo_add(&data->mesh_node1, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node1, EVAS_CANVAS3D_NODE_TYPE_MESH));
224 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
225 221
226 evas_canvas3d_node_member_add(data->root_node, data->mesh_node1); 222 evas_canvas3d_node_member_add(data->root_node, data->mesh_node1);
227 evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1); 223 evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1);
@@ -237,13 +233,12 @@ _mesh_setup(Scene_Data *data)
237static void 233static void
238_scene_setup(Scene_Data *data) 234_scene_setup(Scene_Data *data)
239{ 235{
240 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 236 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
241 237
242 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 238 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
243 evas_canvas3d_scene_background_color_set(data->scene, 0.5, 0.5, 0.5, 1); 239 evas_canvas3d_scene_background_color_set(data->scene, 0.5, 0.5, 0.5, 1);
244 240
245 data->root_node = 241 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
246 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
247 242
248 _camera_setup(data); 243 _camera_setup(data);
249 _light_setup(data); 244 _light_setup(data);
diff --git a/src/examples/evas/evas-3d-colorpick.c b/src/examples/evas/evas-3d-colorpick.c
index 885a53bd81..4a7594bd6d 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 sphere->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 240 eo_add(&sphere->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
241 sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 241 eo_add(&sphere->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
242 sphere->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 242 eo_add(&sphere->material, 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 sphere->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 251 eo_add(&sphere->texture, 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 m->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 316 eo_add(&m->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(m->node, 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 e393c14deb..74525cc014 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 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 151 eo_add(&data->camera, 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 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 154 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, 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 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 165 eo_add(&data->light, 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 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 171 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 184 eo_add(&data->material, 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 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 195 eo_add(&data->cube, 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 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 199 eo_add(&data->mesh, 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 data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 204 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, 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 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 212 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
213 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 213 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, 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 6f6f4208c2..be29e046c5 100644
--- a/src/examples/evas/evas-3d-cube.c
+++ b/src/examples/evas/evas-3d-cube.c
@@ -133,12 +133,11 @@ _animate_scene(void *data)
133static void 133static void
134_camera_setup(Scene_Data *data) 134_camera_setup(Scene_Data *data)
135{ 135{
136 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 136 eo_add(&data->camera, 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 data->camera_node = 140 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
141 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
142 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 141 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
143 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0); 142 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.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); 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);
@@ -148,13 +147,12 @@ _camera_setup(Scene_Data *data)
148static void 147static void
149_light_setup(Scene_Data *data) 148_light_setup(Scene_Data *data)
150{ 149{
151 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 150 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
152 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 151 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
153 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 152 evas_canvas3d_light_diffuse_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); 153 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
155 154
156 data->light_node = 155 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
157 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
158 evas_canvas3d_node_light_set(data->light_node, data->light); 156 evas_canvas3d_node_light_set(data->light_node, data->light);
159 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 157 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.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); 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);
@@ -164,7 +162,7 @@ static void
164_mesh_setup(Scene_Data *data) 162_mesh_setup(Scene_Data *data)
165{ 163{
166 /* Setup material. */ 164 /* Setup material. */
167 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 165 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
168 166
169 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 167 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
170 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 168 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -175,7 +173,7 @@ _mesh_setup(Scene_Data *data)
175 evas_canvas3d_material_shininess_set(data->material, 100.0); 173 evas_canvas3d_material_shininess_set(data->material, 100.0);
176 174
177 /* Setup mesh. */ 175 /* Setup mesh. */
178 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 176 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
179 evas_canvas3d_mesh_vertex_count_set(data->mesh, 24); 177 evas_canvas3d_mesh_vertex_count_set(data->mesh, 24);
180 evas_canvas3d_mesh_frame_add(data->mesh, 0); 178 evas_canvas3d_mesh_frame_add(data->mesh, 0);
181 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]); 179 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]);
@@ -187,8 +185,7 @@ _mesh_setup(Scene_Data *data)
187 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 185 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
188 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material); 186 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
189 187
190 data->mesh_node = 188 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
191 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
192 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 189 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
193 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 190 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
194} 191}
@@ -196,12 +193,11 @@ _mesh_setup(Scene_Data *data)
196static void 193static void
197_scene_setup(Scene_Data *data) 194_scene_setup(Scene_Data *data)
198{ 195{
199 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 196 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
200 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 197 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
201 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 198 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
202 199
203 data->root_node = 200 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
204 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
205 201
206 _camera_setup(data); 202 _camera_setup(data);
207 _light_setup(data); 203 _light_setup(data);
@@ -233,7 +229,7 @@ main(void)
233 _scene_setup(&data); 229 _scene_setup(&data);
234 230
235 /* Add a background rectangle objects. */ 231 /* Add a background rectangle objects. */
236 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 232 eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
237 efl_gfx_color_set(background, 0, 0, 0, 255); 233 efl_gfx_color_set(background, 0, 0, 0, 255);
238 efl_gfx_size_set(background, WIDTH, HEIGHT); 234 efl_gfx_size_set(background, WIDTH, HEIGHT);
239 efl_gfx_visible_set(background, EINA_TRUE); 235 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 e46c2f7c64..387edd8cea 100644
--- a/src/examples/evas/evas-3d-cube2.c
+++ b/src/examples/evas/evas-3d-cube2.c
@@ -111,11 +111,10 @@ _animate_scene(void *data)
111static void 111static void
112_camera_setup(Scene_Data *data) 112_camera_setup(Scene_Data *data)
113{ 113{
114 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 114 eo_add(&data->camera, 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 data->camera_node = 117 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
118 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
119 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 118 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
120 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 3.0); 119 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 3.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); 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);
@@ -125,13 +124,12 @@ _camera_setup(Scene_Data *data)
125static void 124static void
126_light_setup(Scene_Data *data) 125_light_setup(Scene_Data *data)
127{ 126{
128 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 127 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
129 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 128 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
130 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 129 evas_canvas3d_light_diffuse_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); 130 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
132 131
133 data->light_node = 132 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
134 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
135 evas_canvas3d_node_light_set(data->light_node, data->light); 133 evas_canvas3d_node_light_set(data->light_node, data->light);
136 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 134 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.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); 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);
@@ -142,8 +140,8 @@ static void
142_mesh_setup(Scene_Data *data) 140_mesh_setup(Scene_Data *data)
143{ 141{
144 /* Setup material. */ 142 /* Setup material. */
145 data->material0 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 143 eo_add(&data->material0, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
146 data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 144 eo_add(&data->material1, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
147 145
148 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 146 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
149 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 147 evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -163,9 +161,9 @@ _mesh_setup(Scene_Data *data)
163 evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 161 evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
164 evas_canvas3d_material_shininess_set(data->material1, 100.0); 162 evas_canvas3d_material_shininess_set(data->material1, 100.0);
165 163
166 data->texture0 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 164 eo_add(&data->texture0, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
167 data->texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 165 eo_add(&data->texture1, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
168 data->texture_normal = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 166 eo_add(&data->texture_normal, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
169 167
170 evas_canvas3d_texture_data_set(data->texture0, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]); 168 evas_canvas3d_texture_data_set(data->texture0, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]);
171 evas_canvas3d_texture_data_set(data->texture1, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels1[0]); 169 evas_canvas3d_texture_data_set(data->texture1, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels1[0]);
@@ -176,19 +174,18 @@ _mesh_setup(Scene_Data *data)
176 evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_normal); 174 evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_normal);
177 175
178 /* Set data of primitive */ 176 /* Set data of primitive */
179 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 177 eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
180 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 178 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
181 179
182 /* Setup mesh. */ 180 /* Setup mesh. */
183 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 181 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
184 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube); 182 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
185 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material0); 183 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material0);
186 evas_canvas3d_mesh_frame_add(data->mesh, 20); 184 evas_canvas3d_mesh_frame_add(data->mesh, 20);
187 evas_canvas3d_mesh_frame_material_set(data->mesh, 20, data->material1); 185 evas_canvas3d_mesh_frame_material_set(data->mesh, 20, data->material1);
188 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP); 186 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
189 187
190 data->mesh_node = 188 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
191 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
192 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 189 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
193 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 190 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
194} 191}
@@ -196,12 +193,11 @@ _mesh_setup(Scene_Data *data)
196static void 193static void
197_scene_setup(Scene_Data *data) 194_scene_setup(Scene_Data *data)
198{ 195{
199 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 196 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
200 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 197 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
201 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 198 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
202 199
203 data->root_node = 200 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
204 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
205 201
206 _camera_setup(data); 202 _camera_setup(data);
207 _light_setup(data); 203 _light_setup(data);
@@ -234,7 +230,7 @@ main(void)
234 _scene_setup(&data); 230 _scene_setup(&data);
235 231
236 /* Add a background rectangle objects. */ 232 /* Add a background rectangle objects. */
237 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 233 eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
238 efl_gfx_color_set(background, 0, 0, 0, 255); 234 efl_gfx_color_set(background, 0, 0, 0, 255);
239 efl_gfx_size_set(background, WIDTH, HEIGHT); 235 efl_gfx_size_set(background, WIDTH, HEIGHT);
240 efl_gfx_visible_set(background, EINA_TRUE); 236 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 dc09191e05..69fca120e8 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 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 118 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
119 119
120 /* Add the root node for the scene. */ 120 /* Add the root node for the scene. */
121 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 121 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
122 122
123 /* Add the camera. */ 123 /* Add the camera. */
124 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 124 eo_add(&camera, 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 camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 127 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, 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 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 133 eo_add(&light, 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 light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 139 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, 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 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 146 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
147 mesh2 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 147 eo_add(&mesh2, EVAS_CANVAS3D_MESH_CLASS, evas);
148 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 148 eo_add(&material, 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 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 172 eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, 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 mesh_node2 = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 178 eo_add(&mesh_node2, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node2, 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 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 189 eo_add(&background, 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 33bd05cc8c..bc33f92c48 100644
--- a/src/examples/evas/evas-3d-fog.c
+++ b/src/examples/evas/evas-3d-fog.c
@@ -81,12 +81,11 @@ _animate_scene(void *data)
81static void 81static void
82_camera_setup(Scene_Data *data) 82_camera_setup(Scene_Data *data)
83{ 83{
84 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 84 eo_add(&data->camera, 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 data->camera_node = 88 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
89 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
90 89
91 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 90 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
92 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 7.0); 91 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 7.0);
@@ -98,13 +97,12 @@ _camera_setup(Scene_Data *data)
98static void 97static void
99_light_setup(Scene_Data *data) 98_light_setup(Scene_Data *data)
100{ 99{
101 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 100 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
102 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 101 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
103 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 102 evas_canvas3d_light_diffuse_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); 103 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
105 104
106 data->light_node = 105 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
107 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
108 evas_canvas3d_node_light_set(data->light_node, data->light); 106 evas_canvas3d_node_light_set(data->light_node, data->light);
109 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 107 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.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); 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);
@@ -123,7 +121,7 @@ _set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material)
123static void 121static void
124_mesh_setup(Scene_Data *data) 122_mesh_setup(Scene_Data *data)
125{ 123{
126 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 124 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
127 125
128 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 126 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
129 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 127 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -133,29 +131,26 @@ _mesh_setup(Scene_Data *data)
133 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 131 evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
134 evas_canvas3d_material_shininess_set(data->material, 100.0); 132 evas_canvas3d_material_shininess_set(data->material, 100.0);
135 133
136 data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 134 eo_add(&data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
137 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 135 evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
138 evas_canvas3d_primitive_precision_set(data->sphere, 50); 136 evas_canvas3d_primitive_precision_set(data->sphere, 50);
139 137
140 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 138 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
141 data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 139 eo_add(&data->mesh1, EVAS_CANVAS3D_MESH_CLASS, evas);
142 140
143 _set_ball(data->mesh, data->sphere, data->material); 141 _set_ball(data->mesh, data->sphere, data->material);
144 _set_ball(data->mesh1, data->sphere, data->material); 142 _set_ball(data->mesh1, data->sphere, data->material);
145 143
146 data->animation_node = 144 eo_add(&data->animation_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->animation_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
147 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
148 145
149 data->mesh_node = 146 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
150 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
151 147
152 evas_canvas3d_node_member_add(data->animation_node, data->mesh_node); 148 evas_canvas3d_node_member_add(data->animation_node, data->mesh_node);
153 evas_canvas3d_node_member_add(data->root_node, data->animation_node); 149 evas_canvas3d_node_member_add(data->root_node, data->animation_node);
154 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 150 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
155 evas_canvas3d_node_position_set(data->mesh_node, 0.0, 0.0, 3.0); 151 evas_canvas3d_node_position_set(data->mesh_node, 0.0, 0.0, 3.0);
156 152
157 data->mesh_node1 = 153 eo_add(&data->mesh_node1, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node1, EVAS_CANVAS3D_NODE_TYPE_MESH));
158 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
159 154
160 evas_canvas3d_node_member_add(data->root_node, data->mesh_node1); 155 evas_canvas3d_node_member_add(data->root_node, data->mesh_node1);
161 evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1); 156 evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1);
@@ -170,13 +165,12 @@ _mesh_setup(Scene_Data *data)
170static void 165static void
171_scene_setup(Scene_Data *data) 166_scene_setup(Scene_Data *data)
172{ 167{
173 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 168 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
174 169
175 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 170 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
176 evas_canvas3d_scene_background_color_set(data->scene, FOG_COLOR, 1); 171 evas_canvas3d_scene_background_color_set(data->scene, FOG_COLOR, 1);
177 172
178 data->root_node = 173 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
179 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
180 174
181 _camera_setup(data); 175 _camera_setup(data);
182 _light_setup(data); 176 _light_setup(data);
@@ -209,7 +203,7 @@ main(void)
209 _scene_setup(&data); 203 _scene_setup(&data);
210 204
211 /* Add a background rectangle objects. */ 205 /* Add a background rectangle objects. */
212 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 206 eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
213 efl_gfx_color_set(background, 0, 0, 0, 255); 207 efl_gfx_color_set(background, 0, 0, 0, 255);
214 efl_gfx_size_set(background, WIDTH, HEIGHT); 208 efl_gfx_size_set(background, WIDTH, HEIGHT);
215 efl_gfx_visible_set(background, EINA_TRUE); 209 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 4e1323f5b4..25cfc5b8d4 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 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 282 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
283 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 283 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, 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 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 296 eo_add(&data->light, 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 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 301 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 312 eo_add(&data->material, 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,27 +319,26 @@ _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 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 322 eo_add(&data->cube, 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 data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 325 eo_add(&data->sphere, 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 data->mesh_aabb = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 329 eo_add(&data->mesh_aabb, 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 data->mesh_sphere = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 335 eo_add(&data->mesh_sphere, 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 data->mesh_node = 341 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
342 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
343 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 342 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
344 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_aabb); 343 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_aabb);
345} 344}
@@ -347,9 +346,9 @@ _mesh_setup(Scene_Data *data)
347static void 346static void
348_mesh_setup_model(Scene_Data *data) 347_mesh_setup_model(Scene_Data *data)
349{ 348{
350 data->mesh_model = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 349 eo_add(&data->mesh_model, EVAS_CANVAS3D_MESH_CLASS, evas);
351 data->material_model = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 350 eo_add(&data->material_model, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
352 data->texture_model = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 351 eo_add(&data->texture_model, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
353 352
354 evas_canvas3d_texture_file_set(data->texture_model, texture_path, NULL); 353 evas_canvas3d_texture_file_set(data->texture_model, texture_path, NULL);
355 evas_canvas3d_texture_filter_set(data->texture_model, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 354 evas_canvas3d_texture_filter_set(data->texture_model, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
@@ -374,15 +373,15 @@ _mesh_setup_model(Scene_Data *data)
374static void 373static void
375_scene_setup(Scene_Data *data) 374_scene_setup(Scene_Data *data)
376{ 375{
377 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 376 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
378 377
379 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 378 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
380 379
381 _light_setup(data); 380 _light_setup(data);
382 _mesh_setup_model(data); 381 _mesh_setup_model(data);
383 _camera_setup(data); 382 _camera_setup(data);
384 383
385 data->mesh_node_model = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 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));
386 evas_canvas3d_node_position_set(data->mesh_node_model, obj_x, obj_y, obj_z); 385 evas_canvas3d_node_position_set(data->mesh_node_model, obj_x, obj_y, obj_z);
387 evas_canvas3d_node_orientation_angle_axis_set(data->mesh_node_model, -90, 1.0, 0.0, 0.0); 386 evas_canvas3d_node_orientation_angle_axis_set(data->mesh_node_model, -90, 1.0, 0.0, 0.0);
388 evas_canvas3d_node_scale_set(data->mesh_node_model, obj_sc_x, obj_sc_y, obj_sc_z); 387 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 57602b6988..130ad3742e 100644
--- a/src/examples/evas/evas-3d-hull.c
+++ b/src/examples/evas/evas-3d-hull.c
@@ -255,12 +255,11 @@ _key_down(void *data,
255static void 255static void
256_camera_setup(Scene_Data *data) 256_camera_setup(Scene_Data *data)
257{ 257{
258 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 258 eo_add(&data->camera, 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 data->camera_node = 262 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
263 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
264 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 263 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
265 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0); 264 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.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); 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);
@@ -270,13 +269,12 @@ _camera_setup(Scene_Data *data)
270static void 269static void
271_light_setup(Scene_Data *data) 270_light_setup(Scene_Data *data)
272{ 271{
273 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 272 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
274 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 273 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
275 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 274 evas_canvas3d_light_diffuse_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); 275 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
277 276
278 data->light_node = 277 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
279 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
280 evas_canvas3d_node_light_set(data->light_node, data->light); 278 evas_canvas3d_node_light_set(data->light_node, data->light);
281 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 279 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.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); 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);
@@ -292,7 +290,7 @@ _mesh_setup(Scene_Data *data)
292 Eo *primitive = NULL; 290 Eo *primitive = NULL;
293 /* Setup material. */ 291 /* Setup material. */
294 292
295 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 293 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
296 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 294 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
297 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 295 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
298 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE); 296 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
@@ -302,17 +300,17 @@ _mesh_setup(Scene_Data *data)
302 evas_canvas3d_material_shininess_set(data->material, 100.0); 300 evas_canvas3d_material_shininess_set(data->material, 100.0);
303 301
304 /* Setup mesh sphere */ 302 /* Setup mesh sphere */
305 primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 303 eo_add(&primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
306 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 304 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
307 evas_canvas3d_primitive_precision_set(primitive, 10); 305 evas_canvas3d_primitive_precision_set(primitive, 10);
308 data->mesh_sphere = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 306 eo_add(&data->mesh_sphere, EVAS_CANVAS3D_MESH_CLASS, evas);
309 evas_canvas3d_mesh_from_primitive_set(data->mesh_sphere, 0, primitive); 307 evas_canvas3d_mesh_from_primitive_set(data->mesh_sphere, 0, primitive);
310 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_sphere, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES); 308 evas_canvas3d_mesh_vertex_assembly_set(data->mesh_sphere, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
311 evas_canvas3d_mesh_shade_mode_set(data->mesh_sphere, EVAS_CANVAS3D_SHADE_MODE_PHONG); 309 evas_canvas3d_mesh_shade_mode_set(data->mesh_sphere, EVAS_CANVAS3D_SHADE_MODE_PHONG);
312 evas_canvas3d_mesh_frame_material_set(data->mesh_sphere, 0, data->material); 310 evas_canvas3d_mesh_frame_material_set(data->mesh_sphere, 0, data->material);
313 311
314 /* Setup mesh torus */ 312 /* Setup mesh torus */
315 data->mesh_torus = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 313 eo_add(&data->mesh_torus, EVAS_CANVAS3D_MESH_CLASS, evas);
316 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_TORUS); 314 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_TORUS);
317 evas_canvas3d_primitive_precision_set(primitive, 50); 315 evas_canvas3d_primitive_precision_set(primitive, 50);
318 evas_canvas3d_mesh_from_primitive_set(data->mesh_torus, 0, primitive); 316 evas_canvas3d_mesh_from_primitive_set(data->mesh_torus, 0, primitive);
@@ -321,7 +319,7 @@ _mesh_setup(Scene_Data *data)
321 evas_canvas3d_mesh_frame_material_set(data->mesh_torus, 0, data->material); 319 evas_canvas3d_mesh_frame_material_set(data->mesh_torus, 0, data->material);
322 320
323 /* Setup mesh cube */ 321 /* Setup mesh cube */
324 data->mesh_cube = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 322 eo_add(&data->mesh_cube, EVAS_CANVAS3D_MESH_CLASS, evas);
325 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 323 evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
326 evas_canvas3d_primitive_precision_set(primitive, 50); 324 evas_canvas3d_primitive_precision_set(primitive, 50);
327 evas_canvas3d_mesh_from_primitive_set(data->mesh_cube, 0, primitive); 325 evas_canvas3d_mesh_from_primitive_set(data->mesh_cube, 0, primitive);
@@ -353,8 +351,7 @@ _mesh_setup(Scene_Data *data)
353 MODEL_MESH_INIT(blender_test_eagle, eagle_test, DIFFUSE) 351 MODEL_MESH_INIT(blender_test_eagle, eagle_test, DIFFUSE)
354 MODEL_MESH_INIT(blender_test_sonic, sonic_test, DIFFUSE) 352 MODEL_MESH_INIT(blender_test_sonic, sonic_test, DIFFUSE)
355 353
356 data->mesh_node = 354 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
357 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
358 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 355 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
359 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_sphere); 356 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_sphere);
360 evas_canvas3d_node_scale_set(data->mesh_node, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE); 357 evas_canvas3d_node_scale_set(data->mesh_node, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
@@ -371,15 +368,13 @@ _mesh_setup(Scene_Data *data)
371 368
372 _print_result(data->mesh_sphere_ch, data->mesh_blender_test_sphere); 369 _print_result(data->mesh_sphere_ch, data->mesh_blender_test_sphere);
373 370
374 data->mesh_node_convex_hull = 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));
375 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
376 evas_canvas3d_node_member_add(data->root_node, data->mesh_node_convex_hull); 372 evas_canvas3d_node_member_add(data->root_node, data->mesh_node_convex_hull);
377 evas_canvas3d_node_position_set(data->mesh_node_convex_hull, 0.0, 0.0, 0.0); 373 evas_canvas3d_node_position_set(data->mesh_node_convex_hull, 0.0, 0.0, 0.0);
378 evas_canvas3d_node_scale_set(data->mesh_node_convex_hull, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE); 374 evas_canvas3d_node_scale_set(data->mesh_node_convex_hull, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
379 evas_canvas3d_node_mesh_add(data->mesh_node_convex_hull, data->mesh_sphere_ch); 375 evas_canvas3d_node_mesh_add(data->mesh_node_convex_hull, data->mesh_sphere_ch);
380 376
381 data->mesh_node_blender = 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));
382 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
383 evas_canvas3d_node_member_add(data->root_node, data->mesh_node_blender); 378 evas_canvas3d_node_member_add(data->root_node, data->mesh_node_blender);
384 evas_canvas3d_node_position_set(data->mesh_node_blender, -3.0, 0.0, 0.0); 379 evas_canvas3d_node_position_set(data->mesh_node_blender, -3.0, 0.0, 0.0);
385 evas_canvas3d_node_scale_set(data->mesh_node_blender, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE); 380 evas_canvas3d_node_scale_set(data->mesh_node_blender, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
@@ -389,12 +384,11 @@ _mesh_setup(Scene_Data *data)
389static void 384static void
390_scene_setup(Scene_Data *data) 385_scene_setup(Scene_Data *data)
391{ 386{
392 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 387 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
393 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 388 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
394 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 389 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
395 390
396 data->root_node = 391 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
397 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
398 392
399 _camera_setup(data); 393 _camera_setup(data);
400 _light_setup(data); 394 _light_setup(data);
@@ -429,7 +423,7 @@ main(void)
429 _scene_setup(&data); 423 _scene_setup(&data);
430 424
431 /* Add a background rectangle objects. */ 425 /* Add a background rectangle objects. */
432 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 426 eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
433 efl_gfx_color_set(background, 0, 0, 0, 255); 427 efl_gfx_color_set(background, 0, 0, 0, 255);
434 efl_gfx_size_set(background, WIDTH, HEIGHT); 428 efl_gfx_size_set(background, WIDTH, HEIGHT);
435 efl_gfx_visible_set(background, EINA_TRUE); 429 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 e19dfd6630..443271a9dc 100644
--- a/src/examples/evas/evas-3d-md2.c
+++ b/src/examples/evas/evas-3d-md2.c
@@ -91,44 +91,42 @@ 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 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 94 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
95 95
96 /* Add the root node for the scene. */ 96 /* Add the root node for the scene. */
97 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 97 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
98 98
99 /* Add the camera. */ 99 /* Add the camera. */
100 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 100 eo_add(&camera, 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 camera_node = 103 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
104 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
105 evas_canvas3d_node_camera_set(camera_node, camera); 104 evas_canvas3d_node_camera_set(camera_node, camera);
106 evas_canvas3d_node_member_add(root_node, camera_node); 105 evas_canvas3d_node_member_add(root_node, camera_node);
107 evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 20.0); 106 evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 20.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); 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);
109 /* Add the light. */ 108 /* Add the light. */
110 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 109 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
111 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 110 evas_canvas3d_light_ambient_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); 111 evas_canvas3d_light_diffuse_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); 112 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
114 evas_canvas3d_light_directional_set(light, EINA_TRUE); 113 evas_canvas3d_light_directional_set(light, EINA_TRUE);
115 114
116 light_node = 115 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
117 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
118 evas_canvas3d_node_light_set(light_node, light); 116 evas_canvas3d_node_light_set(light_node, light);
119 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0); 117 evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.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); 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);
121 evas_canvas3d_node_member_add(root_node, light_node); 119 evas_canvas3d_node_member_add(root_node, light_node);
122 120
123 /* Add the mesh. */ 121 /* Add the mesh. */
124 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 122 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
125 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 123 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
126 124
127 efl_file_set(mesh, model_path, NULL); 125 efl_file_set(mesh, model_path, NULL);
128 evas_canvas3d_mesh_frame_material_set(mesh, 0, material); 126 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
129 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 127 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
130 128
131 texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 129 eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
132 evas_canvas3d_texture_file_set(texture, image_path, NULL); 130 evas_canvas3d_texture_file_set(texture, image_path, NULL);
133 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 131 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
134 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 132 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -142,7 +140,7 @@ main(void)
142 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 140 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
143 evas_canvas3d_material_shininess_set(material, 50.0); 141 evas_canvas3d_material_shininess_set(material, 50.0);
144 142
145 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 143 eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
146 evas_canvas3d_node_member_add(root_node, mesh_node); 144 evas_canvas3d_node_member_add(root_node, mesh_node);
147 evas_canvas3d_node_mesh_add(mesh_node, mesh); 145 evas_canvas3d_node_mesh_add(mesh_node, mesh);
148 146
@@ -152,7 +150,7 @@ main(void)
152 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 150 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
153 151
154 /* Add a background rectangle objects. */ 152 /* Add a background rectangle objects. */
155 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 153 eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
156 efl_gfx_color_set(background, 0, 0, 0, 255); 154 efl_gfx_color_set(background, 0, 0, 0, 255);
157 efl_gfx_size_set(background, WIDTH, HEIGHT); 155 efl_gfx_size_set(background, WIDTH, HEIGHT);
158 efl_gfx_visible_set(background, EINA_TRUE); 156 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 000204d2e8..2432a4b6a3 100644
--- a/src/examples/evas/evas-3d-mmap-set.c
+++ b/src/examples/evas/evas-3d-mmap-set.c
@@ -181,36 +181,34 @@ 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 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 184 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
185 185
186 /* Add the root node for the scene. */ 186 /* Add the root node for the scene. */
187 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 187 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
188 188
189 /* Add the camera. */ 189 /* Add the camera. */
190 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 190 eo_add(&camera, 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 camera_node = 193 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
194 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
195 evas_canvas3d_node_camera_set(camera_node, camera); 194 evas_canvas3d_node_camera_set(camera_node, camera);
196 evas_canvas3d_node_member_add(root_node, camera_node); 195 evas_canvas3d_node_member_add(root_node, camera_node);
197 evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 100.0); 196 evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 100.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); 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);
199 /* Add the light. */ 198 /* Add the light. */
200 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 199 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
201 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 200 evas_canvas3d_light_ambient_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); 201 evas_canvas3d_light_diffuse_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); 202 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
204 evas_canvas3d_light_directional_set(light, EINA_TRUE); 203 evas_canvas3d_light_directional_set(light, EINA_TRUE);
205 204
206 light_node = 205 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
207 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
208 evas_canvas3d_node_light_set(light_node, light); 206 evas_canvas3d_node_light_set(light_node, light);
209 evas_canvas3d_node_position_set(light_node, 1.0, 0.0, 100.0); 207 evas_canvas3d_node_position_set(light_node, 1.0, 0.0, 100.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); 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);
211 evas_canvas3d_node_member_add(root_node, light_node); 209 evas_canvas3d_node_member_add(root_node, light_node);
212 210
213 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 211 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
214 212
215 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 213 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
216 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 214 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -233,7 +231,7 @@ main(void)
233 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 231 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
234 232
235 /* Add a background rectangle objects. */ 233 /* Add a background rectangle objects. */
236 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 234 eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
237 efl_gfx_color_set(background, 20, 20, 200, 255); 235 efl_gfx_color_set(background, 20, 20, 200, 255);
238 efl_gfx_size_set(background, WIDTH, HEIGHT); 236 efl_gfx_size_set(background, WIDTH, HEIGHT);
239 efl_gfx_visible_set(background, EINA_TRUE); 237 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 b9a6b69bd1..f2623f4779 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 name = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \ 66 eo_add(&name, 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 name = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); \ 74 eo_add(&name, 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,30 +157,28 @@ 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 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 160 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
161 161
162 /* Add the root node for the scene. */ 162 /* Add the root node for the scene. */
163 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 163 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
164 164
165 /* Add the camera. */ 165 /* Add the camera. */
166 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 166 eo_add(&camera, 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 camera_node = 169 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
170 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
171 evas_canvas3d_node_camera_set(camera_node, camera); 170 evas_canvas3d_node_camera_set(camera_node, camera);
172 evas_canvas3d_node_member_add(root_node, camera_node); 171 evas_canvas3d_node_member_add(root_node, camera_node);
173 evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 0.0); 172 evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 0.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); 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);
175 /* Add the light. */ 174 /* Add the light. */
176 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 175 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
177 evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0); 176 evas_canvas3d_light_ambient_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); 177 evas_canvas3d_light_diffuse_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); 178 evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
180 evas_canvas3d_light_directional_set(light, EINA_TRUE); 179 evas_canvas3d_light_directional_set(light, EINA_TRUE);
181 180
182 light_node = 181 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
183 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
184 evas_canvas3d_node_light_set(light_node, light); 182 evas_canvas3d_node_light_set(light_node, light);
185 evas_canvas3d_node_position_set(light_node, 10.0, 0.0, 0.0); 183 evas_canvas3d_node_position_set(light_node, 10.0, 0.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); 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);
@@ -212,7 +210,7 @@ main(void)
212 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 210 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
213 211
214 /* Add a background rectangle MESHES. */ 212 /* Add a background rectangle MESHES. */
215 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 213 eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
216 efl_gfx_color_set(background, 0, 0, 0, 255); 214 efl_gfx_color_set(background, 0, 0, 0, 255);
217 efl_gfx_size_set(background, WIDTH, HEIGHT); 215 efl_gfx_size_set(background, WIDTH, HEIGHT);
218 efl_gfx_visible_set(background, EINA_TRUE); 216 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 67be66536d..b096dc838b 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 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 107 eo_add(&data->camera, 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 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 111 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, 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 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 121 eo_add(&data->light, 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 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 126 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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 data->material_rocks = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 137 eo_add(&data->material_rocks, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
138 138
139 data->texture_rocks = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 139 eo_add(&data->texture_rocks, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
140 data->texture_rocks_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 140 eo_add(&data->texture_rocks_n, 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 data->material_wood = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 159 eo_add(&data->material_wood, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
160 160
161 data->texture_wood = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 161 eo_add(&data->texture_wood, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
162 data->texture_four_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 162 eo_add(&data->texture_four_n, 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 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 182 eo_add(&data->cube, 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 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 186 eo_add(&data->mesh, 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 data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 194 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, 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 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 203 eo_add(&data->scene, 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 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 207 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, 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 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 240 eo_add(&background, 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 1ae79a8cc9..86ee222b8a 100644
--- a/src/examples/evas/evas-3d-pick.c
+++ b/src/examples/evas/evas-3d-pick.c
@@ -132,32 +132,31 @@ 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 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 135 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
136 136
137 /* Add the root node for the scene. */ 137 /* Add the root node for the scene. */
138 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 138 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
139 139
140 /* Add the camera. */ 140 /* Add the camera. */
141 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 141 eo_add(&camera, 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 camera_node = 144 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
145 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
146 evas_canvas3d_node_camera_set(camera_node, camera); 145 evas_canvas3d_node_camera_set(camera_node, camera);
147 evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 2.5); 146 evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 2.5);
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); 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);
149 evas_canvas3d_node_member_add(root_node, camera_node); 148 evas_canvas3d_node_member_add(root_node, camera_node);
150 149
151 sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 150 eo_add(&sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
152 evas_canvas3d_primitive_form_set(sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE); 151 evas_canvas3d_primitive_form_set(sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
153 evas_canvas3d_primitive_precision_set(sphere, 50); 152 evas_canvas3d_primitive_precision_set(sphere, 50);
154 153
155 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 154 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
156 evas_canvas3d_mesh_from_primitive_set(mesh, 0, sphere); 155 evas_canvas3d_mesh_from_primitive_set(mesh, 0, sphere);
157 156
158 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 157 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
159 158
160 texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 159 eo_add(&texture_diffuse, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
161 evas_canvas3d_texture_file_set(texture_diffuse, image_path, NULL); 160 evas_canvas3d_texture_file_set(texture_diffuse, image_path, NULL);
162 evas_canvas3d_texture_filter_set(texture_diffuse, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR); 161 evas_canvas3d_texture_filter_set(texture_diffuse, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR);
163 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse); 162 evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse);
@@ -169,7 +168,7 @@ main(void)
169 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0); 168 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
170 evas_canvas3d_material_shininess_set(material, 50.0); 169 evas_canvas3d_material_shininess_set(material, 50.0);
171 170
172 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 171 eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
173 172
174 evas_canvas3d_node_member_add(root_node, mesh_node); 173 evas_canvas3d_node_member_add(root_node, mesh_node);
175 evas_canvas3d_node_mesh_add(mesh_node, mesh); 174 evas_canvas3d_node_mesh_add(mesh_node, mesh);
@@ -182,7 +181,7 @@ main(void)
182 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT); 181 evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
183 182
184 /* Add evas objects. */ 183 /* Add evas objects. */
185 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 184 eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
186 efl_gfx_color_set(background, 0, 0, 0, 255); 185 efl_gfx_color_set(background, 0, 0, 0, 255);
187 efl_gfx_size_set(background, WIDTH, HEIGHT); 186 efl_gfx_size_set(background, WIDTH, HEIGHT);
188 efl_gfx_visible_set(background, EINA_TRUE); 187 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 b34b2cc313..65f4fe5de3 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 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 133 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
134 134
135 /* Add the root node for the scene. */ 135 /* Add the root node for the scene. */
136 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 136 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
137 137
138 /* Add the camera. */ 138 /* Add the camera. */
139 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 139 eo_add(&camera, 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 camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 142 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, 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 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 148 eo_add(&light, 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 light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 154 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, 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 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 160 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
161 texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 161 eo_add(&texture, 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 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 211 eo_add(&background, 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 901c52bd54..7ec50bc4c2 100644
--- a/src/examples/evas/evas-3d-proxy.c
+++ b/src/examples/evas/evas-3d-proxy.c
@@ -97,11 +97,10 @@ _animate_scene(void *data)
97static void 97static void
98_camera_setup(Scene_Data *data) 98_camera_setup(Scene_Data *data)
99{ 99{
100 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 100 eo_add(&data->camera, 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 data->camera_node = 103 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
104 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
105 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 104 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
106 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 5.0); 105 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 5.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); 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);
@@ -111,13 +110,12 @@ _camera_setup(Scene_Data *data)
111static void 110static void
112_light_setup(Scene_Data *data) 111_light_setup(Scene_Data *data)
113{ 112{
114 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 113 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
115 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 114 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
116 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 115 evas_canvas3d_light_diffuse_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); 116 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
118 117
119 data->light_node = 118 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
120 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
121 evas_canvas3d_node_light_set(data->light_node, data->light); 119 evas_canvas3d_node_light_set(data->light_node, data->light);
122 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 120 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.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); 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);
@@ -128,8 +126,8 @@ static void
128_mesh_setup(Scene_Data *data) 126_mesh_setup(Scene_Data *data)
129{ 127{
130 /* Setup material. */ 128 /* Setup material. */
131 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 129 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
132 data->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 130 eo_add(&data->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
133 131
134 evas_canvas3d_texture_source_set(data->texture, source); 132 evas_canvas3d_texture_source_set(data->texture, source);
135 evas_canvas3d_texture_source_visible_set(data->texture, EINA_TRUE); 133 evas_canvas3d_texture_source_visible_set(data->texture, EINA_TRUE);
@@ -144,17 +142,16 @@ _mesh_setup(Scene_Data *data)
144 evas_canvas3d_material_texture_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture); 142 evas_canvas3d_material_texture_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture);
145 143
146 /* Set data of primitive */ 144 /* Set data of primitive */
147 data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 145 eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
148 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 146 evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
149 147
150 /* Setup mesh. */ 148 /* Setup mesh. */
151 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 149 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
152 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube); 150 evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
153 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_FLAT); 151 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_FLAT);
154 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material); 152 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
155 153
156 data->mesh_node = 154 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
157 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
158 155
159 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 156 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
160 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 157 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
@@ -163,12 +160,11 @@ _mesh_setup(Scene_Data *data)
163static void 160static void
164_scene_setup(Scene_Data *data) 161_scene_setup(Scene_Data *data)
165{ 162{
166 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 163 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
167 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 164 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
168 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 165 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
169 166
170 data->root_node = 167 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
171 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
172 168
173 _camera_setup(data); 169 _camera_setup(data);
174 _light_setup(data); 170 _light_setup(data);
@@ -199,7 +195,7 @@ main(void)
199 evas = ecore_evas_get(ecore_evas); 195 evas = ecore_evas_get(ecore_evas);
200 196
201 /* Add a background rectangle objects. */ 197 /* Add a background rectangle objects. */
202 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 198 eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
203 efl_gfx_color_set(background, 0, 0, 0, 255); 199 efl_gfx_color_set(background, 0, 0, 0, 255);
204 efl_gfx_size_set(background, WIDTH, HEIGHT); 200 efl_gfx_size_set(background, WIDTH, HEIGHT);
205 efl_gfx_visible_set(background, EINA_TRUE); 201 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 f70d7e41a8..90a714655f 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 body->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 177 eo_add(&body->material, 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,33 +191,32 @@ _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 sphere->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 194 eo_add(&sphere->primitive, 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 sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 198 eo_add(&sphere->mesh, 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 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)); 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));
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 cone->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 210 eo_add(&cone->primitive, 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 cone->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 214 eo_add(&cone->mesh, 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 cone->node = 219 eo_add(&cone->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(cone->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
220 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
221 evas_canvas3d_node_mesh_add(cone->node, cone->mesh); 220 evas_canvas3d_node_mesh_add(cone->node, cone->mesh);
222 evas_canvas3d_node_orientation_angle_axis_set(cone->node, -90.0, 1.0, 0.0, 0.0); 221 evas_canvas3d_node_orientation_angle_axis_set(cone->node, -90.0, 1.0, 0.0, 0.0);
223 evas_canvas3d_node_position_set(cone->node, -4.0, 0.0, -3.0); 222 evas_canvas3d_node_position_set(cone->node, -4.0, 0.0, -3.0);
@@ -226,17 +225,16 @@ _cone_setup(Body_3D *cone)
226static void 225static void
227_cylinder_setup(Body_3D *cylinder) 226_cylinder_setup(Body_3D *cylinder)
228{ 227{
229 cylinder->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 228 eo_add(&cylinder->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
230 evas_canvas3d_primitive_form_set(cylinder->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER); 229 evas_canvas3d_primitive_form_set(cylinder->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER);
231 evas_canvas3d_primitive_precision_set(cylinder->primitive, 50); 230 evas_canvas3d_primitive_precision_set(cylinder->primitive, 50);
232 231
233 cylinder->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 232 eo_add(&cylinder->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
234 evas_canvas3d_mesh_from_primitive_set(cylinder->mesh, 0, cylinder->primitive); 233 evas_canvas3d_mesh_from_primitive_set(cylinder->mesh, 0, cylinder->primitive);
235 234
236 _body_material_set(cylinder, 0.0, 0.0, 1.0); 235 _body_material_set(cylinder, 0.0, 0.0, 1.0);
237 236
238 cylinder->node = 237 eo_add(&cylinder->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(cylinder->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
239 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
240 evas_canvas3d_node_mesh_add(cylinder->node, cylinder->mesh); 238 evas_canvas3d_node_mesh_add(cylinder->node, cylinder->mesh);
241 evas_canvas3d_node_orientation_angle_axis_set(cylinder->node, -90.0, 1.0, 0.0, 0.0); 239 evas_canvas3d_node_orientation_angle_axis_set(cylinder->node, -90.0, 1.0, 0.0, 0.0);
242 evas_canvas3d_node_position_set(cylinder->node, -2.0, 3.0, 1.0); 240 evas_canvas3d_node_position_set(cylinder->node, -2.0, 3.0, 1.0);
@@ -246,17 +244,19 @@ static void
246_fence_setup(Body_3D *fence) 244_fence_setup(Body_3D *fence)
247{ 245{
248 246
249 Eo *texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 247 Eo *texture = NULL;
248 eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
250 evas_canvas3d_texture_atlas_enable_set(texture, EINA_FALSE); 249 evas_canvas3d_texture_atlas_enable_set(texture, EINA_FALSE);
251 evas_canvas3d_texture_file_set(texture, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL); 250 evas_canvas3d_texture_file_set(texture, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL);
252 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 251 evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
253 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 252 evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
254 Eo *texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 253 Eo *texture1 = NULL;
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 fence->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 259 eo_add(&fence->material, 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,21 +270,20 @@ _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 fence->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 273 eo_add(&fence->primitive, 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 fence->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 279 eo_add(&fence->mesh, 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 fence->node = 286 eo_add(&fence->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(fence->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
287 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
288 evas_canvas3d_node_mesh_add(fence->node, fence->mesh); 287 evas_canvas3d_node_mesh_add(fence->node, fence->mesh);
289 evas_canvas3d_node_orientation_angle_axis_set(fence->node, -90.0, 1.0, 0.0, 0.0); 288 evas_canvas3d_node_orientation_angle_axis_set(fence->node, -90.0, 1.0, 0.0, 0.0);
290 evas_canvas3d_node_scale_set(fence->node, 10.0, 10.0, 5.0); 289 evas_canvas3d_node_scale_set(fence->node, 10.0, 10.0, 5.0);
@@ -294,16 +293,15 @@ _fence_setup(Body_3D *fence)
294static void 293static void
295_square_setup(Body_3D *square) 294_square_setup(Body_3D *square)
296{ 295{
297 square->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 296 eo_add(&square->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
298 evas_canvas3d_primitive_form_set(square->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE); 297 evas_canvas3d_primitive_form_set(square->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE);
299 298
300 square->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 299 eo_add(&square->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
301 evas_canvas3d_mesh_from_primitive_set(square->mesh, 0, square->primitive); 300 evas_canvas3d_mesh_from_primitive_set(square->mesh, 0, square->primitive);
302 301
303 _body_material_set(square, 0.4, 0.4, 0.4); 302 _body_material_set(square, 0.4, 0.4, 0.4);
304 303
305 square->node = 304 eo_add(&square->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(square->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
306 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
307 evas_canvas3d_node_mesh_add(square->node, square->mesh); 305 evas_canvas3d_node_mesh_add(square->node, square->mesh);
308 evas_canvas3d_node_position_set(square->node, 0.0, -1.0, 0.0); 306 evas_canvas3d_node_position_set(square->node, 0.0, -1.0, 0.0);
309 evas_canvas3d_node_scale_set(square->node, 30.0, 30.0, 30.0); 307 evas_canvas3d_node_scale_set(square->node, 30.0, 30.0, 30.0);
@@ -313,15 +311,15 @@ _square_setup(Body_3D *square)
313static void 311static void
314_box_setup(Body_3D *box) 312_box_setup(Body_3D *box)
315{ 313{
316 box->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 314 eo_add(&box->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
317 evas_canvas3d_primitive_form_set(box->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE); 315 evas_canvas3d_primitive_form_set(box->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
318 316
319 box->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 317 eo_add(&box->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
320 evas_canvas3d_mesh_from_primitive_set(box->mesh, 0, box->primitive); 318 evas_canvas3d_mesh_from_primitive_set(box->mesh, 0, box->primitive);
321 319
322 _body_material_set(box, 0, 1, 0); 320 _body_material_set(box, 0, 1, 0);
323 321
324 box->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 322 eo_add(&box->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(box->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
325 evas_canvas3d_node_mesh_add(box->node, box->mesh); 323 evas_canvas3d_node_mesh_add(box->node, box->mesh);
326 evas_canvas3d_node_position_set(box->node, 3.0, 0.0, -3.0); 324 evas_canvas3d_node_position_set(box->node, 3.0, 0.0, -3.0);
327} 325}
@@ -329,11 +327,11 @@ _box_setup(Body_3D *box)
329static void 327static void
330_model_setup(Body_3D *model) 328_model_setup(Body_3D *model)
331{ 329{
332 model->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 330 eo_add(&model->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
333 evas_canvas3d_texture_file_set(model->texture, image_path, NULL); 331 evas_canvas3d_texture_file_set(model->texture, image_path, NULL);
334 evas_canvas3d_texture_filter_set(model->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); 332 evas_canvas3d_texture_filter_set(model->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
335 evas_canvas3d_texture_wrap_set(model->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 333 evas_canvas3d_texture_wrap_set(model->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
336 model->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 334 eo_add(&model->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
337 335
338 evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, model->texture); 336 evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, model->texture);
339 evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, model->texture); 337 evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, model->texture);
@@ -343,13 +341,12 @@ _model_setup(Body_3D *model)
343 evas_canvas3d_material_shininess_set(model->material, 100.0); 341 evas_canvas3d_material_shininess_set(model->material, 100.0);
344 342
345 343
346 model->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 344 eo_add(&model->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
347 efl_file_set(model->mesh, model_path, NULL); 345 efl_file_set(model->mesh, model_path, NULL);
348 evas_canvas3d_mesh_frame_material_set(model->mesh, 0, model->material); 346 evas_canvas3d_mesh_frame_material_set(model->mesh, 0, model->material);
349 evas_canvas3d_mesh_shade_mode_set(model->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 347 evas_canvas3d_mesh_shade_mode_set(model->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
350 348
351 model->node = 349 eo_add(&model->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(model->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
352 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
353 evas_canvas3d_node_mesh_add(model->node, model->mesh); 350 evas_canvas3d_node_mesh_add(model->node, model->mesh);
354 evas_canvas3d_node_scale_set(model->node, 0.1, 0.1, 0.1); 351 evas_canvas3d_node_scale_set(model->node, 0.1, 0.1, 0.1);
355 evas_canvas3d_node_orientation_angle_axis_set(model->node, 120.0, -0.577, -0.577, -0.577); 352 evas_canvas3d_node_orientation_angle_axis_set(model->node, 120.0, -0.577, -0.577, -0.577);
@@ -391,13 +388,12 @@ _billboard_setup(Scene_Data *data)
391static void 388static void
392_camera_setup(Scene_Data *data) 389_camera_setup(Scene_Data *data)
393{ 390{
394 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 391 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
395 data->mediator = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 392 eo_add(&data->mediator, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mediator, EVAS_CANVAS3D_NODE_TYPE_NODE));
396 393
397 evas_canvas3d_camera_projection_perspective_set(data->camera, 50.0, 1.0, 2.0, 100.0); 394 evas_canvas3d_camera_projection_perspective_set(data->camera, 50.0, 1.0, 2.0, 100.0);
398 395
399 data->camera_node = 396 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
400 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
401 397
402 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 398 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
403 399
@@ -412,15 +408,14 @@ _camera_setup(Scene_Data *data)
412static void 408static void
413_light_setup(Scene_Data *data) 409_light_setup(Scene_Data *data)
414{ 410{
415 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 411 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
416 evas_canvas3d_light_ambient_set(data->light, AMBIENT_LIGHT, 1.0); 412 evas_canvas3d_light_ambient_set(data->light, AMBIENT_LIGHT, 1.0);
417 evas_canvas3d_light_diffuse_set(data->light, DIFFUSE_LIGHT, 1.0); 413 evas_canvas3d_light_diffuse_set(data->light, DIFFUSE_LIGHT, 1.0);
418 evas_canvas3d_light_specular_set(data->light, SPECULAR_LIGHT, 1.0); 414 evas_canvas3d_light_specular_set(data->light, SPECULAR_LIGHT, 1.0);
419 evas_canvas3d_light_spot_cutoff_set(data->light, 20); 415 evas_canvas3d_light_spot_cutoff_set(data->light, 20);
420 evas_canvas3d_light_projection_perspective_set(data->light, 40.0, 1.0, 2.0, 1000.0); 416 evas_canvas3d_light_projection_perspective_set(data->light, 40.0, 1.0, 2.0, 1000.0);
421 417
422 data->light_node = 418 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
423 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
424 evas_canvas3d_node_light_set(data->light_node, data->light); 419 evas_canvas3d_node_light_set(data->light_node, data->light);
425 evas_canvas3d_node_position_set(data->light_node, 50.0, 50.0, 70.0); 420 evas_canvas3d_node_position_set(data->light_node, 50.0, 50.0, 70.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); 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);
@@ -432,13 +427,12 @@ _scene_setup(Scene_Data *data)
432{ 427{
433 data->init = EINA_FALSE; 428 data->init = EINA_FALSE;
434 429
435 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 430 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
436 431
437 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 432 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
438 evas_canvas3d_scene_background_color_set(data->scene, BG_COLOR, 1); 433 evas_canvas3d_scene_background_color_set(data->scene, BG_COLOR, 1);
439 434
440 data->root_node = 435 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
441 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
442 436
443 437
444 _camera_setup(data); 438 _camera_setup(data);
@@ -610,7 +604,7 @@ main(void)
610 _scene_setup(&data); 604 _scene_setup(&data);
611 605
612 /* Add a background rectangle objects. */ 606 /* Add a background rectangle objects. */
613 background = eo_add(EVAS_RECTANGLE_CLASS, evas); 607 eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
614 efl_gfx_color_set(background, 0, 0, 0, 255); 608 efl_gfx_color_set(background, 0, 0, 0, 255);
615 efl_gfx_size_set(background, WIDTH, HEIGHT); 609 efl_gfx_size_set(background, WIDTH, HEIGHT);
616 efl_gfx_visible_set(background, EINA_TRUE); 610 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 2c0c7026b0..9d22907cc0 100644
--- a/src/examples/evas/evas-vg-simple.c
+++ b/src/examples/evas/evas-vg-simple.c
@@ -449,15 +449,19 @@ 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 = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "bg")); 452 Efl_VG *bg = NULL;
453 eo_add(&bg, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(bg, "bg"));
453 _rect_add(bg, 0, 0 , vg_w, vg_h); 454 _rect_add(bg, 0, 0 , vg_w, vg_h);
454 evas_vg_node_origin_set(bg, 0,0); 455 evas_vg_node_origin_set(bg, 0,0);
455 evas_vg_shape_stroke_width_set(bg, 1.0); 456 evas_vg_shape_stroke_width_set(bg, 1.0);
456 evas_vg_node_color_set(bg, 80, 80, 80, 80); 457 evas_vg_node_color_set(bg, 80, 80, 80, 80);
457 458
458 Efl_VG *shape = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "shape")); 459 Efl_VG *shape = NULL;
459 Efl_VG *rgradient = eo_add(EFL_VG_GRADIENT_RADIAL_CLASS, NULL, efl_vg_name_set(eoid, "rgradient")); 460 eo_add(&shape, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(shape, "shape"));
460 Efl_VG *lgradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, NULL, efl_vg_name_set(eoid, "lgradient")); 461 Efl_VG *rgradient = NULL;
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"));
461 465
462 _arcto(shape, 0, 0, 100, 100, 25, 330); 466 _arcto(shape, 0, 0, 100, 100, 25, 330);
463 467
@@ -498,7 +502,8 @@ vector_set(int x, int y, int w, int h)
498 evas_vg_node_color_set(shape, 0, 0, 255, 255); 502 evas_vg_node_color_set(shape, 0, 0, 255, 255);
499 evas_vg_shape_stroke_color_set(shape, 0, 0, 255, 128); 503 evas_vg_shape_stroke_color_set(shape, 0, 0, 255, 128);
500 504
501 Efl_VG *rect = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "rect")); 505 Efl_VG *rect = NULL;
506 eo_add(&rect, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(rect, "rect"));
502 _rect_add(rect, 0, 0, 100, 100); 507 _rect_add(rect, 0, 0, 100, 100);
503 evas_vg_node_origin_set(rect, 100, 100); 508 evas_vg_node_origin_set(rect, 100, 100);
504 evas_vg_shape_fill_set(rect, lgradient); 509 evas_vg_shape_fill_set(rect, lgradient);
@@ -506,7 +511,8 @@ vector_set(int x, int y, int w, int h)
506 evas_vg_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND); 511 evas_vg_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND);
507 evas_vg_shape_stroke_color_set(rect, 255, 255, 255, 255); 512 evas_vg_shape_stroke_color_set(rect, 255, 255, 255, 255);
508 513
509 Efl_VG *rect1 = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "rect1")); 514 Efl_VG *rect1 = NULL;
515 eo_add(&rect1, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(rect1, "rect1"));
510 _rect_add(rect1, 0, 0, 70, 70); 516 _rect_add(rect1, 0, 0, 70, 70);
511 evas_vg_node_origin_set(rect1, 50, 70); 517 evas_vg_node_origin_set(rect1, 50, 70);
512 evas_vg_shape_stroke_scale_set(rect1, 2); 518 evas_vg_shape_stroke_scale_set(rect1, 2);
@@ -514,7 +520,8 @@ vector_set(int x, int y, int w, int h)
514 evas_vg_shape_stroke_join_set(rect1, EFL_GFX_JOIN_ROUND); 520 evas_vg_shape_stroke_join_set(rect1, EFL_GFX_JOIN_ROUND);
515 evas_vg_shape_stroke_color_set(rect1, 0, 100, 80, 100); 521 evas_vg_shape_stroke_color_set(rect1, 0, 100, 80, 100);
516 522
517 Efl_VG *circle = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "circle")); 523 Efl_VG *circle = NULL;
524 eo_add(&circle, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(circle, "circle"));
518 _arcto(circle, 0, 0, 250, 100, 30, 300); 525 _arcto(circle, 0, 0, 250, 100, 30, 300);
519 evas_vg_shape_fill_set(circle, lgradient); 526 evas_vg_shape_fill_set(circle, lgradient);
520 //evas_vg_node_transformation_set(&matrix), 527 //evas_vg_node_transformation_set(&matrix),
@@ -522,27 +529,30 @@ vector_set(int x, int y, int w, int h)
522 evas_vg_node_color_set(circle, 50, 0, 0, 50); 529 evas_vg_node_color_set(circle, 50, 0, 0, 50);
523 530
524 // Foreground 531 // Foreground
525 Efl_VG *fg = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "fg")); 532 Efl_VG *fg = NULL;
533 eo_add(&fg, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(fg, "fg"));
526 _rect_add(fg, 0, 0, vg_w, vg_h); 534 _rect_add(fg, 0, 0, vg_w, vg_h);
527 evas_vg_node_origin_set(fg, 0, 0); 535 evas_vg_node_origin_set(fg, 0, 0);
528 evas_vg_shape_stroke_width_set(fg, 5.0); 536 evas_vg_shape_stroke_width_set(fg, 5.0);
529 evas_vg_shape_stroke_join_set(fg, EFL_GFX_JOIN_ROUND); 537 evas_vg_shape_stroke_join_set(fg, EFL_GFX_JOIN_ROUND);
530 evas_vg_shape_stroke_color_set(fg, 70, 70, 0, 70); 538 evas_vg_shape_stroke_color_set(fg, 70, 70, 0, 70);
531 539
532 Efl_VG *tst = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "tst")); 540 Efl_VG *tst = NULL;
541 eo_add(&tst, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(tst, "tst"));
533 evas_vg_shape_shape_append_rect(tst, 50, 25, 200, 200, 3, 5); 542 evas_vg_shape_shape_append_rect(tst, 50, 25, 200, 200, 3, 5);
534 evas_vg_node_color_set(tst, 0, 0, 200, 200); 543 evas_vg_node_color_set(tst, 0, 0, 200, 200);
535 evas_vg_shape_stroke_width_set(tst, 2); 544 evas_vg_shape_stroke_width_set(tst, 2);
536 evas_vg_shape_stroke_color_set(tst, 255, 0, 0, 255); 545 evas_vg_shape_stroke_color_set(tst, 255, 0, 0, 255);
537 546
538 Efl_VG *vc = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "vc")); 547 Efl_VG *vc = NULL;
548 eo_add(&vc, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(vc, "vc"));
539 evas_vg_shape_shape_append_circle(vc, 100, 100, 23); 549 evas_vg_shape_shape_append_circle(vc, 100, 100, 23);
540 evas_vg_node_color_set(vc, 0, 200, 0, 255); 550 evas_vg_node_color_set(vc, 0, 200, 0, 255);
541 evas_vg_shape_stroke_width_set(vc, 4); 551 evas_vg_shape_stroke_width_set(vc, 4);
542 evas_vg_shape_stroke_color_set(vc, 255, 0, 0, 255); 552 evas_vg_shape_stroke_color_set(vc, 255, 0, 0, 255);
543 553
544 beginning = eo_add(EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(eoid, root)); 554 eo_add(&beginning, EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(beginning, root));
545 end = 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));
546 556
547 circle = efl_vg_container_child_get(end, "circle"); 557 circle = efl_vg_container_child_get(end, "circle");
548 efl_vg_transformation_set(circle, &matrix); 558 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 ee608ba2f9..8529746f18 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 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 29 eo_add(&data->camera, 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 data->mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 32 eo_add(&data->mediator_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mediator_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
33 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 33 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, 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 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 46 eo_add(&data->light, 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 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 53 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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 2e83fd8e6d..4acf990f25 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 data->material_ball = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 805 eo_add(&data->material_ball, 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 data->mesh_ball = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 814 eo_add(&data->mesh_ball, 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 data->material_column = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 868 eo_add(&data->material_column, 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 data->texture_diffuse_column = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 889 eo_add(&data->texture_diffuse_column, 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 data->cube_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 994 eo_add(&data->cube_primitive, 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 data->sphere_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 998 eo_add(&data->sphere_primitive, 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 global_scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 1002 eo_add(&global_scene, 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 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 1007 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, 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 data->cylinder_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); 1017 eo_add(&data->cylinder_primitive, 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 data->carp_mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 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));
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 247612b4cf..f2376ff0a7 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 _ecore_parent = eo_add(ECORE_PARENT_CLASS, NULL); 268 eo_add(&_ecore_parent, 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 d54e92f315..bddd7ce15c 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 animator = eo_add(MY_CLASS, _ecore_parent, ecore_animator_constructor(eoid, func, data)); 375 eo_add(&animator, MY_CLASS, _ecore_parent, ecore_animator_constructor(animator, 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 animator = eo_add(MY_CLASS, _ecore_parent, ecore_animator_timeline_constructor(eoid, runtime, func, data)); 391 eo_add(&animator, MY_CLASS, _ecore_parent, ecore_animator_timeline_constructor(animator, 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 75c577b67f..bbb2d65814 100644
--- a/src/lib/ecore/ecore_exe.c
+++ b/src/lib/ecore/ecore_exe.c
@@ -67,7 +67,8 @@ 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 = eo_add(MY_CLASS, NULL, ecore_obj_exe_command_set(eoid, exe_cmd, flags)); 70 Ecore_Exe *ret = NULL;
71 eo_add(&ret, MY_CLASS, NULL, ecore_obj_exe_command_set(ret, exe_cmd, flags));
71 if (ret) 72 if (ret)
72 { 73 {
73 Ecore_Exe_Data *pd = eo_data_scope_get(ret, MY_CLASS); 74 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 a7cbfa5704..d985550aec 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 ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_after_constructor(eoid, func, data)); 64 eo_add(&ie, MY_CLASS, _ecore_parent, ecore_idle_enterer_after_constructor(ie, 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 ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_before_constructor(eoid, func, data)); 81 eo_add(&ie, MY_CLASS, _ecore_parent, ecore_idle_enterer_before_constructor(ie, 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 5074b13009..483f8dfc0c 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 ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_exiter_constructor(eoid, func, data)); 40 eo_add(&ie, MY_CLASS, _ecore_parent, ecore_idle_exiter_constructor(ie, 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 f68d424488..00d60fb0ae 100644
--- a/src/lib/ecore/ecore_idler.c
+++ b/src/lib/ecore/ecore_idler.c
@@ -35,7 +35,8 @@ 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 return eo_add(MY_CLASS, _ecore_parent, ecore_idler_constructor(eoid, func, data)); 38 Eo *ret = NULL;
39 return eo_add(&ret, MY_CLASS, _ecore_parent, ecore_idler_constructor(ret, func, data));
39} 40}
40 41
41EOLIAN static void 42EOLIAN static void
diff --git a/src/lib/ecore/ecore_job.c b/src/lib/ecore/ecore_job.c
index 1f459c7940..a9c4df55f0 100644
--- a/src/lib/ecore/ecore_job.c
+++ b/src/lib/ecore/ecore_job.c
@@ -49,7 +49,8 @@ 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 = eo_add(MY_CLASS, _ecore_parent, ecore_job_constructor(eoid, func, data)); 52 Ecore_Job *job = NULL;
53 eo_add(&job, MY_CLASS, _ecore_parent, ecore_job_constructor(job, func, data));
53 return job; 54 return job;
54} 55}
55 56
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 8175e635e8..d0b9a25751 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 _mainloop_singleton = eo_add(ECORE_MAINLOOP_CLASS, NULL); 2716 eo_add(&_mainloop_singleton, 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 79f2a78f0b..9b0b9a84d5 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 poller = eo_add(MY_CLASS, _ecore_parent, ecore_poller_constructor(eoid, type, interval, func, data)); 240 eo_add(&poller, MY_CLASS, _ecore_parent, ecore_poller_constructor(poller, 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 7343a7f726..2c3364879f 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 timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(eoid, in, func, data)); 96 eo_add(&timer, MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(timer, 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 timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(eoid, in, func, data)); 360 eo_add(&timer, MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(timer, 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 ba1a575fad..2bfca03023 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 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)); 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));
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 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)); 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));
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 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)); 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));
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 obj = eo_add(EFL_NETWORK_CLIENT_CLASS, NULL); 2059 eo_add(&obj, 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 obj = eo_add(EFL_NETWORK_CLIENT_CLASS, NULL); 2334 eo_add(&obj, 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 59a5b211c4..a652636cfa 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 ece_obj = eo_add(ECORE_CON_EET_SERVER_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(eoid, server)); 725 eo_add(&ece_obj, ECORE_CON_EET_SERVER_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(ece_obj, 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 ece_obj = eo_add(ECORE_CON_EET_CLIENT_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(eoid, server)); 737 eo_add(&ece_obj, ECORE_CON_EET_CLIENT_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(ece_obj, 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 75d71c0bf9..9ab9b960ad 100644
--- a/src/lib/ecore_con/ecore_con_local_win32.c
+++ b/src/lib/ecore_con/ecore_con_local_win32.c
@@ -286,7 +286,8 @@ _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 = eo_add(EFL_NETWORK_CLIENT_CLASS, NULL); 289 Ecore_Con_Client *cl_obj = NULL;
290 eo_add(&cl_obj, EFL_NETWORK_CLIENT_CLASS, NULL);
290 Efl_Network_Client_Data *cl = eo_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS); 291 Efl_Network_Client_Data *cl = eo_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS);
291 if (!cl) 292 if (!cl)
292 { 293 {
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index 000bf4d016..3f127185f3 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 url_obj = eo_add(EFL_NETWORK_URL_CLASS, NULL, efl_network_url_set(eoid, url)); 228 eo_add(&url_obj, EFL_NETWORK_URL_CLASS, NULL, efl_network_url_set(url_obj, 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 6ea31570fb..3e8f9c3837 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -4744,7 +4744,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4744 case EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE: 4744 case EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE:
4745 { 4745 {
4746 Eo *primitive = NULL; 4746 Eo *primitive = NULL;
4747 primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base->evas); 4747 eo_add(&primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base->evas);
4748 evas_canvas3d_primitive_form_set(primitive, pd_mesh_node->mesh_node.mesh.primitive); 4748 evas_canvas3d_primitive_form_set(primitive, pd_mesh_node->mesh_node.mesh.primitive);
4749 4749
4750 frame_exist = evas_canvas3d_mesh_frame_exist(mesh, pf->type.node.frame); 4750 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 3934392965..d6b46086b0 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 e = eo_add(MY_CLASS, evas); 234 eo_add(&e, 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 87bbbf0afd..81cba4830f 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 rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 796 eo_add(&rp->node, EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(rp->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
797 797
798 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, ed->base->evas); 798 eo_add(&mesh, 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 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, ed->base->evas); 812 eo_add(&material, 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 texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, ed->base->evas); 818 eo_add(&texture, 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 rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 829 eo_add(&rp->node, EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(rp->node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
830 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, ed->base->evas); 830 eo_add(&light, 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 rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 841 eo_add(&rp->node, EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(rp->node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
842 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, ed->base->evas); 842 eo_add(&camera, 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 df981573f0..8b6f2fa969 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 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)); 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));
206 if (!out) 206 if (!out)
207 { 207 {
208#if HAVE_COREAUDIO 208#if HAVE_COREAUDIO
209 out = eo_add(ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL); 209 eo_add(&out, ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
210#elif HAVE_PULSE 210#elif HAVE_PULSE
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)); 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));
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 in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL); 272 eo_add(&in, 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 out = eo_add(ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL); 281 eo_add(&out, ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
282#elif HAVE_PULSE 282#elif HAVE_PULSE
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)); 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));
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 ab42445257..eb5a9cb1f9 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 e = eo_add(MY_CLASS, evas); 23 eo_add(&e, 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 1d96750cc3..91235d2aa9 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 cevt.child = eo_add_ref(EIO_MODEL_CLASS, priv->obj, eio_model_path_set(eoid, evt->filename)); 150 eo_add_ref(&cevt.child, EIO_MODEL_CLASS, priv->obj, eio_model_path_set(cevt.child, 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 child = eo_add(MY_CLASS, NULL, eio_model_path_set(eoid, info->path)); 410 eo_add(&child, MY_CLASS, NULL, eio_model_path_set(child, 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,7 +523,8 @@ _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 return eo_add(EIO_MODEL_CLASS, obj); 526 Eo *ret = NULL;
527 return eo_add(&ret, EIO_MODEL_CLASS, obj);
527} 528}
528 529
529static void 530static void
diff --git a/src/lib/eldbus/eldbus_model_connection.c b/src/lib/eldbus/eldbus_model_connection.c
index ebd758be2b..af7e9eb6f7 100644
--- a/src/lib/eldbus/eldbus_model_connection.c
+++ b/src/lib/eldbus/eldbus_model_connection.c
@@ -345,7 +345,8 @@ _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 = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_connection_constructor(eoid, pd->connection, bus, "/")); 348 Eo *child = NULL;
349 eo_add(&child, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_connection_constructor(child, pd->connection, bus, "/"));
349 350
350 pd->children_list = eina_list_append(pd->children_list, child); 351 pd->children_list = eina_list_append(pd->children_list, child);
351 } 352 }
diff --git a/src/lib/eldbus/eldbus_model_object.c b/src/lib/eldbus/eldbus_model_object.c
index 240d657e77..697a7591c3 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 child = eo_add_ref(ELDBUS_MODEL_PROXY_CLASS, NULL, eldbus_model_proxy_constructor(eoid, object, interface)); 535 eo_add_ref(&child, ELDBUS_MODEL_PROXY_CLASS, NULL, eldbus_model_proxy_constructor(child, 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 2e660f4116..d2a3c80b51 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 child = eo_add(ELDBUS_MODEL_METHOD_CLASS, NULL, eldbus_model_method_constructor(eoid, pd->proxy, method)); 328 eo_add(&child, ELDBUS_MODEL_METHOD_CLASS, NULL, eldbus_model_method_constructor(child, 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 child = eo_add(ELDBUS_MODEL_SIGNAL_CLASS, NULL, eldbus_model_signal_constructor(eoid, pd->proxy, signal)); 362 eo_add(&child, ELDBUS_MODEL_SIGNAL_CLASS, NULL, eldbus_model_signal_constructor(child, 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 d0b0f327f8..5e7afa29de 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 e = eo_add(MY_CLASS, evas); 239 eo_add(&e, 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 6f2108f810..916304789d 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -1681,7 +1681,8 @@ 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 = eo_add(EVAS_VG_SHAPE_CLASS, root); 1684 * shape = NULL;
1685 eo_add(&shape, EVAS_VG_SHAPE_CLASS, root);
1685 * Efl_Gfx_Path_Command *path_cmd = NULL; 1686 * Efl_Gfx_Path_Command *path_cmd = NULL;
1686 * double *points = NULL; 1687 * double *points = NULL;
1687 * efl_gfx_path_append_circle(&path_cmd, &points); 1688 * 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 d631df6917..9b1fc6c137 100644
--- a/src/lib/evas/canvas/evas_canvas3d_camera.c
+++ b/src/lib/evas/canvas/evas_canvas3d_camera.c
@@ -101,7 +101,8 @@ 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 = eo_add(MY_CLASS, e); 104 Evas_Object *eo_obj = NULL;
105 eo_add(&eo_obj, MY_CLASS, e);
105 return eo_obj; 106 return eo_obj;
106} 107}
107 108
diff --git a/src/lib/evas/canvas/evas_canvas3d_light.c b/src/lib/evas/canvas/evas_canvas3d_light.c
index 11e9c81965..b9b186fe18 100644
--- a/src/lib/evas/canvas/evas_canvas3d_light.c
+++ b/src/lib/evas/canvas/evas_canvas3d_light.c
@@ -72,7 +72,8 @@ 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 = eo_add(MY_CLASS, e); 75 Evas_Object *eo_obj = NULL;
76 eo_add(&eo_obj, MY_CLASS, e);
76 return eo_obj; 77 return eo_obj;
77} 78}
78 79
diff --git a/src/lib/evas/canvas/evas_canvas3d_material.c b/src/lib/evas/canvas/evas_canvas3d_material.c
index 5070d44450..98a4e66cb5 100644
--- a/src/lib/evas/canvas/evas_canvas3d_material.c
+++ b/src/lib/evas/canvas/evas_canvas3d_material.c
@@ -84,7 +84,8 @@ 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 = eo_add(MY_CLASS, e); 87 Evas_Object *eo_obj = NULL;
88 eo_add(&eo_obj, MY_CLASS, e);
88 return eo_obj; 89 return eo_obj;
89} 90}
90 91
diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.c b/src/lib/evas/canvas/evas_canvas3d_mesh.c
index d19a1fc39a..5442ecadb2 100644
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.c
+++ b/src/lib/evas/canvas/evas_canvas3d_mesh.c
@@ -254,7 +254,8 @@ 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 = eo_add(MY_CLASS, e); 257 Evas_Object *eo_obj = NULL;
258 eo_add(&eo_obj, MY_CLASS, e);
258 return eo_obj; 259 return eo_obj;
259} 260}
260 261
diff --git a/src/lib/evas/canvas/evas_canvas3d_node.c b/src/lib/evas/canvas/evas_canvas3d_node.c
index 5e0944d929..246450f593 100644
--- a/src/lib/evas/canvas/evas_canvas3d_node.c
+++ b/src/lib/evas/canvas/evas_canvas3d_node.c
@@ -1012,7 +1012,8 @@ 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 = eo_add(MY_CLASS, e, evas_canvas3d_node_constructor(eoid, type)); 1015 Evas_Object *eo_obj = NULL;
1016 eo_add(&eo_obj, MY_CLASS, e, evas_canvas3d_node_constructor(eo_obj, type));
1016 return eo_obj; 1017 return eo_obj;
1017} 1018}
1018 1019
diff --git a/src/lib/evas/canvas/evas_canvas3d_primitive.c b/src/lib/evas/canvas/evas_canvas3d_primitive.c
index 76dcdd6746..ab07d132f3 100644
--- a/src/lib/evas/canvas/evas_canvas3d_primitive.c
+++ b/src/lib/evas/canvas/evas_canvas3d_primitive.c
@@ -20,7 +20,8 @@ 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 = eo_add(MY_CLASS, e); 23 Evas_Object *eo_obj = NULL;
24 eo_add(&eo_obj, MY_CLASS, e);
24 return eo_obj; 25 return eo_obj;
25} 26}
26 27
diff --git a/src/lib/evas/canvas/evas_canvas3d_scene.c b/src/lib/evas/canvas/evas_canvas3d_scene.c
index cb7ffc373a..e1a0295e07 100644
--- a/src/lib/evas/canvas/evas_canvas3d_scene.c
+++ b/src/lib/evas/canvas/evas_canvas3d_scene.c
@@ -61,7 +61,8 @@ 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 = eo_add(MY_CLASS, e); 64 Evas_Object *eo_obj = NULL;
65 eo_add(&eo_obj, MY_CLASS, e);
65 return eo_obj; 66 return eo_obj;
66} 67}
67 68
diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.c b/src/lib/evas/canvas/evas_canvas3d_texture.c
index 664de1c9c1..b058765b6a 100644
--- a/src/lib/evas/canvas/evas_canvas3d_texture.c
+++ b/src/lib/evas/canvas/evas_canvas3d_texture.c
@@ -313,7 +313,8 @@ 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 = eo_add(MY_CLASS, e); 316 Evas_Object *eo_obj = NULL;
317 eo_add(&eo_obj, MY_CLASS, e);
317 return eo_obj; 318 return eo_obj;
318} 319}
319 320
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 38e901a957..56956a7e3e 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -151,7 +151,8 @@ evas_shutdown(void)
151EAPI Evas * 151EAPI Evas *
152evas_new(void) 152evas_new(void)
153{ 153{
154 Evas_Object *eo_obj = eo_add(EVAS_CANVAS_CLASS, NULL); 154 Evas_Object *eo_obj = NULL;
155 eo_add(&eo_obj, EVAS_CANVAS_CLASS, NULL);
155 return eo_obj; 156 return eo_obj;
156} 157}
157 158
diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c
index 55e7ca5943..739012ee5c 100644
--- a/src/lib/evas/canvas/evas_object_box.c
+++ b/src/lib/evas/canvas/evas_object_box.c
@@ -458,7 +458,8 @@ 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 = eo_add(MY_CLASS, evas); 461 Evas_Object *obj = NULL;
462 eo_add(&obj, MY_CLASS, evas);
462 return obj; 463 return obj;
463} 464}
464 465
diff --git a/src/lib/evas/canvas/evas_object_grid.c b/src/lib/evas/canvas/evas_object_grid.c
index 0374b132f2..12b6d2bf74 100644
--- a/src/lib/evas/canvas/evas_object_grid.c
+++ b/src/lib/evas/canvas/evas_object_grid.c
@@ -265,7 +265,8 @@ 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 = eo_add(MY_CLASS, evas); 268 Evas_Object *obj = NULL;
269 eo_add(&obj, MY_CLASS, evas);
269 return obj; 270 return obj;
270} 271}
271 272
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index f3b1d7797a..0367fa2526 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -383,7 +383,8 @@ 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 = eo_add(EVAS_IMAGE_CLASS, eo_e); 386 Evas_Object *eo_obj = NULL;
387 eo_add(&eo_obj, EVAS_IMAGE_CLASS, eo_e);
387 return eo_obj; 388 return eo_obj;
388} 389}
389 390
diff --git a/src/lib/evas/canvas/evas_object_line.c b/src/lib/evas/canvas/evas_object_line.c
index 26dd5c7acb..07ef578d8f 100644
--- a/src/lib/evas/canvas/evas_object_line.c
+++ b/src/lib/evas/canvas/evas_object_line.c
@@ -97,7 +97,8 @@ 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 = eo_add(EVAS_LINE_CLASS, e); 100 Evas_Object *eo_obj = NULL;
101 eo_add(&eo_obj, EVAS_LINE_CLASS, e);
101 return eo_obj; 102 return eo_obj;
102} 103}
103 104
diff --git a/src/lib/evas/canvas/evas_object_polygon.c b/src/lib/evas/canvas/evas_object_polygon.c
index a154e37cd2..10276ca02f 100644
--- a/src/lib/evas/canvas/evas_object_polygon.c
+++ b/src/lib/evas/canvas/evas_object_polygon.c
@@ -98,7 +98,8 @@ 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 = eo_add(EVAS_POLYGON_CLASS, e); 101 Evas_Object *eo_obj = NULL;
102 eo_add(&eo_obj, EVAS_POLYGON_CLASS, e);
102 return eo_obj; 103 return eo_obj;
103} 104}
104 105
diff --git a/src/lib/evas/canvas/evas_object_rectangle.c b/src/lib/evas/canvas/evas_object_rectangle.c
index 37f8266eb1..212cda658f 100644
--- a/src/lib/evas/canvas/evas_object_rectangle.c
+++ b/src/lib/evas/canvas/evas_object_rectangle.c
@@ -95,7 +95,8 @@ 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 = eo_add(EVAS_RECTANGLE_CLASS, e); 98 Evas_Object *eo_obj = NULL;
99 eo_add(&eo_obj, EVAS_RECTANGLE_CLASS, e);
99 return eo_obj; 100 return eo_obj;
100} 101}
101 102
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index 44c18f197f..b380f58c83 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_obj = eo_add(EVAS_OBJECT_SMART_CLASS, eo_e); 573 eo_add(&eo_obj, 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 60a83fddbe..ab71ad8e25 100644
--- a/src/lib/evas/canvas/evas_object_table.c
+++ b/src/lib/evas/canvas/evas_object_table.c
@@ -964,7 +964,8 @@ 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 = eo_add(MY_CLASS, evas); 967 Evas_Object *obj = NULL;
968 eo_add(&obj, MY_CLASS, evas);
968 return obj; 969 return obj;
969} 970}
970 971
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index a492ebdca7..723c8b510e 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/