aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-11 12:24:08 +0000
committerTom Hacohen <tom@stosb.com>2016-03-11 12:29:03 +0000
commitf24210caac8d50940ddef858994571be59179c10 (patch)
treecfc8b264e77abbab9827517d1827f9a4fb4dcd50
parentRevert "Examples: Update according to recent eo_add changes." (diff)
downloadefl-f24210caac8d50940ddef858994571be59179c10.tar.gz
Revert "Automatic migration to the new eo_add syntax."
-rw-r--r--src/benchmarks/eo/eo_bench_callbacks.c3
-rw-r--r--src/benchmarks/eo/eo_bench_eo_do.c18
-rw-r--r--src/examples/ecore/ecore_audio_custom.c4
-rw-r--r--src/examples/ecore/ecore_audio_playback.c6
-rw-r--r--src/examples/ecore/ecore_audio_to_ogg.c4
-rw-r--r--src/examples/eldbus/dbusmodel.c2
-rw-r--r--src/examples/evas/evas-3d-aabb.c32
-rw-r--r--src/examples/evas/evas-3d-blending.c31
-rw-r--r--src/examples/evas/evas-3d-colorpick.c10
-rw-r--r--src/examples/evas/evas-3d-cube-rotate.c20
-rw-r--r--src/examples/evas/evas-3d-cube.c24
-rw-r--r--src/examples/evas/evas-3d-cube2.c34
-rw-r--r--src/examples/evas/evas-3d-eet.c24
-rw-r--r--src/examples/evas/evas-3d-fog.c34
-rw-r--r--src/examples/evas/evas-3d-frustum.c33
-rw-r--r--src/examples/evas/evas-3d-hull.c36
-rw-r--r--src/examples/evas/evas-3d-md2.c24
-rw-r--r--src/examples/evas/evas-3d-mmap-set.c18
-rw-r--r--src/examples/evas/evas-3d-obj.c20
-rw-r--r--src/examples/evas/evas-3d-parallax-occlusion.c32
-rw-r--r--src/examples/evas/evas-3d-pick.c21
-rw-r--r--src/examples/evas/evas-3d-ply.c18
-rw-r--r--src/examples/evas/evas-3d-proxy.c28
-rw-r--r--src/examples/evas/evas-3d-shadows.c78
-rw-r--r--src/examples/evas/evas-vg-simple.c34
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter-header.c10
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter.c20
-rw-r--r--src/lib/ecore/ecore.c2
-rw-r--r--src/lib/ecore/ecore_anim.c4
-rw-r--r--src/lib/ecore/ecore_exe.c3
-rw-r--r--src/lib/ecore/ecore_idle_enterer.c4
-rw-r--r--src/lib/ecore/ecore_idle_exiter.c2
-rw-r--r--src/lib/ecore/ecore_idler.c3
-rw-r--r--src/lib/ecore/ecore_job.c3
-rw-r--r--src/lib/ecore/ecore_main.c2
-rw-r--r--src/lib/ecore/ecore_poller.c2
-rw-r--r--src/lib/ecore/ecore_timer.c4
-rw-r--r--src/lib/ecore_con/ecore_con.c10
-rw-r--r--src/lib/ecore_con/ecore_con_eet.c4
-rw-r--r--src/lib/ecore_con/ecore_con_local_win32.c3
-rw-r--r--src/lib/ecore_con/ecore_con_url.c2
-rw-r--r--src/lib/edje/edje_calc.c2
-rw-r--r--src/lib/edje/edje_edit.c2
-rw-r--r--src/lib/edje/edje_load.c16
-rw-r--r--src/lib/edje/edje_multisense.c12
-rw-r--r--src/lib/edje/edje_smart.c2
-rw-r--r--src/lib/eio/eio_model.c7
-rw-r--r--src/lib/eldbus/eldbus_model_connection.c3
-rw-r--r--src/lib/eldbus/eldbus_model_object.c2
-rw-r--r--src/lib/eldbus/eldbus_model_proxy.c4
-rw-r--r--src/lib/emotion/emotion_smart.c2
-rw-r--r--src/lib/evas/Evas_Legacy.h3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_camera.c3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_light.c3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_material.c3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.c3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_node.c3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_primitive.c3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_scene.c3
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_texture.c3
-rw-r--r--src/lib/evas/canvas/evas_main.c3
-rw-r--r--src/lib/evas/canvas/evas_object_box.c3
-rw-r--r--src/lib/evas/canvas/evas_object_grid.c3
-rw-r--r--src/lib/evas/canvas/evas_object_image.c3
-rw-r--r--src/lib/evas/canvas/evas_object_line.c3
-rw-r--r--src/lib/evas/canvas/evas_object_polygon.c3
-rw-r--r--src/lib/evas/canvas/evas_object_rectangle.c3
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c2
-rw-r--r--src/lib/evas/canvas/evas_object_table.c3
-rw-r--r--src/lib/evas/canvas/evas_object_text.c3
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c3
-rw-r--r--src/lib/evas/canvas/evas_object_textgrid.c3
-rw-r--r--src/lib/evas/canvas/evas_object_vg.c5
-rw-r--r--src/lib/evas/canvas/evas_out.c3
-rw-r--r--src/lib/evas/canvas/evas_vg_container.c6
-rw-r--r--src/lib/evas/canvas/evas_vg_node.c2
-rw-r--r--src/lib/evas/canvas/evas_vg_shape.c9
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c12
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c8
-rw-r--r--src/modules/evas/model_loaders/eet/evas_model_load_eet.c2
-rw-r--r--src/tests/ecore/ecore_test_animator.c4
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c36
-rw-r--r--src/tests/eio/eio_model_test_file.c2
-rw-r--r--src/tests/eio/eio_model_test_monitor_add.c2
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model.c6
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_method.c2
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_model_signal.c2
-rw-r--r--src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c2
-rw-r--r--src/tests/emotion/emotion_test_main-eo.c4
-rw-r--r--src/tests/eo/access/access_main.c3
-rw-r--r--src/tests/eo/children/children_main.c14
-rw-r--r--src/tests/eo/composite_objects/composite_objects_comp.c3
-rw-r--r--src/tests/eo/composite_objects/composite_objects_main.c3
-rw-r--r--src/tests/eo/constructors/constructors_main.c21
-rw-r--r--src/tests/eo/function_overrides/function_overrides_main.c9
-rw-r--r--src/tests/eo/interface/interface_main.c3
-rw-r--r--src/tests/eo/mixin/mixin_main.c5
-rw-r--r--src/tests/eo/signals/signals_main.c3
-rw-r--r--src/tests/eo/suite/eo_test_call_errors.c9
-rw-r--r--src/tests/eo/suite/eo_test_class_behaviour_errors.c6
-rw-r--r--src/tests/eo/suite/eo_test_class_simple.c3
-rw-r--r--src/tests/eo/suite/eo_test_threaded_calls.c2
-rw-r--r--src/tests/eo/suite/eo_test_value.c3
-rw-r--r--src/tests/eolian_js/eolian_js_test_constructor_method_impl.c6
-rw-r--r--src/tests/evas/evas_test_mesh.c4
105 files changed, 477 insertions, 507 deletions
diff --git a/src/benchmarks/eo/eo_bench_callbacks.c b/src/benchmarks/eo/eo_bench_callbacks.c
index 2114234411..ab779f8417 100644
--- a/src/benchmarks/eo/eo_bench_callbacks.c
+++ b/src/benchmarks/eo/eo_bench_callbacks.c
@@ -17,8 +17,7 @@ static void
bench_eo_callbacks_add(int request)
{
int i;
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
diff --git a/src/benchmarks/eo/eo_bench_eo_do.c b/src/benchmarks/eo/eo_bench_eo_do.c
index 9160507c75..9f84535254 100644
--- a/src/benchmarks/eo/eo_bench_eo_do.c
+++ b/src/benchmarks/eo/eo_bench_eo_do.c
@@ -10,8 +10,7 @@ static void
bench_eo_do_simple(int request)
{
int i;
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
@@ -24,10 +23,8 @@ static void
bench_eo_do_two_objs(int request)
{
int i;
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
- Eo *obj2 = NULL;
- eo_add(&obj2, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
@@ -42,10 +39,8 @@ static void
bench_eo_do_two_objs_growing_stack(int request)
{
int i;
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
- Eo *obj2 = NULL;
- eo_add(&obj2, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_other_call(obj, obj2, 20);
@@ -83,8 +78,7 @@ bench_eo_do_super(int request)
cur_klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL);
int i;
- Eo *obj = NULL;
- eo_add(&obj, cur_klass, NULL);
+ Eo *obj = eo_add(cur_klass, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
diff --git a/src/examples/ecore/ecore_audio_custom.c b/src/examples/ecore/ecore_audio_custom.c
index 6eb1add105..2570a9e20d 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[])
ecore_app_args_set(argc, argv);
- eo_add(&out, ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
+ out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
- eo_add(&in, ECORE_AUDIO_OBJ_IN_CLASS, NULL);
+ in = eo_add(ECORE_AUDIO_OBJ_IN_CLASS, NULL);
if (!in)
{
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 a6e6c5e20a..f1624e0e67 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[])
{
if (!strncmp(argv[i], "tone:", 5))
{
- eo_add(&in, ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL);
+ in = eo_add(ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL);
if (!in)
{
printf("error when creating ecore audio source.\n");
@@ -276,7 +276,7 @@ main(int argc, const char *argv[])
}
else
{
- eo_add(&in, ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
+ in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
if (!in)
{
printf("error when creating ecore audio source.\n");
@@ -307,7 +307,7 @@ main(int argc, const char *argv[])
printf("Start: %s (%0.2fs)\n", name, length);
- eo_add(&out, ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
+ out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
ret = ecore_audio_obj_out_input_attach(out, in);
if (!ret)
printf("Could not attach input %s\n", name);
diff --git a/src/examples/ecore/ecore_audio_to_ogg.c b/src/examples/ecore/ecore_audio_to_ogg.c
index 62e721b061..fceed59045 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[])
ecore_audio_init();
- eo_add(&in, ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
+ in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
ecore_audio_obj_name_set(in, basename(argv[1]));
ret = ecore_audio_obj_source_set(in, argv[1]);
if (!ret) {
@@ -60,7 +60,7 @@ main(int argc, char *argv[])
eo_event_callback_add(in, ECORE_AUDIO_EV_IN_STOPPED, _play_finished, NULL);
- eo_add(&out, ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
+ out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
ret = ecore_audio_obj_source_set(out, argv[2]);
if (!ret) {
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 3e4063ea6a..b34799b4c5 100644
--- a/src/examples/eldbus/dbusmodel.c
+++ b/src/examples/eldbus/dbusmodel.c
@@ -102,7 +102,7 @@ main(int argc, char **argv EINA_UNUSED)
if (argc > 1) bus = argv[1];
if (argc > 2) path = argv[2];
- eo_add_ref(&root, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(root, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, bus, path));
+ root = eo_add_ref(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, bus, path));
eo_event_callback_add(root, EFL_MODEL_BASE_EVENT_LOAD_STATUS, _event_load_status_cb, NULL);
efl_model_load(root);
diff --git a/src/examples/evas/evas-3d-aabb.c b/src/examples/evas/evas-3d-aabb.c
index a6761855f6..d02668bed0 100644
--- a/src/examples/evas/evas-3d-aabb.c
+++ b/src/examples/evas/evas-3d-aabb.c
@@ -142,38 +142,40 @@ main(void)
evas = ecore_evas_get(ecore_evas);
- eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
- eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
- eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ camera_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_member_add(root_node, camera_node);
evas_canvas3d_node_position_set(camera_node, 100.0, 50.0, 20.0);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
- eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_directional_set(light, EINA_TRUE);
- eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ light_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(light_node, light);
evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
evas_canvas3d_node_member_add(root_node, light_node);
- eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
efl_file_set(mesh, model_path, NULL);
evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
- eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_file_set(texture, image_path, NULL);
evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -187,16 +189,16 @@ main(void)
evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_material_shininess_set(material, 50.0);
- eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_add(&mesh_box_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_box_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ mesh_box_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_add(&material_box, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ material_box = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_enable_set(material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
- eo_add(&cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
- eo_add(&mesh_box, EVAS_CANVAS3D_MESH_CLASS, evas);
+ mesh_box = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(mesh_box, 0, cube);
evas_canvas3d_mesh_vertex_assembly_set(mesh_box, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
evas_canvas3d_mesh_shade_mode_set(mesh_box, EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR);
@@ -213,7 +215,7 @@ main(void)
evas_canvas3d_scene_camera_node_set(scene, camera_node);
evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
- eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
+ background = eo_add(EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
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 90ee461389..db7c7a1590 100644
--- a/src/examples/evas/evas-3d-blending.c
+++ b/src/examples/evas/evas-3d-blending.c
@@ -143,11 +143,12 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
- eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
- eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ data->camera_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(data->camera_node, data->camera);
evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
@@ -159,12 +160,13 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
- eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ data->light_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(data->light_node, data->light);
evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -182,7 +184,7 @@ _set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material)
static void
_mesh_setup(Scene_Data *data)
{
- eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -192,7 +194,7 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2);
evas_canvas3d_material_shininess_set(data->material, 100.0);
- eo_add(&data->material1, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
evas_canvas3d_material_enable_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -202,22 +204,24 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2);
evas_canvas3d_material_shininess_set(data->material1, 100.0);
- eo_add(&data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
evas_canvas3d_primitive_precision_set(data->sphere, 50);
- eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_add(&data->mesh1, EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
_set_ball(data->mesh, data->sphere, data->material);
_set_ball(data->mesh1, data->sphere, data->material1);
- eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->mesh_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
- eo_add(&data->mesh_node1, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node1, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->mesh_node1 =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->root_node, data->mesh_node1);
evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1);
@@ -233,12 +237,13 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(data->scene, 0.5, 0.5, 0.5, 1);
- eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->root_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
diff --git a/src/examples/evas/evas-3d-colorpick.c b/src/examples/evas/evas-3d-colorpick.c
index 4a7594bd6d..885a53bd81 100644
--- a/src/examples/evas/evas-3d-colorpick.c
+++ b/src/examples/evas/evas-3d-colorpick.c
@@ -237,9 +237,9 @@ Eina_Bool
_init_sphere(void *this, const char *texture)
{
Test_object *sphere = (Test_object *)this;
- eo_add(&sphere->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- eo_add(&sphere->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_add(&sphere->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ sphere->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ sphere->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_primitive_form_set(sphere->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
evas_canvas3d_primitive_precision_set(sphere->primitive, 50);
evas_canvas3d_mesh_from_primitive_set(sphere->mesh, 0, sphere->primitive);
@@ -248,7 +248,7 @@ _init_sphere(void *this, const char *texture)
evas_canvas3d_mesh_color_pick_enable_set(sphere->mesh, EINA_TRUE);
- eo_add(&sphere->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ sphere->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_file_set(sphere->texture, texture, NULL);
evas_canvas3d_texture_filter_set(sphere->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
evas_canvas3d_texture_wrap_set(sphere->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -313,7 +313,7 @@ _init_scene(const char *texture)
m->material = spheretmp->material;
m->texture = spheretmp->texture;
}
- eo_add(&m->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(m->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ m->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
m->speed = tmp;
m->sphere_animate = _animate_sphere;
m->animate = ecore_timer_add(m->speed, m->sphere_animate, m);
diff --git a/src/examples/evas/evas-3d-cube-rotate.c b/src/examples/evas/evas-3d-cube-rotate.c
index 74525cc014..e393c14deb 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)
static void
_camera_setup(Scene_Data *data)
{
- eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 20.0, 1.0, 2.0, 50.0);
- eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(data->camera_node, data->camera);
evas_canvas3d_node_position_set(data->camera_node, 3.0, 3.0, 10.0);
evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -162,13 +162,13 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
- eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(data->light_node, data->light);
evas_canvas3d_node_position_set(data->light_node, 5.0, 5.0, 10.0);
@@ -181,7 +181,7 @@ static void
_mesh_setup(Scene_Data *data)
{
/* Setup material. */
- eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -192,16 +192,16 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_shininess_set(data->material, 100.0);
/* Setup primitive */
- eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
/* Setup mesh. */
- eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
- eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
}
@@ -209,8 +209,8 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
- eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
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 be29e046c5..6f6f4208c2 100644
--- a/src/examples/evas/evas-3d-cube.c
+++ b/src/examples/evas/evas-3d-cube.c
@@ -133,11 +133,12 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
- eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
- eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ data->camera_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(data->camera_node, data->camera);
evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -147,12 +148,13 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
- eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ data->light_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(data->light_node, data->light);
evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -162,7 +164,7 @@ static void
_mesh_setup(Scene_Data *data)
{
/* Setup material. */
- eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -173,7 +175,7 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_shininess_set(data->material, 100.0);
/* Setup mesh. */
- eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_vertex_count_set(data->mesh, 24);
evas_canvas3d_mesh_frame_add(data->mesh, 0);
evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]);
@@ -185,7 +187,8 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
- eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->mesh_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
}
@@ -193,11 +196,12 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
- eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->root_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
@@ -229,7 +233,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
- eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
+ background = eo_add(EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
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 387edd8cea..e46c2f7c64 100644
--- a/src/examples/evas/evas-3d-cube2.c
+++ b/src/examples/evas/evas-3d-cube2.c
@@ -111,10 +111,11 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
- eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
- eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ data->camera_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(data->camera_node, data->camera);
evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 3.0);
evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -124,12 +125,13 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
- eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ data->light_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(data->light_node, data->light);
evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -140,8 +142,8 @@ static void
_mesh_setup(Scene_Data *data)
{
/* Setup material. */
- eo_add(&data->material0, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_add(&data->material1, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->material0 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
evas_canvas3d_material_enable_set(data->material0, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -161,9 +163,9 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_material_shininess_set(data->material1, 100.0);
- eo_add(&data->texture0, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_add(&data->texture1, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_add(&data->texture_normal, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ data->texture0 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ data->texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ data->texture_normal = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_data_set(data->texture0, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]);
evas_canvas3d_texture_data_set(data->texture1, EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels1[0]);
@@ -174,18 +176,19 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_normal);
/* Set data of primitive */
- eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
/* Setup mesh. */
- eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material0);
evas_canvas3d_mesh_frame_add(data->mesh, 20);
evas_canvas3d_mesh_frame_material_set(data->mesh, 20, data->material1);
evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
- eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->mesh_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
}
@@ -193,11 +196,12 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
- eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->root_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
@@ -230,7 +234,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
- eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
+ background = eo_add(EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
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 69fca120e8..dc09191e05 100644
--- a/src/examples/evas/evas-3d-eet.c
+++ b/src/examples/evas/evas-3d-eet.c
@@ -115,37 +115,37 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
- eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
- eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_member_add(root_node, camera_node);
evas_canvas3d_node_position_set(camera_node, 200.0, 0.0, 40.0);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
/* Add the light. */
- eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_directional_set(light, EINA_TRUE);
- eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(light_node, light);
evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
evas_canvas3d_node_member_add(root_node, light_node);
/* Add the meshes. */
- eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_add(&mesh2, EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ mesh2 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
efl_file_set(mesh, input_model_path, NULL);
evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
@@ -169,13 +169,13 @@ main(void)
efl_file_set(mesh2, output_model_path, NULL);
evas_canvas3d_mesh_shade_mode_set(mesh2, EVAS_CANVAS3D_SHADE_MODE_PHONG);
- eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(root_node, mesh_node);
evas_canvas3d_node_mesh_add(mesh_node, mesh);
evas_canvas3d_node_position_set(mesh_node, 0.0, -40.0, 0.0);
- eo_add(&mesh_node2, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node2, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ mesh_node2 = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(root_node, mesh_node2);
evas_canvas3d_node_mesh_add(mesh_node2, mesh2);
evas_canvas3d_node_position_set(mesh_node2, 0.0, 40.0, 0.0);
@@ -186,7 +186,7 @@ main(void)
evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add a background rectangle objects. */
- eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
+ background = eo_add(EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
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 bc33f92c48..33bd05cc8c 100644
--- a/src/examples/evas/evas-3d-fog.c
+++ b/src/examples/evas/evas-3d-fog.c
@@ -81,11 +81,12 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
- eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
- eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ data->camera_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(data->camera_node, data->camera);
evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 7.0);
@@ -97,12 +98,13 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
- eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ data->light_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(data->light_node, data->light);
evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -121,7 +123,7 @@ _set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material)
static void
_mesh_setup(Scene_Data *data)
{
- eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -131,26 +133,29 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_material_shininess_set(data->material, 100.0);
- eo_add(&data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
evas_canvas3d_primitive_precision_set(data->sphere, 50);
- eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_add(&data->mesh1, EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
_set_ball(data->mesh, data->sphere, data->material);
_set_ball(data->mesh1, data->sphere, data->material);
- eo_add(&data->animation_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->animation_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->animation_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
- eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->mesh_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->animation_node, data->mesh_node);
evas_canvas3d_node_member_add(data->root_node, data->animation_node);
evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
evas_canvas3d_node_position_set(data->mesh_node, 0.0, 0.0, 3.0);
- eo_add(&data->mesh_node1, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node1, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->mesh_node1 =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->root_node, data->mesh_node1);
evas_canvas3d_node_mesh_add(data->mesh_node1, data->mesh1);
@@ -165,12 +170,13 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(data->scene, FOG_COLOR, 1);
- eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->root_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
@@ -203,7 +209,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
- eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
+ background = eo_add(EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
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 25cfc5b8d4..4e1323f5b4 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
static void
_camera_setup(Scene_Data *data)
{
- eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(data->camera_node, data->camera);
evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 300.0);
evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -293,12 +293,12 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
- eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(data->light_node, data->light);
evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 200.0);
evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
@@ -309,7 +309,7 @@ _light_setup(Scene_Data *data)
static void
_mesh_setup(Scene_Data *data)
{
- eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -319,26 +319,27 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_material_shininess_set(data->material, 100.0);
- eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
- eo_add(&data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
evas_canvas3d_primitive_precision_set(data->sphere, 20);
- eo_add(&data->mesh_aabb, EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh_aabb = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(data->mesh_aabb, 0, data->cube);
evas_canvas3d_mesh_vertex_assembly_set(data->mesh_aabb, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
evas_canvas3d_mesh_shade_mode_set(data->mesh_aabb, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
evas_canvas3d_mesh_frame_material_set(data->mesh_aabb, 0, data->material);
- eo_add(&data->mesh_sphere, EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh_sphere = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(data->mesh_sphere, 0, data->sphere);
evas_canvas3d_mesh_vertex_assembly_set(data->mesh_sphere, EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES);
evas_canvas3d_mesh_shade_mode_set(data->mesh_sphere, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
evas_canvas3d_mesh_frame_material_set(data->mesh_sphere, 0, data->material);
- eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->mesh_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_aabb);
}
@@ -346,9 +347,9 @@ _mesh_setup(Scene_Data *data)
static void
_mesh_setup_model(Scene_Data *data)
{
- eo_add(&data->mesh_model, EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_add(&data->material_model, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_add(&data->texture_model, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ data->mesh_model = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->material_model = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->texture_model = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_file_set(data->texture_model, texture_path, NULL);
evas_canvas3d_texture_filter_set(data->texture_model, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
@@ -373,15 +374,15 @@ _mesh_setup_model(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
- eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_light_setup(data);
_mesh_setup_model(data);
_camera_setup(data);
- eo_add(&data->mesh_node_model, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node_model, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->mesh_node_model = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_position_set(data->mesh_node_model, obj_x, obj_y, obj_z);
evas_canvas3d_node_orientation_angle_axis_set(data->mesh_node_model, -90, 1.0, 0.0, 0.0);
evas_canvas3d_node_scale_set(data->mesh_node_model, obj_sc_x, obj_sc_y, obj_sc_z);
diff --git a/src/examples/evas/evas-3d-hull.c b/src/examples/evas/evas-3d-hull.c
index 130ad3742e..57602b6988 100644
--- a/src/examples/evas/evas-3d-hull.c
+++ b/src/examples/evas/evas-3d-hull.c
@@ -255,11 +255,12 @@ _key_down(void *data,
static void
_camera_setup(Scene_Data *data)
{
- eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
- eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ data->camera_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(data->camera_node, data->camera);
evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -269,12 +270,13 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
- eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ data->light_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(data->light_node, data->light);
evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -290,7 +292,7 @@ _mesh_setup(Scene_Data *data)
Eo *primitive = NULL;
/* Setup material. */
- eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
@@ -300,17 +302,17 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_shininess_set(data->material, 100.0);
/* Setup mesh sphere */
- eo_add(&primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
evas_canvas3d_primitive_precision_set(primitive, 10);
- eo_add(&data->mesh_sphere, EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh_sphere = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(data->mesh_sphere, 0, primitive);
evas_canvas3d_mesh_vertex_assembly_set(data->mesh_sphere, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
evas_canvas3d_mesh_shade_mode_set(data->mesh_sphere, EVAS_CANVAS3D_SHADE_MODE_PHONG);
evas_canvas3d_mesh_frame_material_set(data->mesh_sphere, 0, data->material);
/* Setup mesh torus */
- eo_add(&data->mesh_torus, EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh_torus = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_TORUS);
evas_canvas3d_primitive_precision_set(primitive, 50);
evas_canvas3d_mesh_from_primitive_set(data->mesh_torus, 0, primitive);
@@ -319,7 +321,7 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_mesh_frame_material_set(data->mesh_torus, 0, data->material);
/* Setup mesh cube */
- eo_add(&data->mesh_cube, EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh_cube = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
evas_canvas3d_primitive_precision_set(primitive, 50);
evas_canvas3d_mesh_from_primitive_set(data->mesh_cube, 0, primitive);
@@ -351,7 +353,8 @@ _mesh_setup(Scene_Data *data)
MODEL_MESH_INIT(blender_test_eagle, eagle_test, DIFFUSE)
MODEL_MESH_INIT(blender_test_sonic, sonic_test, DIFFUSE)
- eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->mesh_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh_sphere);
evas_canvas3d_node_scale_set(data->mesh_node, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
@@ -368,13 +371,15 @@ _mesh_setup(Scene_Data *data)
_print_result(data->mesh_sphere_ch, data->mesh_blender_test_sphere);
- 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));
+ data->mesh_node_convex_hull =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->root_node, data->mesh_node_convex_hull);
evas_canvas3d_node_position_set(data->mesh_node_convex_hull, 0.0, 0.0, 0.0);
evas_canvas3d_node_scale_set(data->mesh_node_convex_hull, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
evas_canvas3d_node_mesh_add(data->mesh_node_convex_hull, data->mesh_sphere_ch);
- eo_add(&data->mesh_node_blender, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node_blender, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->mesh_node_blender =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->root_node, data->mesh_node_blender);
evas_canvas3d_node_position_set(data->mesh_node_blender, -3.0, 0.0, 0.0);
evas_canvas3d_node_scale_set(data->mesh_node_blender, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
@@ -384,11 +389,12 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
- eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->root_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
@@ -423,7 +429,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
- eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
+ background = eo_add(EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
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 443271a9dc..e19dfd6630 100644
--- a/src/examples/evas/evas-3d-md2.c
+++ b/src/examples/evas/evas-3d-md2.c
@@ -91,42 +91,44 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
- eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
- eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ camera_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_member_add(root_node, camera_node);
evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 20.0);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
/* Add the light. */
- eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_directional_set(light, EINA_TRUE);
- eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ light_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(light_node, light);
evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
evas_canvas3d_node_member_add(root_node, light_node);
/* Add the mesh. */
- eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
- eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
efl_file_set(mesh, model_path, NULL);
evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
- eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_file_set(texture, image_path, NULL);
evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -140,7 +142,7 @@ main(void)
evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_material_shininess_set(material, 50.0);
- eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(root_node, mesh_node);
evas_canvas3d_node_mesh_add(mesh_node, mesh);
@@ -150,7 +152,7 @@ main(void)
evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add a background rectangle objects. */
- eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
+ background = eo_add(EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
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 2432a4b6a3..000204d2e8 100644
--- a/src/examples/evas/evas-3d-mmap-set.c
+++ b/src/examples/evas/evas-3d-mmap-set.c
@@ -181,34 +181,36 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
- eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 10.0, 1.0, 1.0, 500.0);
- eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ camera_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_member_add(root_node, camera_node);
evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 100.0);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
/* Add the light. */
- eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_directional_set(light, EINA_TRUE);
- eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ light_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(light_node, light);
evas_canvas3d_node_position_set(light_node, 1.0, 0.0, 100.0);
evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
evas_canvas3d_node_member_add(root_node, light_node);
- eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -231,7 +233,7 @@ main(void)
evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add a background rectangle objects. */
- eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
+ background = eo_add(EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 20, 20, 200, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
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 f2623f4779..b9a6b69bd1 100644
--- a/src/examples/evas/evas-3d-obj.c
+++ b/src/examples/evas/evas-3d-obj.c
@@ -63,7 +63,7 @@
ADD_OBJ_MESH(buffer, Y + COPY_OFFSET, Z, num + 4, shade_mode, name_of_material)
#define ADD_TEXTURE(name, path) \
- eo_add(&name, EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
+ name = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
evas_canvas3d_texture_file_set(name, path, NULL); \
evas_canvas3d_texture_filter_set(name, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST); \
@@ -71,7 +71,7 @@
EVAS_CANVAS3D_WRAP_MODE_REPEAT);
#define ADD_MATERIAL(name) \
- eo_add(&name, EVAS_CANVAS3D_MATERIAL_CLASS, evas); \
+ name = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); \
evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); \
evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); \
evas_canvas3d_material_enable_set(name, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE); \
@@ -157,28 +157,30 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
- eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 20.0, 1.0, 1.0, 500.0);
- eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ camera_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_member_add(root_node, camera_node);
evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 0.0);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
/* Add the light. */
- eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_directional_set(light, EINA_TRUE);
- eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ light_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(light_node, light);
evas_canvas3d_node_position_set(light_node, 10.0, 0.0, 0.0);
evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -210,7 +212,7 @@ main(void)
evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add a background rectangle MESHES. */
- eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
+ background = eo_add(EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
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 b096dc838b..67be66536d 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)
static void
_camera_setup(Scene_Data *data)
{
- eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0);
- eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(data->camera_node, data->camera);
evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -118,12 +118,12 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
- eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(data->light_node, data->light);
evas_canvas3d_node_position_set(data->light_node, -20.0, 20.0, 50.0);
evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -134,10 +134,10 @@ static void
_mesh_setup(Scene_Data *data)
{
/* Setup material. */
- eo_add(&data->material_rocks, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->material_rocks = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_add(&data->texture_rocks, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_add(&data->texture_rocks_n, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ data->texture_rocks = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ data->texture_rocks_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_file_set(data->texture_rocks, rock_diffuse, NULL);
evas_canvas3d_texture_wrap_set(data->texture_rocks, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
evas_canvas3d_texture_file_set(data->texture_rocks_n, rock_n_and_height_map, NULL);
@@ -156,10 +156,10 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(data->material_rocks, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_material_shininess_set(data->material_rocks, 100.0);
- eo_add(&data->material_wood, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->material_wood = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_add(&data->texture_wood, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- eo_add(&data->texture_four_n, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ data->texture_wood = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ data->texture_four_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_file_set(data->texture_wood, wood_diffuse, NULL);
evas_canvas3d_texture_wrap_set(data->texture_wood, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
evas_canvas3d_texture_file_set(data->texture_four_n, wood_n_and_height_map, NULL);
@@ -179,11 +179,11 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_shininess_set(data->material_wood, 100.0);
/* Set data of primitive */
- eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
/* Setup mesh. */
- eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
evas_canvas3d_mesh_from_primitive_set(data->mesh, 100, data->cube);
evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PARALLAX_OCCLUSION);
@@ -191,7 +191,7 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_mesh_frame_material_set(data->mesh, 100, data->material_wood);
- eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
evas_canvas3d_node_scale_set(data->mesh_node, 3, 3, 3);
@@ -200,11 +200,11 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
- eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
@@ -237,7 +237,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
- eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
+ background = eo_add(EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
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 86ee222b8a..1ae79a8cc9 100644
--- a/src/examples/evas/evas-3d-pick.c
+++ b/src/examples/evas/evas-3d-pick.c
@@ -132,31 +132,32 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
- eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 30.0, 1.0, 1.0, 100.0);
- eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ camera_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 2.5);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
evas_canvas3d_node_member_add(root_node, camera_node);
- eo_add(&sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
evas_canvas3d_primitive_precision_set(sphere, 50);
- eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(mesh, 0, sphere);
- eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_add(&texture_diffuse, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_file_set(texture_diffuse, image_path, NULL);
evas_canvas3d_texture_filter_set(texture_diffuse, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR);
evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse);
@@ -168,7 +169,7 @@ main(void)
evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_material_shininess_set(material, 50.0);
- eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(root_node, mesh_node);
evas_canvas3d_node_mesh_add(mesh_node, mesh);
@@ -181,7 +182,7 @@ main(void)
evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add evas objects. */
- eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
+ background = eo_add(EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
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 65f4fe5de3..b34b2cc313 100644
--- a/src/examples/evas/evas-3d-ply.c
+++ b/src/examples/evas/evas-3d-ply.c
@@ -130,35 +130,35 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
- eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
- eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_member_add(root_node, camera_node);
evas_canvas3d_node_position_set(camera_node, 15.0, 0.0, 0.0);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
/* Add the light. */
- eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_directional_set(light, EINA_TRUE);
- eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(light_node, light);
evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
evas_canvas3d_node_member_add(root_node, light_node);
- eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_file_set(texture, image_path, NULL);
evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -208,7 +208,7 @@ main(void)
evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add a background rectangle objects. */
- eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
+ background = eo_add(EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 100, 100, 100, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
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 7ec50bc4c2..901c52bd54 100644
--- a/src/examples/evas/evas-3d-proxy.c
+++ b/src/examples/evas/evas-3d-proxy.c
@@ -97,10 +97,11 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
- eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0);
- eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ data->camera_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(data->camera_node, data->camera);
evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 5.0);
evas_canvas3d_node_look_at_set(data->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -110,12 +111,13 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
- eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ data->light_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(data->light_node, data->light);
evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
@@ -126,8 +128,8 @@ static void
_mesh_setup(Scene_Data *data)
{
/* Setup material. */
- eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- eo_add(&data->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_source_set(data->texture, source);
evas_canvas3d_texture_source_visible_set(data->texture, EINA_TRUE);
@@ -142,16 +144,17 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_texture_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture);
/* Set data of primitive */
- eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
/* Setup mesh. */
- eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(data->mesh, 0, data->cube);
evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_FLAT);
evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
- eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->mesh_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
@@ -160,11 +163,12 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
- eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->root_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
@@ -195,7 +199,7 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a background rectangle objects. */
- eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
+ background = eo_add(EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
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 90a714655f..f70d7e41a8 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)
static void
_body_material_set(Body_3D *body, float r, float g, float b)
{
- eo_add(&body->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ body->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_enable_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
evas_canvas3d_material_enable_set(body->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -191,32 +191,33 @@ _body_material_set(Body_3D *body, float r, float g, float b)
static void
_sphere_setup(Body_3D *sphere)
{
- eo_add(&sphere->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ sphere->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(sphere->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
evas_canvas3d_primitive_precision_set(sphere->primitive, 50);
- eo_add(&sphere->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(sphere->mesh, 0, sphere->primitive);
_body_material_set(sphere, 1, 0.0, 0.0);
- 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));
+ sphere->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH), evas_canvas3d_node_position_set(eoid, 3.0, 3.0, 0.0));
evas_canvas3d_node_mesh_add(sphere->node, sphere->mesh);
}
static void
_cone_setup(Body_3D *cone)
{
- eo_add(&cone->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ cone->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(cone->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CONE);
evas_canvas3d_primitive_precision_set(cone->primitive, 50);
- eo_add(&cone->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ cone->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(cone->mesh, 0, cone->primitive);
_body_material_set(cone, 0.8, 0.5, 0.5);
- eo_add(&cone->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(cone->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ cone->node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_mesh_add(cone->node, cone->mesh);
evas_canvas3d_node_orientation_angle_axis_set(cone->node, -90.0, 1.0, 0.0, 0.0);
evas_canvas3d_node_position_set(cone->node, -4.0, 0.0, -3.0);
@@ -225,16 +226,17 @@ _cone_setup(Body_3D *cone)
static void
_cylinder_setup(Body_3D *cylinder)
{
- eo_add(&cylinder->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ cylinder->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(cylinder->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER);
evas_canvas3d_primitive_precision_set(cylinder->primitive, 50);
- eo_add(&cylinder->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ cylinder->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(cylinder->mesh, 0, cylinder->primitive);
_body_material_set(cylinder, 0.0, 0.0, 1.0);
- eo_add(&cylinder->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(cylinder->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ cylinder->node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_mesh_add(cylinder->node, cylinder->mesh);
evas_canvas3d_node_orientation_angle_axis_set(cylinder->node, -90.0, 1.0, 0.0, 0.0);
evas_canvas3d_node_position_set(cylinder->node, -2.0, 3.0, 1.0);
@@ -244,19 +246,17 @@ static void
_fence_setup(Body_3D *fence)
{
- Eo *texture = NULL;
- eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ Eo *texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_atlas_enable_set(texture, EINA_FALSE);
evas_canvas3d_texture_file_set(texture, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL);
evas_canvas3d_texture_filter_set(texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
evas_canvas3d_texture_wrap_set(texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
- Eo *texture1 = NULL;
- eo_add(&texture1, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ Eo *texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_atlas_enable_set(texture1, EINA_FALSE);
evas_canvas3d_texture_file_set(texture1, PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid_n.png", NULL);
evas_canvas3d_texture_filter_set(texture1, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
evas_canvas3d_texture_wrap_set(texture1, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
- eo_add(&fence->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ fence->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_texture_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
evas_canvas3d_material_texture_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, texture);
@@ -270,20 +270,21 @@ _fence_setup(Body_3D *fence)
evas_canvas3d_material_color_set(fence->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_material_shininess_set(fence->material, 100.0);
- eo_add(&fence->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ fence->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(fence->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER);
evas_canvas3d_primitive_mode_set(fence->primitive, EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE);
evas_canvas3d_primitive_tex_scale_set(fence->primitive, 160.0, 12.0);
evas_canvas3d_primitive_precision_set(fence->primitive, 50);
- eo_add(&fence->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ fence->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(fence->mesh, 0, fence->primitive);
evas_canvas3d_mesh_frame_material_set(fence->mesh, 0, fence->material);
evas_canvas3d_mesh_alpha_func_set(fence->mesh, EVAS_CANVAS3D_COMPARISON_GREATER, 0);
evas_canvas3d_mesh_alpha_test_enable_set(fence->mesh, EINA_TRUE);
evas_canvas3d_mesh_shade_mode_set(fence->mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
- eo_add(&fence->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(fence->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ fence->node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_mesh_add(fence->node, fence->mesh);
evas_canvas3d_node_orientation_angle_axis_set(fence->node, -90.0, 1.0, 0.0, 0.0);
evas_canvas3d_node_scale_set(fence->node, 10.0, 10.0, 5.0);
@@ -293,15 +294,16 @@ _fence_setup(Body_3D *fence)
static void
_square_setup(Body_3D *square)
{
- eo_add(&square->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ square->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(square->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE);
- eo_add(&square->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ square->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(square->mesh, 0, square->primitive);
_body_material_set(square, 0.4, 0.4, 0.4);
- eo_add(&square->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(square->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ square->node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_mesh_add(square->node, square->mesh);
evas_canvas3d_node_position_set(square->node, 0.0, -1.0, 0.0);
evas_canvas3d_node_scale_set(square->node, 30.0, 30.0, 30.0);
@@ -311,15 +313,15 @@ _square_setup(Body_3D *square)
static void
_box_setup(Body_3D *box)
{
- eo_add(&box->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ box->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(box->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
- eo_add(&box->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ box->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(box->mesh, 0, box->primitive);
_body_material_set(box, 0, 1, 0);
- eo_add(&box->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(box->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ box->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_mesh_add(box->node, box->mesh);
evas_canvas3d_node_position_set(box->node, 3.0, 0.0, -3.0);
}
@@ -327,11 +329,11 @@ _box_setup(Body_3D *box)
static void
_model_setup(Body_3D *model)
{
- eo_add(&model->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ model->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_file_set(model->texture, image_path, NULL);
evas_canvas3d_texture_filter_set(model->texture, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST);
evas_canvas3d_texture_wrap_set(model->texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
- eo_add(&model->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ model->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, model->texture);
evas_canvas3d_material_texture_set(model->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, model->texture);
@@ -341,12 +343,13 @@ _model_setup(Body_3D *model)
evas_canvas3d_material_shininess_set(model->material, 100.0);
- eo_add(&model->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ model->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
efl_file_set(model->mesh, model_path, NULL);
evas_canvas3d_mesh_frame_material_set(model->mesh, 0, model->material);
evas_canvas3d_mesh_shade_mode_set(model->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
- eo_add(&model->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(model->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ model->node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_mesh_add(model->node, model->mesh);
evas_canvas3d_node_scale_set(model->node, 0.1, 0.1, 0.1);
evas_canvas3d_node_orientation_angle_axis_set(model->node, 120.0, -0.577, -0.577, -0.577);
@@ -388,12 +391,13 @@ _billboard_setup(Scene_Data *data)
static void
_camera_setup(Scene_Data *data)
{
- eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
- eo_add(&data->mediator, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mediator, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ data->mediator = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
evas_canvas3d_camera_projection_perspective_set(data->camera, 50.0, 1.0, 2.0, 100.0);
- eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ data->camera_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(data->camera_node, data->camera);
@@ -408,14 +412,15 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(data->light, AMBIENT_LIGHT, 1.0);
evas_canvas3d_light_diffuse_set(data->light, DIFFUSE_LIGHT, 1.0);
evas_canvas3d_light_specular_set(data->light, SPECULAR_LIGHT, 1.0);
evas_canvas3d_light_spot_cutoff_set(data->light, 20);
evas_canvas3d_light_projection_perspective_set(data->light, 40.0, 1.0, 2.0, 1000.0);
- eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ data->light_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(data->light_node, data->light);
evas_canvas3d_node_position_set(data->light_node, 50.0, 50.0, 70.0);
evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 15.0, 0.0, -5.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
@@ -427,12 +432,13 @@ _scene_setup(Scene_Data *data)
{
data->init = EINA_FALSE;
- eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(data->scene, BG_COLOR, 1);
- eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->root_node =
+ eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@@ -604,7 +610,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
- eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
+ background = eo_add(EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
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 9d22907cc0..2c0c7026b0 100644
--- a/src/examples/evas/evas-vg-simple.c
+++ b/src/examples/evas/evas-vg-simple.c
@@ -449,19 +449,15 @@ vector_set(int x, int y, int w, int h)
root = evas_object_vg_root_node_get(d.vg);
//evas_vg_node_transformation_set(root, &matrix);
- Efl_VG *bg = NULL;
- eo_add(&bg, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(bg, "bg"));
+ Efl_VG *bg = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "bg"));
_rect_add(bg, 0, 0 , vg_w, vg_h);
evas_vg_node_origin_set(bg, 0,0);
evas_vg_shape_stroke_width_set(bg, 1.0);
evas_vg_node_color_set(bg, 80, 80, 80, 80);
- Efl_VG *shape = NULL;
- eo_add(&shape, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(shape, "shape"));
- Efl_VG *rgradient = NULL;
- eo_add(&rgradient, EFL_VG_GRADIENT_RADIAL_CLASS, NULL, efl_vg_name_set(rgradient, "rgradient"));
- Efl_VG *lgradient = NULL;
- eo_add(&lgradient, EFL_VG_GRADIENT_LINEAR_CLASS, NULL, efl_vg_name_set(lgradient, "lgradient"));
+ Efl_VG *shape = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "shape"));
+ Efl_VG *rgradient = eo_add(EFL_VG_GRADIENT_RADIAL_CLASS, NULL, efl_vg_name_set(eoid, "rgradient"));
+ Efl_VG *lgradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, NULL, efl_vg_name_set(eoid, "lgradient"));
_arcto(shape, 0, 0, 100, 100, 25, 330);
@@ -502,8 +498,7 @@ vector_set(int x, int y, int w, int h)
evas_vg_node_color_set(shape, 0, 0, 255, 255);
evas_vg_shape_stroke_color_set(shape, 0, 0, 255, 128);
- Efl_VG *rect = NULL;
- eo_add(&rect, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(rect, "rect"));
+ Efl_VG *rect = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "rect"));
_rect_add(rect, 0, 0, 100, 100);
evas_vg_node_origin_set(rect, 100, 100);
evas_vg_shape_fill_set(rect, lgradient);
@@ -511,8 +506,7 @@ vector_set(int x, int y, int w, int h)
evas_vg_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND);
evas_vg_shape_stroke_color_set(rect, 255, 255, 255, 255);
- Efl_VG *rect1 = NULL;
- eo_add(&rect1, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(rect1, "rect1"));
+ Efl_VG *rect1 = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "rect1"));
_rect_add(rect1, 0, 0, 70, 70);
evas_vg_node_origin_set(rect1, 50, 70);
evas_vg_shape_stroke_scale_set(rect1, 2);
@@ -520,8 +514,7 @@ vector_set(int x, int y, int w, int h)
evas_vg_shape_stroke_join_set(rect1, EFL_GFX_JOIN_ROUND);
evas_vg_shape_stroke_color_set(rect1, 0, 100, 80, 100);
- Efl_VG *circle = NULL;
- eo_add(&circle, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(circle, "circle"));
+ Efl_VG *circle = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "circle"));
_arcto(circle, 0, 0, 250, 100, 30, 300);
evas_vg_shape_fill_set(circle, lgradient);
//evas_vg_node_transformation_set(&matrix),
@@ -529,30 +522,27 @@ vector_set(int x, int y, int w, int h)
evas_vg_node_color_set(circle, 50, 0, 0, 50);
// Foreground
- Efl_VG *fg = NULL;
- eo_add(&fg, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(fg, "fg"));
+ Efl_VG *fg = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "fg"));
_rect_add(fg, 0, 0, vg_w, vg_h);
evas_vg_node_origin_set(fg, 0, 0);
evas_vg_shape_stroke_width_set(fg, 5.0);
evas_vg_shape_stroke_join_set(fg, EFL_GFX_JOIN_ROUND);
evas_vg_shape_stroke_color_set(fg, 70, 70, 0, 70);
- Efl_VG *tst = NULL;
- eo_add(&tst, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(tst, "tst"));
+ Efl_VG *tst = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "tst"));
evas_vg_shape_shape_append_rect(tst, 50, 25, 200, 200, 3, 5);
evas_vg_node_color_set(tst, 0, 0, 200, 200);
evas_vg_shape_stroke_width_set(tst, 2);
evas_vg_shape_stroke_color_set(tst, 255, 0, 0, 255);
- Efl_VG *vc = NULL;
- eo_add(&vc, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(vc, "vc"));
+ Efl_VG *vc = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "vc"));
evas_vg_shape_shape_append_circle(vc, 100, 100, 23);
evas_vg_node_color_set(vc, 0, 200, 0, 255);
evas_vg_shape_stroke_width_set(vc, 4);
evas_vg_shape_stroke_color_set(vc, 255, 0, 0, 255);
- eo_add(&beginning, EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(beginning, root));
- eo_add(&end, EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(end, root));
+ beginning = eo_add(EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(eoid, root));
+ end = eo_add(EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(eoid, root));
circle = efl_vg_container_child_get(end, "circle");
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 8529746f18..ee608ba2f9 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)
void
_camera_setup(Scene_Data *data)
{
- eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 65.0, 1.0, 1.0, 300.0);
- eo_add(&data->mediator_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mediator_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
- eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ data->mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_member_add(data->root_node, data->mediator_node);
evas_canvas3d_node_member_add(data->mediator_node, data->camera_node);
@@ -43,14 +43,14 @@ _camera_setup(Scene_Data *data)
void
_light_setup(Scene_Data *data)
{
- eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(data->light, 0.2, 0.2, 0.2, 1.0);
evas_canvas3d_light_projection_perspective_set(data->light, 100.0, 1.0, 1.0, 200.0);
- eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(data->light_node, data->light);
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 4acf990f25..2e83fd8e6d 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)
evas_canvas3d_node_position_set(data->mesh_node_column_c, 10, 9.0, -12);
/* Setup mesh for bounding sphere */
- eo_add(&data->material_ball, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->material_ball = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
@@ -811,7 +811,7 @@ _mesh_setup_gun_planet(Scene_Data *data)
evas_canvas3d_material_color_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_material_shininess_set(data->material_ball, 50.0);
- eo_add(&data->mesh_ball, EVAS_CANVAS3D_MESH_CLASS, evas);
+ data->mesh_ball = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
_set_ball(data->mesh_ball, 10);
@@ -865,7 +865,7 @@ _mesh_setup_column(Scene_Data *data, int index)
{
/* Setup mesh for column */
- eo_add(&data->material_column, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ data->material_column = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_enable_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
evas_canvas3d_material_enable_set(data->material_column, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -886,7 +886,7 @@ _mesh_setup_column(Scene_Data *data, int index)
evas_canvas3d_mesh_shade_mode_set(data->mesh_column[index], EVAS_CANVAS3D_SHADE_MODE_PHONG);
evas_canvas3d_mesh_frame_material_set(data->mesh_column[index], 0, data->material_column);
- eo_add(&data->texture_diffuse_column, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ data->texture_diffuse_column = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_file_set(data->texture_diffuse_column, red_brick_path, NULL);
evas_canvas3d_texture_atlas_enable_set(data->texture_diffuse_column, EINA_FALSE);
@@ -991,20 +991,20 @@ _scene_setup(Scene_Data *data)
for (i = 0; i < 4; i++)
motion_vec[i] = 0;
- eo_add(&data->cube_primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ data->cube_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->cube_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
evas_canvas3d_primitive_precision_set(data->cube_primitive, 10);
- eo_add(&data->sphere_primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ data->sphere_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->sphere_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
evas_canvas3d_primitive_precision_set(data->sphere_primitive, 50);
- eo_add(&global_scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ global_scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
evas_canvas3d_scene_size_set(global_scene, WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(global_scene, 0.5, 0.5, 0.9, 0.0);
- eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
@@ -1014,7 +1014,7 @@ _scene_setup(Scene_Data *data)
for (i = 0; i < 10; i++)
_mesh_setup_rocket(data, i);
- eo_add(&data->cylinder_primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ data->cylinder_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_mode_set(data->cylinder_primitive, EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE);
evas_canvas3d_primitive_form_set(data->cylinder_primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER);
evas_canvas3d_primitive_tex_scale_set(data->cylinder_primitive, 1.0, 1.0);
@@ -1069,7 +1069,7 @@ _scene_setup(Scene_Data *data)
}
}
- eo_add(&data->carp_mediator_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->carp_mediator_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ data->carp_mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->carp_mediator_node, data->mesh_node_carpet);
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index f2376ff0a7..247612b4cf 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -265,7 +265,7 @@ ecore_init(void)
#if defined(GLIB_INTEGRATION_ALWAYS)
if (_ecore_glib_always_integrate) ecore_main_loop_glib_integrate();
#endif
- eo_add(&_ecore_parent, ECORE_PARENT_CLASS, NULL);
+ _ecore_parent = eo_add(ECORE_PARENT_CLASS, NULL);
#if defined(HAVE_MALLINFO) || defined(HAVE_MALLOC_INFO)
if (getenv("ECORE_MEM_STAT"))
diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c
index bddd7ce15c..d54e92f315 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,
{
Ecore_Animator *animator = NULL;
- eo_add(&animator, MY_CLASS, _ecore_parent, ecore_animator_constructor(animator, func, data));
+ animator = eo_add(MY_CLASS, _ecore_parent, ecore_animator_constructor(eoid, func, data));
return animator;
}
@@ -388,7 +388,7 @@ ecore_animator_timeline_add(double runtime,
const void *data)
{
Ecore_Animator *animator;
- eo_add(&animator, MY_CLASS, _ecore_parent, ecore_animator_timeline_constructor(animator, runtime, func, data));
+ animator = eo_add(MY_CLASS, _ecore_parent, ecore_animator_timeline_constructor(eoid, runtime, func, data));
return animator;
}
diff --git a/src/lib/ecore/ecore_exe.c b/src/lib/ecore/ecore_exe.c
index bbb2d65814..75c577b67f 100644
--- a/src/lib/ecore/ecore_exe.c
+++ b/src/lib/ecore/ecore_exe.c
@@ -67,8 +67,7 @@ ecore_exe_pipe_run(const char *exe_cmd,
Ecore_Exe_Flags flags,
const void *data)
{
- Ecore_Exe *ret = NULL;
- eo_add(&ret, MY_CLASS, NULL, ecore_obj_exe_command_set(ret, exe_cmd, flags));
+ Ecore_Exe *ret = eo_add(MY_CLASS, NULL, ecore_obj_exe_command_set(eoid, exe_cmd, flags));
if (ret)
{
Ecore_Exe_Data *pd = eo_data_scope_get(ret, MY_CLASS);
diff --git a/src/lib/ecore/ecore_idle_enterer.c b/src/lib/ecore/ecore_idle_enterer.c
index d985550aec..a7cbfa5704 100644
--- a/src/lib/ecore/ecore_idle_enterer.c
+++ b/src/lib/ecore/ecore_idle_enterer.c
@@ -61,7 +61,7 @@ ecore_idle_enterer_add(Ecore_Task_Cb func,
const void *data)
{
Ecore_Idle_Enterer *ie = NULL;
- eo_add(&ie, MY_CLASS, _ecore_parent, ecore_idle_enterer_after_constructor(ie, func, data));
+ ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_after_constructor(eoid, func, data));
return ie;
}
@@ -78,7 +78,7 @@ ecore_idle_enterer_before_add(Ecore_Task_Cb func,
const void *data)
{
Ecore_Idle_Enterer *ie = NULL;
- eo_add(&ie, MY_CLASS, _ecore_parent, ecore_idle_enterer_before_constructor(ie, func, data));
+ ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_before_constructor(eoid, func, data));
return ie;
}
diff --git a/src/lib/ecore/ecore_idle_exiter.c b/src/lib/ecore/ecore_idle_exiter.c
index 483f8dfc0c..5074b13009 100644
--- a/src/lib/ecore/ecore_idle_exiter.c
+++ b/src/lib/ecore/ecore_idle_exiter.c
@@ -37,7 +37,7 @@ ecore_idle_exiter_add(Ecore_Task_Cb func,
const void *data)
{
Ecore_Idle_Exiter *ie = NULL;
- eo_add(&ie, MY_CLASS, _ecore_parent, ecore_idle_exiter_constructor(ie, func, data));
+ ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_exiter_constructor(eoid, func, data));
return ie;
}
diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c
index 00d60fb0ae..f68d424488 100644
--- a/src/lib/ecore/ecore_idler.c
+++ b/src/lib/ecore/ecore_idler.c
@@ -35,8 +35,7 @@ EAPI Ecore_Idler *
ecore_idler_add(Ecore_Task_Cb func,
const void *data)
{
- Eo *ret = NULL;
- return eo_add(&ret, MY_CLASS, _ecore_parent, ecore_idler_constructor(ret, func, data));
+ return eo_add(MY_CLASS, _ecore_parent, ecore_idler_constructor(eoid, func, data));
}
EOLIAN static void
diff --git a/src/lib/ecore/ecore_job.c b/src/lib/ecore/ecore_job.c
index a9c4df55f0..1f459c7940 100644
--- a/src/lib/ecore/ecore_job.c
+++ b/src/lib/ecore/ecore_job.c
@@ -49,8 +49,7 @@ EAPI Ecore_Job *
ecore_job_add(Ecore_Cb func,
const void *data)
{
- Ecore_Job *job = NULL;
- eo_add(&job, MY_CLASS, _ecore_parent, ecore_job_constructor(job, func, data));
+ Ecore_Job *job = eo_add(MY_CLASS, _ecore_parent, ecore_job_constructor(eoid, func, data));
return job;
}
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index d0b9a25751..8175e635e8 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)
{
if (!_mainloop_singleton)
{
- eo_add(&_mainloop_singleton, ECORE_MAINLOOP_CLASS, NULL);
+ _mainloop_singleton = eo_add(ECORE_MAINLOOP_CLASS, NULL);
}
return _mainloop_singleton;
diff --git a/src/lib/ecore/ecore_poller.c b/src/lib/ecore/ecore_poller.c
index 9b0b9a84d5..79f2a78f0b 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,
const void *data)
{
Ecore_Poller *poller;
- eo_add(&poller, MY_CLASS, _ecore_parent, ecore_poller_constructor(poller, type, interval, func, data));
+ poller = eo_add(MY_CLASS, _ecore_parent, ecore_poller_constructor(eoid, type, interval, func, data));
return poller;
}
diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c
index 2c3364879f..7343a7f726 100644
--- a/src/lib/ecore/ecore_timer.c
+++ b/src/lib/ecore/ecore_timer.c
@@ -93,7 +93,7 @@ ecore_timer_add(double in,
Ecore_Timer *timer = NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
- eo_add(&timer, MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(timer, in, func, data));
+ timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(eoid, in, func, data));
return timer;
}
@@ -357,7 +357,7 @@ _ecore_timer_loop_add(double in,
const void *data)
{
Ecore_Timer *timer = NULL;
- eo_add(&timer, MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(timer, in, func, data));
+ timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(eoid, in, func, data));
return timer;
}
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 2bfca03023..ba1a575fad 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
if (!name || !done_cb)
return EINA_FALSE;
- 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));
+ obj = eo_add(EFL_NETWORK_CONNECTOR_CLASS, NULL, efl_network_server_connection_type_set(eoid, ECORE_CON_REMOTE_TCP), efl_network_server_name_set(eoid, name), efl_network_base_port_set(eoid, 1025));
lk = malloc(sizeof (Ecore_Con_Lookup));
if (!lk)
@@ -359,7 +359,7 @@ ecore_con_server_add(Ecore_Con_Type compl_type,
/* local system socket: FILE: /tmp/.ecore_service|[name]|[port] */
/* remote system socket: TCP/IP: [name]:[port] */
- 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));
+ obj = eo_add(EFL_NETWORK_SERVER_CLASS, NULL, efl_network_server_connection_type_set(eoid, compl_type), efl_network_server_name_set(eoid, name), efl_network_base_port_set(eoid, port));
ecore_con_server_data_set(obj, (void *) data);
@@ -455,7 +455,7 @@ ecore_con_server_connect(Ecore_Con_Type compl_type,
/* local user socket: FILE: ~/.ecore/[name]/[port] */
/* local system socket: FILE: /tmp/.ecore_service|[name]|[port] */
/* remote system socket: TCP/IP: [name]:[port] */
- 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));
+ obj = eo_add(EFL_NETWORK_CONNECTOR_CLASS, NULL, efl_network_server_connection_type_set(eoid, compl_type), efl_network_server_name_set(eoid, name), efl_network_base_port_set(eoid, port));
ecore_con_server_data_set(obj, (void *) data);
@@ -2056,7 +2056,7 @@ _ecore_con_svr_tcp_handler(void *data,
/* a new client */
- eo_add(&obj, EFL_NETWORK_CLIENT_CLASS, NULL);
+ obj = eo_add(EFL_NETWORK_CLIENT_CLASS, NULL);
Efl_Network_Client_Data *cl = eo_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS);
if (!cl)
{
@@ -2331,7 +2331,7 @@ _ecore_con_svr_udp_handler(void *data,
}
/* Create a new client for use in the client data event */
- eo_add(&obj, EFL_NETWORK_CLIENT_CLASS, NULL);
+ obj = eo_add(EFL_NETWORK_CLIENT_CLASS, NULL);
Efl_Network_Client_Data *cl = eo_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS);
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, ECORE_CALLBACK_RENEW);
diff --git a/src/lib/ecore_con/ecore_con_eet.c b/src/lib/ecore_con/ecore_con_eet.c
index a652636cfa..59a5b211c4 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)
if (!server) return NULL;
- eo_add(&ece_obj, ECORE_CON_EET_SERVER_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(ece_obj, server));
+ ece_obj = eo_add(ECORE_CON_EET_SERVER_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(eoid, server));
return ece_obj;
}
@@ -734,7 +734,7 @@ ecore_con_eet_client_new(Ecore_Con_Server *server)
if (!server) return NULL;
- eo_add(&ece_obj, ECORE_CON_EET_CLIENT_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(ece_obj, server));
+ ece_obj = eo_add(ECORE_CON_EET_CLIENT_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(eoid, server));
return ece_obj;
}
diff --git a/src/lib/ecore_con/ecore_con_local_win32.c b/src/lib/ecore_con/ecore_con_local_win32.c
index 9ab9b960ad..75d71c0bf9 100644
--- a/src/lib/ecore_con/ecore_con_local_win32.c
+++ b/src/lib/ecore_con/ecore_con_local_win32.c
@@ -286,8 +286,7 @@ _ecore_con_local_win32_client_add(void *data, Ecore_Win32_Handler *wh)
(svr->client_count >= (unsigned int)svr->client_limit))
return ECORE_CALLBACK_CANCEL;
- Ecore_Con_Client *cl_obj = NULL;
- eo_add(&cl_obj, EFL_NETWORK_CLIENT_CLASS, NULL);
+ Ecore_Con_Client *cl_obj = eo_add(EFL_NETWORK_CLIENT_CLASS, NULL);
Efl_Network_Client_Data *cl = eo_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS);
if (!cl)
{
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index 3f127185f3..000bf4d016 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 *
ecore_con_url_new(const char *url)
{
Ecore_Con_Url *url_obj;
- eo_add(&url_obj, EFL_NETWORK_URL_CLASS, NULL, efl_network_url_set(url_obj, url));
+ url_obj = eo_add(EFL_NETWORK_URL_CLASS, NULL, efl_network_url_set(eoid, url));
eo_event_callback_array_add(url_obj, efl_network_url_event_table_callbacks(), NULL);
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index fe3764ae93..8b19443584 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -4748,7 +4748,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
case EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE:
{
Eo *primitive = NULL;
- eo_add(&primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base->evas);
+ primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base->evas);
evas_canvas3d_primitive_form_set(primitive, pd_mesh_node->mesh_node.mesh.primitive);
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 d6b46086b0..3934392965 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -231,7 +231,7 @@ EAPI Evas_Object *
edje_edit_object_add(Evas *evas)
{
Evas_Object *e;
- eo_add(&e, MY_CLASS, evas);
+ e = eo_add(MY_CLASS, evas);
return e;
}
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index 490ba1759d..ba164b75f4 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
Evas_Canvas3D_Material *material = NULL;
Edje_Part_Description_Mesh_Node *pd_mesh_node;
- eo_add(&rp->node, EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(rp->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
- eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, ed->base->evas);
+ mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, ed->base->evas);
evas_canvas3d_node_mesh_add(rp->node, mesh);
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
evas_canvas3d_mesh_frame_add(mesh, 0);
}
- eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, ed->base->evas);
+ material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, ed->base->evas);
evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
if (pd_mesh_node->mesh_node.texture.need_texture && pd_mesh_node->mesh_node.texture.textured)
{
Evas_Canvas3D_Texture *texture = NULL;
- eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, ed->base->evas);
+ texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, ed->base->evas);
evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
}
rp->object = NULL;
@@ -826,8 +826,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
{
Evas_Canvas3D_Light *light = NULL;
- eo_add(&rp->node, EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(rp->node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, ed->base->evas);
+ rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, ed->base->evas);
evas_canvas3d_node_light_set(rp->node, light);
rp->object = NULL;
@@ -838,8 +838,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
{
Evas_Canvas3D_Camera *camera = NULL;
- eo_add(&rp->node, EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(rp->node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, ed->base->evas);
+ rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, ed->base->evas);
evas_canvas3d_node_camera_set(rp->node, camera);
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 8b6f2fa969..df981573f0 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
eet_data->vio.tell = eet_snd_file_tell;
eet_data->offset = 0;
- 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));
+ in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL, ecore_audio_obj_name_set(eoid, snd_id_str), ecore_audio_obj_in_speed_set(eoid, speed), ecore_audio_obj_vio_set(eoid, &eet_data->vio, eet_data, _free), eo_event_callback_add(eoid, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL));
if (!out)
{
#if HAVE_COREAUDIO
- eo_add(&out, ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
+ out = eo_add(ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
#elif HAVE_PULSE
- eo_add(&out, ECORE_AUDIO_OUT_PULSE_CLASS, NULL, eo_event_callback_add(out, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
+ out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, eo_event_callback_add(eoid, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
#endif
if (out) outs++;
}
@@ -269,7 +269,7 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
tone = &ed->file->sound_dir->tones[i];
if (!strcmp(tone->name, tone_name))
{
- eo_add(&in, ECORE_AUDIO_IN_TONE_CLASS, NULL);
+ in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
ecore_audio_obj_name_set(in, "tone");
eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &tone->value);
ecore_audio_obj_in_length_set(in, duration);
@@ -278,9 +278,9 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
if (!out)
{
#if HAVE_COREAUDIO
- eo_add(&out, ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
+ out = eo_add(ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
#elif HAVE_PULSE
- eo_add(&out, ECORE_AUDIO_OUT_PULSE_CLASS, NULL, eo_event_callback_add(out, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
+ out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, eo_event_callback_add(eoid, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
#endif
if (out) outs++;
}
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index eb5a9cb1f9..ab42445257 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -20,7 +20,7 @@ edje_object_add(Evas *evas)
{
Evas_Object *e;
EINA_SAFETY_ON_NULL_RETURN_VAL(evas, NULL);
- eo_add(&e, MY_CLASS, evas);
+ e = eo_add(MY_CLASS, evas);
return e;
}
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index 91235d2aa9..1d96750cc3 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
Efl_Model_Children_Event cevt;
Eina_Value path;
- eo_add_ref(&cevt.child, EIO_MODEL_CLASS, priv->obj, eio_model_path_set(cevt.child, evt->filename));
+ cevt.child = eo_add_ref(EIO_MODEL_CLASS, priv->obj, eio_model_path_set(eoid, evt->filename));
priv->children_list = eina_list_append(priv->children_list, cevt.child);
cevt.index = eina_list_count(priv->children_list);
@@ -407,7 +407,7 @@ _eio_main_children_load_cb(void *data, Eio_File *handler EINA_UNUSED, const Eina
Eio_Model_Data *priv = data;
EINA_SAFETY_ON_NULL_RETURN(priv);
- eo_add(&child, MY_CLASS, NULL, eio_model_path_set(child, info->path));
+ child = eo_add(MY_CLASS, NULL, eio_model_path_set(eoid, info->path));
eina_spinlock_take(&priv->filter_lock);
if (priv->filter_cb)
eio_model_children_filter_set(child, priv->filter_cb, priv->filter_userdata);
@@ -523,8 +523,7 @@ _eio_model_children_filter_set(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, Eio_Fi
static Eo *
_eio_model_efl_model_base_child_add(Eo *obj EINA_UNUSED, Eio_Model_Data *priv EINA_UNUSED)
{
- Eo *ret = NULL;
- return eo_add(&ret, EIO_MODEL_CLASS, obj);
+ return eo_add(EIO_MODEL_CLASS, obj);
}
static void
diff --git a/src/lib/eldbus/eldbus_model_connection.c b/src/lib/eldbus/eldbus_model_connection.c
index af7e9eb6f7..ebd758be2b 100644
--- a/src/lib/eldbus/eldbus_model_connection.c
+++ b/src/lib/eldbus/eldbus_model_connection.c
@@ -345,8 +345,7 @@ _eldbus_model_connection_names_list_cb(void *data,
{
DBG("(%p): bus = %s", pd->obj, bus);
- Eo *child = NULL;
- eo_add(&child, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_connection_constructor(child, pd->connection, bus, "/"));
+ Eo *child = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_connection_constructor(eoid, pd->connection, bus, "/"));
pd->children_list = eina_list_append(pd->children_list, child);
}
diff --git a/src/lib/eldbus/eldbus_model_object.c b/src/lib/eldbus/eldbus_model_object.c
index 697a7591c3..240d657e77 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
WRN("(%p) Creating child: bus = %s, path = %s, interface = %s", pd->obj, pd->bus, current_path, interface->name);
// TODO: increment reference to keep 'interface' in memory
- eo_add_ref(&child, ELDBUS_MODEL_PROXY_CLASS, NULL, eldbus_model_proxy_constructor(child, object, interface));
+ child = eo_add_ref(ELDBUS_MODEL_PROXY_CLASS, NULL, eldbus_model_proxy_constructor(eoid, object, interface));
pd->children_list = eina_list_append(pd->children_list, child);
}
diff --git a/src/lib/eldbus/eldbus_model_proxy.c b/src/lib/eldbus/eldbus_model_proxy.c
index d2a3c80b51..2e660f4116 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)
INF("(%p) Creating method child: bus = %s, path = %s, method = %s::%s", pd->obj, bus, path, interface_name, method_name);
- eo_add(&child, ELDBUS_MODEL_METHOD_CLASS, NULL, eldbus_model_method_constructor(child, pd->proxy, method));
+ child = eo_add(ELDBUS_MODEL_METHOD_CLASS, NULL, eldbus_model_method_constructor(eoid, pd->proxy, method));
pd->children_list = eina_list_append(pd->children_list, child);
}
@@ -359,7 +359,7 @@ _eldbus_model_proxy_create_signals_children(Eldbus_Model_Proxy_Data *pd)
DBG("(%p) Creating signal child: bus = %s, path = %s, signal = %s::%s", pd->obj, bus, path, interface_name, signal_name);
- eo_add(&child, ELDBUS_MODEL_SIGNAL_CLASS, NULL, eldbus_model_signal_constructor(child, pd->proxy, signal));
+ child = eo_add(ELDBUS_MODEL_SIGNAL_CLASS, NULL, eldbus_model_signal_constructor(eoid, pd->proxy, signal));
pd->children_list = eina_list_append(pd->children_list, child);
}
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index 5e7afa29de..d0b0f327f8 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -236,7 +236,7 @@ EAPI Evas_Object *
emotion_object_add(Evas *evas)
{
Evas_Object *e;
- eo_add(&e, MY_CLASS, evas);
+ e = eo_add(MY_CLASS, evas);
return e;
}
diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index 916304789d..6f2108f810 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -1681,8 +1681,7 @@ EAPI Evas_Object *evas_object_rectangle_add(Evas *e) EINA_WARN_UNUSED_RESULT EIN
* @code
* vector = evas_object_vg_add(canvas);
* root = evas_obj_vg_root_node_get(vector);
- * shape = NULL;
- eo_add(&shape, EVAS_VG_SHAPE_CLASS, root);
+ * shape = eo_add(EVAS_VG_SHAPE_CLASS, root);
* Efl_Gfx_Path_Command *path_cmd = NULL;
* double *points = NULL;
* 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 9b1fc6c137..d631df6917 100644
--- a/src/lib/evas/canvas/evas_canvas3d_camera.c
+++ b/src/lib/evas/canvas/evas_canvas3d_camera.c
@@ -101,8 +101,7 @@ evas_canvas3d_camera_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, MY_CLASS, e);
+ Evas_Object *eo_obj = eo_add(MY_CLASS, e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_canvas3d_light.c b/src/lib/evas/canvas/evas_canvas3d_light.c
index b9b186fe18..11e9c81965 100644
--- a/src/lib/evas/canvas/evas_canvas3d_light.c
+++ b/src/lib/evas/canvas/evas_canvas3d_light.c
@@ -72,8 +72,7 @@ evas_canvas3d_light_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, MY_CLASS, e);
+ Evas_Object *eo_obj = eo_add(MY_CLASS, e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_canvas3d_material.c b/src/lib/evas/canvas/evas_canvas3d_material.c
index 98a4e66cb5..5070d44450 100644
--- a/src/lib/evas/canvas/evas_canvas3d_material.c
+++ b/src/lib/evas/canvas/evas_canvas3d_material.c
@@ -84,8 +84,7 @@ evas_canvas3d_material_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, MY_CLASS, e);
+ Evas_Object *eo_obj = eo_add(MY_CLASS, e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.c b/src/lib/evas/canvas/evas_canvas3d_mesh.c
index 5442ecadb2..d19a1fc39a 100644
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.c
+++ b/src/lib/evas/canvas/evas_canvas3d_mesh.c
@@ -254,8 +254,7 @@ evas_canvas3d_mesh_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, MY_CLASS, e);
+ Evas_Object *eo_obj = eo_add(MY_CLASS, e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_canvas3d_node.c b/src/lib/evas/canvas/evas_canvas3d_node.c
index 246450f593..5e0944d929 100644
--- a/src/lib/evas/canvas/evas_canvas3d_node.c
+++ b/src/lib/evas/canvas/evas_canvas3d_node.c
@@ -1012,8 +1012,7 @@ evas_canvas3d_node_add(Evas *e, Evas_Canvas3D_Node_Type type)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, MY_CLASS, e, evas_canvas3d_node_constructor(eo_obj, type));
+ Evas_Object *eo_obj = eo_add(MY_CLASS, e, evas_canvas3d_node_constructor(eoid, type));
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_canvas3d_primitive.c b/src/lib/evas/canvas/evas_canvas3d_primitive.c
index ab07d132f3..76dcdd6746 100644
--- a/src/lib/evas/canvas/evas_canvas3d_primitive.c
+++ b/src/lib/evas/canvas/evas_canvas3d_primitive.c
@@ -20,8 +20,7 @@ evas_canvas3d_primitive_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, MY_CLASS, e);
+ Evas_Object *eo_obj = eo_add(MY_CLASS, e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_canvas3d_scene.c b/src/lib/evas/canvas/evas_canvas3d_scene.c
index e1a0295e07..cb7ffc373a 100644
--- a/src/lib/evas/canvas/evas_canvas3d_scene.c
+++ b/src/lib/evas/canvas/evas_canvas3d_scene.c
@@ -61,8 +61,7 @@ evas_canvas3d_scene_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, MY_CLASS, e);
+ Evas_Object *eo_obj = eo_add(MY_CLASS, e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.c b/src/lib/evas/canvas/evas_canvas3d_texture.c
index b058765b6a..664de1c9c1 100644
--- a/src/lib/evas/canvas/evas_canvas3d_texture.c
+++ b/src/lib/evas/canvas/evas_canvas3d_texture.c
@@ -313,8 +313,7 @@ evas_canvas3d_texture_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, MY_CLASS, e);
+ Evas_Object *eo_obj = eo_add(MY_CLASS, e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 56956a7e3e..38e901a957 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -151,8 +151,7 @@ evas_shutdown(void)
EAPI Evas *
evas_new(void)
{
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, EVAS_CANVAS_CLASS, NULL);
+ Evas_Object *eo_obj = eo_add(EVAS_CANVAS_CLASS, NULL);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c
index 739012ee5c..55e7ca5943 100644
--- a/src/lib/evas/canvas/evas_object_box.c
+++ b/src/lib/evas/canvas/evas_object_box.c
@@ -458,8 +458,7 @@ evas_object_box_add(Evas *evas)
MAGIC_CHECK(evas, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *obj = NULL;
- eo_add(&obj, MY_CLASS, evas);
+ Evas_Object *obj = eo_add(MY_CLASS, evas);
return obj;
}
diff --git a/src/lib/evas/canvas/evas_object_grid.c b/src/lib/evas/canvas/evas_object_grid.c
index 12b6d2bf74..0374b132f2 100644
--- a/src/lib/evas/canvas/evas_object_grid.c
+++ b/src/lib/evas/canvas/evas_object_grid.c
@@ -265,8 +265,7 @@ evas_object_grid_add(Evas *evas)
MAGIC_CHECK(evas, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *obj = NULL;
- eo_add(&obj, MY_CLASS, evas);
+ Evas_Object *obj = eo_add(MY_CLASS, evas);
return obj;
}
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 0367fa2526..f3b1d7797a 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -383,8 +383,7 @@ evas_object_image_add(Evas *eo_e)
Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
EINA_SAFETY_ON_NULL_RETURN_VAL(e, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(e->engine.func, NULL);
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, EVAS_IMAGE_CLASS, eo_e);
+ Evas_Object *eo_obj = eo_add(EVAS_IMAGE_CLASS, eo_e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_object_line.c b/src/lib/evas/canvas/evas_object_line.c
index 07ef578d8f..26dd5c7acb 100644
--- a/src/lib/evas/canvas/evas_object_line.c
+++ b/src/lib/evas/canvas/evas_object_line.c
@@ -97,8 +97,7 @@ evas_object_line_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, EVAS_LINE_CLASS, e);
+ Evas_Object *eo_obj = eo_add(EVAS_LINE_CLASS, e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_object_polygon.c b/src/lib/evas/canvas/evas_object_polygon.c
index 10276ca02f..a154e37cd2 100644
--- a/src/lib/evas/canvas/evas_object_polygon.c
+++ b/src/lib/evas/canvas/evas_object_polygon.c
@@ -98,8 +98,7 @@ evas_object_polygon_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, EVAS_POLYGON_CLASS, e);
+ Evas_Object *eo_obj = eo_add(EVAS_POLYGON_CLASS, e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_object_rectangle.c b/src/lib/evas/canvas/evas_object_rectangle.c
index 212cda658f..37f8266eb1 100644
--- a/src/lib/evas/canvas/evas_object_rectangle.c
+++ b/src/lib/evas/canvas/evas_object_rectangle.c
@@ -95,8 +95,7 @@ evas_object_rectangle_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, EVAS_RECTANGLE_CLASS, e);
+ Evas_Object *eo_obj = eo_add(EVAS_RECTANGLE_CLASS, e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index b380f58c83..44c18f197f 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)
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- eo_add(&eo_obj, EVAS_OBJECT_SMART_CLASS, eo_e);
+ eo_obj = eo_add(EVAS_OBJECT_SMART_CLASS, eo_e);
evas_obj_smart_attach(eo_obj, s);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_object_table.c b/src/lib/evas/canvas/evas_object_table.c
index ab71ad8e25..60a83fddbe 100644
--- a/src/lib/evas/canvas/evas_object_table.c
+++ b/src/lib/evas/canvas/evas_object_table.c
@@ -964,8 +964,7 @@ evas_object_table_add(Evas *evas)
MAGIC_CHECK(evas, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *obj = NULL;
- eo_add(&obj, MY_CLASS, evas);
+ Evas_Object *obj = eo_add(MY_CLASS, evas);
return obj;
}
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index 723c8b510e..a492ebdca7 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -372,8 +372,7 @@ evas_object_text_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, EVAS_TEXT_CLASS, e);
+ Evas_Object *eo_obj = eo_add(EVAS_TEXT_CLASS, e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index b82a6911a9..8066f08732 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -6253,8 +6253,7 @@ evas_object_textblock_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, EVAS_TEXTBLOCK_CLASS, e);
+ Evas_Object *eo_obj = eo_add(EVAS_TEXTBLOCK_CLASS, e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_object_textgrid.c b/src/lib/evas/canvas/evas_object_textgrid.c
index bcbc186488..8742a4c2de 100644
--- a/src/lib/evas/canvas/evas_object_textgrid.c
+++ b/src/lib/evas/canvas/evas_object_textgrid.c
@@ -1056,8 +1056,7 @@ evas_object_textgrid_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, EVAS_TEXTGRID_CLASS, e);
+ Evas_Object *eo_obj = eo_add(EVAS_TEXTGRID_CLASS, e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_object_vg.c b/src/lib/evas/canvas/evas_object_vg.c
index 1b915e4405..929b584871 100644
--- a/src/lib/evas/canvas/evas_object_vg.c
+++ b/src/lib/evas/canvas/evas_object_vg.c
@@ -81,8 +81,7 @@ evas_object_vg_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, MY_CLASS, e);
+ Evas_Object *eo_obj = eo_add(MY_CLASS, e);
// Ask backend to return the main Ector_Surface
@@ -138,7 +137,7 @@ _evas_vg_eo_base_constructor(Eo *eo_obj, Evas_VG_Data *pd)
obj->type = o_type;
/* root node */
- eo_add(&pd->root, EFL_VG_ROOT_NODE_CLASS, eo_obj);
+ pd->root = eo_add(EFL_VG_ROOT_NODE_CLASS, eo_obj);
eo_ref(pd->root);
eina_array_step_set(&pd->cleanup, sizeof(pd->cleanup), 8);
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index fdf4f9542c..73c902c20f 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -19,8 +19,7 @@ evas_out_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = NULL;
- eo_add(&eo_obj, MY_CLASS, e);
+ Evas_Object *eo_obj = eo_add(MY_CLASS, e);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_vg_container.c b/src/lib/evas/canvas/evas_vg_container.c
index 7491c3a523..7d766a55da 100644
--- a/src/lib/evas/canvas/evas_vg_container.c
+++ b/src/lib/evas/canvas/evas_vg_container.c
@@ -155,16 +155,14 @@ _efl_vg_container_efl_vg_base_dup(Eo *obj,
{
// By setting parent, we automatically reference
// this new object as a child of obj. Magic at work !
- Eo *tmp = NULL;
- eo_add_ref(&tmp, eo_class_get(child), obj, efl_vg_dup(tmp, child));
+ (void) eo_add_ref(eo_class_get(child), obj, efl_vg_dup(eoid, child));
}
}
EAPI Efl_VG*
evas_vg_container_add(Efl_VG *parent)
{
- Eo *ret = NULL;
- return eo_add(&ret, EFL_VG_CONTAINER_CLASS, parent);
+ return eo_add(EFL_VG_CONTAINER_CLASS, parent);
}
#include "efl_vg_container.eo.c"
diff --git a/src/lib/evas/canvas/evas_vg_node.c b/src/lib/evas/canvas/evas_vg_node.c
index fed256b56a..2ae9135681 100644
--- a/src/lib/evas/canvas/evas_vg_node.c
+++ b/src/lib/evas/canvas/evas_vg_node.c
@@ -779,7 +779,7 @@ _efl_vg_base_dup(Eo *obj, Efl_VG_Base_Data *pd, const Efl_VG_Base *from)
if (fromd->mask)
{
Eo *tmp = pd->mask;
- eo_add(&pd->mask, eo_class_get(fromd->mask), obj, efl_vg_dup(pd->mask, tmp));
+ pd->mask = eo_add(eo_class_get(fromd->mask), obj, efl_vg_dup(eoid, tmp));
}
pd->x = fromd->x;
diff --git a/src/lib/evas/canvas/evas_vg_shape.c b/src/lib/evas/canvas/evas_vg_shape.c
index 9d49735243..312953a46f 100644
--- a/src/lib/evas/canvas/evas_vg_shape.c
+++ b/src/lib/evas/canvas/evas_vg_shape.c
@@ -232,17 +232,17 @@ _efl_vg_shape_efl_vg_base_dup(Eo *obj, Efl_VG_Shape_Data *pd EINA_UNUSED, const
if (fromd->fill)
{
- eo_add(&fill, eo_class_get(fromd->fill), parent, efl_vg_dup(fill, fromd->fill));
+ fill = eo_add(eo_class_get(fromd->fill), parent, efl_vg_dup(eoid, fromd->fill));
}
if (fromd->stroke.fill)
{
- eo_add(&stroke_fill, eo_class_get(fromd->stroke.fill), parent, efl_vg_dup(stroke_fill, fromd->stroke.fill));
+ stroke_fill = eo_add(eo_class_get(fromd->stroke.fill), parent, efl_vg_dup(eoid, fromd->stroke.fill));
}
if (fromd->stroke.marker)
{
- eo_add(&stroke_marker, eo_class_get(fromd->stroke.marker), parent, efl_vg_dup(stroke_marker, fromd->stroke.marker));
+ stroke_marker = eo_add(eo_class_get(fromd->stroke.marker), parent, efl_vg_dup(eoid, fromd->stroke.marker));
}
efl_vg_shape_fill_set(obj, fill);
@@ -458,8 +458,7 @@ evas_vg_shape_shape_equal_commands(Eo *obj, const Eo *with)
EAPI Efl_VG*
evas_vg_shape_add(Efl_VG *parent)
{
- Eo *ret = NULL;
- return eo_add(&ret, EFL_VG_SHAPE_CLASS, parent);
+ return eo_add(EFL_VG_SHAPE_CLASS, parent);
}
#include "efl_vg_shape.eo.c"
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c
index 617ae340e4..d296cf660e 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -2447,16 +2447,16 @@ eng_ector_create(void *data EINA_UNUSED)
ector_backend = getenv("ECTOR_BACKEND");
if (ector_backend && !strcasecmp(ector_backend, "default"))
{
- eo_add(&ector, ECTOR_SOFTWARE_SURFACE_CLASS, NULL);
+ ector = eo_add(ECTOR_SOFTWARE_SURFACE_CLASS, NULL);
}
else if (ector_backend && !strcasecmp(ector_backend, "experimental"))
{
- eo_add(&ector, ECTOR_GL_SURFACE_CLASS, NULL);
+ ector = eo_add(ECTOR_GL_SURFACE_CLASS, NULL);
use_gl = EINA_TRUE;
}
else
{
- eo_add(&ector, ECTOR_CAIRO_SOFTWARE_SURFACE_CLASS, NULL);
+ ector = eo_add(ECTOR_CAIRO_SOFTWARE_SURFACE_CLASS, NULL);
use_cairo = EINA_TRUE;
}
return ector;
@@ -2477,13 +2477,13 @@ eng_ector_buffer_wrap(void *data EINA_UNUSED, Evas *evas, void *engine_image, Ei
{
RGBA_Image *im = engine_image;
- eo_add(&buf, EVAS_ECTOR_GL_RGBAIMAGE_BUFFER_CLASS, evas, evas_ector_buffer_engine_image_set(buf, evas, im));
+ buf = eo_add(EVAS_ECTOR_GL_RGBAIMAGE_BUFFER_CLASS, evas, evas_ector_buffer_engine_image_set(eoid, evas, im));
}
else
{
Evas_GL_Image *im = engine_image;
- eo_add(&buf, EVAS_ECTOR_GL_IMAGE_BUFFER_CLASS, evas, evas_ector_buffer_engine_image_set(buf, evas, im));
+ buf = eo_add(EVAS_ECTOR_GL_IMAGE_BUFFER_CLASS, evas, evas_ector_buffer_engine_image_set(eoid, evas, im));
}
return buf;
}
@@ -2544,7 +2544,7 @@ eng_ector_buffer_new(void *data, Evas *evas, void *pixels,
gc = re->window_gl_context_get(re->software.ob);
im = evas_gl_common_image_surface_new(gc, iw, ih, EINA_TRUE);
- eo_add(&buf, EVAS_ECTOR_GL_IMAGE_BUFFER_CLASS, evas, evas_ector_buffer_engine_image_set(buf, evas, im));
+ buf = eo_add(EVAS_ECTOR_GL_IMAGE_BUFFER_CLASS, evas, evas_ector_buffer_engine_image_set(eoid, evas, im));
im->references--;
}
return buf;
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index 060d2e12b9..f2018a626b 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -3740,12 +3740,12 @@ eng_ector_create(void *data EINA_UNUSED)
ector_backend = getenv("ECTOR_BACKEND");
if (ector_backend && !strcasecmp(ector_backend, "default"))
{
- eo_add(&ector, ECTOR_SOFTWARE_SURFACE_CLASS, NULL);
+ ector = eo_add(ECTOR_SOFTWARE_SURFACE_CLASS, NULL);
use_cairo = EINA_FALSE;
}
else
{
- eo_add(&ector, ECTOR_CAIRO_SOFTWARE_SURFACE_CLASS, NULL);
+ ector = eo_add(ECTOR_CAIRO_SOFTWARE_SURFACE_CLASS, NULL);
use_cairo = EINA_TRUE;
}
return ector;
@@ -3765,7 +3765,7 @@ eng_ector_buffer_wrap(void *data EINA_UNUSED, Evas *e, void *engine_image, Eina_
if (!ie) return NULL;
- eo_add(&buf, EVAS_ECTOR_SOFTWARE_BUFFER_CLASS, e, evas_ector_buffer_engine_image_set(buf, e, ie));
+ buf = eo_add(EVAS_ECTOR_SOFTWARE_BUFFER_CLASS, e, evas_ector_buffer_engine_image_set(eoid, e, ie));
return buf;
}
@@ -3784,7 +3784,7 @@ eng_ector_buffer_new(void *data EINA_UNUSED, Evas *evas, void *pixels,
if ((flags & (ECTOR_BUFFER_FLAG_RENDERABLE | ECTOR_BUFFER_FLAG_DRAWABLE)) == 0)
{
- eo_add(&buf, ECTOR_SOFTWARE_BUFFER_CLASS, evas, ector_buffer_pixels_set(buf, pixels, width, height, stride, cspace, writeable, l, r, t, b));
+ buf = eo_add(ECTOR_SOFTWARE_BUFFER_CLASS, evas, ector_buffer_pixels_set(eoid, pixels, width, height, stride, cspace, writeable, l, r, t, b));
}
else
{
diff --git a/src/modules/evas/model_loaders/eet/evas_model_load_eet.c b/src/modules/evas/model_loaders/eet/evas_model_load_eet.c
index 96e70fee90..c17e984634 100644
--- a/src/modules/evas/model_loaders/eet/evas_model_load_eet.c
+++ b/src/modules/evas/model_loaders/eet/evas_model_load_eet.c
@@ -65,7 +65,7 @@ _set_material_to_mesh_from_eet_file(Evas_Canvas3D_Mesh *mesh,
{
Evas_Canvas3D_Object_Data *pd = eo_data_scope_get(mesh, EVAS_CANVAS3D_OBJECT_CLASS);
Eo *material = NULL;
- eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, pd->evas);
+ material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, pd->evas);
evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, !!(eet_mesh->materials->colors[0].a > 0));
evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, !!(eet_mesh->materials->colors[1].a > 0));
diff --git a/src/tests/ecore/ecore_test_animator.c b/src/tests/ecore/ecore_test_animator.c
index c00cdd752e..e2f17bcd9c 100644
--- a/src/tests/ecore/ecore_test_animator.c
+++ b/src/tests/ecore/ecore_test_animator.c
@@ -30,7 +30,7 @@ START_TEST(ecore_test_animators)
fail_if(!ecore_init(), "ERROR: Cannot init Ecore!\n");
ecore_animator_frametime_set(interval1);
- eo_add(&animator, ECORE_ANIMATOR_CLASS, NULL, ecore_animator_timeline_constructor(animator, 1, _anim_cb, &interval1));
+ animator = eo_add(ECORE_ANIMATOR_CLASS, NULL, ecore_animator_timeline_constructor(eoid, 1, _anim_cb, &interval1));
fail_if(!animator);
@@ -38,7 +38,7 @@ START_TEST(ecore_test_animators)
ecore_animator_frametime_set(interval2);
prev = 0;
- eo_add(&animator, ECORE_ANIMATOR_CLASS, NULL, ecore_animator_timeline_constructor(animator, 1, _anim_cb, &interval2));
+ animator = eo_add(ECORE_ANIMATOR_CLASS, NULL, ecore_animator_timeline_constructor(eoid, 1, _anim_cb, &interval2));
fail_if(!animator);
ecore_main_loop_begin();
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index a6589ce02b..0240903e0b 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -62,14 +62,14 @@ START_TEST(ecore_test_ecore_audio_obj_pulse)
Eina_Bool ret = EINA_FALSE;
Eina_Bool pulse_context_failed = EINA_FALSE;
- eo_add(&in, ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
+ in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
fail_if(!in);
ecore_audio_obj_name_set(in, "modem.wav");
ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/modem.wav");
fail_if(!ret);
- eo_add(&out, ECORE_AUDIO_OUT_PULSE_CLASS, NULL);
+ out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL);
fail_if(!out);
ecore_timer_add(0.3, _seek_vol, in);
@@ -112,12 +112,12 @@ START_TEST(ecore_test_ecore_audio_cleanup)
int freq = 1000;
Eina_Bool ret = EINA_FALSE;
- eo_add(&in, ECORE_AUDIO_IN_TONE_CLASS, NULL);
+ in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
fail_if(!in);
eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &freq);
ecore_audio_obj_in_length_set(in, 2);
- eo_add(&out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
+ out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
fail_if(!out);
ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_OGG);
fail_if(!ret);
@@ -143,7 +143,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
Eina_Bool ret;
char *tmp;
- eo_add(&in, ECORE_AUDIO_IN_TONE_CLASS, NULL);
+ in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
fail_if(!in);
ecore_audio_obj_name_set(in, "tone");
@@ -201,7 +201,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
len = ecore_audio_obj_in_remaining_get(in);
fail_if(len != 1.0);
- eo_add(&out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
+ out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
fail_if(!out);
ecore_audio_obj_name_set(out, "tmp.wav");
@@ -235,7 +235,7 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
Ecore_Audio_Format fmt;
const char *src;
- eo_add(&in, ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
+ in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
fail_if(!in);
fmt = ecore_audio_obj_format_get(in);
@@ -281,7 +281,7 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
len = ecore_audio_obj_in_seek(in, -1.0, SEEK_END);
fail_if(fabs(rem - 1 - len) > 0.1);
- eo_add(&out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
+ out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
fail_if(!out);
ecore_audio_obj_name_set(out, "tmp.wav");
@@ -322,12 +322,9 @@ START_TEST(ecore_test_ecore_audio_obj_in_out)
Eina_List *in3;
Eina_Bool attached;
- Eo *in = NULL;
- eo_add(&in, ECORE_AUDIO_IN_CLASS, NULL);
- Eo *in2 = NULL;
- eo_add(&in2, ECORE_AUDIO_IN_CLASS, NULL);
- Eo *out = NULL;
- eo_add(&out, ECORE_AUDIO_OUT_CLASS, NULL);
+ Eo *in = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
+ Eo *in2 = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
+ Eo *out = eo_add(ECORE_AUDIO_OUT_CLASS, NULL);
fail_if(!in);
fail_if(!in2);
@@ -423,10 +420,10 @@ START_TEST(ecore_test_ecore_audio_obj_vio)
{
Eo *in, *out;
- eo_add(&in, ECORE_AUDIO_IN_CLASS, NULL);
+ in = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
fail_if(!in);
- eo_add(&out, ECORE_AUDIO_OUT_CLASS, NULL);
+ out = eo_add(ECORE_AUDIO_OUT_CLASS, NULL);
fail_if(!out);
ecore_audio_obj_vio_set(in, &in_vio, NULL, NULL);
@@ -461,8 +458,7 @@ START_TEST(ecore_test_ecore_audio_obj_in)
Ecore_Audio_Vio vio;
Eina_Bool freed = EINA_FALSE;
- Eo *in = NULL;
- eo_add(&in, ECORE_AUDIO_IN_CLASS, NULL);
+ Eo *in = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
fail_if(!in);
@@ -549,10 +545,10 @@ START_TEST(ecore_test_ecore_audio_obj)
double volume;
Eo *objs[2], *obj;
- eo_add(&objs[0], ECORE_AUDIO_IN_CLASS, NULL);
+ objs[0] = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
fail_if(!objs[0]);
- eo_add(&objs[1], ECORE_AUDIO_OUT_CLASS, NULL);
+ objs[1] = eo_add(ECORE_AUDIO_OUT_CLASS, NULL);
fail_if(!objs[1]);
for (i=0; i<2; i++) {
diff --git a/src/tests/eio/eio_model_test_file.c b/src/tests/eio/eio_model_test_file.c
index 8018c5b080..5873d7ab83 100644
--- a/src/tests/eio/eio_model_test_file.c
+++ b/src/tests/eio/eio_model_test_file.c
@@ -165,7 +165,7 @@ START_TEST(eio_model_test_test_file)
fail_if(!ecore_init(), "ERROR: Cannot init Ecore!\n");
fail_if(!eio_init(), "ERROR: Cannot init EIO!\n");
- eo_add(&filemodel, EIO_MODEL_CLASS, NULL, eio_model_path_set(filemodel, EFL_MODEL_TEST_FILENAME_PATH));
+ filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(eoid, EFL_MODEL_TEST_FILENAME_PATH));
fail_if(!filemodel, "ERROR: Cannot init model!\n");
eo_event_callback_add(filemodel, EFL_MODEL_BASE_EVENT_LOAD_STATUS, _load_status_cb, NULL);
diff --git a/src/tests/eio/eio_model_test_monitor_add.c b/src/tests/eio/eio_model_test_monitor_add.c
index 0cf0c9f4ee..b718edd137 100644
--- a/src/tests/eio/eio_model_test_monitor_add.c
+++ b/src/tests/eio/eio_model_test_monitor_add.c
@@ -125,7 +125,7 @@ START_TEST(eio_model_test_test_monitor_add)
tmpdir = eina_environment_tmp_get();
- eo_add(&filemodel, EIO_MODEL_CLASS, NULL, eio_model_path_set(filemodel, tmpdir));
+ filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(eoid, tmpdir));
fail_if(!filemodel, "ERROR: Cannot init model!\n");
eo_event_callback_add(filemodel, EFL_MODEL_BASE_EVENT_CHILD_ADDED, _children_added_cb, NULL);
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model.c b/src/tests/eldbus/eldbus_test_eldbus_model.c
index d1dcbfc869..5439217e46 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model.c
@@ -123,8 +123,7 @@ check_property(Eo *object, const char *property_name, const char *expected_value
Eo *
create_connection(void)
{
- Eo *connection = NULL;
- eo_add_ref(&connection, ELDBUS_MODEL_CONNECTION_CLASS, NULL, eldbus_model_connection_constructor(connection, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE));
+ Eo *connection = eo_add_ref(ELDBUS_MODEL_CONNECTION_CLASS, NULL, eldbus_model_connection_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE));
ck_assert_ptr_ne(NULL, connection);
return connection;
}
@@ -140,8 +139,7 @@ create_and_load_connection(void)
Eo *
create_object(void)
{
- Eo *object = NULL;
- eo_add_ref(&object, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(object, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, ELDBUS_FDO_BUS, ELDBUS_FDO_PATH));
+ Eo *object = eo_add_ref(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, ELDBUS_FDO_BUS, ELDBUS_FDO_PATH));
ck_assert_ptr_ne(NULL, object);
return object;
}
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model_method.c b/src/tests/eldbus/eldbus_test_eldbus_model_method.c
index 06e5bf7aa7..51ed4afc34 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model_method.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model_method.c
@@ -29,7 +29,7 @@ _setup(void)
fake_server = fake_server_start(&fake_server_data);
- eo_add(&fake_server_object, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(fake_server_object, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
+ fake_server_object = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
ck_assert_ptr_ne(NULL, fake_server_object);
efl_model_load_and_wait_for_load_status(fake_server_object, EFL_MODEL_LOAD_STATUS_LOADED);
diff --git a/src/tests/eldbus/eldbus_test_eldbus_model_signal.c b/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
index 3f51d07c53..7c3187430e 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_model_signal.c
@@ -27,7 +27,7 @@ _setup(void)
fake_server = fake_server_start(&fake_server_data);
- eo_add(&fake_server_object, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(fake_server_object, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
+ fake_server_object = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
ck_assert_ptr_ne(NULL, fake_server_object);
efl_model_load_and_wait_for_load_status(fake_server_object, EFL_MODEL_LOAD_STATUS_LOADED);
diff --git a/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c b/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c
index 0195aff349..09ef4cc9ca 100644
--- a/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c
+++ b/src/tests/eldbus/eldbus_test_fake_server_eldbus_model_proxy.c
@@ -33,7 +33,7 @@ _setup(void)
};
fake_server = fake_server_start(&fake_server_data);
- eo_add(&fake_server_object, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(fake_server_object, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
+ fake_server_object = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
ck_assert_ptr_ne(NULL, fake_server_object);
efl_model_load_and_wait_for_load_status(fake_server_object, EFL_MODEL_LOAD_STATUS_LOADED);
diff --git a/src/tests/emotion/emotion_test_main-eo.c b/src/tests/emotion/emotion_test_main-eo.c
index 0f9ea6493e..f88e045836 100644
--- a/src/tests/emotion/emotion_test_main-eo.c
+++ b/src/tests/emotion/emotion_test_main-eo.c
@@ -111,7 +111,7 @@ main_delete_request(Ecore_Evas *ee EINA_UNUSED)
static void
bg_setup(void)
{
- eo_add(&o_bg, EDJE_OBJECT_CLASS, evas);
+ o_bg = eo_add(EDJE_OBJECT_CLASS, evas);
efl_file_set(o_bg, theme_file, "background");
efl_gfx_position_set(o_bg, 0, 0);
efl_gfx_size_set(o_bg, startw, starth);
@@ -639,7 +639,7 @@ init_video_object(const char *module_filename, const char *filename)
fd = calloc(1, sizeof(Frame_Data));
if (!fd) exit(1);
- eo_add(&oe, EDJE_OBJECT_CLASS, evas);
+ oe = eo_add(EDJE_OBJECT_CLASS, evas);
eo_event_callback_add(oe, EVAS_OBJECT_EVENT_FREE, _oe_free_cb, fd);
eo_key_data_set(oe, "frame_data", fd);
efl_file_set(oe, theme_file, reflex ? "video_controller/reflex" : "video_controller");
diff --git a/src/tests/eo/access/access_main.c b/src/tests/eo/access/access_main.c
index 348422fe2a..d8d825bda2 100644
--- a/src/tests/eo/access/access_main.c
+++ b/src/tests/eo/access/access_main.c
@@ -13,8 +13,7 @@ main(int argc, char *argv[])
(void) argv;
eo_init();
- Eo *obj = NULL;
- eo_add(&obj, INHERIT_CLASS, NULL);
+ Eo *obj = eo_add(INHERIT_CLASS, NULL);
simple_a_set(obj, 1);
inherit_prot_print(obj);
diff --git a/src/tests/eo/children/children_main.c b/src/tests/eo/children/children_main.c
index 25e9f9fcd4..9d30277333 100644
--- a/src/tests/eo/children/children_main.c
+++ b/src/tests/eo/children/children_main.c
@@ -22,15 +22,11 @@ main(int argc, char *argv[])
eo_init();
- Eo *parent = NULL;
- eo_add(&parent, SIMPLE_CLASS, NULL);
-
- Eo *child1 = NULL;
- eo_add(&child1, SIMPLE_CLASS, parent);
- Eo *child2 = NULL;
- eo_add(&child2, SIMPLE_CLASS, parent);
- Eo *child3 = NULL;
- eo_add(&child3, SIMPLE_CLASS, parent);
+ Eo *parent = eo_add(SIMPLE_CLASS, NULL);
+
+ Eo *child1 = eo_add(SIMPLE_CLASS, parent);
+ Eo *child2 = eo_add(SIMPLE_CLASS, parent);
+ Eo *child3 = eo_add(SIMPLE_CLASS, parent);
iter = eo_children_iterator_new(parent);
fail_if(!iter);
diff --git a/src/tests/eo/composite_objects/composite_objects_comp.c b/src/tests/eo/composite_objects/composite_objects_comp.c
index 349bf8ffff..51824a9a98 100644
--- a/src/tests/eo/composite_objects/composite_objects_comp.c
+++ b/src/tests/eo/composite_objects/composite_objects_comp.c
@@ -26,8 +26,7 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED)
{
obj = eo_constructor(eo_super(obj, MY_CLASS));
- Eo *simple = NULL;
- eo_add(&simple, SIMPLE_CLASS, obj);
+ Eo *simple = eo_add(SIMPLE_CLASS, obj);
eo_composite_attach(obj, simple);
eo_event_callback_forwarder_add(simple, EV_A_CHANGED, obj);
diff --git a/src/tests/eo/composite_objects/composite_objects_main.c b/src/tests/eo/composite_objects/composite_objects_main.c
index 47902a4424..6f9e914415 100644
--- a/src/tests/eo/composite_objects/composite_objects_main.c
+++ b/src/tests/eo/composite_objects/composite_objects_main.c
@@ -30,8 +30,7 @@ main(int argc, char *argv[])
(void) argv;
eo_init();
- Eo *obj = NULL;
- eo_add(&obj, COMP_CLASS, NULL);
+ Eo *obj = eo_add(COMP_CLASS, NULL);
eo_event_callback_add(obj, EV_A_CHANGED, _a_changed_cb, NULL);
fail_if(!eo_isa(obj, COMP_CLASS));
diff --git a/src/tests/eo/constructors/constructors_main.c b/src/tests/eo/constructors/constructors_main.c
index bb2baa1d6c..5844e46624 100644
--- a/src/tests/eo/constructors/constructors_main.c
+++ b/src/tests/eo/constructors/constructors_main.c
@@ -24,8 +24,7 @@ main(int argc, char *argv[])
(void) argv;
eo_init();
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
fail_if(my_init_count != 2);
@@ -43,14 +42,14 @@ main(int argc, char *argv[])
fail_if(my_init_count != 0);
- eo_add(&obj, SIMPLE2_CLASS, NULL);
+ obj = eo_add(SIMPLE2_CLASS, NULL);
fail_if(obj);
- eo_add(&obj, SIMPLE3_CLASS, NULL);
+ obj = eo_add(SIMPLE3_CLASS, NULL);
fail_if(obj);
my_init_count = 0;
- eo_add(&obj, SIMPLE4_CLASS, NULL);
+ obj = eo_add(SIMPLE4_CLASS, NULL);
fail_if(my_init_count != 2);
@@ -58,33 +57,33 @@ main(int argc, char *argv[])
fail_if(my_init_count != 0);
- eo_add(&obj, SIMPLE5_CLASS, NULL);
+ obj = eo_add(SIMPLE5_CLASS, NULL);
fail_if(!obj);
eo_unref(obj);
- eo_add(&obj, SIMPLE6_CLASS, NULL);
+ obj = eo_add(SIMPLE6_CLASS, NULL);
fail_if(!obj);
eo_unref(obj);
- eo_add(&obj, SIMPLE7_CLASS, NULL);
+ obj = eo_add(SIMPLE7_CLASS, NULL);
fail_if(obj);
my_init_count = 0;
- eo_add(&obj, SIMPLE_CLASS, NULL);
+ obj = eo_add(SIMPLE_CLASS, NULL);
fail_if(!obj);
fail_if(my_init_count != 2);
a = simple_a_get(obj);
fail_if(a != 0);
my_init_count = 0;
- eo_add(&obj, SIMPLE_CLASS, NULL, simple_a_set(obj, 7));
+ obj = eo_add(SIMPLE_CLASS, NULL, simple_a_set(eoid, 7));
fail_if(!obj);
fail_if(my_init_count != 2);
a = simple_a_get(obj);
fail_if(a != 7);
my_init_count = 0;
- eo_add(&obj, SIMPLE_CLASS, NULL, simple_b_set(obj, 6), simple_a_set(obj, -1), b = simple_b_get(obj));
+ obj = eo_add(SIMPLE_CLASS, NULL, simple_b_set(eoid, 6), simple_a_set(eoid, -1), b = simple_b_get(eoid));
fail_if(obj);
fail_if(b != 6);
fail_if(my_init_count != 0);
diff --git a/src/tests/eo/function_overrides/function_overrides_main.c b/src/tests/eo/function_overrides/function_overrides_main.c
index a9148ed4ef..b2aa840897 100644
--- a/src/tests/eo/function_overrides/function_overrides_main.c
+++ b/src/tests/eo/function_overrides/function_overrides_main.c
@@ -18,8 +18,7 @@ main(int argc, char *argv[])
eo_init();
Eina_Bool called = EINA_FALSE;
- Eo *obj = NULL;
- eo_add(&obj, INHERIT2_CLASS, NULL);
+ Eo *obj = eo_add(INHERIT2_CLASS, NULL);
simple_a_set(obj, 1);
Simple_Public_Data *pd = eo_data_scope_get(obj, SIMPLE_CLASS);
@@ -27,7 +26,7 @@ main(int argc, char *argv[])
eo_unref(obj);
- eo_add(&obj, INHERIT3_CLASS, NULL);
+ obj = eo_add(INHERIT3_CLASS, NULL);
simple_a_set(obj, 1);
pd = eo_data_scope_get(obj, SIMPLE_CLASS);
@@ -35,7 +34,7 @@ main(int argc, char *argv[])
eo_unref(obj);
- eo_add(&obj, INHERIT2_CLASS, NULL);
+ obj = eo_add(INHERIT2_CLASS, NULL);
called = inherit2_print(obj);
fail_if(!called);
called = inherit2_print(obj);
@@ -43,7 +42,7 @@ main(int argc, char *argv[])
fail_if(!called);
eo_unref(obj);
- eo_add(&obj, SIMPLE_CLASS, NULL);
+ obj = eo_add(SIMPLE_CLASS, NULL);
called = inherit2_print(obj);
fail_if(called);
diff --git a/src/tests/eo/interface/interface_main.c b/src/tests/eo/interface/interface_main.c
index 489a4e86c3..a85f030963 100644
--- a/src/tests/eo/interface/interface_main.c
+++ b/src/tests/eo/interface/interface_main.c
@@ -16,8 +16,7 @@ main(int argc, char *argv[])
(void) argv;
eo_init();
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
simple_a_set(obj, 1);
simple_b_set(obj, 2);
diff --git a/src/tests/eo/mixin/mixin_main.c b/src/tests/eo/mixin/mixin_main.c
index 1c5cebd609..d3c1dbf2ac 100644
--- a/src/tests/eo/mixin/mixin_main.c
+++ b/src/tests/eo/mixin/mixin_main.c
@@ -18,8 +18,7 @@ main(int argc, char *argv[])
(void) argv;
eo_init();
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
simple_a_set(obj, 1);
simple_b_set(obj, 2);
@@ -41,7 +40,7 @@ main(int argc, char *argv[])
eo_unref(obj);
- eo_add(&obj, INHERIT_CLASS, NULL);
+ obj = eo_add(INHERIT_CLASS, NULL);
simple_a_set(obj, 5);
a = simple_a_get(obj);
printf("%d\n", a);
diff --git a/src/tests/eo/signals/signals_main.c b/src/tests/eo/signals/signals_main.c
index f69faf5030..5d40331b03 100644
--- a/src/tests/eo/signals/signals_main.c
+++ b/src/tests/eo/signals/signals_main.c
@@ -37,8 +37,7 @@ main(int argc, char *argv[])
(void) argv;
eo_init();
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
Simple_Public_Data *pd = eo_data_scope_get(obj, SIMPLE_CLASS);
/* The order of these two is undetermined. */
diff --git a/src/tests/eo/suite/eo_test_call_errors.c b/src/tests/eo/suite/eo_test_call_errors.c
index f4c2d42cc6..551c58deae 100644
--- a/src/tests/eo/suite/eo_test_call_errors.c
+++ b/src/tests/eo/suite/eo_test_call_errors.c
@@ -17,8 +17,7 @@ START_TEST(eo_pure_virtual_fct_call)
eo_init();
eina_log_print_cb_set(eo_test_print_cb, &ctx);
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
fail_if(!obj);
TEST_EO_ERROR("_eo_call_resolve", "in %s:%d: you called a pure virtual func '%s' (%d) of class '%s'.");
@@ -36,8 +35,7 @@ START_TEST(eo_api_not_implemented_call)
eo_init();
eina_log_print_cb_set(eo_test_print_cb, &ctx);
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
fail_if(!obj);
TEST_EO_ERROR("_eo_api_op_id_get", "Unable to resolve op for api func %p");
@@ -55,8 +53,7 @@ START_TEST(eo_op_not_found_in_super)
eo_init();
eina_log_print_cb_set(eo_test_print_cb, &ctx);
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
fail_if(!obj);
TEST_EO_ERROR("_eo_call_resolve", "in %s:%d: func '%s' (%d) could not be resolved for class '%s' for super of '%s'.");
diff --git a/src/tests/eo/suite/eo_test_class_behaviour_errors.c b/src/tests/eo/suite/eo_test_class_behaviour_errors.c
index 5288f066ca..12c478f454 100644
--- a/src/tests/eo/suite/eo_test_class_behaviour_errors.c
+++ b/src/tests/eo/suite/eo_test_class_behaviour_errors.c
@@ -45,8 +45,7 @@ START_TEST(eo_destructor_unref)
klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL);
fail_if(!klass);
- Eo *obj = NULL;
- eo_add(&obj, klass, NULL);
+ Eo *obj = eo_add(klass, NULL);
fail_if(!obj);
TEST_EO_ERROR("_eo_unref", "Object %p deletion already triggered. You wrongly call eo_unref() within a destructor.");
@@ -77,8 +76,7 @@ START_TEST(eo_destructor_double_del)
klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL);
fail_if(!klass);
- Eo *obj = NULL;
- eo_add(&obj, klass, NULL);
+ Eo *obj = eo_add(klass, NULL);
eo_manual_free_set(obj, EINA_TRUE);
fail_if(!obj);
diff --git a/src/tests/eo/suite/eo_test_class_simple.c b/src/tests/eo/suite/eo_test_class_simple.c
index ef5d8e9e0c..224e80a290 100644
--- a/src/tests/eo/suite/eo_test_class_simple.c
+++ b/src/tests/eo/suite/eo_test_class_simple.c
@@ -54,8 +54,7 @@ static Eo *
_part_get(Eo *obj, void *class_data EINA_UNUSED, const char *name EINA_UNUSED)
{
/* A normal part get will do something saner, we just create objects. */
- Eo *ret = NULL;
- return eo_add(&ret, SIMPLE_CLASS, obj);
+ return eo_add(SIMPLE_CLASS, obj);
}
EO_VOID_FUNC_BODYV(simple_recursive, EO_FUNC_CALL(n), int n);
diff --git a/src/tests/eo/suite/eo_test_threaded_calls.c b/src/tests/eo/suite/eo_test_threaded_calls.c
index 76a9ca9684..b25b00b672 100644
--- a/src/tests/eo/suite/eo_test_threaded_calls.c
+++ b/src/tests/eo/suite/eo_test_threaded_calls.c
@@ -94,7 +94,7 @@ _thread_job(void *data, Eina_Thread t EINA_UNUSED)
fail_if(EINA_LOCK_SUCCEED != eina_spinlock_take(&locks[0]));
}
- eo_add(&obj, THREAD_TEST_CLASS, NULL, thread_test_constructor(obj, v));
+ obj = eo_add(THREAD_TEST_CLASS, NULL, thread_test_constructor(eoid, v));
thread_test_try_swap_stack(obj);
v = thread_test_v_get(obj);
diff --git a/src/tests/eo/suite/eo_test_value.c b/src/tests/eo/suite/eo_test_value.c
index b9fac0db36..6162389e16 100644
--- a/src/tests/eo/suite/eo_test_value.c
+++ b/src/tests/eo/suite/eo_test_value.c
@@ -17,8 +17,7 @@ START_TEST(eo_value)
Eina_Value val2, eo_val;
void *tmpp = NULL;
Eo_Dbg_Info *eo_dbg_info;
- Eo *obj = NULL;
- eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj = eo_add(SIMPLE_CLASS, NULL);
eo_dbg_info = EO_DBG_INFO_LIST_APPEND(NULL, "Root");
eo_dbg_info_get(obj, eo_dbg_info);
diff --git a/src/tests/eolian_js/eolian_js_test_constructor_method_impl.c b/src/tests/eolian_js/eolian_js_test_constructor_method_impl.c
index adff8f5614..1740e61466 100644
--- a/src/tests/eolian_js/eolian_js_test_constructor_method_impl.c
+++ b/src/tests/eolian_js/eolian_js_test_constructor_method_impl.c
@@ -132,8 +132,7 @@ _constructor_method_class_classoutmethod1(Eo* obj EINA_UNUSED, Constructor_Metho
{
fprintf(stderr, "classoutmethod1\n");
fflush(stderr);
- Eo *ret = NULL;
- return eo_add(&ret, MY_CLASS, NULL, constructor_method_class_constructor1(ret, one), constructor_method_class_constructor2(ret, two));
+ return eo_add(MY_CLASS, NULL, constructor_method_class_constructor1(eoid, one), constructor_method_class_constructor2(eoid, two));
}
EOLIAN static void
@@ -141,8 +140,7 @@ _constructor_method_class_classoutmethod2(Eo* obj EINA_UNUSED, Constructor_Metho
{
fprintf(stderr, "classoutmethod2\n");
fflush(stderr);
- *out_class = NULL;
- eo_add(&out_class, MY_CLASS, NULL, constructor_method_class_constructor1(out_class, one), constructor_method_class_constructor2(out_class, two));
+ *out_class = eo_add(MY_CLASS, NULL, constructor_method_class_constructor1(eoid, one), constructor_method_class_constructor2(eoid, two));
}
diff --git a/src/tests/evas/evas_test_mesh.c b/src/tests/evas/evas_test_mesh.c
index a339584f5d..40a2239000 100644
--- a/src/tests/evas/evas_test_mesh.c
+++ b/src/tests/evas/evas_test_mesh.c
@@ -44,8 +44,8 @@
EINA_ITERATOR_FOREACH(it, file) \
{ \
int set_ok, save_ok; \
- eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, e); \
- eo_add(&mesh2, EVAS_CANVAS3D_MESH_CLASS, e); \
+ mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, e); \
+ mesh2 = eo_add(EVAS_CANVAS3D_MESH_CLASS, e); \
fail_if(mesh == NULL); \
fail_if(mesh2 == NULL); \
snprintf(buffer, PATH_MAX, "%s%s", tmp, ext); \