bench_eo_callbacks_add(int request)
{
int i;
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
bench_eo_do_simple(int request)
{
int i;
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
bench_eo_do_two_objs(int request)
{
int i;
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
- Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj2 = NULL;
+ eo_add(&obj2, SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
bench_eo_do_two_objs_growing_stack(int request)
{
int i;
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
- Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
+ Eo *obj2 = NULL;
+ eo_add(&obj2, SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
simple_other_call(obj, obj2, 20);
cur_klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL);
int i;
- Eo *obj = eo_add(cur_klass, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, cur_klass, NULL);
for (i = 0 ; i < request ; i++)
{
simple_a_set(obj, i);
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");
{
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");
}
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");
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);
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) {
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]);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
_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);
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);
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);
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);
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);
_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);
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);
}
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);
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);
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);
_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);
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]);
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);
}
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);
_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);
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);
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);
_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);
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]);
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);
}
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);
_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);
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);
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);
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);
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);
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);
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);
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);
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);
_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);
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);
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);
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);
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);
}
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);
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);
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);
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);
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);
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);
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);
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);
_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);
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);
_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);
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);
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);
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);
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);
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);
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); \
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); \
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);
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);
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);
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);
_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);
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);
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);
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);
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);
_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);
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);
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);
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);
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);
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);
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);
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);
_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);
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);
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);
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);
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);
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);
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);
_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);
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);
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);
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);
}
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);
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);
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);
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);
{
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);
_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);
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);
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);
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);
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),
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);
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);
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);
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);
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);
{
/* 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);
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);
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);
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);
}
}
- 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);
#if defined(GLIB_INTEGRATION_ALWAYS)
if (_ecore_glib_always_integrate) ecore_main_loop_glib_integrate();
#endif
- _ecore_parent = eo_add(ECORE_PARENT_CLASS, NULL);
+ eo_add(&_ecore_parent, ECORE_PARENT_CLASS, NULL);
#if defined(HAVE_MALLINFO) || defined(HAVE_MALLOC_INFO)
if (getenv("ECORE_MEM_STAT"))
{
Ecore_Animator *animator = NULL;
- animator = eo_add(MY_CLASS, _ecore_parent, ecore_animator_constructor(eoid, func, data));
+ eo_add(&animator, MY_CLASS, _ecore_parent, ecore_animator_constructor(animator, func, data));
return animator;
}
const void *data)
{
Ecore_Animator *animator;
- animator = eo_add(MY_CLASS, _ecore_parent, ecore_animator_timeline_constructor(eoid, runtime, func, data));
+ eo_add(&animator, MY_CLASS, _ecore_parent, ecore_animator_timeline_constructor(animator, runtime, func, data));
return animator;
}
Ecore_Exe_Flags flags,
const void *data)
{
- Ecore_Exe *ret = eo_add(MY_CLASS, NULL, ecore_obj_exe_command_set(eoid, exe_cmd, flags));
+ Ecore_Exe *ret = NULL;
+ eo_add(&ret, MY_CLASS, NULL, ecore_obj_exe_command_set(ret, exe_cmd, flags));
if (ret)
{
Ecore_Exe_Data *pd = eo_data_scope_get(ret, MY_CLASS);
const void *data)
{
Ecore_Idle_Enterer *ie = NULL;
- ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_after_constructor(eoid, func, data));
+ eo_add(&ie, MY_CLASS, _ecore_parent, ecore_idle_enterer_after_constructor(ie, func, data));
return ie;
}
const void *data)
{
Ecore_Idle_Enterer *ie = NULL;
- ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_before_constructor(eoid, func, data));
+ eo_add(&ie, MY_CLASS, _ecore_parent, ecore_idle_enterer_before_constructor(ie, func, data));
return ie;
}
const void *data)
{
Ecore_Idle_Exiter *ie = NULL;
- ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_exiter_constructor(eoid, func, data));
+ eo_add(&ie, MY_CLASS, _ecore_parent, ecore_idle_exiter_constructor(ie, func, data));
return ie;
}
ecore_idler_add(Ecore_Task_Cb func,
const void *data)
{
- return eo_add(MY_CLASS, _ecore_parent, ecore_idler_constructor(eoid, func, data));
+ Eo *ret = NULL;
+ return eo_add(&ret, MY_CLASS, _ecore_parent, ecore_idler_constructor(ret, func, data));
}
EOLIAN static void
ecore_job_add(Ecore_Cb func,
const void *data)
{
- Ecore_Job *job = eo_add(MY_CLASS, _ecore_parent, ecore_job_constructor(eoid, func, data));
+ Ecore_Job *job = NULL;
+ eo_add(&job, MY_CLASS, _ecore_parent, ecore_job_constructor(job, func, data));
return job;
}
{
if (!_mainloop_singleton)
{
- _mainloop_singleton = eo_add(ECORE_MAINLOOP_CLASS, NULL);
+ eo_add(&_mainloop_singleton, ECORE_MAINLOOP_CLASS, NULL);
}
return _mainloop_singleton;
const void *data)
{
Ecore_Poller *poller;
- poller = eo_add(MY_CLASS, _ecore_parent, ecore_poller_constructor(eoid, type, interval, func, data));
+ eo_add(&poller, MY_CLASS, _ecore_parent, ecore_poller_constructor(poller, type, interval, func, data));
return poller;
}
Ecore_Timer *timer = NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
- timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(eoid, in, func, data));
+ eo_add(&timer, MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(timer, in, func, data));
return timer;
}
const void *data)
{
Ecore_Timer *timer = NULL;
- timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(eoid, in, func, data));
+ eo_add(&timer, MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(timer, in, func, data));
return timer;
}
if (!name || !done_cb)
return EINA_FALSE;
- obj = eo_add(EFL_NETWORK_CONNECTOR_CLASS, NULL, efl_network_server_connection_type_set(eoid, ECORE_CON_REMOTE_TCP), efl_network_server_name_set(eoid, name), efl_network_base_port_set(eoid, 1025));
+ eo_add(&obj, EFL_NETWORK_CONNECTOR_CLASS, NULL, efl_network_server_connection_type_set(obj, ECORE_CON_REMOTE_TCP), efl_network_server_name_set(obj, name), efl_network_base_port_set(obj, 1025));
lk = malloc(sizeof (Ecore_Con_Lookup));
if (!lk)
/* local system socket: FILE: /tmp/.ecore_service|[name]|[port] */
/* remote system socket: TCP/IP: [name]:[port] */
- obj = eo_add(EFL_NETWORK_SERVER_CLASS, NULL, efl_network_server_connection_type_set(eoid, compl_type), efl_network_server_name_set(eoid, name), efl_network_base_port_set(eoid, port));
+ eo_add(&obj, EFL_NETWORK_SERVER_CLASS, NULL, efl_network_server_connection_type_set(obj, compl_type), efl_network_server_name_set(obj, name), efl_network_base_port_set(obj, port));
ecore_con_server_data_set(obj, (void *) data);
/* local user socket: FILE: ~/.ecore/[name]/[port] */
/* local system socket: FILE: /tmp/.ecore_service|[name]|[port] */
/* remote system socket: TCP/IP: [name]:[port] */
- obj = eo_add(EFL_NETWORK_CONNECTOR_CLASS, NULL, efl_network_server_connection_type_set(eoid, compl_type), efl_network_server_name_set(eoid, name), efl_network_base_port_set(eoid, port));
+ eo_add(&obj, EFL_NETWORK_CONNECTOR_CLASS, NULL, efl_network_server_connection_type_set(obj, compl_type), efl_network_server_name_set(obj, name), efl_network_base_port_set(obj, port));
ecore_con_server_data_set(obj, (void *) data);
/* a new client */
- obj = eo_add(EFL_NETWORK_CLIENT_CLASS, NULL);
+ eo_add(&obj, EFL_NETWORK_CLIENT_CLASS, NULL);
Efl_Network_Client_Data *cl = eo_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS);
if (!cl)
{
}
/* Create a new client for use in the client data event */
- obj = eo_add(EFL_NETWORK_CLIENT_CLASS, NULL);
+ eo_add(&obj, EFL_NETWORK_CLIENT_CLASS, NULL);
Efl_Network_Client_Data *cl = eo_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS);
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, ECORE_CALLBACK_RENEW);
if (!server) return NULL;
- ece_obj = eo_add(ECORE_CON_EET_SERVER_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(eoid, server));
+ eo_add(&ece_obj, ECORE_CON_EET_SERVER_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(ece_obj, server));
return ece_obj;
}
if (!server) return NULL;
- ece_obj = eo_add(ECORE_CON_EET_CLIENT_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(eoid, server));
+ eo_add(&ece_obj, ECORE_CON_EET_CLIENT_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(ece_obj, server));
return ece_obj;
}
(svr->client_count >= (unsigned int)svr->client_limit))
return ECORE_CALLBACK_CANCEL;
- Ecore_Con_Client *cl_obj = eo_add(EFL_NETWORK_CLIENT_CLASS, NULL);
+ Ecore_Con_Client *cl_obj = NULL;
+ eo_add(&cl_obj, EFL_NETWORK_CLIENT_CLASS, NULL);
Efl_Network_Client_Data *cl = eo_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS);
if (!cl)
{
ecore_con_url_new(const char *url)
{
Ecore_Con_Url *url_obj;
- url_obj = eo_add(EFL_NETWORK_URL_CLASS, NULL, efl_network_url_set(eoid, url));
+ eo_add(&url_obj, EFL_NETWORK_URL_CLASS, NULL, efl_network_url_set(url_obj, url));
eo_event_callback_array_add(url_obj, efl_network_url_event_table_callbacks(), NULL);
case EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE:
{
Eo *primitive = NULL;
- primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base->evas);
+ eo_add(&primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base->evas);
evas_canvas3d_primitive_form_set(primitive, pd_mesh_node->mesh_node.mesh.primitive);
frame_exist = evas_canvas3d_mesh_frame_exist(mesh, pf->type.node.frame);
edje_edit_object_add(Evas *evas)
{
Evas_Object *e;
- e = eo_add(MY_CLASS, evas);
+ eo_add(&e, MY_CLASS, evas);
return e;
}
Evas_Canvas3D_Material *material = NULL;
Edje_Part_Description_Mesh_Node *pd_mesh_node;
- rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&rp->node, EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(rp->node, EVAS_CANVAS3D_NODE_TYPE_MESH));
- mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, ed->base->evas);
+ eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, ed->base->evas);
evas_canvas3d_node_mesh_add(rp->node, mesh);
pd_mesh_node = (Edje_Part_Description_Mesh_Node*) rp->chosen_description;
evas_canvas3d_mesh_frame_add(mesh, 0);
}
- material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, ed->base->evas);
+ eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, ed->base->evas);
evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
if (pd_mesh_node->mesh_node.texture.need_texture && pd_mesh_node->mesh_node.texture.textured)
{
Evas_Canvas3D_Texture *texture = NULL;
- texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, ed->base->evas);
+ eo_add(&texture, EVAS_CANVAS3D_TEXTURE_CLASS, ed->base->evas);
evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture);
}
rp->object = NULL;
{
Evas_Canvas3D_Light *light = NULL;
- rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
- light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, ed->base->evas);
+ eo_add(&rp->node, EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(rp->node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
+ eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, ed->base->evas);
evas_canvas3d_node_light_set(rp->node, light);
rp->object = NULL;
{
Evas_Canvas3D_Camera *camera = NULL;
- rp->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, ed->base->evas);
+ eo_add(&rp->node, EVAS_CANVAS3D_NODE_CLASS, ed->base->evas, evas_canvas3d_node_constructor(rp->node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, ed->base->evas);
evas_canvas3d_node_camera_set(rp->node, camera);
rp->object = evas_object_image_filled_add(ed->base->evas);
eet_data->vio.tell = eet_snd_file_tell;
eet_data->offset = 0;
- in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL, ecore_audio_obj_name_set(eoid, snd_id_str), ecore_audio_obj_in_speed_set(eoid, speed), ecore_audio_obj_vio_set(eoid, &eet_data->vio, eet_data, _free), eo_event_callback_add(eoid, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL));
+ eo_add(&in, ECORE_AUDIO_IN_SNDFILE_CLASS, NULL, ecore_audio_obj_name_set(in, snd_id_str), ecore_audio_obj_in_speed_set(in, speed), ecore_audio_obj_vio_set(in, &eet_data->vio, eet_data, _free), eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL));
if (!out)
{
#if HAVE_COREAUDIO
- out = eo_add(ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
+ eo_add(&out, ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
#elif HAVE_PULSE
- out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, eo_event_callback_add(eoid, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
+ eo_add(&out, ECORE_AUDIO_OUT_PULSE_CLASS, NULL, eo_event_callback_add(out, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
#endif
if (out) outs++;
}
tone = &ed->file->sound_dir->tones[i];
if (!strcmp(tone->name, tone_name))
{
- in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
+ eo_add(&in, ECORE_AUDIO_IN_TONE_CLASS, NULL);
ecore_audio_obj_name_set(in, "tone");
eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &tone->value);
ecore_audio_obj_in_length_set(in, duration);
if (!out)
{
#if HAVE_COREAUDIO
- out = eo_add(ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
+ eo_add(&out, ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
#elif HAVE_PULSE
- out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, eo_event_callback_add(eoid, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
+ eo_add(&out, ECORE_AUDIO_OUT_PULSE_CLASS, NULL, eo_event_callback_add(out, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
#endif
if (out) outs++;
}
{
Evas_Object *e;
EINA_SAFETY_ON_NULL_RETURN_VAL(evas, NULL);
- e = eo_add(MY_CLASS, evas);
+ eo_add(&e, MY_CLASS, evas);
return e;
}
Efl_Model_Children_Event cevt;
Eina_Value path;
- cevt.child = eo_add_ref(EIO_MODEL_CLASS, priv->obj, eio_model_path_set(eoid, evt->filename));
+ eo_add_ref(&cevt.child, EIO_MODEL_CLASS, priv->obj, eio_model_path_set(cevt.child, evt->filename));
priv->children_list = eina_list_append(priv->children_list, cevt.child);
cevt.index = eina_list_count(priv->children_list);
Eio_Model_Data *priv = data;
EINA_SAFETY_ON_NULL_RETURN(priv);
- child = eo_add(MY_CLASS, NULL, eio_model_path_set(eoid, info->path));
+ eo_add(&child, MY_CLASS, NULL, eio_model_path_set(child, info->path));
eina_spinlock_take(&priv->filter_lock);
if (priv->filter_cb)
eio_model_children_filter_set(child, priv->filter_cb, priv->filter_userdata);
static Eo *
_eio_model_efl_model_base_child_add(Eo *obj EINA_UNUSED, Eio_Model_Data *priv EINA_UNUSED)
{
- return eo_add(EIO_MODEL_CLASS, obj);
+ Eo *ret = NULL;
+ return eo_add(&ret, EIO_MODEL_CLASS, obj);
}
static void
{
DBG("(%p): bus = %s", pd->obj, bus);
- Eo *child = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_connection_constructor(eoid, pd->connection, bus, "/"));
+ Eo *child = NULL;
+ eo_add(&child, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_connection_constructor(child, pd->connection, bus, "/"));
pd->children_list = eina_list_append(pd->children_list, child);
}
WRN("(%p) Creating child: bus = %s, path = %s, interface = %s", pd->obj, pd->bus, current_path, interface->name);
// TODO: increment reference to keep 'interface' in memory
- child = eo_add_ref(ELDBUS_MODEL_PROXY_CLASS, NULL, eldbus_model_proxy_constructor(eoid, object, interface));
+ eo_add_ref(&child, ELDBUS_MODEL_PROXY_CLASS, NULL, eldbus_model_proxy_constructor(child, object, interface));
pd->children_list = eina_list_append(pd->children_list, child);
}
INF("(%p) Creating method child: bus = %s, path = %s, method = %s::%s", pd->obj, bus, path, interface_name, method_name);
- child = eo_add(ELDBUS_MODEL_METHOD_CLASS, NULL, eldbus_model_method_constructor(eoid, pd->proxy, method));
+ eo_add(&child, ELDBUS_MODEL_METHOD_CLASS, NULL, eldbus_model_method_constructor(child, pd->proxy, method));
pd->children_list = eina_list_append(pd->children_list, child);
}
DBG("(%p) Creating signal child: bus = %s, path = %s, signal = %s::%s", pd->obj, bus, path, interface_name, signal_name);
- child = eo_add(ELDBUS_MODEL_SIGNAL_CLASS, NULL, eldbus_model_signal_constructor(eoid, pd->proxy, signal));
+ eo_add(&child, ELDBUS_MODEL_SIGNAL_CLASS, NULL, eldbus_model_signal_constructor(child, pd->proxy, signal));
pd->children_list = eina_list_append(pd->children_list, child);
}
emotion_object_add(Evas *evas)
{
Evas_Object *e;
- e = eo_add(MY_CLASS, evas);
+ eo_add(&e, MY_CLASS, evas);
return e;
}
* @code
* vector = evas_object_vg_add(canvas);
* root = evas_obj_vg_root_node_get(vector);
- * shape = eo_add(EVAS_VG_SHAPE_CLASS, root);
+ * shape = NULL;
+ eo_add(&shape, EVAS_VG_SHAPE_CLASS, root);
* Efl_Gfx_Path_Command *path_cmd = NULL;
* double *points = NULL;
* efl_gfx_path_append_circle(&path_cmd, &points);
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(MY_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, MY_CLASS, e);
return eo_obj;
}
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(MY_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, MY_CLASS, e);
return eo_obj;
}
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(MY_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, MY_CLASS, e);
return eo_obj;
}
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(MY_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, MY_CLASS, e);
return eo_obj;
}
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(MY_CLASS, e, evas_canvas3d_node_constructor(eoid, type));
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, MY_CLASS, e, evas_canvas3d_node_constructor(eo_obj, type));
return eo_obj;
}
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(MY_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, MY_CLASS, e);
return eo_obj;
}
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(MY_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, MY_CLASS, e);
return eo_obj;
}
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(MY_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, MY_CLASS, e);
return eo_obj;
}
EAPI Evas *
evas_new(void)
{
- Evas_Object *eo_obj = eo_add(EVAS_CANVAS_CLASS, NULL);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, EVAS_CANVAS_CLASS, NULL);
return eo_obj;
}
MAGIC_CHECK(evas, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *obj = eo_add(MY_CLASS, evas);
+ Evas_Object *obj = NULL;
+ eo_add(&obj, MY_CLASS, evas);
return obj;
}
MAGIC_CHECK(evas, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *obj = eo_add(MY_CLASS, evas);
+ Evas_Object *obj = NULL;
+ eo_add(&obj, MY_CLASS, evas);
return obj;
}
Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
EINA_SAFETY_ON_NULL_RETURN_VAL(e, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(e->engine.func, NULL);
- Evas_Object *eo_obj = eo_add(EVAS_IMAGE_CLASS, eo_e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, EVAS_IMAGE_CLASS, eo_e);
return eo_obj;
}
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(EVAS_LINE_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, EVAS_LINE_CLASS, e);
return eo_obj;
}
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(EVAS_POLYGON_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, EVAS_POLYGON_CLASS, e);
return eo_obj;
}
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(EVAS_RECTANGLE_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, EVAS_RECTANGLE_CLASS, e);
return eo_obj;
}
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- eo_obj = eo_add(EVAS_OBJECT_SMART_CLASS, eo_e);
+ eo_add(&eo_obj, EVAS_OBJECT_SMART_CLASS, eo_e);
evas_obj_smart_attach(eo_obj, s);
return eo_obj;
}
MAGIC_CHECK(evas, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *obj = eo_add(MY_CLASS, evas);
+ Evas_Object *obj = NULL;
+ eo_add(&obj, MY_CLASS, evas);
return obj;
}
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(EVAS_TEXT_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, EVAS_TEXT_CLASS, e);
return eo_obj;
}
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(EVAS_TEXTBLOCK_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, EVAS_TEXTBLOCK_CLASS, e);
return eo_obj;
}
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(EVAS_TEXTGRID_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, EVAS_TEXTGRID_CLASS, e);
return eo_obj;
}
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(MY_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, MY_CLASS, e);
// Ask backend to return the main Ector_Surface
obj->type = o_type;
/* root node */
- pd->root = eo_add(EFL_VG_ROOT_NODE_CLASS, eo_obj);
+ eo_add(&pd->root, EFL_VG_ROOT_NODE_CLASS, eo_obj);
eo_ref(pd->root);
eina_array_step_set(&pd->cleanup, sizeof(pd->cleanup), 8);
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
- Evas_Object *eo_obj = eo_add(MY_CLASS, e);
+ Evas_Object *eo_obj = NULL;
+ eo_add(&eo_obj, MY_CLASS, e);
return eo_obj;
}
{
// By setting parent, we automatically reference
// this new object as a child of obj. Magic at work !
- (void) eo_add_ref(eo_class_get(child), obj, efl_vg_dup(eoid, child));
+ Eo *tmp = NULL;
+ eo_add_ref(&tmp, eo_class_get(child), obj, efl_vg_dup(tmp, child));
}
}
EAPI Efl_VG*
evas_vg_container_add(Efl_VG *parent)
{
- return eo_add(EFL_VG_CONTAINER_CLASS, parent);
+ Eo *ret = NULL;
+ return eo_add(&ret, EFL_VG_CONTAINER_CLASS, parent);
}
#include "efl_vg_container.eo.c"
if (fromd->mask)
{
Eo *tmp = pd->mask;
- pd->mask = eo_add(eo_class_get(fromd->mask), obj, efl_vg_dup(eoid, tmp));
+ eo_add(&pd->mask, eo_class_get(fromd->mask), obj, efl_vg_dup(pd->mask, tmp));
}
pd->x = fromd->x;
if (fromd->fill)
{
- fill = eo_add(eo_class_get(fromd->fill), parent, efl_vg_dup(eoid, fromd->fill));
+ eo_add(&fill, eo_class_get(fromd->fill), parent, efl_vg_dup(fill, fromd->fill));
}
if (fromd->stroke.fill)
{
- stroke_fill = eo_add(eo_class_get(fromd->stroke.fill), parent, efl_vg_dup(eoid, fromd->stroke.fill));
+ eo_add(&stroke_fill, eo_class_get(fromd->stroke.fill), parent, efl_vg_dup(stroke_fill, fromd->stroke.fill));
}
if (fromd->stroke.marker)
{
- stroke_marker = eo_add(eo_class_get(fromd->stroke.marker), parent, efl_vg_dup(eoid, fromd->stroke.marker));
+ eo_add(&stroke_marker, eo_class_get(fromd->stroke.marker), parent, efl_vg_dup(stroke_marker, fromd->stroke.marker));
}
efl_vg_shape_fill_set(obj, fill);
EAPI Efl_VG*
evas_vg_shape_add(Efl_VG *parent)
{
- return eo_add(EFL_VG_SHAPE_CLASS, parent);
+ Eo *ret = NULL;
+ return eo_add(&ret, EFL_VG_SHAPE_CLASS, parent);
}
#include "efl_vg_shape.eo.c"
ector_backend = getenv("ECTOR_BACKEND");
if (ector_backend && !strcasecmp(ector_backend, "default"))
{
- ector = eo_add(ECTOR_SOFTWARE_SURFACE_CLASS, NULL);
+ eo_add(&ector, ECTOR_SOFTWARE_SURFACE_CLASS, NULL);
}
else if (ector_backend && !strcasecmp(ector_backend, "experimental"))
{
- ector = eo_add(ECTOR_GL_SURFACE_CLASS, NULL);
+ eo_add(&ector, ECTOR_GL_SURFACE_CLASS, NULL);
use_gl = EINA_TRUE;
}
else
{
- ector = eo_add(ECTOR_CAIRO_SOFTWARE_SURFACE_CLASS, NULL);
+ eo_add(&ector, ECTOR_CAIRO_SOFTWARE_SURFACE_CLASS, NULL);
use_cairo = EINA_TRUE;
}
return ector;
{
RGBA_Image *im = engine_image;
- buf = eo_add(EVAS_ECTOR_GL_RGBAIMAGE_BUFFER_CLASS, evas, evas_ector_buffer_engine_image_set(eoid, evas, im));
+ eo_add(&buf, EVAS_ECTOR_GL_RGBAIMAGE_BUFFER_CLASS, evas, evas_ector_buffer_engine_image_set(buf, evas, im));
}
else
{
Evas_GL_Image *im = engine_image;
- buf = eo_add(EVAS_ECTOR_GL_IMAGE_BUFFER_CLASS, evas, evas_ector_buffer_engine_image_set(eoid, evas, im));
+ eo_add(&buf, EVAS_ECTOR_GL_IMAGE_BUFFER_CLASS, evas, evas_ector_buffer_engine_image_set(buf, evas, im));
}
return buf;
}
gc = re->window_gl_context_get(re->software.ob);
im = evas_gl_common_image_surface_new(gc, iw, ih, EINA_TRUE);
- buf = eo_add(EVAS_ECTOR_GL_IMAGE_BUFFER_CLASS, evas, evas_ector_buffer_engine_image_set(eoid, evas, im));
+ eo_add(&buf, EVAS_ECTOR_GL_IMAGE_BUFFER_CLASS, evas, evas_ector_buffer_engine_image_set(buf, evas, im));
im->references--;
}
return buf;
ector_backend = getenv("ECTOR_BACKEND");
if (ector_backend && !strcasecmp(ector_backend, "default"))
{
- ector = eo_add(ECTOR_SOFTWARE_SURFACE_CLASS, NULL);
+ eo_add(&ector, ECTOR_SOFTWARE_SURFACE_CLASS, NULL);
use_cairo = EINA_FALSE;
}
else
{
- ector = eo_add(ECTOR_CAIRO_SOFTWARE_SURFACE_CLASS, NULL);
+ eo_add(&ector, ECTOR_CAIRO_SOFTWARE_SURFACE_CLASS, NULL);
use_cairo = EINA_TRUE;
}
return ector;
if (!ie) return NULL;
- buf = eo_add(EVAS_ECTOR_SOFTWARE_BUFFER_CLASS, e, evas_ector_buffer_engine_image_set(eoid, e, ie));
+ eo_add(&buf, EVAS_ECTOR_SOFTWARE_BUFFER_CLASS, e, evas_ector_buffer_engine_image_set(buf, e, ie));
return buf;
}
if ((flags & (ECTOR_BUFFER_FLAG_RENDERABLE | ECTOR_BUFFER_FLAG_DRAWABLE)) == 0)
{
- buf = eo_add(ECTOR_SOFTWARE_BUFFER_CLASS, evas, ector_buffer_pixels_set(eoid, pixels, width, height, stride, cspace, writeable, l, r, t, b));
+ eo_add(&buf, ECTOR_SOFTWARE_BUFFER_CLASS, evas, ector_buffer_pixels_set(buf, pixels, width, height, stride, cspace, writeable, l, r, t, b));
}
else
{
{
Evas_Canvas3D_Object_Data *pd = eo_data_scope_get(mesh, EVAS_CANVAS3D_OBJECT_CLASS);
Eo *material = NULL;
- material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, pd->evas);
+ eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, pd->evas);
evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, !!(eet_mesh->materials->colors[0].a > 0));
evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, !!(eet_mesh->materials->colors[1].a > 0));
fail_if(!ecore_init(), "ERROR: Cannot init Ecore!\n");
ecore_animator_frametime_set(interval1);
- animator = eo_add(ECORE_ANIMATOR_CLASS, NULL, ecore_animator_timeline_constructor(eoid, 1, _anim_cb, &interval1));
+ eo_add(&animator, ECORE_ANIMATOR_CLASS, NULL, ecore_animator_timeline_constructor(animator, 1, _anim_cb, &interval1));
fail_if(!animator);
ecore_animator_frametime_set(interval2);
prev = 0;
- animator = eo_add(ECORE_ANIMATOR_CLASS, NULL, ecore_animator_timeline_constructor(eoid, 1, _anim_cb, &interval2));
+ eo_add(&animator, ECORE_ANIMATOR_CLASS, NULL, ecore_animator_timeline_constructor(animator, 1, _anim_cb, &interval2));
fail_if(!animator);
ecore_main_loop_begin();
Eina_Bool ret = EINA_FALSE;
Eina_Bool pulse_context_failed = EINA_FALSE;
- in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
+ eo_add(&in, ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
fail_if(!in);
ecore_audio_obj_name_set(in, "modem.wav");
ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/modem.wav");
fail_if(!ret);
- out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL);
+ eo_add(&out, ECORE_AUDIO_OUT_PULSE_CLASS, NULL);
fail_if(!out);
ecore_timer_add(0.3, _seek_vol, in);
int freq = 1000;
Eina_Bool ret = EINA_FALSE;
- in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
+ eo_add(&in, ECORE_AUDIO_IN_TONE_CLASS, NULL);
fail_if(!in);
eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &freq);
ecore_audio_obj_in_length_set(in, 2);
- out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
+ eo_add(&out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
fail_if(!out);
ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_OGG);
fail_if(!ret);
Eina_Bool ret;
char *tmp;
- in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
+ eo_add(&in, ECORE_AUDIO_IN_TONE_CLASS, NULL);
fail_if(!in);
ecore_audio_obj_name_set(in, "tone");
len = ecore_audio_obj_in_remaining_get(in);
fail_if(len != 1.0);
- out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
+ eo_add(&out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
fail_if(!out);
ecore_audio_obj_name_set(out, "tmp.wav");
Ecore_Audio_Format fmt;
const char *src;
- in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
+ eo_add(&in, ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
fail_if(!in);
fmt = ecore_audio_obj_format_get(in);
len = ecore_audio_obj_in_seek(in, -1.0, SEEK_END);
fail_if(fabs(rem - 1 - len) > 0.1);
- out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
+ eo_add(&out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
fail_if(!out);
ecore_audio_obj_name_set(out, "tmp.wav");
Eina_List *in3;
Eina_Bool attached;
- Eo *in = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
- Eo *in2 = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
- Eo *out = eo_add(ECORE_AUDIO_OUT_CLASS, NULL);
+ Eo *in = NULL;
+ eo_add(&in, ECORE_AUDIO_IN_CLASS, NULL);
+ Eo *in2 = NULL;
+ eo_add(&in2, ECORE_AUDIO_IN_CLASS, NULL);
+ Eo *out = NULL;
+ eo_add(&out, ECORE_AUDIO_OUT_CLASS, NULL);
fail_if(!in);
fail_if(!in2);
{
Eo *in, *out;
- in = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
+ eo_add(&in, ECORE_AUDIO_IN_CLASS, NULL);
fail_if(!in);
- out = eo_add(ECORE_AUDIO_OUT_CLASS, NULL);
+ eo_add(&out, ECORE_AUDIO_OUT_CLASS, NULL);
fail_if(!out);
ecore_audio_obj_vio_set(in, &in_vio, NULL, NULL);
Ecore_Audio_Vio vio;
Eina_Bool freed = EINA_FALSE;
- Eo *in = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
+ Eo *in = NULL;
+ eo_add(&in, ECORE_AUDIO_IN_CLASS, NULL);
fail_if(!in);
double volume;
Eo *objs[2], *obj;
- objs[0] = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
+ eo_add(&objs[0], ECORE_AUDIO_IN_CLASS, NULL);
fail_if(!objs[0]);
- objs[1] = eo_add(ECORE_AUDIO_OUT_CLASS, NULL);
+ eo_add(&objs[1], ECORE_AUDIO_OUT_CLASS, NULL);
fail_if(!objs[1]);
for (i=0; i<2; i++) {
fail_if(!ecore_init(), "ERROR: Cannot init Ecore!\n");
fail_if(!eio_init(), "ERROR: Cannot init EIO!\n");
- filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(eoid, EFL_MODEL_TEST_FILENAME_PATH));
+ eo_add(&filemodel, EIO_MODEL_CLASS, NULL, eio_model_path_set(filemodel, EFL_MODEL_TEST_FILENAME_PATH));
fail_if(!filemodel, "ERROR: Cannot init model!\n");
eo_event_callback_add(filemodel, EFL_MODEL_BASE_EVENT_LOAD_STATUS, _load_status_cb, NULL);
tmpdir = eina_environment_tmp_get();
- filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(eoid, tmpdir));
+ eo_add(&filemodel, EIO_MODEL_CLASS, NULL, eio_model_path_set(filemodel, tmpdir));
fail_if(!filemodel, "ERROR: Cannot init model!\n");
eo_event_callback_add(filemodel, EFL_MODEL_BASE_EVENT_CHILD_ADDED, _children_added_cb, NULL);
Eo *
create_connection(void)
{
- Eo *connection = eo_add_ref(ELDBUS_MODEL_CONNECTION_CLASS, NULL, eldbus_model_connection_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE));
+ Eo *connection = NULL;
+ eo_add_ref(&connection, ELDBUS_MODEL_CONNECTION_CLASS, NULL, eldbus_model_connection_constructor(connection, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE));
ck_assert_ptr_ne(NULL, connection);
return connection;
}
Eo *
create_object(void)
{
- Eo *object = eo_add_ref(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, ELDBUS_FDO_BUS, ELDBUS_FDO_PATH));
+ Eo *object = NULL;
+ eo_add_ref(&object, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(object, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, ELDBUS_FDO_BUS, ELDBUS_FDO_PATH));
ck_assert_ptr_ne(NULL, object);
return object;
}
fake_server = fake_server_start(&fake_server_data);
- fake_server_object = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
+ eo_add(&fake_server_object, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(fake_server_object, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
ck_assert_ptr_ne(NULL, fake_server_object);
efl_model_load_and_wait_for_load_status(fake_server_object, EFL_MODEL_LOAD_STATUS_LOADED);
fake_server = fake_server_start(&fake_server_data);
- fake_server_object = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
+ eo_add(&fake_server_object, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(fake_server_object, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
ck_assert_ptr_ne(NULL, fake_server_object);
efl_model_load_and_wait_for_load_status(fake_server_object, EFL_MODEL_LOAD_STATUS_LOADED);
};
fake_server = fake_server_start(&fake_server_data);
- fake_server_object = eo_add(ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(eoid, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
+ eo_add(&fake_server_object, ELDBUS_MODEL_OBJECT_CLASS, NULL, eldbus_model_object_constructor(fake_server_object, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE, FAKE_SERVER_BUS, FAKE_SERVER_PATH));
ck_assert_ptr_ne(NULL, fake_server_object);
efl_model_load_and_wait_for_load_status(fake_server_object, EFL_MODEL_LOAD_STATUS_LOADED);
static void
bg_setup(void)
{
- o_bg = eo_add(EDJE_OBJECT_CLASS, evas);
+ eo_add(&o_bg, EDJE_OBJECT_CLASS, evas);
efl_file_set(o_bg, theme_file, "background");
efl_gfx_position_set(o_bg, 0, 0);
efl_gfx_size_set(o_bg, startw, starth);
fd = calloc(1, sizeof(Frame_Data));
if (!fd) exit(1);
- oe = eo_add(EDJE_OBJECT_CLASS, evas);
+ eo_add(&oe, EDJE_OBJECT_CLASS, evas);
eo_event_callback_add(oe, EVAS_OBJECT_EVENT_FREE, _oe_free_cb, fd);
eo_key_data_set(oe, "frame_data", fd);
efl_file_set(oe, theme_file, reflex ? "video_controller/reflex" : "video_controller");
(void) argv;
eo_init();
- Eo *obj = eo_add(INHERIT_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, INHERIT_CLASS, NULL);
simple_a_set(obj, 1);
inherit_prot_print(obj);
eo_init();
- Eo *parent = eo_add(SIMPLE_CLASS, NULL);
-
- Eo *child1 = eo_add(SIMPLE_CLASS, parent);
- Eo *child2 = eo_add(SIMPLE_CLASS, parent);
- Eo *child3 = eo_add(SIMPLE_CLASS, parent);
+ Eo *parent = NULL;
+ eo_add(&parent, SIMPLE_CLASS, NULL);
+
+ Eo *child1 = NULL;
+ eo_add(&child1, SIMPLE_CLASS, parent);
+ Eo *child2 = NULL;
+ eo_add(&child2, SIMPLE_CLASS, parent);
+ Eo *child3 = NULL;
+ eo_add(&child3, SIMPLE_CLASS, parent);
iter = eo_children_iterator_new(parent);
fail_if(!iter);
{
obj = eo_constructor(eo_super(obj, MY_CLASS));
- Eo *simple = eo_add(SIMPLE_CLASS, obj);
+ Eo *simple = NULL;
+ eo_add(&simple, SIMPLE_CLASS, obj);
eo_composite_attach(obj, simple);
eo_event_callback_forwarder_add(simple, EV_A_CHANGED, obj);
(void) argv;
eo_init();
- Eo *obj = eo_add(COMP_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, COMP_CLASS, NULL);
eo_event_callback_add(obj, EV_A_CHANGED, _a_changed_cb, NULL);
fail_if(!eo_isa(obj, COMP_CLASS));
(void) argv;
eo_init();
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
fail_if(my_init_count != 2);
fail_if(my_init_count != 0);
- obj = eo_add(SIMPLE2_CLASS, NULL);
+ eo_add(&obj, SIMPLE2_CLASS, NULL);
fail_if(obj);
- obj = eo_add(SIMPLE3_CLASS, NULL);
+ eo_add(&obj, SIMPLE3_CLASS, NULL);
fail_if(obj);
my_init_count = 0;
- obj = eo_add(SIMPLE4_CLASS, NULL);
+ eo_add(&obj, SIMPLE4_CLASS, NULL);
fail_if(my_init_count != 2);
fail_if(my_init_count != 0);
- obj = eo_add(SIMPLE5_CLASS, NULL);
+ eo_add(&obj, SIMPLE5_CLASS, NULL);
fail_if(!obj);
eo_unref(obj);
- obj = eo_add(SIMPLE6_CLASS, NULL);
+ eo_add(&obj, SIMPLE6_CLASS, NULL);
fail_if(!obj);
eo_unref(obj);
- obj = eo_add(SIMPLE7_CLASS, NULL);
+ eo_add(&obj, SIMPLE7_CLASS, NULL);
fail_if(obj);
my_init_count = 0;
- obj = eo_add(SIMPLE_CLASS, NULL);
+ eo_add(&obj, SIMPLE_CLASS, NULL);
fail_if(!obj);
fail_if(my_init_count != 2);
a = simple_a_get(obj);
fail_if(a != 0);
my_init_count = 0;
- obj = eo_add(SIMPLE_CLASS, NULL, simple_a_set(eoid, 7));
+ eo_add(&obj, SIMPLE_CLASS, NULL, simple_a_set(obj, 7));
fail_if(!obj);
fail_if(my_init_count != 2);
a = simple_a_get(obj);
fail_if(a != 7);
my_init_count = 0;
- obj = eo_add(SIMPLE_CLASS, NULL, simple_b_set(eoid, 6), simple_a_set(eoid, -1), b = simple_b_get(eoid));
+ eo_add(&obj, SIMPLE_CLASS, NULL, simple_b_set(obj, 6), simple_a_set(obj, -1), b = simple_b_get(obj));
fail_if(obj);
fail_if(b != 6);
fail_if(my_init_count != 0);
eo_init();
Eina_Bool called = EINA_FALSE;
- Eo *obj = eo_add(INHERIT2_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, INHERIT2_CLASS, NULL);
simple_a_set(obj, 1);
Simple_Public_Data *pd = eo_data_scope_get(obj, SIMPLE_CLASS);
eo_unref(obj);
- obj = eo_add(INHERIT3_CLASS, NULL);
+ eo_add(&obj, INHERIT3_CLASS, NULL);
simple_a_set(obj, 1);
pd = eo_data_scope_get(obj, SIMPLE_CLASS);
eo_unref(obj);
- obj = eo_add(INHERIT2_CLASS, NULL);
+ eo_add(&obj, INHERIT2_CLASS, NULL);
called = inherit2_print(obj);
fail_if(!called);
called = inherit2_print(obj);
fail_if(!called);
eo_unref(obj);
- obj = eo_add(SIMPLE_CLASS, NULL);
+ eo_add(&obj, SIMPLE_CLASS, NULL);
called = inherit2_print(obj);
fail_if(called);
(void) argv;
eo_init();
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
simple_a_set(obj, 1);
simple_b_set(obj, 2);
(void) argv;
eo_init();
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
simple_a_set(obj, 1);
simple_b_set(obj, 2);
eo_unref(obj);
- obj = eo_add(INHERIT_CLASS, NULL);
+ eo_add(&obj, INHERIT_CLASS, NULL);
simple_a_set(obj, 5);
a = simple_a_get(obj);
printf("%d\n", a);
(void) argv;
eo_init();
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
Simple_Public_Data *pd = eo_data_scope_get(obj, SIMPLE_CLASS);
/* The order of these two is undetermined. */
eo_init();
eina_log_print_cb_set(eo_test_print_cb, &ctx);
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
fail_if(!obj);
TEST_EO_ERROR("_eo_call_resolve", "in %s:%d: you called a pure virtual func '%s' (%d) of class '%s'.");
eo_init();
eina_log_print_cb_set(eo_test_print_cb, &ctx);
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
fail_if(!obj);
TEST_EO_ERROR("_eo_api_op_id_get", "Unable to resolve op for api func %p");
eo_init();
eina_log_print_cb_set(eo_test_print_cb, &ctx);
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
fail_if(!obj);
TEST_EO_ERROR("_eo_call_resolve", "in %s:%d: func '%s' (%d) could not be resolved for class '%s' for super of '%s'.");
klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL);
fail_if(!klass);
- Eo *obj = eo_add(klass, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, klass, NULL);
fail_if(!obj);
TEST_EO_ERROR("_eo_unref", "Object %p deletion already triggered. You wrongly call eo_unref() within a destructor.");
klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL);
fail_if(!klass);
- Eo *obj = eo_add(klass, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, klass, NULL);
eo_manual_free_set(obj, EINA_TRUE);
fail_if(!obj);
_part_get(Eo *obj, void *class_data EINA_UNUSED, const char *name EINA_UNUSED)
{
/* A normal part get will do something saner, we just create objects. */
- return eo_add(SIMPLE_CLASS, obj);
+ Eo *ret = NULL;
+ return eo_add(&ret, SIMPLE_CLASS, obj);
}
EO_VOID_FUNC_BODYV(simple_recursive, EO_FUNC_CALL(n), int n);
fail_if(EINA_LOCK_SUCCEED != eina_spinlock_take(&locks[0]));
}
- obj = eo_add(THREAD_TEST_CLASS, NULL, thread_test_constructor(eoid, v));
+ eo_add(&obj, THREAD_TEST_CLASS, NULL, thread_test_constructor(obj, v));
thread_test_try_swap_stack(obj);
v = thread_test_v_get(obj);
Eina_Value val2, eo_val;
void *tmpp = NULL;
Eo_Dbg_Info *eo_dbg_info;
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj = NULL;
+ eo_add(&obj, SIMPLE_CLASS, NULL);
eo_dbg_info = EO_DBG_INFO_LIST_APPEND(NULL, "Root");
eo_dbg_info_get(obj, eo_dbg_info);
{
fprintf(stderr, "classoutmethod1\n");
fflush(stderr);
- return eo_add(MY_CLASS, NULL, constructor_method_class_constructor1(eoid, one), constructor_method_class_constructor2(eoid, two));
+ Eo *ret = NULL;
+ return eo_add(&ret, MY_CLASS, NULL, constructor_method_class_constructor1(ret, one), constructor_method_class_constructor2(ret, two));
}
EOLIAN static void
{
fprintf(stderr, "classoutmethod2\n");
fflush(stderr);
- *out_class = eo_add(MY_CLASS, NULL, constructor_method_class_constructor1(eoid, one), constructor_method_class_constructor2(eoid, two));
+ *out_class = NULL;
+ eo_add(&out_class, MY_CLASS, NULL, constructor_method_class_constructor1(out_class, one), constructor_method_class_constructor2(out_class, two));
}
EINA_ITERATOR_FOREACH(it, file) \
{ \
int set_ok, save_ok; \
- mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, e); \
- mesh2 = eo_add(EVAS_CANVAS3D_MESH_CLASS, e); \
+ eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, e); \
+ eo_add(&mesh2, EVAS_CANVAS3D_MESH_CLASS, e); \
fail_if(mesh == NULL); \
fail_if(mesh2 == NULL); \
snprintf(buffer, PATH_MAX, "%s%s", tmp, ext); \