aboutsummaryrefslogtreecommitdiffstats
path: root/src/examples/evas
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/evas')
-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.c24
-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.c36
-rw-r--r--src/examples/evas/evas-3d-eet.c24
-rw-r--r--src/examples/evas/evas-3d-fog.c40
-rw-r--r--src/examples/evas/evas-3d-frustum.c33
-rw-r--r--src/examples/evas/evas-3d-md2.c26
-rw-r--r--src/examples/evas/evas-3d-mmap-set.c24
-rw-r--r--src/examples/evas/evas-3d-obj.c26
-rw-r--r--src/examples/evas/evas-3d-parallax-occlusion.c32
-rw-r--r--src/examples/evas/evas-3d-pick.c22
-rw-r--r--src/examples/evas/evas-3d-ply.c22
-rw-r--r--src/examples/evas/evas-3d-proxy.c32
-rw-r--r--src/examples/evas/evas-3d-shadows.c94
-rw-r--r--src/examples/evas/evas-object-manipulation-eo.c8
-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-macros.h12
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter.c22
22 files changed, 312 insertions, 316 deletions
diff --git a/src/examples/evas/evas-3d-aabb.c b/src/examples/evas/evas-3d-aabb.c
index c8d906c881..59c9a8b703 100644
--- a/src/examples/evas/evas-3d-aabb.c
+++ b/src/examples/evas/evas-3d-aabb.c
@@ -142,17 +142,16 @@ 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,
+ eo_add(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0));
- camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_canvas3d_node_camera_set(camera));
@@ -162,15 +161,14 @@ main(void)
evas_canvas3d_node_position_set(100.0, 50.0, 20.0),
evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0,
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
- light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(light,
evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_directional_set(EINA_TRUE));
- light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(light_node,
evas_canvas3d_node_light_set(light),
@@ -180,15 +178,15 @@ main(void)
eo_do(root_node,
evas_canvas3d_node_member_add(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);
eo_do(mesh,
efl_file_set(model_path, NULL),
evas_canvas3d_mesh_frame_material_set(0, material),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
- texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(texture,
evas_canvas3d_texture_file_set(image_path, NULL),
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
@@ -209,19 +207,19 @@ main(void)
1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(50.0));
- mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- mesh_box_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(mesh_box_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
- material_box = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(material_box, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(material_box, evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE));
- cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(cube,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
- mesh_box = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(mesh_box, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(mesh_box,
evas_canvas3d_mesh_from_primitive_set(0, cube),
evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES),
@@ -244,7 +242,7 @@ main(void)
evas_canvas3d_scene_camera_node_set(camera_node),
evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),
diff --git a/src/examples/evas/evas-3d-blending.c b/src/examples/evas/evas-3d-blending.c
index 98bd74afb5..589e78fdaf 100644
--- a/src/examples/evas/evas-3d-blending.c
+++ b/src/examples/evas/evas-3d-blending.c
@@ -144,13 +144,12 @@ _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);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
- data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
@@ -165,14 +164,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);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
- data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@@ -194,7 +192,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);
eo_do(data->material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@@ -206,7 +204,7 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2),
evas_canvas3d_material_shininess_set(100.0));
- data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(data->material1, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(data->material1,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@@ -218,26 +216,24 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2),
evas_canvas3d_material_shininess_set(100.0));
- data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->sphere,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(50));
- 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,
+ eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
- data->mesh_node1 =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->mesh_node1, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node1));
@@ -256,14 +252,13 @@ _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);
eo_do(data->scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(0.5, 0.5, 0.5, 1));
- data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
diff --git a/src/examples/evas/evas-3d-colorpick.c b/src/examples/evas/evas-3d-colorpick.c
index f0a6444d77..5845a5f857 100644
--- a/src/examples/evas/evas-3d-colorpick.c
+++ b/src/examples/evas/evas-3d-colorpick.c
@@ -242,9 +242,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);
eo_do(sphere->primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(50));
@@ -255,7 +255,7 @@ _init_sphere(void *this, const char *texture)
eo_do(sphere->mesh, evas_canvas3d_mesh_color_pick_enable_set(EINA_TRUE));
- sphere->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(sphere->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(sphere->texture,
evas_canvas3d_texture_file_set(texture, NULL),
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
@@ -286,17 +286,16 @@ _init_scene(const char *texture)
Evas_Real tmp;
Test_object *m;
- globalscene.scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(globalscene.scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
- globalscene.root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(globalscene.root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
- globalscene.camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(globalscene.camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(globalscene.camera,
evas_canvas3d_camera_projection_perspective_set(30.0, 1.0, 1.0, 1000.0));
- globalscene.camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(globalscene.camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(globalscene.camera_node,
evas_canvas3d_node_camera_set(globalscene.camera));
@@ -306,15 +305,14 @@ _init_scene(const char *texture)
evas_canvas3d_node_position_set(0.0, 30.0, 800.0),
evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, -1000.0,
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
- globalscene.light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(globalscene.light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(globalscene.light,
evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_directional_set(EINA_TRUE));
- globalscene.light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(globalscene.light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(globalscene.light_node,
evas_canvas3d_node_light_set(globalscene.light),
@@ -339,7 +337,7 @@ _init_scene(const char *texture)
m->material = spheretmp->material;
m->texture = spheretmp->texture;
}
- m->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(m->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
m->speed = tmp;
m->sphere_animate = _animate_sphere;
diff --git a/src/examples/evas/evas-3d-cube-rotate.c b/src/examples/evas/evas-3d-cube-rotate.c
index eec0234960..2a38c94c3b 100644
--- a/src/examples/evas/evas-3d-cube-rotate.c
+++ b/src/examples/evas/evas-3d-cube-rotate.c
@@ -148,11 +148,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);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(20.0, 1.0, 2.0, 50.0));
- data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
evas_canvas3d_node_camera_set(data->camera),
@@ -165,14 +165,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);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
- data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
@@ -188,7 +188,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);
eo_do(data->material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@@ -200,18 +200,18 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_shininess_set(100.0));
/* Setup primitive */
- data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->cube,
evas_canvas3d_primitive_form_set(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);
eo_do(data->mesh,
evas_canvas3d_mesh_from_primitive_set(0, data->cube),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
evas_canvas3d_mesh_frame_material_set(0, data->material));
- data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node,
evas_canvas3d_node_member_add(data->mesh_node));
eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
@@ -220,8 +220,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,
+ eo_add(scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
eo_do(scene,
diff --git a/src/examples/evas/evas-3d-cube.c b/src/examples/evas/evas-3d-cube.c
index d3bcbbe6b5..b4712184e3 100644
--- a/src/examples/evas/evas-3d-cube.c
+++ b/src/examples/evas/evas-3d-cube.c
@@ -134,13 +134,12 @@ _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);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
- data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
evas_canvas3d_node_camera_set(data->camera),
@@ -153,14 +152,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);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
- data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@@ -173,7 +171,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);
eo_do(data->material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@@ -186,7 +184,7 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_shininess_set(100.0));
/* Setup mesh. */
- data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(data->mesh,
evas_canvas3d_mesh_vertex_count_set(24),
evas_canvas3d_mesh_frame_add(0),
@@ -208,8 +206,7 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_mesh_frame_material_set(0, data->material));
- data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
@@ -218,13 +215,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);
eo_do(data->scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
- data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@@ -258,7 +254,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);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),
diff --git a/src/examples/evas/evas-3d-cube2.c b/src/examples/evas/evas-3d-cube2.c
index a2dd1febf5..9f811e1500 100644
--- a/src/examples/evas/evas-3d-cube2.c
+++ b/src/examples/evas/evas-3d-cube2.c
@@ -112,12 +112,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);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
- data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
evas_canvas3d_node_camera_set(data->camera),
@@ -131,14 +130,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);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
- data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@@ -152,8 +150,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);
eo_do(data->material0,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@@ -177,9 +175,9 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(100.0));
- 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);
eo_do(data->texture0,
evas_canvas3d_texture_data_set(EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]));
@@ -196,12 +194,12 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_texture_set(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);
eo_do(data->cube,
evas_canvas3d_primitive_form_set(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);
eo_do(data->mesh,
evas_canvas3d_mesh_from_primitive_set(0, data->cube),
evas_canvas3d_mesh_frame_material_set(0, data->material0),
@@ -209,8 +207,8 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_mesh_frame_material_set(20, data->material1),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP));
- data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
@@ -219,13 +217,13 @@ _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);
eo_do(data->scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT),
evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
- data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@@ -260,7 +258,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);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),
diff --git a/src/examples/evas/evas-3d-eet.c b/src/examples/evas/evas-3d-eet.c
index 9067825e00..18d994cd58 100644
--- a/src/examples/evas/evas-3d-eet.c
+++ b/src/examples/evas/evas-3d-eet.c
@@ -116,18 +116,18 @@ 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,
+ eo_add(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0));
- camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_canvas3d_node_camera_set(camera));
@@ -138,14 +138,14 @@ main(void)
evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0,
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
/* Add the light. */
- light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(light,
evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_directional_set(EINA_TRUE));
- light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(light_node,
evas_canvas3d_node_light_set(light),
@@ -156,9 +156,9 @@ main(void)
evas_canvas3d_node_member_add(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);
eo_do(mesh,
efl_file_set(input_model_path, NULL),
@@ -188,7 +188,7 @@ main(void)
efl_file_set(output_model_path, NULL),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
- mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(root_node,
@@ -197,7 +197,7 @@ main(void)
evas_canvas3d_node_mesh_add(mesh),
evas_canvas3d_node_position_set(0.0, -40.0, 0.0));
- mesh_node2 = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(mesh_node2, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(root_node,
evas_canvas3d_node_member_add(mesh_node2));
@@ -212,7 +212,7 @@ main(void)
evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
/* Add a background rectangle objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),
diff --git a/src/examples/evas/evas-3d-fog.c b/src/examples/evas/evas-3d-fog.c
index 5d191e800f..8d9a0c68ab 100644
--- a/src/examples/evas/evas-3d-fog.c
+++ b/src/examples/evas/evas-3d-fog.c
@@ -82,13 +82,13 @@ _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);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
- data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
@@ -103,14 +103,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);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
- data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@@ -133,7 +133,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);
eo_do(data->material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@@ -145,23 +145,23 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(100.0));
- data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->sphere,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(50));
- 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,
+
+ eo_add(data->animation_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
- data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->animation_node, evas_canvas3d_node_member_add(data->mesh_node));
@@ -169,8 +169,8 @@ _mesh_setup(Scene_Data *data)
eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh),
evas_canvas3d_node_position_set(0.0, 0.0, 3.0));
- data->mesh_node1 =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(data->mesh_node1, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node1));
@@ -184,14 +184,14 @@ _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);
eo_do(data->scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(FOG_COLOR, 1));
- data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@@ -226,7 +226,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);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),
diff --git a/src/examples/evas/evas-3d-frustum.c b/src/examples/evas/evas-3d-frustum.c
index 465160bae7..a89c407ddf 100644
--- a/src/examples/evas/evas-3d-frustum.c
+++ b/src/examples/evas/evas-3d-frustum.c
@@ -296,8 +296,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,
+ eo_add(data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
evas_canvas3d_node_camera_set(data->camera),
@@ -312,13 +312,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);
eo_do(data->light,
evas_canvas3d_light_ambient_set( 0.2, 0.2, 0.2, 1.0);
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
- data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS,evas,
+ eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS,evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@@ -331,7 +331,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);
eo_do(data->material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@@ -343,31 +343,30 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(100.0));
- data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->cube,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
- data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->sphere,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(20));
- data->mesh_aabb = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(data->mesh_aabb, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(data->mesh_aabb,
evas_canvas3d_mesh_from_primitive_set(0, data->cube),
evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_DIFFUSE),
evas_canvas3d_mesh_frame_material_set(0, data->material));
- data->mesh_sphere = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(data->mesh_sphere, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(data->mesh_sphere,
evas_canvas3d_mesh_from_primitive_set(0, data->sphere),
evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_DIFFUSE),
evas_canvas3d_mesh_frame_material_set(0, data->material));
- data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh_aabb));
}
@@ -375,9 +374,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);
eo_do(data->texture_model,
evas_canvas3d_texture_file_set(texture_path, NULL),
@@ -405,16 +404,16 @@ _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,
+ eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(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,
+ eo_add(data->mesh_node_model, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->mesh_node_model,
evas_canvas3d_node_position_set(obj_x, obj_y, obj_z),
diff --git a/src/examples/evas/evas-3d-md2.c b/src/examples/evas/evas-3d-md2.c
index 9409efc5b7..95ec7fbbc1 100644
--- a/src/examples/evas/evas-3d-md2.c
+++ b/src/examples/evas/evas-3d-md2.c
@@ -91,19 +91,19 @@ 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,
+ eo_addE(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0));
- camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_canvas3d_node_camera_set(camera));
@@ -114,15 +114,15 @@ main(void)
evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0,
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
/* Add the light. */
- light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(light,
evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_directional_set(EINA_TRUE));
- light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(light_node,
evas_canvas3d_node_light_set(light),
@@ -133,15 +133,15 @@ main(void)
evas_canvas3d_node_member_add(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);
eo_do(mesh,
efl_file_set(model_path, NULL),
evas_canvas3d_mesh_frame_material_set(0, material),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
- texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(texture,
evas_canvas3d_texture_file_set(image_path, NULL),
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
@@ -162,7 +162,7 @@ main(void)
1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(50.0));
- mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(root_node,
evas_canvas3d_node_member_add(mesh_node));
@@ -176,7 +176,7 @@ main(void)
evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
/* Add a background rectangle objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),
diff --git a/src/examples/evas/evas-3d-mmap-set.c b/src/examples/evas/evas-3d-mmap-set.c
index 39f6d34a6b..fde77481d9 100644
--- a/src/examples/evas/evas-3d-mmap-set.c
+++ b/src/examples/evas/evas-3d-mmap-set.c
@@ -32,12 +32,12 @@
#define LOAD_AND_ADD_MESH(extention, number) \
snprintf(buffer, PATH_MAX, "%s%s", template_path, #extention); \
extention##_file = eina_file_open(buffer , 0); \
- mesh_##extention = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); \
+ eo_add(mesh_##extention, EVAS_CANVAS3D_MESH_CLASS, evas); \
eo_do(mesh_##extention, \
efl_file_mmap_set(extention##_file, NULL), \
evas_canvas3d_mesh_frame_material_set(0, material), \
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG)); \
- node_##extention = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, \
+ eo_add(node_##extention, EVAS_CANVAS3D_NODE_CLASS, evas, \
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); \
eo_do(root_node, evas_canvas3d_node_member_add(node_##extention)); \
eo_do(node_##extention, evas_canvas3d_node_mesh_add(mesh_##extention), \
@@ -187,19 +187,19 @@ 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,
+ eo_add(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(10.0, 1.0, 1.0, 500.0));
- camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_canvas3d_node_camera_set(camera));
@@ -210,15 +210,15 @@ main(void)
evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
/* Add the light. */
- light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(light,
evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_directional_set(EINA_TRUE));
- light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(light_node,
evas_canvas3d_node_light_set(light),
@@ -228,7 +228,7 @@ main(void)
eo_do(root_node,
evas_canvas3d_node_member_add(light_node));
- material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@@ -256,7 +256,7 @@ main(void)
evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
/* Add a background rectangle objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(20, 20, 200, 255),
efl_gfx_size_set(WIDTH, HEIGHT),
diff --git a/src/examples/evas/evas-3d-obj.c b/src/examples/evas/evas-3d-obj.c
index 0d40a4125a..f6d65dfba2 100644
--- a/src/examples/evas/evas-3d-obj.c
+++ b/src/examples/evas/evas-3d-obj.c
@@ -44,13 +44,13 @@
#define NUMBER_OF_MESHES 8
#define ADD_OBJ_MESH(path, Y, Z, num, shade_mode, name_of_material) \
- mesh[num] = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); \
+ eo_add(mesh[num], EVAS_CANVAS3D_MESH_CLASS, evas); \
snprintf(full_file_path, PATH_MAX, "%s%s", path, ".obj"); \
eo_do(mesh[num], \
efl_file_set(full_file_path, NULL), \
evas_canvas3d_mesh_frame_material_set(0, name_of_material), \
evas_canvas3d_mesh_shade_mode_set(shade_mode)); \
- mesh_node[num] = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, \
+ eo_add(mesh_node[num], EVAS_CANVAS3D_NODE_CLASS, evas, \
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); \
eo_do(root_node, \
evas_canvas3d_node_member_add(mesh_node[num])); \
@@ -67,7 +67,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); \
eo_do(name, \
evas_canvas3d_texture_file_set(path, NULL), \
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
@@ -76,7 +76,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); \
eo_do(name, \
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), \
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), \
@@ -164,19 +164,19 @@ 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,
+ eo_add(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(20.0, 1.0, 1.0, 500.0));
- camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_canvas3d_node_camera_set(camera));
@@ -187,15 +187,15 @@ main(void)
evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
/* Add the light. */
- light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(light,
evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_directional_set(EINA_TRUE));
- light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(light_node,
evas_canvas3d_node_light_set(light),
@@ -233,7 +233,7 @@ main(void)
evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
/* Add a background rectangle MESHES. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),
diff --git a/src/examples/evas/evas-3d-parallax-occlusion.c b/src/examples/evas/evas-3d-parallax-occlusion.c
index fd1e8ce18b..eb35237420 100644
--- a/src/examples/evas/evas-3d-parallax-occlusion.c
+++ b/src/examples/evas/evas-3d-parallax-occlusion.c
@@ -105,12 +105,12 @@ _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);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(30.0, 1.0, 2.0, 50.0));
- data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
evas_canvas3d_node_camera_set(data->camera),
@@ -123,13 +123,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);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
- data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@@ -143,10 +143,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);
eo_do(data->texture_rocks, evas_canvas3d_texture_file_set(rock_diffuse, NULL),
evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
EVAS_CANVAS3D_WRAP_MODE_REPEAT));
@@ -169,10 +169,10 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(100.0));
- 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);
eo_do(data->texture_wood, evas_canvas3d_texture_file_set(wood_diffuse, NULL),
evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
EVAS_CANVAS3D_WRAP_MODE_REPEAT));
@@ -196,12 +196,12 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_shininess_set(100.0));
/* Set data of primitive */
- data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->cube,
evas_canvas3d_primitive_form_set(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);
eo_do(data->mesh,
evas_canvas3d_mesh_from_primitive_set(0, data->cube),
evas_canvas3d_mesh_from_primitive_set(100, data->cube),
@@ -211,7 +211,7 @@ _mesh_setup(Scene_Data *data)
eo_do(data->mesh,
evas_canvas3d_mesh_frame_material_set(100, data->material_wood));
- data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh),
@@ -221,12 +221,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);
eo_do(data->scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
- data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@@ -261,7 +261,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);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),
diff --git a/src/examples/evas/evas-3d-pick.c b/src/examples/evas/evas-3d-pick.c
index db8389ae36..9836100037 100644
--- a/src/examples/evas/evas-3d-pick.c
+++ b/src/examples/evas/evas-3d-pick.c
@@ -133,19 +133,19 @@ 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,
+ eo_add(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(30.0, 1.0, 1.0, 100.0));
- camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_canvas3d_node_camera_set(camera),
@@ -154,17 +154,17 @@ main(void)
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
eo_do(root_node, evas_canvas3d_node_member_add(camera_node));
- sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(sphere,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(50));
- mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(mesh, evas_canvas3d_mesh_from_primitive_set(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);
eo_do(texture_diffuse,
evas_canvas3d_texture_file_set(image_path, NULL),
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR,
@@ -184,7 +184,7 @@ main(void)
1.0),
evas_canvas3d_material_shininess_set(50.0));
- mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(root_node, evas_canvas3d_node_member_add(mesh_node));
@@ -199,7 +199,7 @@ main(void)
evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
/* Add evas objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),
diff --git a/src/examples/evas/evas-3d-ply.c b/src/examples/evas/evas-3d-ply.c
index 10881aa731..6781c9af66 100644
--- a/src/examples/evas/evas-3d-ply.c
+++ b/src/examples/evas/evas-3d-ply.c
@@ -123,18 +123,18 @@ 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,
+ eo_add(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0));
- camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_canvas3d_node_camera_set(camera));
@@ -145,14 +145,14 @@ main(void)
evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
/* Add the light. */
- light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
+ eo_add(light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(light,
evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_directional_set(EINA_TRUE));
- light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(light_node,
evas_canvas3d_node_light_set(light),
@@ -162,8 +162,8 @@ main(void)
eo_do(root_node,
evas_canvas3d_node_member_add(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);
eo_do(texture,
evas_canvas3d_texture_file_set(image_path, NULL),
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
@@ -191,7 +191,7 @@ main(void)
/* Add the meshes. */
for (i = 0; i < NUMBER_OF_MESHES; i++)
{
- mesh[i] = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(mesh[i], EVAS_CANVAS3D_MESH_CLASS, evas);
snprintf(buffer, PATH_MAX, "%s%s", input_template, file_name[i % 8]);
eo_do(mesh[i],
@@ -210,7 +210,7 @@ main(void)
evas_canvas3d_mesh_shade_mode_set(draw_mode[(i % 16) / 8]));
}
- mesh_node[i] = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(mesh_node[i], EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(root_node, evas_canvas3d_node_member_add(mesh_node[i]));
eo_do(mesh_node[i],
@@ -225,7 +225,7 @@ main(void)
evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
/* Add a background rectangle objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(100, 100, 100, 255),
efl_gfx_size_set(WIDTH, HEIGHT),
diff --git a/src/examples/evas/evas-3d-proxy.c b/src/examples/evas/evas-3d-proxy.c
index 48d85e474d..f2e380c8a0 100644
--- a/src/examples/evas/evas-3d-proxy.c
+++ b/src/examples/evas/evas-3d-proxy.c
@@ -100,12 +100,12 @@ _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);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(30.0, 1.0, 2.0, 50.0));
- data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
evas_canvas3d_node_camera_set(data->camera),
@@ -119,14 +119,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);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
- data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@@ -140,8 +140,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);
eo_do(data->texture,
evas_canvas3d_texture_source_set(source),
@@ -160,19 +160,19 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_texture_set(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);
eo_do(data->cube,
evas_canvas3d_primitive_form_set(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);
eo_do(data->mesh,
evas_canvas3d_mesh_from_primitive_set(0, data->cube),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_FLAT),
evas_canvas3d_mesh_frame_material_set(0, data->material));
- data->mesh_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
@@ -182,13 +182,13 @@ _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);
eo_do(data->scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT),
evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
- data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@@ -221,7 +221,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);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),
diff --git a/src/examples/evas/evas-3d-shadows.c b/src/examples/evas/evas-3d-shadows.c
index 179d1825cd..f0da2f2039 100644
--- a/src/examples/evas/evas-3d-shadows.c
+++ b/src/examples/evas/evas-3d-shadows.c
@@ -179,7 +179,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);
eo_do(body->material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@@ -199,18 +199,18 @@ _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);
eo_do(sphere->primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(50));
- sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(sphere->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(sphere->mesh,
evas_canvas3d_mesh_from_primitive_set(0, sphere->primitive));
_body_material_set(sphere, 1, 0.0, 0.0);
- sphere->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(sphere->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH),
evas_canvas3d_node_position_set(3.0, 3.0, 0.0));
eo_do(sphere->node, evas_canvas3d_node_mesh_add(sphere->mesh));
@@ -219,19 +219,19 @@ _sphere_setup(Body_3D *sphere)
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);
eo_do(cone->primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CONE),
evas_canvas3d_primitive_precision_set(50));
- cone->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(cone->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(cone->mesh,
evas_canvas3d_mesh_from_primitive_set(0, cone->primitive));
_body_material_set(cone, 0.8, 0.5, 0.5);
- cone->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(cone->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(cone->node, evas_canvas3d_node_mesh_add(cone->mesh),
evas_canvas3d_node_orientation_angle_axis_set(-90.0, 1.0, 0.0, 0.0),
@@ -241,19 +241,19 @@ _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);
eo_do(cylinder->primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER),
evas_canvas3d_primitive_precision_set(50));
- cylinder->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(cylinder->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(cylinder->mesh,
evas_canvas3d_mesh_from_primitive_set(0, cylinder->primitive));
_body_material_set(cylinder, 0.0, 0.0, 1.0);
- cylinder->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(cylinder->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(cylinder->node, evas_canvas3d_node_mesh_add(cylinder->mesh),
evas_canvas3d_node_orientation_angle_axis_set(-90.0, 1.0, 0.0, 0.0),
@@ -264,7 +264,8 @@ static void
_fence_setup(Body_3D *fence)
{
- Eo *texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ Eo *texture;
+ eo_add(texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(texture, evas_canvas3d_texture_atlas_enable_set(EINA_FALSE));
eo_do(texture,
evas_canvas3d_texture_file_set(PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL),
@@ -272,7 +273,8 @@ _fence_setup(Body_3D *fence)
EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
EVAS_CANVAS3D_WRAP_MODE_REPEAT));
- Eo *texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ Eo *texture1;
+ eo_add(texture1, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(texture1, evas_canvas3d_texture_atlas_enable_set(EINA_FALSE));
eo_do(texture1,
evas_canvas3d_texture_file_set(PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid_n.png", NULL),
@@ -280,7 +282,7 @@ _fence_setup(Body_3D *fence)
EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
evas_canvas3d_texture_wrap_set(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);
eo_do(fence->material,
evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture),
@@ -295,14 +297,14 @@ _fence_setup(Body_3D *fence)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(100.0));
- fence->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(fence->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(fence->primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER),
evas_canvas3d_primitive_mode_set(EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE),
evas_canvas3d_primitive_tex_scale_set(160.0, 12.0),
evas_canvas3d_primitive_precision_set(50));
- fence->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(fence->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(fence->mesh,
evas_canvas3d_mesh_from_primitive_set(0, fence->primitive));
@@ -311,8 +313,8 @@ _fence_setup(Body_3D *fence)
evas_canvas3d_mesh_alpha_func_set(EVAS_CANVAS3D_COMPARISON_GREATER, 0),
evas_canvas3d_mesh_alpha_test_enable_set(EINA_TRUE),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP));
- fence->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(fence->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(fence->node, evas_canvas3d_node_mesh_add(fence->mesh),
evas_canvas3d_node_orientation_angle_axis_set(-90.0, 1.0, 0.0, 0.0),
@@ -323,18 +325,18 @@ _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);
eo_do(square->primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE));
- square->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(square->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(square->mesh,
evas_canvas3d_mesh_from_primitive_set(0, square->primitive));
_body_material_set(square, 0.4, 0.4, 0.4);
- square->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(square->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(square->node, evas_canvas3d_node_mesh_add(square->mesh),
evas_canvas3d_node_position_set(0.0, -1.0, 0.0),
@@ -345,17 +347,17 @@ _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);
eo_do(box->primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
- box->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(box->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(box->mesh,
evas_canvas3d_mesh_from_primitive_set(0, box->primitive));
_body_material_set(box, 0, 1, 0);
- box->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(box->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(box->node, evas_canvas3d_node_mesh_add(box->mesh),
evas_canvas3d_node_position_set(3.0, 0.0, -3.0));
@@ -364,14 +366,14 @@ _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);
eo_do(model->texture,
evas_canvas3d_texture_file_set(image_path, NULL),
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
EVAS_CANVAS3D_WRAP_MODE_REPEAT));
- model->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(model->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(model->material,
evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, model->texture),
@@ -382,14 +384,14 @@ _model_setup(Body_3D *model)
evas_canvas3d_material_shininess_set(100.0));
- model->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(model->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(model->mesh,
efl_file_set(model_path, NULL),
evas_canvas3d_mesh_frame_material_set(0, model->material),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
- model->node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(model->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(model->node, evas_canvas3d_node_mesh_add(model->mesh),
evas_canvas3d_node_scale_set(0.1, 0.1, 0.1),
@@ -399,7 +401,7 @@ _model_setup(Body_3D *model)
static void
_billboard_setup(Scene_Data *data)
{
- data->billboard.texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(data->billboard.texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(data->billboard.texture,
evas_canvas3d_texture_file_set(b_image_path, NULL),
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
@@ -407,11 +409,11 @@ _billboard_setup(Scene_Data *data)
evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
EVAS_CANVAS3D_WRAP_MODE_REPEAT));
- data->billboard.primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(data->billboard.primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->billboard.primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE));
- data->billboard.mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(data->billboard.mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(data->billboard.mesh,
evas_canvas3d_mesh_from_primitive_set(0, data->billboard.primitive));
@@ -429,7 +431,7 @@ _billboard_setup(Scene_Data *data)
evas_canvas3d_mesh_blending_func_set(EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA,
EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA));
- data->billboard.node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->billboard.node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->billboard.node,
evas_canvas3d_node_mesh_add(data->billboard.mesh),
@@ -443,15 +445,15 @@ _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,
+ eo_add(data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(data->mediator, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(50.0, 1.0, 2.0, 100.0));
- data->camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
@@ -470,7 +472,7 @@ _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);
eo_do(data->light,
evas_canvas3d_light_ambient_set(AMBIENT_LIGHT, 1.0),
evas_canvas3d_light_diffuse_set(DIFFUSE_LIGHT, 1.0),
@@ -478,8 +480,8 @@ _light_setup(Scene_Data *data)
evas_canvas3d_light_spot_cutoff_set(20),
evas_canvas3d_light_projection_perspective_set(40.0, 1.0, 2.0, 1000.0));
- data->light_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@@ -494,14 +496,14 @@ _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);
eo_do(data->scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(BG_COLOR, 1));
- data->root_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+
+ eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
@@ -676,7 +678,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);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),
diff --git a/src/examples/evas/evas-object-manipulation-eo.c b/src/examples/evas/evas-object-manipulation-eo.c
index 9f17ee8313..a2ad39f9ee 100644
--- a/src/examples/evas/evas-object-manipulation-eo.c
+++ b/src/examples/evas/evas-object-manipulation-eo.c
@@ -174,7 +174,7 @@ main(void)
/* Creating object with Eo.
* Object must be deleted explixitly at the end of program.*/
- d.bg = eo_add(EVAS_RECTANGLE_CLASS, d.canvas);
+ eo_add(d.bg, EVAS_RECTANGLE_CLASS, d.canvas);
/* Eo-styled way to perform actions on an object*/
eo_do(d.bg, evas_obj_name_set("background rectangle"),
@@ -187,7 +187,7 @@ main(void)
evas_object_event_callback_add(
d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL);
- d.img = eo_add(EVAS_IMAGE_CLASS, d.canvas);
+ eo_add(d.img, EVAS_IMAGE_CLASS, d.canvas);
/* As soon as 'canvas' object is a parent for 'image' object,
* 'canvas' keeps reference to 'image'.
@@ -214,7 +214,7 @@ main(void)
}
/* border on the image's clipper, here just to emphasize its position */
- d.clipper_border = eo_add(EVAS_IMAGE_CLASS, d.canvas);
+ eo_add(d.clipper_border, EVAS_IMAGE_CLASS, d.canvas);
eo_do(d.clipper_border, evas_obj_image_filled_set(EINA_TRUE),
efl_file_set(border_img_path, NULL),
err = evas_obj_image_load_error_get());
@@ -235,7 +235,7 @@ main(void)
/* solid white clipper (note that it's the default color for a
* rectangle) - it won't change clippees' colors, then (multiplying
* by 255) */
- d.clipper = eo_add(EVAS_RECTANGLE_CLASS, d.canvas);
+ eo_add(d.clipper, EVAS_RECTANGLE_CLASS, d.canvas);
eo_do(d.clipper,
efl_gfx_position_set( WIDTH / 4, HEIGHT / 4),
diff --git a/src/examples/evas/evas-vg-simple.c b/src/examples/evas/evas-vg-simple.c
index 5e0b0e4017..3d5a716a09 100644
--- a/src/examples/evas/evas-vg-simple.c
+++ b/src/examples/evas/evas-vg-simple.c
@@ -449,18 +449,22 @@ vector_set(int x, int y, int w, int h)
root = evas_object_vg_root_node_get(d.vg);
//eo_do(root, evas_vg_node_transformation_set(&matrix));
- Efl_VG *bg = eo_add(EFL_VG_SHAPE_CLASS, root,
+ Efl_VG *bg;
+ eo_add(bg, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("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 *shape;
+ eo_add(shape, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("shape"));
- Efl_VG *rgradient = eo_add(EFL_VG_GRADIENT_RADIAL_CLASS, NULL,
+ Efl_VG *rgradient;
+ eo_add(rgradient, EFL_VG_GRADIENT_RADIAL_CLASS, NULL,
efl_vg_name_set("rgradient"));
- Efl_VG *lgradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, NULL,
+ Efl_VG *lgradient;
+ eo_add(lgradient, EFL_VG_GRADIENT_LINEAR_CLASS, NULL,
efl_vg_name_set("lgradient"));
_arcto(shape, 0, 0, 100, 100, 25, 330);
@@ -502,7 +506,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 *rect;
+ eo_add(rect, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("rect"));
_rect_add(rect, 0, 0, 100, 100);
evas_vg_node_origin_set(rect, 100, 100);
@@ -511,7 +516,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 *rect1;
+ eo_add(rect1, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("rect1"));
_rect_add(rect1, 0, 0, 70, 70);
evas_vg_node_origin_set(rect1, 50, 70);
@@ -520,7 +526,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 *circle;
+ eo_add(circle, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("circle"));
_arcto(circle, 0, 0, 250, 100, 30, 300);
evas_vg_shape_fill_set(circle, lgradient);
@@ -529,7 +536,8 @@ 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 *fg;
+ eo_add(fg, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("fg"));
_rect_add(fg, 0, 0, vg_w, vg_h);
evas_vg_node_origin_set(fg, 0, 0);
@@ -537,23 +545,25 @@ vector_set(int x, int y, int w, int h)
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 *tst;
+ eo_add(tst, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("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 *vc;
+ eo_add(vc, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("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,
+ eo_add(beginning, EFL_VG_CONTAINER_CLASS, NULL,
efl_vg_dup(root));
- end = eo_add(EFL_VG_CONTAINER_CLASS, NULL,
+ eo_add(end, EFL_VG_CONTAINER_CLASS, NULL,
efl_vg_dup(root));
eo_do(end, circle = efl_vg_container_child_get("circle"));
diff --git a/src/examples/evas/shooter/evas-3d-shooter-header.c b/src/examples/evas/shooter/evas-3d-shooter-header.c
index 894df546f0..c55be83338 100644
--- a/src/examples/evas/shooter/evas-3d-shooter-header.c
+++ b/src/examples/evas/shooter/evas-3d-shooter-header.c
@@ -26,13 +26,13 @@ _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);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(65.0, 1.0, 1.0, 300.0));
- data->mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->mediator_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
- data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mediator_node));
@@ -47,7 +47,7 @@ _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);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
@@ -55,7 +55,7 @@ _light_setup(Scene_Data *data)
evas_canvas3d_light_specular_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_projection_perspective_set(100.0, 1.0, 1.0, 200.0));
- data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
diff --git a/src/examples/evas/shooter/evas-3d-shooter-macros.h b/src/examples/evas/shooter/evas-3d-shooter-macros.h
index e19a507f17..27ae7d806a 100644
--- a/src/examples/evas/shooter/evas-3d-shooter-macros.h
+++ b/src/examples/evas/shooter/evas-3d-shooter-macros.h
@@ -127,7 +127,7 @@ typedef struct _vec2
#define ADD_MESH(Object, Name, a, d, s) \
- data->material_##Object = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); \
+ eo_add(data->material_##Object, EVAS_CANVAS3D_MATERIAL_CLASS, evas); \
\
eo_do(data->material_##Object, \
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), \
@@ -139,7 +139,7 @@ typedef struct _vec2
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, s, s, s, 1.0), \
evas_canvas3d_material_shininess_set(50.0)); \
\
- data->mesh_##Name = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(data->mesh_##Name, EVAS_CANVAS3D_MESH_CLASS, evas);
#define SETUP_DEFAULT_MESH(Object, Name, Shade_Mode) \
eo_do(data->mesh_##Name, \
@@ -149,7 +149,7 @@ typedef struct _vec2
#define SETUP_MESH_NODE(Name) \
- data->mesh_node_##Name = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, \
+ eo_add(data->mesh_node_##Name, EVAS_CANVAS3D_NODE_CLASS, evas, \
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); \
\
eo_do(data->mesh_node_##Name, \
@@ -161,7 +161,7 @@ typedef struct _vec2
efl_file_set(file, NULL)); \
\
SETUP_DEFAULT_MESH(Object, Name, PHONG) \
- data->texture_diffuse_##Object = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
+ eo_add(data->texture_diffuse_##Object, EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
\
eo_do(data->texture_diffuse_##Object, \
evas_canvas3d_texture_atlas_enable_set(EINA_FALSE), \
@@ -183,7 +183,7 @@ typedef struct _vec2
evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, \
2 * sizeof(float), vertex)); \
SETUP_DEFAULT_MESH(Object, Name, NORMAL_MAP) \
- data->texture_diffuse_##Object = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
+ eo_add(data->texture_diffuse_##Object, EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
\
eo_do(data->texture_diffuse_##Object, \
evas_canvas3d_texture_atlas_enable_set(EINA_FALSE), \
@@ -200,7 +200,7 @@ typedef struct _vec2
#define NORMAL_SET(Object, Name, normal) \
- data->texture_normal_##Object = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
+ eo_add(data->texture_normal_##Object, EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
\
eo_do(data->texture_normal_##Object, \
evas_canvas3d_texture_atlas_enable_set(EINA_FALSE), \
diff --git a/src/examples/evas/shooter/evas-3d-shooter.c b/src/examples/evas/shooter/evas-3d-shooter.c
index fac65a3412..354f688031 100644
--- a/src/examples/evas/shooter/evas-3d-shooter.c
+++ b/src/examples/evas/shooter/evas-3d-shooter.c
@@ -884,7 +884,7 @@ _mesh_setup_gun_planet(Scene_Data *data)
evas_canvas3d_node_position_set(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);
eo_do(data->material_ball,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
@@ -894,7 +894,7 @@ _mesh_setup_gun_planet(Scene_Data *data)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(50.0));
- 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);
@@ -949,7 +949,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);
eo_do(data->material_column,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@@ -961,7 +961,7 @@ _mesh_setup_column(Scene_Data *data, int index)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(50.0));
- data->mesh_column[index] = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(data->mesh_column[index], EVAS_CANVAS3D_MESH_CLASS, evas);
SETUP_MESH_NODE(column[index])
@@ -972,7 +972,7 @@ _mesh_setup_column(Scene_Data *data, int index)
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
evas_canvas3d_mesh_frame_material_set(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);
eo_do(data->texture_diffuse_column,
evas_canvas3d_texture_file_set(red_brick_path, NULL),
@@ -1090,23 +1090,23 @@ _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);
eo_do(data->cube_primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE),
evas_canvas3d_primitive_precision_set(10));
- data->sphere_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(data->sphere_primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->sphere_primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(50));
- global_scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(global_scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_do(global_scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT),
evas_canvas3d_scene_background_color_set(0.5, 0.5, 0.9, 0.0));
- data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@@ -1117,7 +1117,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);
eo_do(data->cylinder_primitive,
evas_canvas3d_primitive_mode_set(EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE),
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER),
@@ -1174,7 +1174,7 @@ _scene_setup(Scene_Data *data)
}
}
- data->carp_mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
+ eo_add(data->carp_mediator_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->carp_mediator_node,