summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-09 15:47:28 +0000
committerTom Hacohen <tom@stosb.com>2016-03-09 16:09:14 +0000
commit4f949a2757b6332306264d7f126b15ba7bfd37d4 (patch)
treeec3a3aacfe34b2b3e75f3fc4d85531f6f4957c9d /src/examples
parentdf83edaeb6b10324868f28e8f1910147ba22e5e5 (diff)
downloadefl-4f949a2757b6332306264d7f126b15ba7bfd37d4.tar.gz
Automatic migration to the new eo_add syntax.
Diffstat (limited to 'src/examples')
-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
25 files changed, 281 insertions, 316 deletions
diff --git a/src/examples/ecore/ecore_audio_custom.c b/src/examples/ecore/ecore_audio_custom.c
index 2570a9e20d..6eb1add105 100644
--- a/src/examples/ecore/ecore_audio_custom.c
+++ b/src/examples/ecore/ecore_audio_custom.c
@@ -56,9 +56,9 @@ main(int argc, const char *argv[])
ecore_app_args_set(argc, argv);
- out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
+ eo_add(&out, ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
- in = eo_add(ECORE_AUDIO_OBJ_IN_CLASS, NULL);
+ eo_add(&in, 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 f1624e0e67..a6e6c5e20a 100644
--- a/src/examples/ecore/ecore_audio_playback.c
+++ b/src/examples/ecore/ecore_audio_playback.c
@@ -252,7 +252,7 @@ main(int argc, const char *argv[])
{
if (!strncmp(argv[i], "tone:", 5))
{
- in = eo_add(ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL);
+ eo_add(&in, 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
{
- in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
+ eo_add(&in, 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);
- out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
+ eo_add(&out, 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 fceed59045..62e721b061 100644
--- a/src/examples/ecore/ecore_audio_to_ogg.c
+++ b/src/examples/ecore/ecore_audio_to_ogg.c
@@ -49,7 +49,7 @@ main(int argc, char *argv[])
ecore_audio_init();
- in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
+ eo_add(&in, 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);
- out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
+ eo_add(&out, 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 b34799b4c5..3e4063ea6a 100644
--- a/src/examples/eldbus/dbusmodel.c
+++ b/src/examples/eldbus/dbusmodel.c
@@ -102,7 +102,7 @@ main(int argc, char **argv EINA_UNUSED)
if (argc > 1) bus = argv[1];
if (argc > 2) path = argv[2];
- root = eo_add_ref(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, bus, path));
+ eo_add_ref(&root, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(root, 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 d02668bed0..a6761855f6 100644
--- a/src/examples/evas/evas-3d-aabb.c
+++ b/src/examples/evas/evas-3d-aabb.c
@@ -142,40 +142,38 @@ main(void)
evas = ecore_evas_get(ecore_evas);
- scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
- camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_member_add(root_node, camera_node);
evas_canvas3d_node_position_set(camera_node, 100.0, 50.0, 20.0);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
- light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&light, 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);
- light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(light_node, light);
evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
evas_canvas3d_node_member_add(root_node, light_node);
- mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&material, 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);
- texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(&texture, 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);
@@ -189,16 +187,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);
- 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(&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));
- material_box = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&material_box, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
evas_canvas3d_material_enable_set(material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
- cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
- mesh_box = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&mesh_box, 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);
@@ -215,7 +213,7 @@ main(void)
evas_canvas3d_scene_camera_node_set(scene, camera_node);
evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, 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 db7c7a1590..90ee461389 100644
--- a/src/examples/evas/evas-3d-blending.c
+++ b/src/examples/evas/evas-3d-blending.c
@@ -143,12 +143,11 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
- data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
- data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, 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);
@@ -160,13 +159,12 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&data->light, 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);
- data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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);
@@ -184,7 +182,7 @@ _set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material)
static void
_mesh_setup(Scene_Data *data)
{
- data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&data->material, 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);
@@ -194,7 +192,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);
- data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&data->material1, 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);
@@ -204,24 +202,22 @@ _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);
- data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&data->sphere, 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);
- data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh1, EVAS_CANVAS3D_MESH_CLASS, evas);
_set_ball(data->mesh, data->sphere, data->material);
_set_ball(data->mesh1, data->sphere, data->material1);
- data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, 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);
- data->mesh_node1 =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&data->mesh_node1, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node1, 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);
@@ -237,13 +233,12 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&data->scene, 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);
- data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, 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 885a53bd81..4a7594bd6d 100644
--- a/src/examples/evas/evas-3d-colorpick.c
+++ b/src/examples/evas/evas-3d-colorpick.c
@@ -237,9 +237,9 @@ Eina_Bool
_init_sphere(void *this, const char *texture)
{
Test_object *sphere = (Test_object *)this;
- sphere->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
- sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- sphere->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_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);
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);
- sphere->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(&sphere->texture, 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;
}
- m->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&m->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(m->node, 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 e393c14deb..74525cc014 100644
--- a/src/examples/evas/evas-3d-cube-rotate.c
+++ b/src/examples/evas/evas-3d-cube-rotate.c
@@ -148,10 +148,10 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
- data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 20.0, 1.0, 2.0, 50.0);
- data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, 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)
{
- data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&data->light, 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);
- data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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. */
- data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&data->material, 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 */
- data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
/* Setup mesh. */
- data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh, 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);
- data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, 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)
{
- 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));
+ 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));
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 6f6f4208c2..be29e046c5 100644
--- a/src/examples/evas/evas-3d-cube.c
+++ b/src/examples/evas/evas-3d-cube.c
@@ -133,12 +133,11 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
- data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
- data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, 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);
@@ -148,13 +147,12 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&data->light, 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);
- data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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);
@@ -164,7 +162,7 @@ static void
_mesh_setup(Scene_Data *data)
{
/* Setup material. */
- data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&data->material, 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);
@@ -175,7 +173,7 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_shininess_set(data->material, 100.0);
/* Setup mesh. */
- data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh, 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]);
@@ -187,8 +185,7 @@ _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);
- data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, 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);
}
@@ -196,12 +193,11 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&data->scene, 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);
- data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
@@ -233,7 +229,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, 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 e46c2f7c64..387edd8cea 100644
--- a/src/examples/evas/evas-3d-cube2.c
+++ b/src/examples/evas/evas-3d-cube2.c
@@ -111,11 +111,10 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
- data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
- data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, 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);
@@ -125,13 +124,12 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&data->light, 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);
- data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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);
@@ -142,8 +140,8 @@ static void
_mesh_setup(Scene_Data *data)
{
/* Setup material. */
- data->material0 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&data->material0, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&data->material1, 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);
@@ -163,9 +161,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);
- data->texture0 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- data->texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- data->texture_normal = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_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);
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]);
@@ -176,19 +174,18 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_texture_set(data->material1, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_normal);
/* Set data of primitive */
- data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
/* Setup mesh. */
- data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh, 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);
- data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, 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);
}
@@ -196,12 +193,11 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&data->scene, 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);
- data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
@@ -234,7 +230,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, 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 dc09191e05..69fca120e8 100644
--- a/src/examples/evas/evas-3d-eet.c
+++ b/src/examples/evas/evas-3d-eet.c
@@ -115,37 +115,37 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
- scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
- camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_member_add(root_node, camera_node);
evas_canvas3d_node_position_set(camera_node, 200.0, 0.0, 40.0);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
/* Add the light. */
- light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&light, 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);
- light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(light_node, light);
evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
evas_canvas3d_node_member_add(root_node, light_node);
/* Add the meshes. */
- mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- mesh2 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&mesh2, EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&material, 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);
- mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, 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);
- mesh_node2 = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&mesh_node2, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node2, 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. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, 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 33bd05cc8c..bc33f92c48 100644
--- a/src/examples/evas/evas-3d-fog.c
+++ b/src/examples/evas/evas-3d-fog.c
@@ -81,12 +81,11 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
- data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
- data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, 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);
@@ -98,13 +97,12 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&data->light, 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);
- data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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);
@@ -123,7 +121,7 @@ _set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material)
static void
_mesh_setup(Scene_Data *data)
{
- data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&data->material, 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);
@@ -133,29 +131,26 @@ _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);
- data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&data->sphere, 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);
- data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh1, EVAS_CANVAS3D_MESH_CLASS, evas);
_set_ball(data->mesh, data->sphere, data->material);
_set_ball(data->mesh1, data->sphere, data->material);
- data->animation_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&data->animation_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->animation_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
- data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, 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);
- data->mesh_node1 =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&data->mesh_node1, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node1, 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);
@@ -170,13 +165,12 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&data->scene, 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);
- data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
@@ -209,7 +203,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, 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 4e1323f5b4..25cfc5b8d4 100644
--- a/src/examples/evas/evas-3d-frustum.c
+++ b/src/examples/evas/evas-3d-frustum.c
@@ -279,8 +279,8 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void
static void
_camera_setup(Scene_Data *data)
{
- data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ 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));
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)
{
- data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&data->light, 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);
- data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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)
{
- data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&data->material, 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,27 +319,26 @@ _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);
- data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
- data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&data->sphere, 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);
- data->mesh_aabb = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh_aabb, 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);
- data->mesh_sphere = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh_sphere, 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);
- data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, 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);
}
@@ -347,9 +346,9 @@ _mesh_setup(Scene_Data *data)
static void
_mesh_setup_model(Scene_Data *data)
{
- 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);
+ 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);
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);
@@ -374,15 +373,15 @@ _mesh_setup_model(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&data->scene, 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));
+ eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
_light_setup(data);
_mesh_setup_model(data);
_camera_setup(data);
- data->mesh_node_model = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&data->mesh_node_model, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node_model, 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 57602b6988..130ad3742e 100644
--- a/src/examples/evas/evas-3d-hull.c
+++ b/src/examples/evas/evas-3d-hull.c
@@ -255,12 +255,11 @@ _key_down(void *data,
static void
_camera_setup(Scene_Data *data)
{
- data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
- data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, 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);
@@ -270,13 +269,12 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&data->light, 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);
- data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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);
@@ -292,7 +290,7 @@ _mesh_setup(Scene_Data *data)
Eo *primitive = NULL;
/* Setup material. */
- data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&data->material, 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);
@@ -302,17 +300,17 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_shininess_set(data->material, 100.0);
/* Setup mesh sphere */
- primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
evas_canvas3d_primitive_precision_set(primitive, 10);
- data->mesh_sphere = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh_sphere, 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 */
- data->mesh_torus = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh_torus, 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);
@@ -321,7 +319,7 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_mesh_frame_material_set(data->mesh_torus, 0, data->material);
/* Setup mesh cube */
- data->mesh_cube = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh_cube, 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);
@@ -353,8 +351,7 @@ _mesh_setup(Scene_Data *data)
MODEL_MESH_INIT(blender_test_eagle, eagle_test, DIFFUSE)
MODEL_MESH_INIT(blender_test_sonic, sonic_test, DIFFUSE)
- data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, 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);
@@ -371,15 +368,13 @@ _mesh_setup(Scene_Data *data)
_print_result(data->mesh_sphere_ch, data->mesh_blender_test_sphere);
- data->mesh_node_convex_hull =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ 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));
evas_canvas3d_node_member_add(data->root_node, data->mesh_node_convex_hull);
evas_canvas3d_node_position_set(data->mesh_node_convex_hull, 0.0, 0.0, 0.0);
evas_canvas3d_node_scale_set(data->mesh_node_convex_hull, SCALE_SPHERE, SCALE_SPHERE, SCALE_SPHERE);
evas_canvas3d_node_mesh_add(data->mesh_node_convex_hull, data->mesh_sphere_ch);
- data->mesh_node_blender =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&data->mesh_node_blender, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node_blender, 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);
@@ -389,12 +384,11 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&data->scene, 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);
- data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
@@ -429,7 +423,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, 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 e19dfd6630..443271a9dc 100644
--- a/src/examples/evas/evas-3d-md2.c
+++ b/src/examples/evas/evas-3d-md2.c
@@ -91,44 +91,42 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
- scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
- camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_member_add(root_node, camera_node);
evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 20.0);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
/* Add the light. */
- light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&light, 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);
- light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(light_node, light);
evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
evas_canvas3d_node_member_add(root_node, light_node);
/* Add the mesh. */
- mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
- material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&material, 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);
- texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(&texture, 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);
@@ -142,7 +140,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);
- mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(root_node, mesh_node);
evas_canvas3d_node_mesh_add(mesh_node, mesh);
@@ -152,7 +150,7 @@ main(void)
evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add a background rectangle objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, 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 000204d2e8..2432a4b6a3 100644
--- a/src/examples/evas/evas-3d-mmap-set.c
+++ b/src/examples/evas/evas-3d-mmap-set.c
@@ -181,36 +181,34 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
- scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 10.0, 1.0, 1.0, 500.0);
- camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_member_add(root_node, camera_node);
evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 100.0);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
/* Add the light. */
- light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&light, 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);
- light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(light_node, light);
evas_canvas3d_node_position_set(light_node, 1.0, 0.0, 100.0);
evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
evas_canvas3d_node_member_add(root_node, light_node);
- material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&material, 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);
@@ -233,7 +231,7 @@ main(void)
evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add a background rectangle objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, 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 b9a6b69bd1..f2623f4779 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) \
- name = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
+ eo_add(&name, 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) \
- name = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); \
+ eo_add(&name, 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,30 +157,28 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
- scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 20.0, 1.0, 1.0, 500.0);
- camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_member_add(root_node, camera_node);
evas_canvas3d_node_position_set(camera_node, 100.0, 0.0, 0.0);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
/* Add the light. */
- light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&light, 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);
- light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, 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);
@@ -212,7 +210,7 @@ main(void)
evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add a background rectangle MESHES. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, 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 67be66536d..b096dc838b 100644
--- a/src/examples/evas/evas-3d-parallax-occlusion.c
+++ b/src/examples/evas/evas-3d-parallax-occlusion.c
@@ -104,11 +104,11 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
- data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0);
- data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, 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)
{
- data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&data->light, 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);
- data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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. */
- data->material_rocks = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&data->material_rocks, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- data->texture_rocks = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- data->texture_rocks_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(&data->texture_rocks, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(&data->texture_rocks_n, 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);
- data->material_wood = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&data->material_wood, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- data->texture_wood = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
- data->texture_four_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(&data->texture_wood, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(&data->texture_four_n, 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 */
- data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
/* Setup mesh. */
- data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh, 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);
- data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, 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)
{
- data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&data->scene, 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);
- data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, 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. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, 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 1ae79a8cc9..86ee222b8a 100644
--- a/src/examples/evas/evas-3d-pick.c
+++ b/src/examples/evas/evas-3d-pick.c
@@ -132,32 +132,31 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
- scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 30.0, 1.0, 1.0, 100.0);
- camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 2.5);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
evas_canvas3d_node_member_add(root_node, camera_node);
- sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
evas_canvas3d_primitive_precision_set(sphere, 50);
- mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(mesh, 0, sphere);
- material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(&texture_diffuse, 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);
@@ -169,7 +168,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);
- mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(root_node, mesh_node);
evas_canvas3d_node_mesh_add(mesh_node, mesh);
@@ -182,7 +181,7 @@ main(void)
evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add evas objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, 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 b34b2cc313..65f4fe5de3 100644
--- a/src/examples/evas/evas-3d-ply.c
+++ b/src/examples/evas/evas-3d-ply.c
@@ -130,35 +130,35 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
- scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 500.0);
- camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_member_add(root_node, camera_node);
evas_canvas3d_node_position_set(camera_node, 15.0, 0.0, 0.0);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0);
/* Add the light. */
- light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&light, 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);
- light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
evas_canvas3d_node_light_set(light_node, light);
evas_canvas3d_node_position_set(light_node, 1000.0, 0.0, 1000.0);
evas_canvas3d_node_look_at_set(light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
evas_canvas3d_node_member_add(root_node, light_node);
- material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&texture, 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. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, 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 901c52bd54..7ec50bc4c2 100644
--- a/src/examples/evas/evas-3d-proxy.c
+++ b/src/examples/evas/evas-3d-proxy.c
@@ -97,11 +97,10 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
- data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 30.0, 1.0, 2.0, 50.0);
- data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, 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);
@@ -111,13 +110,12 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&data->light, 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);
- data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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);
@@ -128,8 +126,8 @@ static void
_mesh_setup(Scene_Data *data)
{
/* Setup material. */
- data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- data->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&data->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_source_set(data->texture, source);
evas_canvas3d_texture_source_visible_set(data->texture, EINA_TRUE);
@@ -144,17 +142,16 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_texture_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture);
/* Set data of primitive */
- data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(data->cube, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
/* Setup mesh. */
- data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh, 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);
- data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, 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);
@@ -163,12 +160,11 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
- data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&data->scene, 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);
- data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
_light_setup(data);
@@ -199,7 +195,7 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a background rectangle objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, 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 f70d7e41a8..90a714655f 100644
--- a/src/examples/evas/evas-3d-shadows.c
+++ b/src/examples/evas/evas-3d-shadows.c
@@ -174,7 +174,7 @@ _on_canvas_resize(Ecore_Evas *ee)
static void
_body_material_set(Body_3D *body, float r, float g, float b)
{
- body->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&body->material, 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,33 +191,32 @@ _body_material_set(Body_3D *body, float r, float g, float b)
static void
_sphere_setup(Body_3D *sphere)
{
- sphere->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&sphere->primitive, 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);
- sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&sphere->mesh, 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);
- 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));
+ 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));
evas_canvas3d_node_mesh_add(sphere->node, sphere->mesh);
}
static void
_cone_setup(Body_3D *cone)
{
- cone->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&cone->primitive, 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);
- cone->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&cone->mesh, 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);
- cone->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&cone->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(cone->node, 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);
@@ -226,17 +225,16 @@ _cone_setup(Body_3D *cone)
static void
_cylinder_setup(Body_3D *cylinder)
{
- cylinder->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&cylinder->primitive, 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);
- cylinder->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&cylinder->mesh, 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);
- cylinder->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&cylinder->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(cylinder->node, 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);
@@ -246,17 +244,19 @@ static void
_fence_setup(Body_3D *fence)
{
- Eo *texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ Eo *texture = NULL;
+ eo_add(&texture, 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 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ Eo *texture1 = NULL;
+ eo_add(&texture1, 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);
- fence->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&fence->material, 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,21 +270,20 @@ _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);
- fence->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&fence->primitive, 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);
- fence->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&fence->mesh, 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);
- fence->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&fence->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(fence->node, 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);
@@ -294,16 +293,15 @@ _fence_setup(Body_3D *fence)
static void
_square_setup(Body_3D *square)
{
- square->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&square->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(square->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE);
- square->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&square->mesh, 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);
- square->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&square->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(square->node, 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);
@@ -313,15 +311,15 @@ _square_setup(Body_3D *square)
static void
_box_setup(Body_3D *box)
{
- box->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&box->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(box->primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE);
- box->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&box->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(box->mesh, 0, box->primitive);
_body_material_set(box, 0, 1, 0);
- box->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&box->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(box->node, 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);
}
@@ -329,11 +327,11 @@ _box_setup(Body_3D *box)
static void
_model_setup(Body_3D *model)
{
- model->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(&model->texture, 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);
- model->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&model->material, 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);
@@ -343,13 +341,12 @@ _model_setup(Body_3D *model)
evas_canvas3d_material_shininess_set(model->material, 100.0);
- model->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&model->mesh, 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);
- model->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&model->node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(model->node, 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);
@@ -391,13 +388,12 @@ _billboard_setup(Scene_Data *data)
static void
_camera_setup(Scene_Data *data)
{
- data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
- data->mediator = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ 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));
evas_canvas3d_camera_projection_perspective_set(data->camera, 50.0, 1.0, 2.0, 100.0);
- data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(data->camera_node, data->camera);
@@ -412,15 +408,14 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
- data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&data->light, 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);
- data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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);
@@ -432,13 +427,12 @@ _scene_setup(Scene_Data *data)
{
data->init = EINA_FALSE;
- data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&data->scene, 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);
- data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@@ -610,7 +604,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, 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 2c0c7026b0..9d22907cc0 100644
--- a/src/examples/evas/evas-vg-simple.c
+++ b/src/examples/evas/evas-vg-simple.c
@@ -449,15 +449,19 @@ vector_set(int x, int y, int w, int h)
root = evas_object_vg_root_node_get(d.vg);
//evas_vg_node_transformation_set(root, &matrix);
- Efl_VG *bg = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "bg"));
+ Efl_VG *bg = NULL;
+ eo_add(&bg, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(bg, "bg"));
_rect_add(bg, 0, 0 , vg_w, vg_h);
evas_vg_node_origin_set(bg, 0,0);
evas_vg_shape_stroke_width_set(bg, 1.0);
evas_vg_node_color_set(bg, 80, 80, 80, 80);
- Efl_VG *shape = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(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"));
+ 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"));
_arcto(shape, 0, 0, 100, 100, 25, 330);
@@ -498,7 +502,8 @@ vector_set(int x, int y, int w, int h)
evas_vg_node_color_set(shape, 0, 0, 255, 255);
evas_vg_shape_stroke_color_set(shape, 0, 0, 255, 128);
- Efl_VG *rect = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "rect"));
+ Efl_VG *rect = NULL;
+ eo_add(&rect, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(rect, "rect"));
_rect_add(rect, 0, 0, 100, 100);
evas_vg_node_origin_set(rect, 100, 100);
evas_vg_shape_fill_set(rect, lgradient);
@@ -506,7 +511,8 @@ vector_set(int x, int y, int w, int h)
evas_vg_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND);
evas_vg_shape_stroke_color_set(rect, 255, 255, 255, 255);
- Efl_VG *rect1 = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "rect1"));
+ Efl_VG *rect1 = NULL;
+ eo_add(&rect1, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(rect1, "rect1"));
_rect_add(rect1, 0, 0, 70, 70);
evas_vg_node_origin_set(rect1, 50, 70);
evas_vg_shape_stroke_scale_set(rect1, 2);
@@ -514,7 +520,8 @@ vector_set(int x, int y, int w, int h)
evas_vg_shape_stroke_join_set(rect1, EFL_GFX_JOIN_ROUND);
evas_vg_shape_stroke_color_set(rect1, 0, 100, 80, 100);
- Efl_VG *circle = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "circle"));
+ Efl_VG *circle = NULL;
+ eo_add(&circle, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(circle, "circle"));
_arcto(circle, 0, 0, 250, 100, 30, 300);
evas_vg_shape_fill_set(circle, lgradient);
//evas_vg_node_transformation_set(&matrix),
@@ -522,27 +529,30 @@ vector_set(int x, int y, int w, int h)
evas_vg_node_color_set(circle, 50, 0, 0, 50);
// Foreground
- Efl_VG *fg = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "fg"));
+ Efl_VG *fg = NULL;
+ eo_add(&fg, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(fg, "fg"));
_rect_add(fg, 0, 0, vg_w, vg_h);
evas_vg_node_origin_set(fg, 0, 0);
evas_vg_shape_stroke_width_set(fg, 5.0);
evas_vg_shape_stroke_join_set(fg, EFL_GFX_JOIN_ROUND);
evas_vg_shape_stroke_color_set(fg, 70, 70, 0, 70);
- Efl_VG *tst = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "tst"));
+ Efl_VG *tst = NULL;
+ eo_add(&tst, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(tst, "tst"));
evas_vg_shape_shape_append_rect(tst, 50, 25, 200, 200, 3, 5);
evas_vg_node_color_set(tst, 0, 0, 200, 200);
evas_vg_shape_stroke_width_set(tst, 2);
evas_vg_shape_stroke_color_set(tst, 255, 0, 0, 255);
- Efl_VG *vc = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "vc"));
+ Efl_VG *vc = NULL;
+ eo_add(&vc, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(vc, "vc"));
evas_vg_shape_shape_append_circle(vc, 100, 100, 23);
evas_vg_node_color_set(vc, 0, 200, 0, 255);
evas_vg_shape_stroke_width_set(vc, 4);
evas_vg_shape_stroke_color_set(vc, 255, 0, 0, 255);
- beginning = eo_add(EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(eoid, root));
- end = eo_add(EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(eoid, root));
+ 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));
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 ee608ba2f9..8529746f18 100644
--- a/src/examples/evas/shooter/evas-3d-shooter-header.c
+++ b/src/examples/evas/shooter/evas-3d-shooter-header.c
@@ -26,11 +26,11 @@ _distance(float x1, float z1, float x2, float z2)
void
_camera_setup(Scene_Data *data)
{
- data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(data->camera, 65.0, 1.0, 1.0, 300.0);
- data->mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
- data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_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));
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)
{
- data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(&data->light, 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);
- data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, 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 2e83fd8e6d..4acf990f25 100644
--- a/src/examples/evas/shooter/evas-3d-shooter.c
+++ b/src/examples/evas/shooter/evas-3d-shooter.c
@@ -802,7 +802,7 @@ _mesh_setup_gun_planet(Scene_Data *data)
evas_canvas3d_node_position_set(data->mesh_node_column_c, 10, 9.0, -12);
/* Setup mesh for bounding sphere */
- data->material_ball = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&data->material_ball, 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);
- data->mesh_ball = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&data->mesh_ball, 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 */
- data->material_column = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&data->material_column, 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);
- data->texture_diffuse_column = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(&data->texture_diffuse_column, 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;
- data->cube_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&data->cube_primitive, 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);
- data->sphere_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&data->sphere_primitive, 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);
- global_scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&global_scene, 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);
- data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, 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);
- data->cylinder_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&data->cylinder_primitive, 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)
}
}
- data->carp_mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&data->carp_mediator_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->carp_mediator_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(data->carp_mediator_node, data->mesh_node_carpet);