summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-09 16:08:12 +0000
committerTom Hacohen <tom@stosb.com>2016-03-09 16:09:17 +0000
commitd1a1819813d74361b25fd5c1123f7ac76be9b84f (patch)
tree804096836acee67ac1487ecdcafe51e81505bf54
parent90e465317d10ca01ff39824e56828ee983f7ae41 (diff)
Automatic migration to the new eo_add syntax.
-rw-r--r--src/bin/test_application_server.c4
-rw-r--r--src/bin/test_systray.c2
-rw-r--r--src/bin/test_task_switcher.c2
-rw-r--r--src/examples/evas3d_map_example.c32
-rw-r--r--src/examples/evas3d_object_on_button_example.c24
-rw-r--r--src/examples/evas3d_scene_on_button_example.c22
-rw-r--r--src/examples/filemvc.c10
-rw-r--r--src/examples/fileviewlist.c4
-rw-r--r--src/examples/performance/graphical.c35
-rw-r--r--src/examples/sphere_hunter/evas_3d_sphere_hunter.c30
-rw-r--r--src/lib/elc_ctxpopup.c7
-rw-r--r--src/lib/elc_fileselector.c3
-rw-r--r--src/lib/elc_fileselector_button.c3
-rw-r--r--src/lib/elc_fileselector_entry.c3
-rw-r--r--src/lib/elc_hoversel.c6
-rw-r--r--src/lib/elc_multibuttonentry.c5
-rw-r--r--src/lib/elc_naviframe.c5
-rw-r--r--src/lib/elc_player.c3
-rw-r--r--src/lib/elc_popup.c5
-rw-r--r--src/lib/elm_access.c3
-rw-r--r--src/lib/elm_actionslider.c3
-rw-r--r--src/lib/elm_app_client.c4
-rw-r--r--src/lib/elm_app_server.c2
-rw-r--r--src/lib/elm_atspi_bridge.c2
-rw-r--r--src/lib/elm_bg.c3
-rw-r--r--src/lib/elm_box.c3
-rw-r--r--src/lib/elm_bubble.c3
-rw-r--r--src/lib/elm_button.c3
-rw-r--r--src/lib/elm_calendar.c3
-rw-r--r--src/lib/elm_check.c3
-rw-r--r--src/lib/elm_clock.c3
-rw-r--r--src/lib/elm_colorselector.c7
-rw-r--r--src/lib/elm_conform.c3
-rw-r--r--src/lib/elm_datetime.c3
-rw-r--r--src/lib/elm_dayselector.c6
-rw-r--r--src/lib/elm_diskselector.c6
-rw-r--r--src/lib/elm_entry.c3
-rw-r--r--src/lib/elm_flip.c3
-rw-r--r--src/lib/elm_flipselector.c5
-rw-r--r--src/lib/elm_frame.c3
-rw-r--r--src/lib/elm_gengrid.c8
-rw-r--r--src/lib/elm_genlist.c8
-rw-r--r--src/lib/elm_gesture_layer.c3
-rw-r--r--src/lib/elm_glview.c6
-rw-r--r--src/lib/elm_grid.c3
-rw-r--r--src/lib/elm_hover.c3
-rw-r--r--src/lib/elm_icon.c3
-rw-r--r--src/lib/elm_image.c3
-rw-r--r--src/lib/elm_index.c5
-rw-r--r--src/lib/elm_interface_atspi_accessible.c2
-rw-r--r--src/lib/elm_interface_scrollable.c3
-rw-r--r--src/lib/elm_inwin.c3
-rw-r--r--src/lib/elm_label.c3
-rw-r--r--src/lib/elm_layout.c3
-rw-r--r--src/lib/elm_list.c6
-rw-r--r--src/lib/elm_map.c5
-rw-r--r--src/lib/elm_mapbuf.c3
-rw-r--r--src/lib/elm_menu.c7
-rw-r--r--src/lib/elm_notify.c3
-rw-r--r--src/lib/elm_panel.c3
-rw-r--r--src/lib/elm_panes.c3
-rw-r--r--src/lib/elm_photo.c3
-rw-r--r--src/lib/elm_photocam.c5
-rw-r--r--src/lib/elm_plug.c3
-rw-r--r--src/lib/elm_prefs.c3
-rw-r--r--src/lib/elm_progressbar.c3
-rw-r--r--src/lib/elm_radio.c3
-rw-r--r--src/lib/elm_route.c3
-rw-r--r--src/lib/elm_scroller.c3
-rw-r--r--src/lib/elm_segment_control.c5
-rw-r--r--src/lib/elm_separator.c3
-rw-r--r--src/lib/elm_slider.c3
-rw-r--r--src/lib/elm_slideshow.c7
-rw-r--r--src/lib/elm_spinner.c3
-rw-r--r--src/lib/elm_sys_notify.c4
-rw-r--r--src/lib/elm_table.c3
-rw-r--r--src/lib/elm_thumb.c3
-rw-r--r--src/lib/elm_toolbar.c6
-rw-r--r--src/lib/elm_video.c3
-rw-r--r--src/lib/elm_web2.c3
-rw-r--r--src/lib/elm_win.c6
-rw-r--r--src/lib/elm_win_standard.c3
-rw-r--r--src/tests/elm_test_atspi.c21
83 files changed, 267 insertions, 197 deletions
diff --git a/src/bin/test_application_server.c b/src/bin/test_application_server.c
index 1272ff619..13a903951 100644
--- a/src/bin/test_application_server.c
+++ b/src/bin/test_application_server.c
@@ -100,7 +100,7 @@ _create_view_cb(Elm_App_Server *app_server, const Eina_Value *args EINA_UNUSED,
100 return NULL; 100 return NULL;
101 } 101 }
102 102
103 view = eo_add(ELM_APP_SERVER_VIEW_CLASS, app_server, elm_app_server_view_id_set(eoid, NULL)); 103 eo_add(&view, ELM_APP_SERVER_VIEW_CLASS, app_server, elm_app_server_view_id_set(view, NULL));
104 104
105 id = elm_app_server_view_id_get(view); 105 id = elm_app_server_view_id_get(view);
106 pkg = elm_app_server_package_get(app_server); 106 pkg = elm_app_server_package_get(app_server);
@@ -141,7 +141,7 @@ test_application_server_common(const char *pkg)
141 Elm_App_Server_View *view; 141 Elm_App_Server_View *view;
142 Elm_App_Server *server; 142 Elm_App_Server *server;
143 143
144 server = eo_add(ELM_APP_SERVER_CLASS, NULL, elm_app_server_constructor(eoid, pkg, _create_view_cb)); 144 eo_add(&server, ELM_APP_SERVER_CLASS, NULL, elm_app_server_constructor(server, pkg, _create_view_cb));
145 elm_app_server_title_set(server, pkg); 145 elm_app_server_title_set(server, pkg);
146 views_iter = elm_app_server_views_get(server); 146 views_iter = elm_app_server_views_get(server);
147 eo_event_callback_add(server, ELM_APP_SERVER_EVENT_TERMINATE, _terminate_cb, NULL); 147 eo_event_callback_add(server, ELM_APP_SERVER_EVENT_TERMINATE, _terminate_cb, NULL);
diff --git a/src/bin/test_systray.c b/src/bin/test_systray.c
index 1271242d5..23fc8af4e 100644
--- a/src/bin/test_systray.c
+++ b/src/bin/test_systray.c
@@ -82,7 +82,7 @@ test_systray(void *data EINA_UNUSED,
82 elm_menu_item_add(it, it2, NULL, "item 2", _menu_clicked, "item 2"); 82 elm_menu_item_add(it, it2, NULL, "item 2", _menu_clicked, "item 2");
83 83
84 // Status Notifier Item Handler 84 // Status Notifier Item Handler
85 item = eo_add(ELM_SYSTRAY_CLASS, win); 85 eo_add(&item, ELM_SYSTRAY_CLASS, win);
86 elm_obj_systray_icon_name_set(item, "elementary"); 86 elm_obj_systray_icon_name_set(item, "elementary");
87 elm_obj_systray_att_icon_name_set(item, "elementary"); 87 elm_obj_systray_att_icon_name_set(item, "elementary");
88 elm_obj_systray_menu_set(item, it); 88 elm_obj_systray_menu_set(item, it);
diff --git a/src/bin/test_task_switcher.c b/src/bin/test_task_switcher.c
index 1c2b441dd..ec4283776 100644
--- a/src/bin/test_task_switcher.c
+++ b/src/bin/test_task_switcher.c
@@ -303,7 +303,7 @@ _app_open(const char *package)
303 return; 303 return;
304 } 304 }
305 305
306 app = eo_add(ELM_APP_CLIENT_CLASS, NULL, elm_app_client_constructor(eoid, package)); 306 eo_add(&app, ELM_APP_CLIENT_CLASS, NULL, elm_app_client_constructor(app, package));
307 eo_event_callback_add(app, ELM_APP_CLIENT_EVENT_VIEW_LIST_LOADED, _view_list_update_cb, table); 307 eo_event_callback_add(app, ELM_APP_CLIENT_EVENT_VIEW_LIST_LOADED, _view_list_update_cb, table);
308 eo_event_callback_add(app, ELM_APP_CLIENT_EVENT_VIEW_CREATED, _view_list_update_cb, table); 308 eo_event_callback_add(app, ELM_APP_CLIENT_EVENT_VIEW_CREATED, _view_list_update_cb, table);
309 eo_event_callback_add(app, ELM_APP_CLIENT_EVENT_VIEW_DELETED, _view_list_update_cb, table); 309 eo_event_callback_add(app, ELM_APP_CLIENT_EVENT_VIEW_DELETED, _view_list_update_cb, table);
diff --git a/src/examples/evas3d_map_example.c b/src/examples/evas3d_map_example.c
index ca584527a..3599826a6 100644
--- a/src/examples/evas3d_map_example.c
+++ b/src/examples/evas3d_map_example.c
@@ -463,7 +463,7 @@ zoom_factor_set(double new_zoom_factor)
463 evas_object_resize(map, src_size, src_size); 463 evas_object_resize(map, src_size, src_size);
464 464
465 /* Apply updated texture source. */ 465 /* Apply updated texture source. */
466 texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 466 eo_add(&texture_diffuse, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
467 evas_canvas3d_texture_source_set(texture_diffuse, map); 467 evas_canvas3d_texture_source_set(texture_diffuse, map);
468 evas_canvas3d_texture_source_visible_set(texture_diffuse, EINA_FALSE); 468 evas_canvas3d_texture_source_visible_set(texture_diffuse, EINA_FALSE);
469 469
@@ -846,7 +846,7 @@ skybox_setup(void)
846 Evas_Object *skybox_image; 846 Evas_Object *skybox_image;
847 char buf[PATH_MAX]; 847 char buf[PATH_MAX];
848 848
849 skybox_mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 849 eo_add(&skybox_mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
850 evas_canvas3d_mesh_vertex_count_set(skybox_mesh, 24); 850 evas_canvas3d_mesh_vertex_count_set(skybox_mesh, 24);
851 evas_canvas3d_mesh_frame_add(skybox_mesh, 0); 851 evas_canvas3d_mesh_frame_add(skybox_mesh, 0);
852 evas_canvas3d_mesh_frame_vertex_data_set(skybox_mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &skybox_vertices[0]); 852 evas_canvas3d_mesh_frame_vertex_data_set(skybox_mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &skybox_vertices[0]);
@@ -864,10 +864,10 @@ skybox_setup(void)
864 evas_object_show(skybox_image); 864 evas_object_show(skybox_image);
865 865
866 /* Set skybox texture material. */ 866 /* Set skybox texture material. */
867 skybox_material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 867 eo_add(&skybox_material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
868 evas_canvas3d_mesh_frame_material_set(skybox_mesh, 0, skybox_material); 868 evas_canvas3d_mesh_frame_material_set(skybox_mesh, 0, skybox_material);
869 869
870 skybox_texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 870 eo_add(&skybox_texture_diffuse, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
871 871
872 evas_canvas3d_texture_source_set(skybox_texture_diffuse, skybox_image); 872 evas_canvas3d_texture_source_set(skybox_texture_diffuse, skybox_image);
873 evas_canvas3d_texture_source_visible_set(skybox_texture_diffuse, EINA_FALSE); 873 evas_canvas3d_texture_source_visible_set(skybox_texture_diffuse, EINA_FALSE);
@@ -881,7 +881,7 @@ skybox_setup(void)
881 evas_canvas3d_material_color_set(skybox_material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.1, 0.1, 0.1, 1.0); 881 evas_canvas3d_material_color_set(skybox_material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.1, 0.1, 0.1, 1.0);
882 evas_canvas3d_material_shininess_set(skybox_material, 50.0); 882 evas_canvas3d_material_shininess_set(skybox_material, 50.0);
883 883
884 skybox_mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 884 eo_add(&skybox_mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(skybox_mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
885 evas_canvas3d_node_member_add(root_node, skybox_mesh_node); 885 evas_canvas3d_node_member_add(root_node, skybox_mesh_node);
886 evas_canvas3d_node_mesh_add(skybox_mesh_node, skybox_mesh); 886 evas_canvas3d_node_mesh_add(skybox_mesh_node, skybox_mesh);
887 evas_canvas3d_mesh_shade_mode_set(skybox_mesh, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE); 887 evas_canvas3d_mesh_shade_mode_set(skybox_mesh, EVAS_CANVAS3D_SHADE_MODE_DIFFUSE);
@@ -922,7 +922,7 @@ static void
922camera_setup(void) 922camera_setup(void)
923{ 923{
924 /* Add the camera. */ 924 /* Add the camera. */
925 camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 925 eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
926 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 100.0); 926 evas_canvas3d_camera_projection_perspective_set(camera, 60.0, 1.0, 1.0, 100.0);
927 927
928 /* Set camera position. */ 928 /* Set camera position. */
@@ -940,7 +940,7 @@ camera_setup(void)
940 camera_right_vec.y = 0.0; 940 camera_right_vec.y = 0.0;
941 camera_right_vec.z = 0.0; 941 camera_right_vec.z = 0.0;
942 942
943 camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 943 eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
944 evas_canvas3d_node_camera_set(camera_node, camera); 944 evas_canvas3d_node_camera_set(camera_node, camera);
945 evas_canvas3d_node_position_set(camera_node, camera_pos.x, camera_pos.y, camera_pos.z); 945 evas_canvas3d_node_position_set(camera_node, camera_pos.x, camera_pos.y, camera_pos.z);
946 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, camera_up_vec.x, camera_up_vec.y, camera_up_vec.z); 946 evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, camera_up_vec.x, camera_up_vec.y, camera_up_vec.z);
@@ -950,12 +950,12 @@ camera_setup(void)
950static void 950static void
951light_setup(void) 951light_setup(void)
952{ 952{
953 light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 953 eo_add(&light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
954 evas_canvas3d_light_ambient_set(light, 0.2, 0.2, 0.2, 1.0); 954 evas_canvas3d_light_ambient_set(light, 0.2, 0.2, 0.2, 1.0);
955 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0); 955 evas_canvas3d_light_diffuse_set(light, 1.0, 1.0, 1.0, 1.0);
956 evas_canvas3d_light_specular_set(light, 0.2, 0.2, 0.2, 1.0); 956 evas_canvas3d_light_specular_set(light, 0.2, 0.2, 0.2, 1.0);
957 957
958 light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 958 eo_add(&light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
959 evas_canvas3d_node_light_set(light_node, light); 959 evas_canvas3d_node_light_set(light_node, light);
960 evas_canvas3d_node_position_set(light_node, 0.0, 0.0, MAX_CAMERA_DISTANCE); 960 evas_canvas3d_node_position_set(light_node, 0.0, 0.0, MAX_CAMERA_DISTANCE);
961 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); 961 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);
@@ -968,7 +968,7 @@ mesh_setup(void)
968 /* Create a sphere mesh. */ 968 /* Create a sphere mesh. */
969 sphere_init(50); 969 sphere_init(50);
970 970
971 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 971 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
972 evas_canvas3d_mesh_vertex_count_set(mesh, vertex_count); 972 evas_canvas3d_mesh_vertex_count_set(mesh, vertex_count);
973 evas_canvas3d_mesh_frame_add(mesh, 0); 973 evas_canvas3d_mesh_frame_add(mesh, 0);
974 evas_canvas3d_mesh_frame_vertex_data_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, sizeof(vertex), &vertices[0].position); 974 evas_canvas3d_mesh_frame_vertex_data_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, sizeof(vertex), &vertices[0].position);
@@ -979,14 +979,14 @@ mesh_setup(void)
979 evas_canvas3d_mesh_index_data_set(mesh, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, index_count, &indices[0]); 979 evas_canvas3d_mesh_index_data_set(mesh, EVAS_CANVAS3D_INDEX_FORMAT_UNSIGNED_SHORT, index_count, &indices[0]);
980 evas_canvas3d_mesh_vertex_assembly_set(mesh, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES); 980 evas_canvas3d_mesh_vertex_assembly_set(mesh, EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES);
981 981
982 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 982 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
983 evas_canvas3d_mesh_frame_material_set(mesh, 0, material); 983 evas_canvas3d_mesh_frame_material_set(mesh, 0, material);
984 984
985 texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 985 eo_add(&texture_diffuse, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
986 evas_canvas3d_texture_source_set(texture_diffuse, map); 986 evas_canvas3d_texture_source_set(texture_diffuse, map);
987 evas_canvas3d_texture_source_visible_set(texture_diffuse, EINA_FALSE); 987 evas_canvas3d_texture_source_visible_set(texture_diffuse, EINA_FALSE);
988 988
989 texture_normal = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 989 eo_add(&texture_normal, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
990 evas_canvas3d_texture_source_set(texture_normal, normal_map); 990 evas_canvas3d_texture_source_set(texture_normal, normal_map);
991 evas_canvas3d_texture_source_visible_set(texture_normal, EINA_FALSE); 991 evas_canvas3d_texture_source_visible_set(texture_normal, EINA_FALSE);
992 992
@@ -1001,7 +1001,7 @@ mesh_setup(void)
1001 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.1, 0.1, 0.1, 1.0); 1001 evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 0.1, 0.1, 0.1, 1.0);
1002 evas_canvas3d_material_shininess_set(material, 50.0); 1002 evas_canvas3d_material_shininess_set(material, 50.0);
1003 1003
1004 mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 1004 eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
1005 evas_canvas3d_node_member_add(root_node, mesh_node); 1005 evas_canvas3d_node_member_add(root_node, mesh_node);
1006 evas_canvas3d_node_mesh_add(mesh_node, mesh); 1006 evas_canvas3d_node_mesh_add(mesh_node, mesh);
1007 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP); 1007 evas_canvas3d_mesh_shade_mode_set(mesh, EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP);
@@ -1166,10 +1166,10 @@ elm_main(int argc, char **argv)
1166 evas_object_event_callback_add(image, EVAS_CALLBACK_MOUSE_WHEEL, mouse_wheel_cb, NULL); 1166 evas_object_event_callback_add(image, EVAS_CALLBACK_MOUSE_WHEEL, mouse_wheel_cb, NULL);
1167 1167
1168 /* Add a scene object. */ 1168 /* Add a scene object. */
1169 scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 1169 eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
1170 1170
1171 /* Add a root node for the scene. */ 1171 /* Add a root node for the scene. */
1172 root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 1172 eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
1173 1173
1174 skybox_setup(); 1174 skybox_setup();
1175 texture_source_setup(); 1175 texture_source_setup();
diff --git a/src/examples/evas3d_object_on_button_example.c b/src/examples/evas3d_object_on_button_example.c
index eb06dc01a..3a5f1b4d7 100644
--- a/src/examples/evas3d_object_on_button_example.c
+++ b/src/examples/evas3d_object_on_button_example.c
@@ -159,12 +159,11 @@ _animate_scene(void *data)
159static void 159static void
160_camera_setup(Scene_Data *data) 160_camera_setup(Scene_Data *data)
161{ 161{
162 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 162 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
163 163
164 evas_canvas3d_camera_projection_perspective_set(data->camera, 20.0, 1.0, 2.0, 50.0); 164 evas_canvas3d_camera_projection_perspective_set(data->camera, 20.0, 1.0, 2.0, 50.0);
165 165
166 data->camera_node = 166 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
167 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
168 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 167 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
169 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 15.0); 168 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 15.0);
170 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); 169 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);
@@ -174,13 +173,12 @@ _camera_setup(Scene_Data *data)
174static void 173static void
175_light_setup(Scene_Data *data) 174_light_setup(Scene_Data *data)
176{ 175{
177 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 176 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
178 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 177 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
179 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 178 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
180 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 179 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
181 180
182 data->light_node = 181 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
183 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
184 evas_canvas3d_node_light_set(data->light_node, data->light); 182 evas_canvas3d_node_light_set(data->light_node, data->light);
185 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 183 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
186 evas_canvas3d_node_look_at_set(data->light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 184 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);
@@ -190,8 +188,8 @@ static void
190_mesh_setup(Scene_Data *data) 188_mesh_setup(Scene_Data *data)
191{ 189{
192 /* Setup material and texture as widget button. */ 190 /* Setup material and texture as widget button. */
193 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 191 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
194 data->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); 192 eo_add(&data->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
195 193
196 evas_canvas3d_texture_source_set(data->texture, btn); 194 evas_canvas3d_texture_source_set(data->texture, btn);
197 evas_canvas3d_texture_source_visible_set(data->texture, EINA_FALSE); 195 evas_canvas3d_texture_source_visible_set(data->texture, EINA_FALSE);
@@ -206,7 +204,7 @@ _mesh_setup(Scene_Data *data)
206 evas_canvas3d_material_shininess_set(data->material, 100.0); 204 evas_canvas3d_material_shininess_set(data->material, 100.0);
207 205
208 /* Setup mesh. */ 206 /* Setup mesh. */
209 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 207 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
210 evas_canvas3d_mesh_vertex_count_set(data->mesh, 24); 208 evas_canvas3d_mesh_vertex_count_set(data->mesh, 24);
211 evas_canvas3d_mesh_frame_add(data->mesh, 0); 209 evas_canvas3d_mesh_frame_add(data->mesh, 0);
212 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]); 210 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]);
@@ -219,8 +217,7 @@ _mesh_setup(Scene_Data *data)
219 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material); 217 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
220 evas_canvas3d_mesh_color_pick_enable_set(data->mesh, EINA_TRUE); 218 evas_canvas3d_mesh_color_pick_enable_set(data->mesh, EINA_TRUE);
221 219
222 data->mesh_node = 220 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
223 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
224 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 221 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
225 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 222 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
226} 223}
@@ -228,12 +225,11 @@ _mesh_setup(Scene_Data *data)
228static void 225static void
229_scene_setup(Scene_Data *data) 226_scene_setup(Scene_Data *data)
230{ 227{
231 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 228 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
232 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 229 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
233 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 230 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
234 231
235 data->root_node = 232 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
236 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
237 233
238 _camera_setup(data); 234 _camera_setup(data);
239 _light_setup(data); 235 _light_setup(data);
diff --git a/src/examples/evas3d_scene_on_button_example.c b/src/examples/evas3d_scene_on_button_example.c
index c7cf82c32..8a70ec8a5 100644
--- a/src/examples/evas3d_scene_on_button_example.c
+++ b/src/examples/evas3d_scene_on_button_example.c
@@ -120,12 +120,11 @@ _animate_scene(void *data)
120static void 120static void
121_camera_setup(Scene_Data *data) 121_camera_setup(Scene_Data *data)
122{ 122{
123 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 123 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
124 124
125 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0); 125 evas_canvas3d_camera_projection_perspective_set(data->camera, 60.0, 1.0, 2.0, 50.0);
126 126
127 data->camera_node = 127 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
128 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
129 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 128 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
130 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0); 129 evas_canvas3d_node_position_set(data->camera_node, 0.0, 0.0, 10.0);
131 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); 130 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);
@@ -135,13 +134,12 @@ _camera_setup(Scene_Data *data)
135static void 134static void
136_light_setup(Scene_Data *data) 135_light_setup(Scene_Data *data)
137{ 136{
138 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 137 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
139 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 138 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
140 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 139 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
141 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 140 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
142 141
143 data->light_node = 142 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
144 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
145 evas_canvas3d_node_light_set(data->light_node, data->light); 143 evas_canvas3d_node_light_set(data->light_node, data->light);
146 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0); 144 evas_canvas3d_node_position_set(data->light_node, 0.0, 0.0, 10.0);
147 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); 145 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);
@@ -151,7 +149,7 @@ static void
151_mesh_setup(Scene_Data *data) 149_mesh_setup(Scene_Data *data)
152{ 150{
153 /* Setup material. */ 151 /* Setup material. */
154 data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 152 eo_add(&data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
155 153
156 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 154 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
157 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 155 evas_canvas3d_material_enable_set(data->material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -162,7 +160,7 @@ _mesh_setup(Scene_Data *data)
162 evas_canvas3d_material_shininess_set(data->material, 100.0); 160 evas_canvas3d_material_shininess_set(data->material, 100.0);
163 161
164 /* Setup mesh. */ 162 /* Setup mesh. */
165 data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 163 eo_add(&data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
166 evas_canvas3d_mesh_vertex_count_set(data->mesh, 24); 164 evas_canvas3d_mesh_vertex_count_set(data->mesh, 24);
167 evas_canvas3d_mesh_frame_add(data->mesh, 0); 165 evas_canvas3d_mesh_frame_add(data->mesh, 0);
168 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]); 166 evas_canvas3d_mesh_frame_vertex_data_set(data->mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]);
@@ -174,8 +172,7 @@ _mesh_setup(Scene_Data *data)
174 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG); 172 evas_canvas3d_mesh_shade_mode_set(data->mesh, EVAS_CANVAS3D_SHADE_MODE_PHONG);
175 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material); 173 evas_canvas3d_mesh_frame_material_set(data->mesh, 0, data->material);
176 174
177 data->mesh_node = 175 eo_add(&data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
178 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
179 evas_canvas3d_node_member_add(data->root_node, data->mesh_node); 176 evas_canvas3d_node_member_add(data->root_node, data->mesh_node);
180 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh); 177 evas_canvas3d_node_mesh_add(data->mesh_node, data->mesh);
181} 178}
@@ -183,12 +180,11 @@ _mesh_setup(Scene_Data *data)
183static void 180static void
184_scene_setup(Scene_Data *data) 181_scene_setup(Scene_Data *data)
185{ 182{
186 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 183 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
187 evas_canvas3d_scene_size_set(data->scene, WIDTH - d_w, HEIGHT - d_h); 184 evas_canvas3d_scene_size_set(data->scene, WIDTH - d_w, HEIGHT - d_h);
188 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0); 185 evas_canvas3d_scene_background_color_set(data->scene, 0.0, 0.0, 0.0, 0.0);
189 186
190 data->root_node = 187 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
191 eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
192 188
193 _camera_setup(data); 189 _camera_setup(data);
194 _light_setup(data); 190 _light_setup(data);
diff --git a/src/examples/filemvc.c b/src/examples/filemvc.c
index 6ef183e44..c217dcbf5 100644
--- a/src/examples/filemvc.c
+++ b/src/examples/filemvc.c
@@ -71,7 +71,7 @@ _tree_selected_cb(void *data, const Eo_Event *event)
71 71
72 efl_model_property_get(child, "path", &vpath); 72 efl_model_property_get(child, "path", &vpath);
73 eina_value_get(vpath, &path); 73 eina_value_get(vpath, &path);
74 model = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(eoid, path)); 74 eo_add(&model, EIO_MODEL_CLASS, NULL, eio_model_path_set(model, path));
75 efl_model_load(model); 75 efl_model_load(model);
76 elm_view_list_model_set(priv->fileview, model); 76 elm_view_list_model_set(priv->fileview, model);
77 return EINA_TRUE; 77 return EINA_TRUE;
@@ -137,13 +137,13 @@ elm_main(int argc, char **argv)
137 else dirname = EFL_MODEL_TEST_FILENAME_PATH; 137 else dirname = EFL_MODEL_TEST_FILENAME_PATH;
138 138
139 //treemodel 139 //treemodel
140 priv.treemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(eoid, dirname)); 140 eo_add(&priv.treemodel, EIO_MODEL_CLASS, NULL, eio_model_path_set(priv.treemodel, dirname));
141 eio_model_children_filter_set(priv.treemodel, _filter_cb, NULL); 141 eio_model_children_filter_set(priv.treemodel, _filter_cb, NULL);
142 efl_model_load(priv.treemodel); 142 efl_model_load(priv.treemodel);
143 143
144 //treeview 144 //treeview
145 genlist = elm_genlist_add(win); 145 genlist = elm_genlist_add(win);
146 priv.treeview = eo_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(eoid, genlist, ELM_GENLIST_ITEM_TREE, NULL)); 146 eo_add(&priv.treeview, ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(priv.treeview, genlist, ELM_GENLIST_ITEM_TREE, NULL));
147 elm_view_list_property_connect(priv.treeview, "filename", "elm.text"); 147 elm_view_list_property_connect(priv.treeview, "filename", "elm.text");
148 elm_view_list_property_connect(priv.treeview, "icon", "elm.swallow.icon"); 148 elm_view_list_property_connect(priv.treeview, "icon", "elm.swallow.icon");
149 elm_view_list_model_set(priv.treeview, priv.treemodel); 149 elm_view_list_model_set(priv.treeview, priv.treemodel);
@@ -157,7 +157,7 @@ elm_main(int argc, char **argv)
157 eo_event_callback_add(priv.treeview, ELM_VIEW_LIST_EVENT_MODEL_SELECTED, _tree_selected_cb, &priv); 157 eo_event_callback_add(priv.treeview, ELM_VIEW_LIST_EVENT_MODEL_SELECTED, _tree_selected_cb, &priv);
158 //listview 158 //listview
159 genlist = elm_genlist_add(win); 159 genlist = elm_genlist_add(win);
160 priv.fileview = eo_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(eoid, genlist, ELM_GENLIST_ITEM_NONE, "double_label")); 160 eo_add(&priv.fileview, ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(priv.fileview, genlist, ELM_GENLIST_ITEM_NONE, "double_label"));
161 elm_view_list_property_connect(priv.fileview, "filename", "elm.text"); 161 elm_view_list_property_connect(priv.fileview, "filename", "elm.text");
162 elm_view_list_property_connect(priv.fileview, "size", "elm.text.sub"); 162 elm_view_list_property_connect(priv.fileview, "size", "elm.text.sub");
163 163
@@ -171,7 +171,7 @@ elm_main(int argc, char **argv)
171 bxr = elm_box_add(win); 171 bxr = elm_box_add(win);
172 _widget_init(bxr); 172 _widget_init(bxr);
173 elm_object_part_content_set(vpanes, "right", bxr); 173 elm_object_part_content_set(vpanes, "right", bxr);
174 priv.formview = eo_add(ELM_VIEW_FORM_CLASS, NULL); 174 eo_add(&priv.formview, ELM_VIEW_FORM_CLASS, NULL);
175 175
176 /*Label widget */ 176 /*Label widget */
177 elm_view_form_widget_add(priv.formview, "filename", _label_init(win, bxr, "File Name")); 177 elm_view_form_widget_add(priv.formview, "filename", _label_init(win, bxr, "File Name"));
diff --git a/src/examples/fileviewlist.c b/src/examples/fileviewlist.c
index d91efdb23..1c420c340 100644
--- a/src/examples/fileviewlist.c
+++ b/src/examples/fileviewlist.c
@@ -55,8 +55,8 @@ elm_main(int argc, char **argv)
55 evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 55 evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
56 evas_object_show(genlist); 56 evas_object_show(genlist);
57 57
58 priv.filemodel = eo_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(eoid, dirname)); 58 eo_add(&priv.filemodel, EIO_MODEL_CLASS, NULL, eio_model_path_set(priv.filemodel, dirname));
59 priv.fileview = eo_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(eoid, genlist, ELM_GENLIST_ITEM_TREE, "double_label")); 59 eo_add(&priv.fileview, ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(priv.fileview, genlist, ELM_GENLIST_ITEM_TREE, "double_label"));
60 elm_view_list_model_set(priv.fileview, priv.filemodel); 60 elm_view_list_model_set(priv.fileview, priv.filemodel);
61 efl_model_load(priv.filemodel); 61 efl_model_load(priv.filemodel);
62 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, &priv); 62 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, &priv);
diff --git a/src/examples/performance/graphical.c b/src/examples/performance/graphical.c
index 788459195..deae035f3 100644
--- a/src/examples/performance/graphical.c
+++ b/src/examples/performance/graphical.c
@@ -248,7 +248,7 @@ void _init_bounding()
248 20, 21, 22, 22, 21, 23 248 20, 21, 22, 22, 21, 23
249 }; 249 };
250 250
251 globalGraphical.material_box = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, globalGraphical.evas); 251 eo_add(&globalGraphical.material_box, EVAS_CANVAS3D_MATERIAL_CLASS, globalGraphical.evas);
252 252
253 evas_canvas3d_material_enable_set(globalGraphical.material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 253 evas_canvas3d_material_enable_set(globalGraphical.material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
254 evas_canvas3d_material_enable_set(globalGraphical.material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 254 evas_canvas3d_material_enable_set(globalGraphical.material_box, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -259,7 +259,7 @@ void _init_bounding()
259 evas_canvas3d_material_shininess_set(globalGraphical.material_box, 100.0); 259 evas_canvas3d_material_shininess_set(globalGraphical.material_box, 100.0);
260 260
261 /* Setup mesh. */ 261 /* Setup mesh. */
262 globalGraphical.mesh_box = eo_add(EVAS_CANVAS3D_MESH_CLASS, globalGraphical.evas); 262 eo_add(&globalGraphical.mesh_box, EVAS_CANVAS3D_MESH_CLASS, globalGraphical.evas);
263 evas_canvas3d_mesh_vertex_count_set(globalGraphical.mesh_box, 24); 263 evas_canvas3d_mesh_vertex_count_set(globalGraphical.mesh_box, 24);
264 evas_canvas3d_mesh_frame_add(globalGraphical.mesh_box, 0); 264 evas_canvas3d_mesh_frame_add(globalGraphical.mesh_box, 0);
265 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh_box, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]); 265 evas_canvas3d_mesh_frame_vertex_data_copy_set(globalGraphical.mesh_box, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 12 * sizeof(float), &cube_vertices[ 0]);
@@ -271,8 +271,7 @@ void _init_bounding()
271 evas_canvas3d_mesh_shade_mode_set(globalGraphical.mesh_box, EVAS_CANVAS3D_SHADE_MODE_PHONG); 271 evas_canvas3d_mesh_shade_mode_set(globalGraphical.mesh_box, EVAS_CANVAS3D_SHADE_MODE_PHONG);
272 evas_canvas3d_mesh_frame_material_set(globalGraphical.mesh_box, 0, globalGraphical.material_box); 272 evas_canvas3d_mesh_frame_material_set(globalGraphical.mesh_box, 0, globalGraphical.material_box);
273 273
274 globalGraphical.mesh_nodebox = 274 eo_add(&globalGraphical.mesh_nodebox, EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(globalGraphical.mesh_nodebox, EVAS_CANVAS3D_NODE_TYPE_MESH), evas_canvas3d_node_position_set(globalGraphical.mesh_nodebox, 0, -30.0, 0.0));
275 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH), evas_canvas3d_node_position_set(eoid, 0, -30.0, 0.0));
276 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.mesh_nodebox); 275 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.mesh_nodebox);
277 evas_canvas3d_node_mesh_add(globalGraphical.mesh_nodebox, globalGraphical.mesh_box); 276 evas_canvas3d_node_mesh_add(globalGraphical.mesh_nodebox, globalGraphical.mesh_box);
278} 277}
@@ -307,7 +306,7 @@ _change_scene_setup()
307 _sphere_init(globalGraphical.precision); 306 _sphere_init(globalGraphical.precision);
308 for (i = 0; i < quantity; i++) 307 for (i = 0; i < quantity; i++)
309 { 308 {
310 globalGraphical.mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, globalGraphical.evas); 309 eo_add(&globalGraphical.mesh, EVAS_CANVAS3D_MESH_CLASS, globalGraphical.evas);
311 if (!globalGraphical.model_path) 310 if (!globalGraphical.model_path)
312 { 311 {
313 evas_canvas3d_mesh_vertex_count_set(globalGraphical.mesh, globalGraphical.vertex_count); 312 evas_canvas3d_mesh_vertex_count_set(globalGraphical.mesh, globalGraphical.vertex_count);
@@ -358,8 +357,7 @@ _change_scene_setup()
358 _sphere_count(globalGraphical.count, 0.2); 357 _sphere_count(globalGraphical.count, 0.2);
359 for (i = 0; i < quantity; i++) 358 for (i = 0; i < quantity; i++)
360 { 359 {
361 globalGraphical.mesh_node = 360 eo_add(&globalGraphical.mesh_node, EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(globalGraphical.mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH), evas_canvas3d_node_position_set(globalGraphical.mesh_node, globalGraphical.places[i].position.x * 20, globalGraphical.places[i].position.y * 20, globalGraphical.places[i].position.z * 20));
362 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH), evas_canvas3d_node_position_set(eoid, globalGraphical.places[i].position.x * 20, globalGraphical.places[i].position.y * 20, globalGraphical.places[i].position.z * 20));
363 if (globalGraphical.model_path) 361 if (globalGraphical.model_path)
364 evas_canvas3d_node_scale_set(globalGraphical.mesh_node, 0.2, 0.2, 0.2); 362 evas_canvas3d_node_scale_set(globalGraphical.mesh_node, 0.2, 0.2, 0.2);
365 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.mesh_node); 363 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.mesh_node);
@@ -394,39 +392,37 @@ _init_scene(Evas_Object *img)
394 /*Allocate memory - eina_mempool*/ 392 /*Allocate memory - eina_mempool*/
395 393
396 /* Add a scene object .*/ 394 /* Add a scene object .*/
397 globalGraphical.scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, globalGraphical.evas); 395 eo_add(&globalGraphical.scene, EVAS_CANVAS3D_SCENE_CLASS, globalGraphical.evas);
398 396
399 /* Add the root node for the scene. */ 397 /* Add the root node for the scene. */
400 globalGraphical.root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 398 eo_add(&globalGraphical.root_node, EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(globalGraphical.root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
401 399
402 /* Add the camera. */ 400 /* Add the camera. */
403 globalGraphical.camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, globalGraphical.evas); 401 eo_add(&globalGraphical.camera, EVAS_CANVAS3D_CAMERA_CLASS, globalGraphical.evas);
404 evas_canvas3d_camera_projection_perspective_set(globalGraphical.camera, globalGraphical.angle, 1.0, 2.0, 1000.0); 402 evas_canvas3d_camera_projection_perspective_set(globalGraphical.camera, globalGraphical.angle, 1.0, 2.0, 1000.0);
405 403
406 globalGraphical.camera_node = 404 eo_add(&globalGraphical.camera_node, EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(globalGraphical.camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
407 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
408 evas_canvas3d_node_camera_set(globalGraphical.camera_node, globalGraphical.camera); 405 evas_canvas3d_node_camera_set(globalGraphical.camera_node, globalGraphical.camera);
409 evas_canvas3d_node_position_set(globalGraphical.camera_node, 0.0, 0.0, 25.0); 406 evas_canvas3d_node_position_set(globalGraphical.camera_node, 0.0, 0.0, 25.0);
410 evas_canvas3d_node_look_at_set(globalGraphical.camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 407 evas_canvas3d_node_look_at_set(globalGraphical.camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
411 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.camera_node); 408 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.camera_node);
412 409
413 globalGraphical.light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, globalGraphical.evas); 410 eo_add(&globalGraphical.light, EVAS_CANVAS3D_LIGHT_CLASS, globalGraphical.evas);
414 evas_canvas3d_light_ambient_set(globalGraphical.light, 1.0, 1.0, 1.0, 1.0); 411 evas_canvas3d_light_ambient_set(globalGraphical.light, 1.0, 1.0, 1.0, 1.0);
415 evas_canvas3d_light_diffuse_set(globalGraphical.light, 1.0, 1.0, 1.0, 1.0); 412 evas_canvas3d_light_diffuse_set(globalGraphical.light, 1.0, 1.0, 1.0, 1.0);
416 evas_canvas3d_light_specular_set(globalGraphical.light, 1.0, 1.0, 1.0, 1.0); 413 evas_canvas3d_light_specular_set(globalGraphical.light, 1.0, 1.0, 1.0, 1.0);
417 evas_canvas3d_light_projection_perspective_set(globalGraphical.light, globalGraphical.angle / 5, 1.0, 1.0, 1000.0); 414 evas_canvas3d_light_projection_perspective_set(globalGraphical.light, globalGraphical.angle / 5, 1.0, 1.0, 1000.0);
418 evas_canvas3d_light_spot_cutoff_set(globalGraphical.light, globalGraphical.angle / 15); 415 evas_canvas3d_light_spot_cutoff_set(globalGraphical.light, globalGraphical.angle / 15);
419 416
420 globalGraphical.light_node = 417 eo_add(&globalGraphical.light_node, EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(globalGraphical.light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
421 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
422 evas_canvas3d_node_light_set(globalGraphical.light_node, globalGraphical.light); 418 evas_canvas3d_node_light_set(globalGraphical.light_node, globalGraphical.light);
423 evas_canvas3d_node_position_set(globalGraphical.light_node, 0.0, 100.0, 1.0); 419 evas_canvas3d_node_position_set(globalGraphical.light_node, 0.0, 100.0, 1.0);
424 evas_canvas3d_node_look_at_set(globalGraphical.light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0); 420 evas_canvas3d_node_look_at_set(globalGraphical.light_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
425 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.light_node); 421 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.light_node);
426 422
427 423
428 globalGraphical.material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, globalGraphical.evas); 424 eo_add(&globalGraphical.material, EVAS_CANVAS3D_MATERIAL_CLASS, globalGraphical.evas);
429 globalGraphical.texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, globalGraphical.evas); 425 eo_add(&globalGraphical.texture, EVAS_CANVAS3D_TEXTURE_CLASS, globalGraphical.evas);
430 evas_canvas3d_texture_file_set(globalGraphical.texture, "target_texture.png", NULL); 426 evas_canvas3d_texture_file_set(globalGraphical.texture, "target_texture.png", NULL);
431 evas_canvas3d_texture_filter_set(globalGraphical.texture, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR); 427 evas_canvas3d_texture_filter_set(globalGraphical.texture, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR);
432 evas_canvas3d_texture_wrap_set(globalGraphical.texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT); 428 evas_canvas3d_texture_wrap_set(globalGraphical.texture, EVAS_CANVAS3D_WRAP_MODE_REPEAT, EVAS_CANVAS3D_WRAP_MODE_REPEAT);
@@ -444,7 +440,7 @@ _init_scene(Evas_Object *img)
444 440
445 for (i = 0; i < quantity; i++) 441 for (i = 0; i < quantity; i++)
446 { 442 {
447 globalGraphical.mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, globalGraphical.evas); 443 eo_add(&globalGraphical.mesh, EVAS_CANVAS3D_MESH_CLASS, globalGraphical.evas);
448 if (!globalGraphical.model_path) 444 if (!globalGraphical.model_path)
449 { 445 {
450 evas_canvas3d_mesh_vertex_count_set(globalGraphical.mesh, globalGraphical.vertex_count); 446 evas_canvas3d_mesh_vertex_count_set(globalGraphical.mesh, globalGraphical.vertex_count);
@@ -473,8 +469,7 @@ _init_scene(Evas_Object *img)
473 469
474 for (i = 0; i < quantity; i++) 470 for (i = 0; i < quantity; i++)
475 { 471 {
476 globalGraphical.mesh_node = 472 eo_add(&globalGraphical.mesh_node, EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(globalGraphical.mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH), evas_canvas3d_node_position_set(globalGraphical.mesh_node, globalGraphical.places[i].position.x * 20, globalGraphical.places[i].position.y * 20, globalGraphical.places[i].position.z * 20));
477 eo_add(EVAS_CANVAS3D_NODE_CLASS, globalGraphical.evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH), evas_canvas3d_node_position_set(eoid, globalGraphical.places[i].position.x * 20, globalGraphical.places[i].position.y * 20, globalGraphical.places[i].position.z * 20));
478 if (globalGraphical.model_path) 473 if (globalGraphical.model_path)
479 evas_canvas3d_node_scale_set(globalGraphical.mesh_node, 0.2, 0.2, 0.2); 474 evas_canvas3d_node_scale_set(globalGraphical.mesh_node, 0.2, 0.2, 0.2);
480 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.mesh_node); 475 evas_canvas3d_node_member_add(globalGraphical.root_node, globalGraphical.mesh_node);
diff --git a/src/examples/sphere_hunter/evas_3d_sphere_hunter.c b/src/examples/sphere_hunter/evas_3d_sphere_hunter.c
index 6de714d17..9d672fc3d 100644
--- a/src/examples/sphere_hunter/evas_3d_sphere_hunter.c
+++ b/src/examples/sphere_hunter/evas_3d_sphere_hunter.c
@@ -435,10 +435,10 @@ _quit_game(void *data EINA_UNUSED, Evas_Object *btn EINA_UNUSED, void *ev EINA_U
435static void 435static void
436_camera_setup(Scene_Data *data) 436_camera_setup(Scene_Data *data)
437{ 437{
438 data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); 438 eo_add(&data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
439 evas_canvas3d_camera_projection_perspective_set(data->camera, 50.0, 1.0, 1.0, 1000.0); 439 evas_canvas3d_camera_projection_perspective_set(data->camera, 50.0, 1.0, 1.0, 1000.0);
440 440
441 data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); 441 eo_add(&data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
442 evas_canvas3d_node_camera_set(data->camera_node, data->camera); 442 evas_canvas3d_node_camera_set(data->camera_node, data->camera);
443 evas_canvas3d_node_position_set(data->camera_node, 0.0, 40, 70); 443 evas_canvas3d_node_position_set(data->camera_node, 0.0, 40, 70);
444 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); 444 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);
@@ -459,14 +459,14 @@ _animate_camera(void *data)
459static void 459static void
460_light_setup(Scene_Data *data) 460_light_setup(Scene_Data *data)
461{ 461{
462 data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); 462 eo_add(&data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
463 463
464 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0); 464 evas_canvas3d_light_ambient_set(data->light, 0.2, 0.2, 0.2, 1.0);
465 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0); 465 evas_canvas3d_light_diffuse_set(data->light, 1.0, 1.0, 1.0, 1.0);
466 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0); 466 evas_canvas3d_light_specular_set(data->light, 1.0, 1.0, 1.0, 1.0);
467 evas_canvas3d_light_projection_perspective_set(data->light, 100.0, 1.0, 1.0, 1000.0); 467 evas_canvas3d_light_projection_perspective_set(data->light, 100.0, 1.0, 1.0, 1000.0);
468 468
469 data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); 469 eo_add(&data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->light_node, EVAS_CANVAS3D_NODE_TYPE_LIGHT));
470 evas_canvas3d_node_light_set(data->light_node, data->light); 470 evas_canvas3d_node_light_set(data->light_node, data->light);
471 evas_canvas3d_node_position_set(data->light_node, 0.1, 25.0, 0.1); 471 evas_canvas3d_node_position_set(data->light_node, 0.1, 25.0, 0.1);
472 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); 472 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);
@@ -477,8 +477,8 @@ _light_setup(Scene_Data *data)
477static void 477static void
478_mesh_cube_setup(Scene_Data *data) 478_mesh_cube_setup(Scene_Data *data)
479{ 479{
480 data->mesh_cube = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 480 eo_add(&data->mesh_cube, EVAS_CANVAS3D_MESH_CLASS, evas);
481 data->material_cube = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 481 eo_add(&data->material_cube, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
482 evas_canvas3d_material_enable_set(data->material_cube, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 482 evas_canvas3d_material_enable_set(data->material_cube, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
483 evas_canvas3d_material_enable_set(data->material_cube, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 483 evas_canvas3d_material_enable_set(data->material_cube, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
484 evas_canvas3d_material_enable_set(data->material_cube, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE); 484 evas_canvas3d_material_enable_set(data->material_cube, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE);
@@ -506,9 +506,9 @@ _create_bondar(Scene_Data *data, Evas_Real scale_x, Evas_Real scale_y, Evas_Real
506 Eo *node = NULL; 506 Eo *node = NULL;
507 Eo *material = NULL; 507 Eo *material = NULL;
508 508
509 mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 509 eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
510 material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 510 eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
511 node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 511 eo_add(&node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(node, EVAS_CANVAS3D_NODE_TYPE_MESH));
512 512
513 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 513 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
514 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); 514 evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE);
@@ -556,7 +556,7 @@ _create_cubes(Scene_Data *data, Evas_Real r, int count)
556 Eo *node = NULL; 556 Eo *node = NULL;
557 557
558 alpha = d_alpha * i * M_PI / 180; 558 alpha = d_alpha * i * M_PI / 180;
559 node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 559 eo_add(&node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(node, EVAS_CANVAS3D_NODE_TYPE_MESH));
560 560
561 evas_canvas3d_node_mesh_add(node, data->mesh_cube); 561 evas_canvas3d_node_mesh_add(node, data->mesh_cube);
562 evas_canvas3d_node_position_set(node, r * sin(alpha), 2.0 + (r / 4 * sin(alpha)), r * cos(alpha)); 562 evas_canvas3d_node_position_set(node, r * sin(alpha), 2.0 + (r / 4 * sin(alpha)), r * cos(alpha));
@@ -573,9 +573,9 @@ _mesh_ball_setup(Scene_Data *data)
573{ 573{
574 _sphere_init(100); 574 _sphere_init(100);
575 575
576 data->mesh_ball = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); 576 eo_add(&data->mesh_ball, EVAS_CANVAS3D_MESH_CLASS, evas);
577 data->material_ball = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); 577 eo_add(&data->material_ball, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
578 data->mesh_node_ball = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH)); 578 eo_add(&data->mesh_node_ball, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->mesh_node_ball, EVAS_CANVAS3D_NODE_TYPE_MESH));
579 579
580 /* Setup material for ball. */ 580 /* Setup material for ball. */
581 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); 581 evas_canvas3d_material_enable_set(data->material_ball, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE);
@@ -609,10 +609,10 @@ _scene_setup(Scene_Data *data, Evas_Real r, int count)
609{ 609{
610 Eina_List *l = NULL; 610 Eina_List *l = NULL;
611 Eo *item = NULL; 611 Eo *item = NULL;
612 data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); 612 eo_add(&data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
613 613
614 /* Add the root node for the scene. */ 614 /* Add the root node for the scene. */
615 data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE)); 615 eo_add(&data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(data->root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
616 616
617 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT); 617 evas_canvas3d_scene_size_set(data->scene, WIDTH, HEIGHT);
618 evas_canvas3d_scene_shadows_enable_set(data->scene, EINA_TRUE); 618 evas_canvas3d_scene_shadows_enable_set(data->scene, EINA_TRUE);
diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c
index 68f65d43c..db8804d3a 100644
--- a/src/lib/elc_ctxpopup.c
+++ b/src/lib/elc_ctxpopup.c
@@ -1176,7 +1176,8 @@ EAPI Evas_Object *
1176elm_ctxpopup_add(Evas_Object *parent) 1176elm_ctxpopup_add(Evas_Object *parent)
1177{ 1177{
1178 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1178 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1179 Evas_Object *obj = eo_add(MY_CLASS, parent); 1179 Evas_Object *obj = NULL;
1180 eo_add(&obj, MY_CLASS, parent);
1180 1181
1181 /* access: parent could be any object such as elm_list which does 1182 /* access: parent could be any object such as elm_list which does
1182 not know elc_ctxpopup as its child object in the focus_next(); */ 1183 not know elc_ctxpopup as its child object in the focus_next(); */
@@ -1280,7 +1281,7 @@ _elm_ctxpopup_item_append(Eo *obj, Elm_Ctxpopup_Data *sd, const char *label, Eva
1280{ 1281{
1281 Eo *eo_item; 1282 Eo *eo_item;
1282 1283
1283 eo_item = eo_add(ELM_CTXPOPUP_ITEM_CLASS, obj, elm_obj_ctxpopup_item_init(eoid, func, data)); 1284 eo_add(&eo_item, ELM_CTXPOPUP_ITEM_CLASS, obj, elm_obj_ctxpopup_item_init(eo_item, func, data));
1284 if (!eo_item) return NULL; 1285 if (!eo_item) return NULL;
1285 1286
1286 ELM_CTXPOPUP_ITEM_DATA_GET(eo_item, item); 1287 ELM_CTXPOPUP_ITEM_DATA_GET(eo_item, item);
@@ -1374,7 +1375,7 @@ _elm_ctxpopup_item_prepend(Eo *obj, Elm_Ctxpopup_Data *sd, const char *label, Ev
1374{ 1375{
1375 Eo *eo_item; 1376 Eo *eo_item;
1376 1377
1377 eo_item = eo_add(ELM_CTXPOPUP_ITEM_CLASS, obj, elm_obj_ctxpopup_item_init(eoid, func, data)); 1378 eo_add(&eo_item, ELM_CTXPOPUP_ITEM_CLASS, obj, elm_obj_ctxpopup_item_init(eo_item, func, data));
1378 if (!eo_item) return NULL; 1379 if (!eo_item) return NULL;
1379 1380
1380 ELM_CTXPOPUP_ITEM_DATA_GET(eo_item, item); 1381 ELM_CTXPOPUP_ITEM_DATA_GET(eo_item, item);
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index 36680ec87..2452a11e1 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -1624,7 +1624,8 @@ EAPI Evas_Object *
1624elm_fileselector_add(Evas_Object *parent) 1624elm_fileselector_add(Evas_Object *parent)
1625{ 1625{
1626 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1626 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1627 Evas_Object *obj = eo_add(MY_CLASS, parent); 1627 Evas_Object *obj = NULL;
1628 eo_add(&obj, MY_CLASS, parent);
1628 return obj; 1629 return obj;
1629} 1630}
1630 1631
diff --git a/src/lib/elc_fileselector_button.c b/src/lib/elc_fileselector_button.c
index 412aefdc6..403119e66 100644
--- a/src/lib/elc_fileselector_button.c
+++ b/src/lib/elc_fileselector_button.c
@@ -215,7 +215,8 @@ EAPI Evas_Object *
215elm_fileselector_button_add(Evas_Object *parent) 215elm_fileselector_button_add(Evas_Object *parent)
216{ 216{
217 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 217 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
218 Evas_Object *obj = eo_add(MY_CLASS, parent); 218 Evas_Object *obj = NULL;
219 eo_add(&obj, MY_CLASS, parent);
219 return obj; 220 return obj;
220} 221}
221 222
diff --git a/src/lib/elc_fileselector_entry.c b/src/lib/elc_fileselector_entry.c
index 85bb72ea4..e2fd6b242 100644
--- a/src/lib/elc_fileselector_entry.c
+++ b/src/lib/elc_fileselector_entry.c
@@ -342,7 +342,8 @@ EAPI Evas_Object *
342elm_fileselector_entry_add(Evas_Object *parent) 342elm_fileselector_entry_add(Evas_Object *parent)
343{ 343{
344 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 344 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
345 Evas_Object *obj = eo_add(MY_CLASS, parent); 345 Evas_Object *obj = NULL;
346 eo_add(&obj, MY_CLASS, parent);
346 return obj; 347 return obj;
347} 348}
348 349
diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c
index e14e0e6d0..8a13df15c 100644
--- a/src/lib/elc_hoversel.c
+++ b/src/lib/elc_hoversel.c
@@ -611,7 +611,8 @@ EAPI Evas_Object *
611elm_hoversel_add(Evas_Object *parent) 611elm_hoversel_add(Evas_Object *parent)
612{ 612{
613 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 613 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
614 Evas_Object *obj = eo_add(MY_CLASS, parent); 614 Evas_Object *obj = NULL;
615 eo_add(&obj, MY_CLASS, parent);
615 return obj; 616 return obj;
616} 617}
617 618
@@ -748,7 +749,8 @@ _elm_hoversel_item_add(Eo *obj, Elm_Hoversel_Data *sd, const char *label, const
748 Evas_Object *bt, *ic; 749 Evas_Object *bt, *ic;
749 char buf[4096]; 750 char buf[4096];
750 751
751 Eo *eo_item = eo_add(ELM_HOVERSEL_ITEM_CLASS, obj); 752 Eo *eo_item = NULL;
753 eo_add(&eo_item, ELM_HOVERSEL_ITEM_CLASS, obj);
752 if (!eo_item) return NULL; 754 if (!eo_item) return NULL;
753 755
754 ELM_HOVERSEL_ITEM_DATA_GET(eo_item, item); 756 ELM_HOVERSEL_ITEM_DATA_GET(eo_item, item);
diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c
index a154571b5..d05ca76d6 100644
--- a/src/lib/elc_multibuttonentry.c
+++ b/src/lib/elc_multibuttonentry.c
@@ -746,7 +746,7 @@ _item_new(Elm_Multibuttonentry_Data *sd,
746 return NULL; 746 return NULL;
747 } 747 }
748 748
749 eo_item = eo_add(ELM_MULTIBUTTONENTRY_ITEM_CLASS, obj); 749 eo_add(&eo_item, ELM_MULTIBUTTONENTRY_ITEM_CLASS, obj);
750 if (!eo_item) 750 if (!eo_item)
751 return NULL; 751 return NULL;
752 WIDGET_ITEM_DATA_SET(eo_item, data); 752 WIDGET_ITEM_DATA_SET(eo_item, data);
@@ -1706,7 +1706,8 @@ EAPI Evas_Object *
1706elm_multibuttonentry_add(Evas_Object *parent) 1706elm_multibuttonentry_add(Evas_Object *parent)
1707{ 1707{
1708 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1708 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1709 Evas_Object *obj = eo_add(MY_CLASS, parent); 1709 Evas_Object *obj = NULL;
1710 eo_add(&obj, MY_CLASS, parent);
1710 return obj; 1711 return obj;
1711} 1712}
1712 1713
diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c
index 717916468..29e92a37d 100644
--- a/src/lib/elc_naviframe.c
+++ b/src/lib/elc_naviframe.c
@@ -1209,7 +1209,7 @@ _item_new(Evas_Object *obj,
1209 1209
1210 ELM_NAVIFRAME_DATA_GET(obj, sd); 1210 ELM_NAVIFRAME_DATA_GET(obj, sd);
1211 1211
1212 eo_item = eo_add(ELM_NAVIFRAME_ITEM_CLASS, obj); 1212 eo_add(&eo_item, ELM_NAVIFRAME_ITEM_CLASS, obj);
1213 1213
1214 if (!eo_item) 1214 if (!eo_item)
1215 { 1215 {
@@ -1583,7 +1583,8 @@ EAPI Evas_Object *
1583elm_naviframe_add(Evas_Object *parent) 1583elm_naviframe_add(Evas_Object *parent)
1584{ 1584{
1585 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1585 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1586 Evas_Object *obj = eo_add(MY_CLASS, parent); 1586 Evas_Object *obj = NULL;
1587 eo_add(&obj, MY_CLASS, parent);
1587 return obj; 1588 return obj;
1588} 1589}
1589 1590
diff --git a/src/lib/elc_player.c b/src/lib/elc_player.c
index 7c1e2a7cb..e19a8e94a 100644
--- a/src/lib/elc_player.c
+++ b/src/lib/elc_player.c
@@ -714,7 +714,8 @@ EAPI Evas_Object *
714elm_player_add(Evas_Object *parent) 714elm_player_add(Evas_Object *parent)
715{ 715{
716 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 716 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
717 Evas_Object *obj = eo_add(MY_CLASS, parent); 717 Evas_Object *obj = NULL;
718 eo_add(&obj, MY_CLASS, parent);
718 return obj; 719 return obj;
719} 720}
720 721
diff --git a/src/lib/elc_popup.c b/src/lib/elc_popup.c
index c69e16df9..89eeaa601 100644
--- a/src/lib/elc_popup.c
+++ b/src/lib/elc_popup.c
@@ -1574,7 +1574,8 @@ EAPI Evas_Object *
1574elm_popup_add(Evas_Object *parent) 1574elm_popup_add(Evas_Object *parent)
1575{ 1575{
1576 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1576 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1577 Evas_Object *obj = eo_add(MY_CLASS, parent); 1577 Evas_Object *obj = NULL;
1578 eo_add(&obj, MY_CLASS, parent);
1578 1579
1579 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 1580 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
1580 wd->highlight_root = EINA_TRUE; 1581 wd->highlight_root = EINA_TRUE;
@@ -1752,7 +1753,7 @@ _elm_popup_item_append(Eo *obj, Elm_Popup_Data *sd, const char *label, Evas_Obje
1752 Evas_Object *prev_content; 1753 Evas_Object *prev_content;
1753 Eo *eo_it; 1754 Eo *eo_it;
1754 1755
1755 eo_it = eo_add(ELM_POPUP_ITEM_CLASS, obj); 1756 eo_add(&eo_it, ELM_POPUP_ITEM_CLASS, obj);
1756 if (!eo_it) return NULL; 1757 if (!eo_it) return NULL;
1757 ELM_POPUP_ITEM_DATA_GET(eo_it, it); 1758 ELM_POPUP_ITEM_DATA_GET(eo_it, it);
1758 if (sd->content || sd->text_content_obj) 1759 if (sd->content || sd->text_content_obj)
diff --git a/src/lib/elm_access.c b/src/lib/elm_access.c
index 6e9a82967..25c665f47 100644
--- a/src/lib/elm_access.c
+++ b/src/lib/elm_access.c
@@ -1235,7 +1235,8 @@ static Evas_Object *
1235_elm_access_add(Evas_Object *parent) 1235_elm_access_add(Evas_Object *parent)
1236{ 1236{
1237 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1237 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1238 Evas_Object *obj = eo_add(MY_CLASS, parent); 1238 Evas_Object *obj = NULL;
1239 eo_add(&obj, MY_CLASS, parent);
1239 return obj; 1240 return obj;
1240} 1241}
1241 1242
diff --git a/src/lib/elm_actionslider.c b/src/lib/elm_actionslider.c
index 7e609e6c9..47a7167bf 100644
--- a/src/lib/elm_actionslider.c
+++ b/src/lib/elm_actionslider.c
@@ -531,7 +531,8 @@ EAPI Evas_Object *
531elm_actionslider_add(Evas_Object *parent) 531elm_actionslider_add(Evas_Object *parent)
532{ 532{
533 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 533 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
534 Evas_Object *obj = eo_add(MY_CLASS, parent); 534 Evas_Object *obj = NULL;
535 eo_add(&obj, MY_CLASS, parent);
535 return obj; 536 return obj;
536} 537}
537 538
diff --git a/src/lib/elm_app_client.c b/src/lib/elm_app_client.c
index ba6513d6d..c1f007ed0 100644
--- a/src/lib/elm_app_client.c
+++ b/src/lib/elm_app_client.c
@@ -37,7 +37,7 @@ _sub_path_process(Elm_App_Client *eo, Eldbus_Message_Iter *obj_iter, Elm_App_Cli
37 if (view) 37 if (view)
38 continue; 38 continue;
39 39
40 view = eo_add(ELM_APP_CLIENT_VIEW_CLASS, eo, elm_app_client_view_path_set(eoid, obj_path)); 40 eo_add(&view, ELM_APP_CLIENT_VIEW_CLASS, eo, elm_app_client_view_path_set(view, obj_path));
41 eina_hash_add(data->views, obj_path, view); 41 eina_hash_add(data->views, obj_path, view);
42 if (!loading_list) 42 if (!loading_list)
43 eo_event_callback_call(eo, ELM_APP_CLIENT_EVENT_VIEW_CREATED, view); 43 eo_event_callback_call(eo, ELM_APP_CLIENT_EVENT_VIEW_CREATED, view);
@@ -211,7 +211,7 @@ _create_view_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
211 view = eina_hash_find(cdata->views, view_path); 211 view = eina_hash_find(cdata->views, view_path);
212 if (!view) 212 if (!view)
213 { 213 {
214 view = eo_add(ELM_APP_CLIENT_VIEW_CLASS, eo, elm_app_client_view_path_set(eoid, view_path)); 214 eo_add(&view, ELM_APP_CLIENT_VIEW_CLASS, eo, elm_app_client_view_path_set(view, view_path));
215 eina_hash_add(cdata->views, view_path, view); 215 eina_hash_add(cdata->views, view_path, view);
216 eo_event_callback_call(eo, ELM_APP_CLIENT_EVENT_VIEW_CREATED, view); 216 eo_event_callback_call(eo, ELM_APP_CLIENT_EVENT_VIEW_CREATED, view);
217 } 217 }
diff --git a/src/lib/elm_app_server.c b/src/lib/elm_app_server.c
index a7483f938..0802b6506 100644
--- a/src/lib/elm_app_server.c
+++ b/src/lib/elm_app_server.c
@@ -255,7 +255,7 @@ _elm_app_server_constructor(Eo *obj, Elm_App_Server_Data *data, const char *pkg,
255 new_events = elm_app_server_view_props_new_events_get(view_eet_props); 255 new_events = elm_app_server_view_props_new_events_get(view_eet_props);
256 progress = elm_app_server_view_props_progress_get(view_eet_props); 256 progress = elm_app_server_view_props_progress_get(view_eet_props);
257 257
258 view = eo_add(ELM_APP_SERVER_VIEW_CLASS, obj, elm_app_server_view_id_set(eoid, view_id)); 258 eo_add(&view, ELM_APP_SERVER_VIEW_CLASS, obj, elm_app_server_view_id_set(view, view_id));
259 if (!view) 259 if (!view)
260 continue; 260 continue;
261 261
diff --git a/src/lib/elm_atspi_bridge.c b/src/lib/elm_atspi_bridge.c
index 3709b9c26..e56b98d86 100644
--- a/src/lib/elm_atspi_bridge.c
+++ b/src/lib/elm_atspi_bridge.c
@@ -4443,7 +4443,7 @@ _elm_atspi_bridge_init(void)
4443{ 4443{
4444 if (!_init_count) 4444 if (!_init_count)
4445 { 4445 {
4446 _instance = eo_add(ELM_ATSPI_BRIDGE_CLASS, NULL); 4446 eo_add(&_instance, ELM_ATSPI_BRIDGE_CLASS, NULL);
4447 _init_count = 1; 4447 _init_count = 1;
4448 } 4448 }
4449} 4449}
diff --git a/src/lib/elm_bg.c b/src/lib/elm_bg.c
index 1c709b26b..fc503c8f8 100644
--- a/src/lib/elm_bg.c
+++ b/src/lib/elm_bg.c
@@ -113,7 +113,8 @@ EAPI Evas_Object *
113elm_bg_add(Evas_Object *parent) 113elm_bg_add(Evas_Object *parent)
114{ 114{
115 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 115 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
116 Evas_Object *obj = eo_add(MY_CLASS, parent); 116 Evas_Object *obj = NULL;
117 eo_add(&obj, MY_CLASS, parent);
117 return obj; 118 return obj;
118} 119}
119 120
diff --git a/src/lib/elm_box.c b/src/lib/elm_box.c
index f3fbd6fe7..133132a83 100644
--- a/src/lib/elm_box.c
+++ b/src/lib/elm_box.c
@@ -436,7 +436,8 @@ EAPI Evas_Object *
436elm_box_add(Evas_Object *parent) 436elm_box_add(Evas_Object *parent)
437{ 437{
438 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 438 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
439 Evas_Object *obj = eo_add(MY_CLASS, parent); 439 Evas_Object *obj = NULL;
440 eo_add(&obj, MY_CLASS, parent);
440 return obj; 441 return obj;
441} 442}
442 443
diff --git a/src/lib/elm_bubble.c b/src/lib/elm_bubble.c
index ba83049c4..5c3a6445b 100644
--- a/src/lib/elm_bubble.c
+++ b/src/lib/elm_bubble.c
@@ -219,7 +219,8 @@ EAPI Evas_Object *
219elm_bubble_add(Evas_Object *parent) 219elm_bubble_add(Evas_Object *parent)
220{ 220{
221 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 221 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
222 Evas_Object *obj = eo_add(MY_CLASS, parent); 222 Evas_Object *obj = NULL;
223 eo_add(&obj, MY_CLASS, parent);
223 return obj; 224 return obj;
224} 225}
225 226
diff --git a/src/lib/elm_button.c b/src/lib/elm_button.c
index 9de31b744..5fc7e754e 100644
--- a/src/lib/elm_button.c
+++ b/src/lib/elm_button.c
@@ -324,7 +324,8 @@ EAPI Evas_Object *
324elm_button_add(Evas_Object *parent) 324elm_button_add(Evas_Object *parent)
325{ 325{
326 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 326 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
327 Evas_Object *obj = eo_add(MY_CLASS, parent); 327 Evas_Object *obj = NULL;
328 eo_add(&obj, MY_CLASS, parent);
328 return obj; 329 return obj;
329} 330}
330 331
diff --git a/src/lib/elm_calendar.c b/src/lib/elm_calendar.c
index af20e6f5c..bd5e11924 100644
--- a/src/lib/elm_calendar.c
+++ b/src/lib/elm_calendar.c
@@ -1583,7 +1583,8 @@ EAPI Evas_Object *
1583elm_calendar_add(Evas_Object *parent) 1583elm_calendar_add(Evas_Object *parent)
1584{ 1584{
1585 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1585 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1586 Evas_Object *obj = eo_add(MY_CLASS, parent); 1586 Evas_Object *obj = NULL;
1587 eo_add(&obj, MY_CLASS, parent);
1587 return obj; 1588 return obj;
1588} 1589}
1589 1590
diff --git a/src/lib/elm_check.c b/src/lib/elm_check.c
index 024e3dacb..a28be74b5 100644
--- a/src/lib/elm_check.c
+++ b/src/lib/elm_check.c
@@ -371,7 +371,8 @@ EAPI Evas_Object *
371elm_check_add(Evas_Object *parent) 371elm_check_add(Evas_Object *parent)
372{ 372{
373 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 373 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
374 Evas_Object *obj = eo_add(MY_CLASS, parent); 374 Evas_Object *obj = NULL;
375 eo_add(&obj, MY_CLASS, parent);
375 return obj; 376 return obj;
376} 377}
377 378
diff --git a/src/lib/elm_clock.c b/src/lib/elm_clock.c
index a5f8a0b9e..e832cd9f6 100644
--- a/src/lib/elm_clock.c
+++ b/src/lib/elm_clock.c
@@ -790,7 +790,8 @@ EAPI Evas_Object *
790elm_clock_add(Evas_Object *parent) 790elm_clock_add(Evas_Object *parent)
791{ 791{
792 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 792 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
793 Evas_Object *obj = eo_add(MY_CLASS, parent); 793 Evas_Object *obj = NULL;
794 eo_add(&obj, MY_CLASS, parent);
794 return obj; 795 return obj;
795} 796}
796 797
diff --git a/src/lib/elm_colorselector.c b/src/lib/elm_colorselector.c
index ca2ae727e..1fbabad84 100644
--- a/src/lib/elm_colorselector.c
+++ b/src/lib/elm_colorselector.c
@@ -1781,7 +1781,7 @@ _palette_colors_load(Evas_Object *obj)
1781 1781
1782 EINA_LIST_FOREACH(color_list, elist, color) 1782 EINA_LIST_FOREACH(color_list, elist, color)
1783 { 1783 {
1784 eo_item = eo_add(ELM_COLOR_ITEM_CLASS, obj); 1784 eo_add(&eo_item, ELM_COLOR_ITEM_CLASS, obj);
1785 if (!eo_item) return; 1785 if (!eo_item) return;
1786 1786
1787 ELM_COLOR_ITEM_DATA_GET(eo_item, item); 1787 ELM_COLOR_ITEM_DATA_GET(eo_item, item);
@@ -2217,7 +2217,8 @@ EAPI Evas_Object *
2217elm_colorselector_add(Evas_Object *parent) 2217elm_colorselector_add(Evas_Object *parent)
2218{ 2218{
2219 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 2219 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
2220 Evas_Object *obj = eo_add(MY_CLASS, parent); 2220 Evas_Object *obj = NULL;
2221 eo_add(&obj, MY_CLASS, parent);
2221 return obj; 2222 return obj;
2222} 2223}
2223 2224
@@ -2396,7 +2397,7 @@ _elm_colorselector_palette_color_add(Eo *obj, Elm_Colorselector_Data *sd, int r,
2396 _items_del(sd); 2397 _items_del(sd);
2397 sd->config_load = EINA_FALSE; 2398 sd->config_load = EINA_FALSE;
2398 } 2399 }
2399 eo_item = eo_add(ELM_COLOR_ITEM_CLASS, obj); 2400 eo_add(&eo_item, ELM_COLOR_ITEM_CLASS, obj);
2400 if (!eo_item) return NULL; 2401 if (!eo_item) return NULL;
2401 2402
2402 ELM_COLOR_ITEM_DATA_GET(eo_item, item); 2403 ELM_COLOR_ITEM_DATA_GET(eo_item, item);
diff --git a/src/lib/elm_conform.c b/src/lib/elm_conform.c
index 7021c5cce..35b335e70 100644
--- a/src/lib/elm_conform.c
+++ b/src/lib/elm_conform.c
@@ -982,7 +982,8 @@ EAPI Evas_Object *
982elm_conformant_add(Evas_Object *parent) 982elm_conformant_add(Evas_Object *parent)
983{ 983{
984 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 984 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
985 Evas_Object *obj = eo_add(MY_CLASS, parent); 985 Evas_Object *obj = NULL;
986 eo_add(&obj, MY_CLASS, parent);
986 return obj; 987 return obj;
987} 988}
988 989
diff --git a/src/lib/elm_datetime.c b/src/lib/elm_datetime.c
index 88fe79dd2..26edc0c79 100644
--- a/src/lib/elm_datetime.c
+++ b/src/lib/elm_datetime.c
@@ -884,7 +884,8 @@ EAPI Evas_Object *
884elm_datetime_add(Evas_Object *parent) 884elm_datetime_add(Evas_Object *parent)
885{ 885{
886 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 886 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
887 Evas_Object *obj = eo_add(MY_CLASS, parent); 887 Evas_Object *obj = NULL;
888 eo_add(&obj, MY_CLASS, parent);
888 return obj; 889 return obj;
889} 890}
890 891
diff --git a/src/lib/elm_dayselector.c b/src/lib/elm_dayselector.c
index 3f1b20910..999f33380 100644
--- a/src/lib/elm_dayselector.c
+++ b/src/lib/elm_dayselector.c
@@ -249,7 +249,8 @@ _elm_dayselector_elm_container_content_set(Eo *obj, Elm_Dayselector_Data *sd, co
249 } 249 }
250 else 250 else
251 { 251 {
252 Eo *eo_it = eo_add(ELM_DAYSELECTOR_ITEM_CLASS, obj); 252 Eo *eo_it = NULL;
253 eo_add(&eo_it, ELM_DAYSELECTOR_ITEM_CLASS, obj);
253 it = eo_data_scope_get(eo_it, ELM_DAYSELECTOR_ITEM_CLASS); 254 it = eo_data_scope_get(eo_it, ELM_DAYSELECTOR_ITEM_CLASS);
254 it->day = day; 255 it->day = day;
255 256
@@ -452,7 +453,8 @@ EAPI Evas_Object *
452elm_dayselector_add(Evas_Object *parent) 453elm_dayselector_add(Evas_Object *parent)
453{ 454{
454 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 455 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
455 Evas_Object *obj = eo_add(MY_CLASS, parent); 456 Evas_Object *obj = NULL;
457 eo_add(&obj, MY_CLASS, parent);
456 return obj; 458 return obj;
457} 459}
458 460
diff --git a/src/lib/elm_diskselector.c b/src/lib/elm_diskselector.c
index 249a26e8a..8ce06724a 100644
--- a/src/lib/elm_diskselector.c
+++ b/src/lib/elm_diskselector.c
@@ -665,7 +665,8 @@ _item_new(Evas_Object *obj,
665 Evas_Smart_Cb func, 665 Evas_Smart_Cb func,
666 const void *data) 666 const void *data)
667{ 667{
668 Eo *eo_it = eo_add(ELM_DISKSELECTOR_ITEM_CLASS, obj); 668 Eo *eo_it = NULL;
669 eo_add(&eo_it, ELM_DISKSELECTOR_ITEM_CLASS, obj);
669 if (!eo_it) return NULL; 670 if (!eo_it) return NULL;
670 ELM_DISKSELECTOR_ITEM_DATA_GET(eo_it, it); 671 ELM_DISKSELECTOR_ITEM_DATA_GET(eo_it, it);
671 672
@@ -1455,7 +1456,8 @@ EAPI Evas_Object *
1455elm_diskselector_add(Evas_Object *parent) 1456elm_diskselector_add(Evas_Object *parent)
1456{ 1457{
1457 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1458 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1458 Evas_Object *obj = eo_add(MY_CLASS, parent); 1459 Evas_Object *obj = NULL;
1460 eo_add(&obj, MY_CLASS, parent);
1459 return obj; 1461 return obj;
1460} 1462}
1461 1463
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 75042abb6..9e6613f2b 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -3872,7 +3872,8 @@ EAPI Evas_Object *
3872elm_entry_add(Evas_Object *parent) 3872elm_entry_add(Evas_Object *parent)
3873{ 3873{
3874 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 3874 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
3875 Evas_Object *obj = eo_add(MY_CLASS, parent); 3875 Evas_Object *obj = NULL;
3876 eo_add(&obj, MY_CLASS, parent);
3876 return obj; 3877 return obj;
3877} 3878}
3878 3879
diff --git a/src/lib/elm_flip.c b/src/lib/elm_flip.c
index 89456902b..cb3ac3de0 100644
--- a/src/lib/elm_flip.c
+++ b/src/lib/elm_flip.c
@@ -1856,7 +1856,8 @@ EAPI Evas_Object *
1856elm_flip_add(Evas_Object *parent) 1856elm_flip_add(Evas_Object *parent)
1857{ 1857{
1858 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1858 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1859 Evas_Object *obj = eo_add(MY_CLASS, parent); 1859 Evas_Object *obj = NULL;
1860 eo_add(&obj, MY_CLASS, parent);
1860 return obj; 1861 return obj;
1861} 1862}
1862 1863
diff --git a/src/lib/elm_flipselector.c b/src/lib/elm_flipselector.c
index 2e789e7ba..58fabe8a1 100644
--- a/src/lib/elm_flipselector.c
+++ b/src/lib/elm_flipselector.c
@@ -313,7 +313,7 @@ _item_new(Evas_Object *obj,
313 313
314 ELM_FLIPSELECTOR_DATA_GET(obj, sd); 314 ELM_FLIPSELECTOR_DATA_GET(obj, sd);
315 315
316 eo_item = eo_add(ELM_FLIPSELECTOR_ITEM_CLASS, obj); 316 eo_add(&eo_item, ELM_FLIPSELECTOR_ITEM_CLASS, obj);
317 if (!eo_item) return NULL; 317 if (!eo_item) return NULL;
318 318
319 ELM_FLIPSELECTOR_ITEM_DATA_GET(eo_item, it); 319 ELM_FLIPSELECTOR_ITEM_DATA_GET(eo_item, it);
@@ -562,7 +562,8 @@ EAPI Evas_Object *
562elm_flipselector_add(Evas_Object *parent) 562elm_flipselector_add(Evas_Object *parent)
563{ 563{
564 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 564 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
565 Evas_Object *obj = eo_add(MY_CLASS, parent); 565 Evas_Object *obj = NULL;
566 eo_add(&obj, MY_CLASS, parent);
566 return obj; 567 return obj;
567} 568}
568 569
diff --git a/src/lib/elm_frame.c b/src/lib/elm_frame.c
index 8b7226386..dbe70810f 100644
--- a/src/lib/elm_frame.c
+++ b/src/lib/elm_frame.c
@@ -195,7 +195,8 @@ EAPI Evas_Object *
195elm_frame_add(Evas_Object *parent) 195elm_frame_add(Evas_Object *parent)
196{ 196{
197 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 197 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
198 Evas_Object *obj = eo_add(MY_CLASS, parent); 198 Evas_Object *obj = NULL;
199 eo_add(&obj, MY_CLASS, parent);
199 return obj; 200 return obj;
200} 201}
201 202
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 93d26449c..7bef1af80 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -4164,7 +4164,8 @@ _elm_gengrid_item_new(Elm_Gengrid_Data *sd,
4164{ 4164{
4165 if (!itc) return NULL; 4165 if (!itc) return NULL;
4166 4166
4167 Eo *eo_it = eo_add(ELM_GENGRID_ITEM_CLASS, sd->obj); 4167 Eo *eo_it = NULL;
4168 eo_add(&eo_it, ELM_GENGRID_ITEM_CLASS, sd->obj);
4168 if (!eo_it) return NULL; 4169 if (!eo_it) return NULL;
4169 ELM_GENGRID_ITEM_DATA_GET(eo_it, it); 4170 ELM_GENGRID_ITEM_DATA_GET(eo_it, it);
4170 4171
@@ -4254,7 +4255,7 @@ _elm_gengrid_evas_object_smart_add(Eo *obj, Elm_Gengrid_Data *priv)
4254 priv->highlight = EINA_TRUE; 4255 priv->highlight = EINA_TRUE;
4255 priv->item_cache_max = CACHE_MAX; 4256 priv->item_cache_max = CACHE_MAX;
4256 4257
4257 priv->pan_obj = eo_add(MY_PAN_CLASS, evas_object_evas_get(obj)); 4258 eo_add(&priv->pan_obj, MY_PAN_CLASS, evas_object_evas_get(obj));
4258 pan_data = eo_data_scope_get(priv->pan_obj, MY_PAN_CLASS); 4259 pan_data = eo_data_scope_get(priv->pan_obj, MY_PAN_CLASS);
4259 eo_data_ref(obj, NULL); 4260 eo_data_ref(obj, NULL);
4260 pan_data->wobj = obj; 4261 pan_data->wobj = obj;
@@ -4331,7 +4332,8 @@ EAPI Evas_Object *
4331elm_gengrid_add(Evas_Object *parent) 4332elm_gengrid_add(Evas_Object *parent)
4332{ 4333{
4333 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 4334 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
4334 Evas_Object *obj = eo_add(MY_CLASS, parent); 4335 Evas_Object *obj = NULL;
4336 eo_add(&obj, MY_CLASS, parent);
4335 return obj; 4337 return obj;
4336} 4338}
4337 4339
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 328b0af4e..9bb7c7952 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -5569,7 +5569,7 @@ _elm_genlist_evas_object_smart_add(Eo *obj, Elm_Genlist_Data *priv)
5569 priv->longpress_timeout = _elm_config->longpress_timeout; 5569 priv->longpress_timeout = _elm_config->longpress_timeout;
5570 priv->highlight = EINA_TRUE; 5570 priv->highlight = EINA_TRUE;
5571 5571
5572 priv->pan_obj = eo_add(MY_PAN_CLASS, evas_object_evas_get(obj)); 5572 eo_add(&priv->pan_obj, MY_PAN_CLASS, evas_object_evas_get(obj));
5573 pan_data = eo_data_scope_get(priv->pan_obj, MY_PAN_CLASS); 5573 pan_data = eo_data_scope_get(priv->pan_obj, MY_PAN_CLASS);
5574 eo_data_ref(obj, NULL); 5574 eo_data_ref(obj, NULL);
5575 pan_data->wobj = obj; 5575 pan_data->wobj = obj;
@@ -5688,7 +5688,8 @@ EAPI Evas_Object *
5688elm_genlist_add(Evas_Object *parent) 5688elm_genlist_add(Evas_Object *parent)
5689{ 5689{
5690 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 5690 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
5691 Evas_Object *obj = eo_add(MY_CLASS, parent); 5691 Evas_Object *obj = NULL;
5692 eo_add(&obj, MY_CLASS, parent);
5692 return obj; 5693 return obj;
5693} 5694}
5694 5695
@@ -6032,7 +6033,8 @@ _elm_genlist_item_new(Elm_Genlist_Data *sd,
6032 6033
6033 if (!itc) return NULL; 6034 if (!itc) return NULL;
6034 6035
6035 Eo *eo_it = eo_add(ELM_GENLIST_ITEM_CLASS, sd->obj); 6036 Eo *eo_it = NULL;
6037 eo_add(&eo_it, ELM_GENLIST_ITEM_CLASS, sd->obj);
6036 if (!eo_it) return NULL; 6038 if (!eo_it) return NULL;
6037 ELM_GENLIST_ITEM_DATA_GET(eo_it, it); 6039 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
6038 6040
diff --git a/src/lib/elm_gesture_layer.c b/src/lib/elm_gesture_layer.c
index 27d60b72c..82c0eef1c 100644
--- a/src/lib/elm_gesture_layer.c
+++ b/src/lib/elm_gesture_layer.c
@@ -3817,7 +3817,8 @@ EAPI Evas_Object *
3817elm_gesture_layer_add(Evas_Object *parent) 3817elm_gesture_layer_add(Evas_Object *parent)
3818{ 3818{
3819 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 3819 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
3820 Evas_Object *obj = eo_add(MY_CLASS, parent); 3820 Evas_Object *obj = NULL;
3821 eo_add(&obj, MY_CLASS, parent);
3821 return obj; 3822 return obj;
3822} 3823}
3823 3824
diff --git a/src/lib/elm_glview.c b/src/lib/elm_glview.c
index 43d08d534..3aefbfd3a 100644
--- a/src/lib/elm_glview.c
+++ b/src/lib/elm_glview.c
@@ -296,7 +296,8 @@ EAPI Evas_Object *
296elm_glview_add(Evas_Object *parent) 296elm_glview_add(Evas_Object *parent)
297{ 297{
298 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 298 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
299 Evas_Object *obj = eo_add(MY_CLASS, parent, elm_obj_glview_version_constructor(eoid, EVAS_GL_GLES_2_X)); 299 Evas_Object *obj = NULL;
300 eo_add(&obj, MY_CLASS, parent, elm_obj_glview_version_constructor(obj, EVAS_GL_GLES_2_X));
300 return obj; 301 return obj;
301} 302}
302 303
@@ -304,7 +305,8 @@ EAPI Evas_Object *
304elm_glview_version_add(Evas_Object *parent, Evas_GL_Context_Version version) 305elm_glview_version_add(Evas_Object *parent, Evas_GL_Context_Version version)
305{ 306{
306 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 307 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
307 Evas_Object *obj = eo_add(MY_CLASS, parent, elm_obj_glview_version_constructor(eoid, version)); 308 Evas_Object *obj = NULL;
309 eo_add(&obj, MY_CLASS, parent, elm_obj_glview_version_constructor(obj, version));
308 return obj; 310 return obj;
309} 311}
310 312
diff --git a/src/lib/elm_grid.c b/src/lib/elm_grid.c
index 957823c7b..a5b12d0b1 100644
--- a/src/lib/elm_grid.c
+++ b/src/lib/elm_grid.c
@@ -161,7 +161,8 @@ EAPI Evas_Object *
161elm_grid_add(Evas_Object *parent) 161elm_grid_add(Evas_Object *parent)
162{ 162{
163 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 163 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
164 Evas_Object *obj = eo_add(MY_CLASS, parent); 164 Evas_Object *obj = NULL;
165 eo_add(&obj, MY_CLASS, parent);
165 return obj; 166 return obj;
166} 167}
167 168
diff --git a/src/lib/elm_hover.c b/src/lib/elm_hover.c
index 22b7e3d52..01da06295 100644
--- a/src/lib/elm_hover.c
+++ b/src/lib/elm_hover.c
@@ -670,7 +670,8 @@ EAPI Evas_Object *
670elm_hover_add(Evas_Object *parent) 670elm_hover_add(Evas_Object *parent)
671{ 671{
672 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 672 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
673 Evas_Object *obj = eo_add(MY_CLASS, parent); 673 Evas_Object *obj = NULL;
674 eo_add(&obj, MY_CLASS, parent);
674 return obj; 675 return obj;
675} 676}
676 677
diff --git a/src/lib/elm_icon.c b/src/lib/elm_icon.c
index e2ec1614c..99d9c36c8 100644
--- a/src/lib/elm_icon.c
+++ b/src/lib/elm_icon.c
@@ -659,7 +659,8 @@ EAPI Evas_Object *
659elm_icon_add(Evas_Object *parent) 659elm_icon_add(Evas_Object *parent)
660{ 660{
661 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 661 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
662 Evas_Object *obj = eo_add(MY_CLASS, parent); 662 Evas_Object *obj = NULL;
663 eo_add(&obj, MY_CLASS, parent);
663 return obj; 664 return obj;
664} 665}
665 666
diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index 92aacaa05..045fb8ee4 100644
--- a/src/lib/elm_image.c
+++ b/src/lib/elm_image.c
@@ -940,7 +940,8 @@ EAPI Evas_Object *
940elm_image_add(Evas_Object *parent) 940elm_image_add(Evas_Object *parent)
941{ 941{
942 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 942 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
943 Evas_Object *obj = eo_add(MY_CLASS, parent); 943 Evas_Object *obj = NULL;
944 eo_add(&obj, MY_CLASS, parent);
944 return obj; 945 return obj;
945} 946}
946 947
diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c
index c6cf6b3ad..808f90fd3 100644
--- a/src/lib/elm_index.c
+++ b/src/lib/elm_index.c
@@ -546,7 +546,7 @@ _item_new(Evas_Object *obj,
546 546
547 ELM_INDEX_DATA_GET(obj, sd); 547 ELM_INDEX_DATA_GET(obj, sd);
548 548
549 eo_item = eo_add(ELM_INDEX_ITEM_CLASS, obj); 549 eo_add(&eo_item, ELM_INDEX_ITEM_CLASS, obj);
550 if (!eo_item) return NULL; 550 if (!eo_item) return NULL;
551 551
552 ELM_INDEX_ITEM_DATA_GET(eo_item, it); 552 ELM_INDEX_ITEM_DATA_GET(eo_item, it);
@@ -1221,7 +1221,8 @@ EAPI Evas_Object *
1221elm_index_add(Evas_Object *parent) 1221elm_index_add(Evas_Object *parent)
1222{ 1222{
1223 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1223 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1224 Evas_Object *obj = eo_add(MY_CLASS, parent); 1224 Evas_Object *obj = NULL;
1225 eo_add(&obj, MY_CLASS, parent);
1225 return obj; 1226 return obj;
1226} 1227}
1227 1228
diff --git a/src/lib/elm_interface_atspi_accessible.c b/src/lib/elm_interface_atspi_accessible.c
index 1e9d1a225..1fec0a3b6 100644
--- a/src/lib/elm_interface_atspi_accessible.c
+++ b/src/lib/elm_interface_atspi_accessible.c
@@ -573,7 +573,7 @@ EOLIAN Eo*
573_elm_interface_atspi_accessible_root_get(Eo *class EINA_UNUSED, void *pd EINA_UNUSED) 573_elm_interface_atspi_accessible_root_get(Eo *class EINA_UNUSED, void *pd EINA_UNUSED)
574{ 574{
575 if (!root) 575 if (!root)
576 root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 576 eo_add(&root, ELM_ATSPI_APP_OBJECT_CLASS, NULL);
577 577
578 return root; 578 return root;
579} 579}
diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c
index 75445a714..3b49929b2 100644
--- a/src/lib/elm_interface_scrollable.c
+++ b/src/lib/elm_interface_scrollable.c
@@ -226,7 +226,8 @@ _elm_pan_gravity_get(Eo *obj EINA_UNUSED, Elm_Pan_Smart_Data *psd, double *x, do
226static Evas_Object * 226static Evas_Object *
227_elm_pan_add(Evas *evas) 227_elm_pan_add(Evas *evas)
228{ 228{
229 Evas_Object *obj = eo_add(MY_PAN_CLASS, evas); 229 Evas_Object *obj = NULL;
230 eo_add(&obj, MY_PAN_CLASS, evas);
230 return obj; 231 return obj;
231} 232}
232 233
diff --git a/src/lib/elm_inwin.c b/src/lib/elm_inwin.c
index 1c673b779..e505bfe21 100644
--- a/src/lib/elm_inwin.c
+++ b/src/lib/elm_inwin.c
@@ -96,7 +96,8 @@ EAPI Evas_Object *
96elm_win_inwin_add(Evas_Object *parent) 96elm_win_inwin_add(Evas_Object *parent)
97{ 97{
98 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 98 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
99 Evas_Object *obj = eo_add(MY_CLASS, parent); 99 Evas_Object *obj = NULL;
100 eo_add(&obj, MY_CLASS, parent);
100 return obj; 101 return obj;
101} 102}
102 103
diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c
index 6887a5f8e..1f2ff6356 100644
--- a/src/lib/elm_label.c
+++ b/src/lib/elm_label.c
@@ -404,7 +404,8 @@ EAPI Evas_Object *
404elm_label_add(Evas_Object *parent) 404elm_label_add(Evas_Object *parent)
405{ 405{
406 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 406 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
407 Evas_Object *obj = eo_add(MY_CLASS, parent); 407 Evas_Object *obj = NULL;
408 eo_add(&obj, MY_CLASS, parent);
408 return obj; 409 return obj;
409} 410}
410 411
diff --git a/src/lib/elm_layout.c b/src/lib/elm_layout.c
index 8058b832e..389f95adf 100644
--- a/src/lib/elm_layout.c
+++ b/src/lib/elm_layout.c
@@ -1771,7 +1771,8 @@ EAPI Evas_Object *
1771elm_layout_add(Evas_Object *parent) 1771elm_layout_add(Evas_Object *parent)
1772{ 1772{
1773 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1773 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1774 Evas_Object *obj = eo_add(MY_CLASS, parent); 1774 Evas_Object *obj = NULL;
1775 eo_add(&obj, MY_CLASS, parent);
1775 return obj; 1776 return obj;
1776} 1777}
1777 1778
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index 14164dcf5..225f89256 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -2284,7 +2284,8 @@ _item_new(Evas_Object *obj,
2284 Evas_Smart_Cb func, 2284 Evas_Smart_Cb func,
2285 const void *data) 2285 const void *data)
2286{ 2286{
2287 Eo *eo_it = eo_add(ELM_LIST_ITEM_CLASS, obj); 2287 Eo *eo_it = NULL;
2288 eo_add(&eo_it, ELM_LIST_ITEM_CLASS, obj);
2288 if (!eo_it) return NULL; 2289 if (!eo_it) return NULL;
2289 ELM_LIST_ITEM_DATA_GET(eo_it, it); 2290 ELM_LIST_ITEM_DATA_GET(eo_it, it);
2290 2291
@@ -2541,7 +2542,8 @@ EAPI Evas_Object *
2541elm_list_add(Evas_Object *parent) 2542elm_list_add(Evas_Object *parent)
2542{ 2543{
2543 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 2544 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
2544 Evas_Object *obj = eo_add(MY_CLASS, parent); 2545 Evas_Object *obj = NULL;
2546 eo_add(&obj, MY_CLASS, parent);
2545 return obj; 2547 return obj;
2546} 2548}
2547 2549
diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index 3dc1111f7..d6d94ba2b 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -4062,7 +4062,7 @@ _elm_map_evas_object_smart_add(Eo *obj, Elm_Map_Data *priv)
4062 elm_interface_scrollable_animate_stop_cb_set(obj, _scroll_animate_stop_cb); 4062 elm_interface_scrollable_animate_stop_cb_set(obj, _scroll_animate_stop_cb);
4063 elm_interface_scrollable_scroll_cb_set(obj, _scroll_cb); 4063 elm_interface_scrollable_scroll_cb_set(obj, _scroll_cb);
4064 4064
4065 priv->pan_obj = eo_add(MY_PAN_CLASS, evas_object_evas_get(obj)); 4065 eo_add(&priv->pan_obj, MY_PAN_CLASS, evas_object_evas_get(obj));
4066 pan_data = eo_data_scope_get(priv->pan_obj, MY_PAN_CLASS); 4066 pan_data = eo_data_scope_get(priv->pan_obj, MY_PAN_CLASS);
4067 eo_data_ref(obj, NULL); 4067 eo_data_ref(obj, NULL);
4068 pan_data->wobj = obj; 4068 pan_data->wobj = obj;
@@ -4213,7 +4213,8 @@ EAPI Evas_Object *
4213elm_map_add(Evas_Object *parent) 4213elm_map_add(Evas_Object *parent)
4214{ 4214{
4215 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 4215 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
4216 Evas_Object *obj = eo_add(MY_CLASS, parent); 4216 Evas_Object *obj = NULL;
4217 eo_add(&obj, MY_CLASS, parent);
4217 return obj; 4218 return obj;
4218} 4219}
4219 4220
diff --git a/src/lib/elm_mapbuf.c b/src/lib/elm_mapbuf.c
index b06dd3f2d..2bd01dab4 100644
--- a/src/lib/elm_mapbuf.c
+++ b/src/lib/elm_mapbuf.c
@@ -286,7 +286,8 @@ EAPI Evas_Object *
286elm_mapbuf_add(Evas_Object *parent) 286elm_mapbuf_add(Evas_Object *parent)
287{ 287{
288 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 288 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
289 Evas_Object *obj = eo_add(MY_CLASS, parent); 289 Evas_Object *obj = NULL;
290 eo_add(&obj, MY_CLASS, parent);
290 return obj; 291 return obj;
291} 292}
292 293
diff --git a/src/lib/elm_menu.c b/src/lib/elm_menu.c
index ee31bcc2d..f8d3e4c66 100644
--- a/src/lib/elm_menu.c
+++ b/src/lib/elm_menu.c
@@ -781,7 +781,8 @@ EAPI Evas_Object *
781elm_menu_add(Evas_Object *parent) 781elm_menu_add(Evas_Object *parent)
782{ 782{
783 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 783 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
784 Evas_Object *obj = eo_add(MY_CLASS, parent); 784 Evas_Object *obj = NULL;
785 eo_add(&obj, MY_CLASS, parent);
785 return obj; 786 return obj;
786} 787}
787 788
@@ -1020,7 +1021,7 @@ _elm_menu_item_add(Eo *obj, Elm_Menu_Data *sd, Elm_Object_Item *parent, const ch
1020 elm_interface_atspi_accessible_type_set(icon_obj, ELM_ATSPI_TYPE_DISABLED); 1021 elm_interface_atspi_accessible_type_set(icon_obj, ELM_ATSPI_TYPE_DISABLED);
1021 if (!icon_obj) return NULL; 1022 if (!icon_obj) return NULL;
1022 1023
1023 eo_item = eo_add(ELM_MENU_ITEM_CLASS, obj); 1024 eo_add(&eo_item, ELM_MENU_ITEM_CLASS, obj);
1024 if (!eo_item) 1025 if (!eo_item)
1025 { 1026 {
1026 evas_object_del(icon_obj); 1027 evas_object_del(icon_obj);
@@ -1108,7 +1109,7 @@ _elm_menu_item_separator_add(Eo *obj, Elm_Menu_Data *sd, Elm_Object_Item *eo_p_i
1108 ELM_MENU_ITEM_DATA_GET(eo_subitem, subitem); 1109 ELM_MENU_ITEM_DATA_GET(eo_subitem, subitem);
1109 if (subitem->separator) return NULL; 1110 if (subitem->separator) return NULL;
1110 1111
1111 eo_subitem = eo_add(ELM_MENU_ITEM_CLASS, obj); 1112 eo_add(&eo_subitem, ELM_MENU_ITEM_CLASS, obj);
1112 if (!eo_subitem) return NULL; 1113 if (!eo_subitem) return NULL;
1113 1114
1114 subitem = eo_data_scope_get(eo_subitem, ELM_MENU_ITEM_CLASS); 1115 subitem = eo_data_scope_get(eo_subitem, ELM_MENU_ITEM_CLASS);
diff --git a/src/lib/elm_notify.c b/src/lib/elm_notify.c
index 4a2242572..59860d7c3 100644
--- a/src/lib/elm_notify.c
+++ b/src/lib/elm_notify.c
@@ -464,7 +464,8 @@ EAPI Evas_Object *
464elm_notify_add(Evas_Object *parent) 464elm_notify_add(Evas_Object *parent)
465{ 465{
466 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 466 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
467 Evas_Object *obj = eo_add(MY_CLASS, parent); 467 Evas_Object *obj = NULL;
468 eo_add(&obj, MY_CLASS, parent);
468 return obj; 469 return obj;
469} 470}
470 471
diff --git a/src/lib/elm_panel.c b/src/lib/elm_panel.c
index ba2aa5914..17fb5693f 100644
--- a/src/lib/elm_panel.c
+++ b/src/lib/elm_panel.c
@@ -1160,7 +1160,8 @@ EAPI Evas_Object *
1160elm_panel_add(Evas_Object *parent) 1160elm_panel_add(Evas_Object *parent)
1161{ 1161{
1162 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1162 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1163 Evas_Object *obj = eo_add(MY_CLASS, parent); 1163 Evas_Object *obj = NULL;
1164 eo_add(&obj, MY_CLASS, parent);
1164 1165
1165 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); 1166 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
1166 wd->highlight_root = EINA_TRUE; 1167 wd->highlight_root = EINA_TRUE;
diff --git a/src/lib/elm_panes.c b/src/lib/elm_panes.c
index 2e249e067..197a666c5 100644
--- a/src/lib/elm_panes.c
+++ b/src/lib/elm_panes.c
@@ -321,7 +321,8 @@ EAPI Evas_Object *
321elm_panes_add(Evas_Object *parent) 321elm_panes_add(Evas_Object *parent)
322{ 322{
323 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 323 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
324 Evas_Object *obj = eo_add(MY_CLASS, parent); 324 Evas_Object *obj = NULL;
325 eo_add(&obj, MY_CLASS, parent);
325 return obj; 326 return obj;
326} 327}
327 328
diff --git a/src/lib/elm_photo.c b/src/lib/elm_photo.c
index ada159057..e1bb05cc7 100644
--- a/src/lib/elm_photo.c
+++ b/src/lib/elm_photo.c
@@ -296,7 +296,8 @@ EAPI Evas_Object *
296elm_photo_add(Evas_Object *parent) 296elm_photo_add(Evas_Object *parent)
297{ 297{
298 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 298 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
299 Evas_Object *obj = eo_add(MY_CLASS, parent); 299 Evas_Object *obj = NULL;
300 eo_add(&obj, MY_CLASS, parent);
300 return obj; 301 return obj;
301} 302}
302 303
diff --git a/src/lib/elm_photocam.c b/src/lib/elm_photocam.c
index 00bab4d6f..6671ff35e 100644
--- a/src/lib/elm_photocam.c
+++ b/src/lib/elm_photocam.c
@@ -1414,7 +1414,7 @@ _elm_photocam_evas_object_smart_add(Eo *obj, Elm_Photocam_Data *priv)
1414 1414
1415 elm_interface_scrollable_bounce_allow_set(obj, bounce, bounce); 1415 elm_interface_scrollable_bounce_allow_set(obj, bounce, bounce);
1416 1416
1417 priv->pan_obj = eo_add(MY_PAN_CLASS, evas_object_evas_get(obj)); 1417 eo_add(&priv->pan_obj, MY_PAN_CLASS, evas_object_evas_get(obj));
1418 pan_data = eo_data_scope_get(priv->pan_obj, MY_PAN_CLASS); 1418 pan_data = eo_data_scope_get(priv->pan_obj, MY_PAN_CLASS);
1419 eo_data_ref(obj, NULL); 1419 eo_data_ref(obj, NULL);
1420 pan_data->wobj = obj; 1420 pan_data->wobj = obj;
@@ -1506,7 +1506,8 @@ EAPI Evas_Object *
1506elm_photocam_add(Evas_Object *parent) 1506elm_photocam_add(Evas_Object *parent)
1507{ 1507{
1508 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1508 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1509 Evas_Object *obj = eo_add(MY_CLASS, parent); 1509 Evas_Object *obj = NULL;
1510 eo_add(&obj, MY_CLASS, parent);
1510 return obj; 1511 return obj;
1511} 1512}
1512 1513
diff --git a/src/lib/elm_plug.c b/src/lib/elm_plug.c
index a567d6350..ca435bb8e 100644
--- a/src/lib/elm_plug.c
+++ b/src/lib/elm_plug.c
@@ -136,7 +136,8 @@ EAPI Evas_Object *
136elm_plug_add(Evas_Object *parent) 136elm_plug_add(Evas_Object *parent)
137{ 137{
138 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 138 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
139 Evas_Object *obj = eo_add(MY_CLASS, parent); 139 Evas_Object *obj = NULL;
140 eo_add(&obj, MY_CLASS, parent);
140 return obj; 141 return obj;
141} 142}
142 143
diff --git a/src/lib/elm_prefs.c b/src/lib/elm_prefs.c
index 87e12e073..7f50f37cd 100644
--- a/src/lib/elm_prefs.c
+++ b/src/lib/elm_prefs.c
@@ -508,7 +508,8 @@ elm_prefs_add(Evas_Object *parent)
508 return NULL; 508 return NULL;
509 } 509 }
510 510
511 Evas_Object *obj = eo_add(MY_CLASS, parent); 511 Evas_Object *obj = NULL;
512 eo_add(&obj, MY_CLASS, parent);
512 return obj; 513 return obj;
513} 514}
514 515
diff --git a/src/lib/elm_progressbar.c b/src/lib/elm_progressbar.c
index a001fac1e..7860f262e 100644
--- a/src/lib/elm_progressbar.c
+++ b/src/lib/elm_progressbar.c
@@ -324,7 +324,8 @@ EAPI Evas_Object *
324elm_progressbar_add(Evas_Object *parent) 324elm_progressbar_add(Evas_Object *parent)
325{ 325{
326 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 326 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
327 Evas_Object *obj = eo_add(MY_CLASS, parent); 327 Evas_Object *obj = NULL;
328 eo_add(&obj, MY_CLASS, parent);
328 return obj; 329 return obj;
329} 330}
330 331
diff --git a/src/lib/elm_radio.c b/src/lib/elm_radio.c
index 39576cf33..923f1b9ef 100644
--- a/src/lib/elm_radio.c
+++ b/src/lib/elm_radio.c
@@ -267,7 +267,8 @@ EAPI Evas_Object *
267elm_radio_add(Evas_Object *parent) 267elm_radio_add(Evas_Object *parent)
268{ 268{
269 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 269 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
270 Evas_Object *obj = eo_add(MY_CLASS, parent); 270 Evas_Object *obj = NULL;
271 eo_add(&obj, MY_CLASS, parent);
271 return obj; 272 return obj;
272} 273}
273 274
diff --git a/src/lib/elm_route.c b/src/lib/elm_route.c
index d5117beb7..e9989b72e 100644
--- a/src/lib/elm_route.c
+++ b/src/lib/elm_route.c
@@ -178,7 +178,8 @@ EAPI Evas_Object *
178elm_route_add(Evas_Object *parent) 178elm_route_add(Evas_Object *parent)
179{ 179{
180 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 180 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
181 Evas_Object *obj = eo_add(MY_CLASS, parent); 181 Evas_Object *obj = NULL;
182 eo_add(&obj, MY_CLASS, parent);
182 return obj; 183 return obj;
183} 184}
184 185
diff --git a/src/lib/elm_scroller.c b/src/lib/elm_scroller.c
index 91fa2972c..545d34711 100644
--- a/src/lib/elm_scroller.c
+++ b/src/lib/elm_scroller.c
@@ -945,7 +945,8 @@ EAPI Evas_Object *
945elm_scroller_add(Evas_Object *parent) 945elm_scroller_add(Evas_Object *parent)
946{ 946{
947 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 947 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
948 Evas_Object *obj = eo_add(MY_CLASS, parent); 948 Evas_Object *obj = NULL;
949 eo_add(&obj, MY_CLASS, parent);
949 return obj; 950 return obj;
950} 951}
951 952
diff --git a/src/lib/elm_segment_control.c b/src/lib/elm_segment_control.c
index d77b93227..3dcc40a0a 100644
--- a/src/lib/elm_segment_control.c
+++ b/src/lib/elm_segment_control.c
@@ -557,7 +557,7 @@ _item_new(Evas_Object *obj,
557{ 557{
558 Eo *eo_item; 558 Eo *eo_item;
559 559
560 eo_item = eo_add(ELM_SEGMENT_CONTROL_ITEM_CLASS, obj); 560 eo_add(&eo_item, ELM_SEGMENT_CONTROL_ITEM_CLASS, obj);
561 if (!eo_item) return NULL; 561 if (!eo_item) return NULL;
562 562
563 ELM_SEGMENT_ITEM_DATA_GET(eo_item, it); 563 ELM_SEGMENT_ITEM_DATA_GET(eo_item, it);
@@ -697,7 +697,8 @@ EAPI Evas_Object *
697elm_segment_control_add(Evas_Object *parent) 697elm_segment_control_add(Evas_Object *parent)
698{ 698{
699 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 699 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
700 Evas_Object *obj = eo_add(MY_CLASS, parent); 700 Evas_Object *obj = NULL;
701 eo_add(&obj, MY_CLASS, parent);
701 return obj; 702 return obj;
702} 703}
703 704
diff --git a/src/lib/elm_separator.c b/src/lib/elm_separator.c
index 2e940d978..e8b04c661 100644
--- a/src/lib/elm_separator.c
+++ b/src/lib/elm_separator.c
@@ -62,7 +62,8 @@ EAPI Evas_Object *
62elm_separator_add(Evas_Object *parent) 62elm_separator_add(Evas_Object *parent)
63{ 63{
64 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 64 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
65 Evas_Object *obj = eo_add(MY_CLASS, parent); 65 Evas_Object *obj = NULL;
66 eo_add(&obj, MY_CLASS, parent);
66 return obj; 67 return obj;
67} 68}
68 69
diff --git a/src/lib/elm_slider.c b/src/lib/elm_slider.c
index 37ea643e6..fd9d78cdc 100644
--- a/src/lib/elm_slider.c
+++ b/src/lib/elm_slider.c
@@ -952,7 +952,8 @@ EAPI Evas_Object *
952elm_slider_add(Evas_Object *parent) 952elm_slider_add(Evas_Object *parent)
953{ 953{
954 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 954 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
955 Evas_Object *obj = eo_add(MY_CLASS, parent); 955 Evas_Object *obj = NULL;
956 eo_add(&obj, MY_CLASS, parent);
956 return obj; 957 return obj;
957} 958}
958 959
diff --git a/src/lib/elm_slideshow.c b/src/lib/elm_slideshow.c
index c3d5879ab..2154b7c82 100644
--- a/src/lib/elm_slideshow.c
+++ b/src/lib/elm_slideshow.c
@@ -381,7 +381,8 @@ EAPI Evas_Object *
381elm_slideshow_add(Evas_Object *parent) 381elm_slideshow_add(Evas_Object *parent)
382{ 382{
383 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 383 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
384 Evas_Object *obj = eo_add(MY_CLASS, parent); 384 Evas_Object *obj = NULL;
385 eo_add(&obj, MY_CLASS, parent);
385 return obj; 386 return obj;
386} 387}
387 388
@@ -410,7 +411,7 @@ _elm_slideshow_item_add(Eo *obj, Elm_Slideshow_Data *sd, const Elm_Slideshow_Ite
410{ 411{
411 Eo *eo_item; 412 Eo *eo_item;
412 413
413 eo_item = eo_add(ELM_SLIDESHOW_ITEM_CLASS, obj); 414 eo_add(&eo_item, ELM_SLIDESHOW_ITEM_CLASS, obj);
414 if (!eo_item) return NULL; 415 if (!eo_item) return NULL;
415 416
416 ELM_SLIDESHOW_ITEM_DATA_GET(eo_item, item); 417 ELM_SLIDESHOW_ITEM_DATA_GET(eo_item, item);
@@ -431,7 +432,7 @@ _elm_slideshow_item_sorted_insert(Eo *obj, Elm_Slideshow_Data *sd, const Elm_Sli
431{ 432{
432 Eo *eo_item; 433 Eo *eo_item;
433 434
434 eo_item = eo_add(ELM_SLIDESHOW_ITEM_CLASS, obj); 435 eo_add(&eo_item, ELM_SLIDESHOW_ITEM_CLASS, obj);
435 if (!eo_item) return NULL; 436 if (!eo_item) return NULL;
436 437
437 ELM_SLIDESHOW_ITEM_DATA_GET(eo_item, item); 438 ELM_SLIDESHOW_ITEM_DATA_GET(eo_item, item);
diff --git a/src/lib/elm_spinner.c b/src/lib/elm_spinner.c
index b621476eb..de25b9d83 100644
--- a/src/lib/elm_spinner.c
+++ b/src/lib/elm_spinner.c
@@ -1403,7 +1403,8 @@ EAPI Evas_Object *
1403elm_spinner_add(Evas_Object *parent) 1403elm_spinner_add(Evas_Object *parent)
1404{ 1404{
1405 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 1405 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
1406 Evas_Object *obj = eo_add(MY_CLASS, parent); 1406 Evas_Object *obj = NULL;
1407 eo_add(&obj, MY_CLASS, parent);
1407 return obj; 1408 return obj;
1408} 1409}
1409 1410
diff --git a/src/lib/elm_sys_notify.c b/src/lib/elm_sys_notify.c
index c58659a1a..5d9f369cd 100644
--- a/src/lib/elm_sys_notify.c
+++ b/src/lib/elm_sys_notify.c
@@ -169,7 +169,7 @@ _elm_sys_notify_servers_set(Eo *obj EINA_UNUSED,
169 return EINA_FALSE; 169 return EINA_FALSE;
170 } 170 }
171 171
172 sd->servers[i] = eo_add(class_get(), NULL); 172 eo_add(&sd->servers[i], class_get(), NULL);
173 if (EINA_UNLIKELY(!(sd->servers[i]))) 173 if (EINA_UNLIKELY(!(sd->servers[i])))
174 { 174 {
175 CRI("Failed to create notification server"); 175 CRI("Failed to create notification server");
@@ -201,7 +201,7 @@ _elm_sys_notify_singleton_get(Eo *obj EINA_UNUSED,
201 void *sd EINA_UNUSED) 201 void *sd EINA_UNUSED)
202{ 202{
203 if (!_singleton) 203 if (!_singleton)
204 _singleton = eo_add(MY_CLASS, NULL); 204 eo_add(&_singleton, MY_CLASS, NULL);
205 return _singleton; 205 return _singleton;
206} 206}
207 207
diff --git a/src/lib/elm_table.c b/src/lib/elm_table.c
index 93099d79e..d3ffca834 100644
--- a/src/lib/elm_table.c
+++ b/src/lib/elm_table.c
@@ -214,7 +214,8 @@ EAPI Evas_Object *
214elm_table_add(Evas_Object *parent) 214elm_table_add(Evas_Object *parent)
215{ 215{
216 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 216 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
217 Evas_Object *obj = eo_add(MY_CLASS, parent); 217 Evas_Object *obj = NULL;
218 eo_add(&obj, MY_CLASS, parent);
218 return obj; 219 return obj;
219} 220}
220 221
diff --git a/src/lib/elm_thumb.c b/src/lib/elm_thumb.c
index 6b33e43b6..5204d11d9 100644
--- a/src/lib/elm_thumb.c
+++ b/src/lib/elm_thumb.c
@@ -586,7 +586,8 @@ EAPI Evas_Object *
586elm_thumb_add(Evas_Object *parent) 586elm_thumb_add(Evas_Object *parent)
587{ 587{
588 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 588 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
589 Evas_Object *obj = eo_add(MY_CLASS, parent); 589 Evas_Object *obj = NULL;
590 eo_add(&obj, MY_CLASS, parent);
590 return obj; 591 return obj;
591} 592}
592 593
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 1611969f7..327b22781 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -2374,7 +2374,8 @@ _item_new(Evas_Object *obj,
2374 2374
2375 ELM_TOOLBAR_DATA_GET(obj, sd); 2375 ELM_TOOLBAR_DATA_GET(obj, sd);
2376 2376
2377 Eo *eo_it = eo_add(ELM_TOOLBAR_ITEM_CLASS, obj); 2377 Eo *eo_it = NULL;
2378 eo_add(&eo_it, ELM_TOOLBAR_ITEM_CLASS, obj);
2378 2379
2379 if (!eo_it) return NULL; 2380 if (!eo_it) return NULL;
2380 2381
@@ -2989,7 +2990,8 @@ EAPI Evas_Object *
2989elm_toolbar_add(Evas_Object *parent) 2990elm_toolbar_add(Evas_Object *parent)
2990{ 2991{
2991 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 2992 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
2992 Evas_Object *obj = eo_add(MY_CLASS, parent); 2993 Evas_Object *obj = NULL;
2994 eo_add(&obj, MY_CLASS, parent);
2993 return obj; 2995 return obj;
2994} 2996}
2995 2997
diff --git a/src/lib/elm_video.c b/src/lib/elm_video.c
index 65a5d6e53..f93a5dada 100644
--- a/src/lib/elm_video.c
+++ b/src/lib/elm_video.c
@@ -284,7 +284,8 @@ EAPI Evas_Object *
284elm_video_add(Evas_Object *parent) 284elm_video_add(Evas_Object *parent)
285{ 285{
286 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 286 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
287 Evas_Object *obj = eo_add(MY_CLASS, parent); 287 Evas_Object *obj = NULL;
288 eo_add(&obj, MY_CLASS, parent);
288 return obj; 289 return obj;
289} 290}
290 291
diff --git a/src/lib/elm_web2.c b/src/lib/elm_web2.c
index 64e1c7fb5..f78c47d5e 100644
--- a/src/lib/elm_web2.c
+++ b/src/lib/elm_web2.c
@@ -733,7 +733,8 @@ EAPI Evas_Object *
733elm_web_add(Evas_Object *parent) 733elm_web_add(Evas_Object *parent)
734{ 734{
735 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 735 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
736 Evas_Object *obj = eo_add(MY_CLASS, parent); 736 Evas_Object *obj = NULL;
737 eo_add(&obj, MY_CLASS, parent);
737 return obj; 738 return obj;
738} 739}
739 740
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 70f5392b1..138e11220 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -3231,14 +3231,16 @@ elm_win_add(Evas_Object *parent,
3231 const char *name, 3231 const char *name,
3232 Elm_Win_Type type) 3232 Elm_Win_Type type)
3233{ 3233{
3234 Evas_Object *obj = eo_add(MY_CLASS, parent, elm_obj_win_name_set(eoid, name), elm_obj_win_type_set(eoid, type)); 3234 Evas_Object *obj = NULL;
3235 eo_add(&obj, MY_CLASS, parent, elm_obj_win_name_set(obj, name), elm_obj_win_type_set(obj, type));
3235 return obj; 3236 return obj;
3236} 3237}
3237 3238
3238EAPI Evas_Object * 3239EAPI Evas_Object *
3239elm_win_fake_add(Ecore_Evas *ee) 3240elm_win_fake_add(Ecore_Evas *ee)
3240{ 3241{
3241 return eo_add(MY_CLASS, NULL, elm_obj_win_fake_canvas_set(eoid, ee), elm_obj_win_name_set(eoid, NULL), elm_obj_win_type_set(eoid, ELM_WIN_FAKE)); 3242 Eo *ret = NULL;
3243 return eo_add(&ret, MY_CLASS, NULL, elm_obj_win_fake_canvas_set(ret, ee), elm_obj_win_name_set(ret, NULL), elm_obj_win_type_set(ret, ELM_WIN_FAKE));
3242} 3244}
3243 3245
3244static void 3246static void
diff --git a/src/lib/elm_win_standard.c b/src/lib/elm_win_standard.c
index c54e3b052..de0da52f0 100644
--- a/src/lib/elm_win_standard.c
+++ b/src/lib/elm_win_standard.c
@@ -19,7 +19,8 @@ _elm_win_standard_eo_base_finalize(Eo *obj, void *pd EINA_UNUSED)
19 if (!obj) 19 if (!obj)
20 return NULL; 20 return NULL;
21 21
22 Evas_Object *bg = eo_add(ELM_BG_CLASS, obj); 22 Evas_Object *bg = NULL;
23 eo_add(&bg, ELM_BG_CLASS, obj);
23 if (!bg) 24 if (!bg)
24 { 25 {
25 ERR("Cannot create background."); 26 ERR("Cannot create background.");
diff --git a/src/tests/elm_test_atspi.c b/src/tests/elm_test_atspi.c
index 82c1564e3..f88b5aecf 100644
--- a/src/tests/elm_test_atspi.c
+++ b/src/tests/elm_test_atspi.c
@@ -29,7 +29,8 @@ START_TEST (elm_atspi_app_obj_name_get)
29{ 29{
30 elm_init(0, NULL); 30 elm_init(0, NULL);
31 31
32 Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 32 Eo* root = NULL;
33 eo_add(&root, ELM_ATSPI_APP_OBJECT_CLASS, NULL);
33 34
34 ck_assert(root != NULL); 35 ck_assert(root != NULL);
35 36
@@ -108,7 +109,8 @@ START_TEST (elm_atspi_role_get)
108{ 109{
109 elm_init(0, NULL); 110 elm_init(0, NULL);
110 111
111 Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 112 Eo* root = NULL;
113 eo_add(&root, ELM_ATSPI_APP_OBJECT_CLASS, NULL);
112 114
113 Elm_Atspi_Role role; 115 Elm_Atspi_Role role;
114 116
@@ -149,7 +151,8 @@ START_TEST (elm_atspi_role_name_get)
149{ 151{
150 elm_init(0, NULL); 152 elm_init(0, NULL);
151 153
152 Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 154 Eo* root = NULL;
155 eo_add(&root, ELM_ATSPI_APP_OBJECT_CLASS, NULL);
153 156
154 const char *ret = NULL; 157 const char *ret = NULL;
155 158
@@ -166,7 +169,8 @@ START_TEST (elm_atspi_localized_role_name_get)
166{ 169{
167 elm_init(0, NULL); 170 elm_init(0, NULL);
168 171
169 Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 172 Eo* root = NULL;
173 eo_add(&root, ELM_ATSPI_APP_OBJECT_CLASS, NULL);
170 174
171 const char *ret = NULL; 175 const char *ret = NULL;
172 176
@@ -183,7 +187,8 @@ START_TEST (elm_atspi_description_set)
183{ 187{
184 elm_init(0, NULL); 188 elm_init(0, NULL);
185 189
186 Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 190 Eo* root = NULL;
191 eo_add(&root, ELM_ATSPI_APP_OBJECT_CLASS, NULL);
187 192
188 const char *ret = NULL; 193 const char *ret = NULL;
189 194
@@ -229,7 +234,8 @@ START_TEST (elm_atspi_children_and_parent)
229 elm_init(0, NULL); 234 elm_init(0, NULL);
230 235
231 generate_app(); 236 generate_app();
232 Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 237 Eo* root = NULL;
238 eo_add(&root, ELM_ATSPI_APP_OBJECT_CLASS, NULL);
233 239
234 Eina_List *child_list = NULL; 240 Eina_List *child_list = NULL;
235 241
@@ -256,7 +262,8 @@ START_TEST (elm_atspi_children_and_parent2)
256 elm_init(0, NULL); 262 elm_init(0, NULL);
257 263
258 generate_app(); 264 generate_app();
259 Eo* root = eo_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 265 Eo* root = NULL;
266 eo_add(&root, ELM_ATSPI_APP_OBJECT_CLASS, NULL);
260 267
261 Eo *win = NULL; 268 Eo *win = NULL;
262 269