From 6846978ebd027fff1de57d526071517243354354 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 25 Sep 2014 10:24:27 +0100 Subject: [PATCH] Eo: Get rid of eo_add_custom. We decided to deprecate this one in favour of setting thing in the construction between the constructor and the finalizer. --- src/examples/ecore/ecore_idler_example.c | 2 +- src/examples/ecore/ecore_poller_example.c | 6 ++-- src/examples/evas/evas-3d-aabb.c | 10 +++---- src/examples/evas/evas-3d-cube-rotate.c | 8 +++--- src/examples/evas/evas-3d-cube.c | 8 +++--- src/examples/evas/evas-3d-cube2.c | 8 +++--- src/examples/evas/evas-3d-fog.c | 10 +++---- src/examples/evas/evas-3d-frustum.c | 8 +++--- src/examples/evas/evas-3d-md2.c | 8 +++--- src/examples/evas/evas-3d-moon-space.c | 12 ++++---- src/examples/evas/evas-3d-obj.c | 8 +++--- src/examples/evas/evas-3d-pick.c | 6 ++-- src/examples/evas/evas-3d-proxy.c | 8 +++--- src/examples/evas/evas-3d-shadows.c | 10 +++---- .../evas/shooter/evas-3d-shooter-header.c | 6 ++-- src/examples/evas/shooter/evas-3d-shooter.c | 28 +++++++++---------- src/lib/ecore/ecore_anim.c | 12 ++------ src/lib/ecore/ecore_animator.eo | 1 - src/lib/ecore/ecore_idle_enterer.c | 12 ++------ src/lib/ecore/ecore_idle_enterer.eo | 1 - src/lib/ecore/ecore_idle_exiter.c | 10 +------ src/lib/ecore/ecore_idle_exiter.eo | 1 - src/lib/ecore/ecore_idler.c | 10 +------ src/lib/ecore/ecore_idler.eo | 1 - src/lib/ecore/ecore_job.c | 10 +------ src/lib/ecore/ecore_job.eo | 1 - src/lib/ecore/ecore_poller.c | 10 +------ src/lib/ecore/ecore_poller.eo | 1 - src/lib/ecore/ecore_timer.c | 12 ++------ src/lib/ecore/ecore_timer.eo | 1 - src/lib/eo/Eo.h | 23 --------------- src/lib/evas/canvas/evas_3d_node.c | 11 +------- src/lib/evas/canvas/evas_3d_node.eo | 1 - src/tests/ecore/ecore_test_animator.c | 4 +-- src/tests/eo/suite/eo_test_general.c | 4 +-- src/tests/eo/suite/eo_test_threaded_calls.c | 6 ++-- 36 files changed, 90 insertions(+), 188 deletions(-) diff --git a/src/examples/ecore/ecore_idler_example.c b/src/examples/ecore/ecore_idler_example.c index 144f56ff7a..29919265a9 100644 --- a/src/examples/ecore/ecore_idler_example.c +++ b/src/examples/ecore/ecore_idler_example.c @@ -111,7 +111,7 @@ main(void) ctxt.enterer = ecore_idle_enterer_add(_enterer_cb, &ctxt); ctxt.exiter = ecore_idle_exiter_add(_exiter_cb, &ctxt); ctxt.idler = ecore_idler_add(_idler_cb, &ctxt); -// ctxt.idler = eo_add_custom(ECORE_IDLER_CLASS, NULL, ecore_idler_constructor(_idler_cb, &ctxt)); +// ctxt.idler = eo_add(ECORE_IDLER_CLASS, NULL, ecore_idler_constructor(_idler_cb, &ctxt)); ctxt.handler = ecore_event_handler_add(_event_type, _event_handler_cb, &ctxt); diff --git a/src/examples/ecore/ecore_poller_example.c b/src/examples/ecore/ecore_poller_example.c index d0e896c7f5..c3d8f69f95 100644 --- a/src/examples/ecore/ecore_poller_example.c +++ b/src/examples/ecore/ecore_poller_example.c @@ -48,11 +48,11 @@ main(void) poller2 = ecore_poller_add(ECORE_POLLER_CORE, 8, _poller_print_cb, str2); poller3 = ecore_poller_add(ECORE_POLLER_CORE, 30, _poller_quit_cb, str3); -// poller1 = eo_add_custom(ECORE_POLLER_CLASS, NULL, +// poller1 = eo_add(ECORE_POLLER_CLASS, NULL, // ecore_poller_constructor(ECORE_POLLER_CORE, 4, _poller_print_cb, str1)); -// poller2 = eo_add_custom(ECORE_POLLER_CLASS, NULL, +// poller2 = eo_add(ECORE_POLLER_CLASS, NULL, // ecore_poller_constructor(ECORE_POLLER_CORE, 8, _poller_print_cb, str2)); -// poller3 = eo_add_custom(ECORE_POLLER_CLASS, NULL, +// poller3 = eo_add(ECORE_POLLER_CLASS, NULL, // ecore_poller_constructor(ECORE_POLLER_CORE, 20, _poller_quit_cb, str3)); diff --git a/src/examples/evas/evas-3d-aabb.c b/src/examples/evas/evas-3d-aabb.c index 42e7ed4b7f..f57889de54 100644 --- a/src/examples/evas/evas-3d-aabb.c +++ b/src/examples/evas/evas-3d-aabb.c @@ -187,7 +187,7 @@ main(void) scene = eo_add(EVAS_3D_SCENE_CLASS, evas); - root_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + root_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); camera = eo_add(EVAS_3D_CAMERA_CLASS, evas); @@ -195,7 +195,7 @@ main(void) evas_3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0)); camera_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); eo_do(camera_node, evas_3d_node_camera_set(camera)); @@ -213,7 +213,7 @@ main(void) evas_3d_light_directional_set(EINA_TRUE)); light_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); eo_do(light_node, evas_3d_node_light_set(light), @@ -252,9 +252,9 @@ main(void) 1.0, 1.0, 1.0, 1.0), evas_3d_material_shininess_set(50.0)); - mesh_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + mesh_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); - mesh_box_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + mesh_box_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); material_box = eo_add(EVAS_3D_MATERIAL_CLASS, evas); diff --git a/src/examples/evas/evas-3d-cube-rotate.c b/src/examples/evas/evas-3d-cube-rotate.c index a0a680d03c..1689d7e0f3 100644 --- a/src/examples/evas/evas-3d-cube-rotate.c +++ b/src/examples/evas/evas-3d-cube-rotate.c @@ -218,7 +218,7 @@ _camera_setup(Scene_Data *data) eo_do(data->camera, evas_3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0)); - data->camera_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->camera_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); eo_do(data->camera_node, evas_3d_node_camera_set(data->camera), @@ -238,7 +238,7 @@ _light_setup(Scene_Data *data) evas_3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0), evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0)); - data->light_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->light_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); eo_do(data->light_node, @@ -284,7 +284,7 @@ _mesh_setup(Scene_Data *data) evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG), evas_3d_mesh_frame_material_set(0, data->material)); - data->mesh_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); + data->mesh_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->root_node, evas_3d_node_member_add(data->mesh_node)); eo_do(data->mesh_node, evas_3d_node_mesh_add(data->mesh)); @@ -294,7 +294,7 @@ static void _scene_setup(Scene_Data *data) { scene = eo_add(EVAS_3D_SCENE_CLASS, evas); - data->root_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->root_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); eo_do(scene, diff --git a/src/examples/evas/evas-3d-cube.c b/src/examples/evas/evas-3d-cube.c index ed99272c37..a9bc74641a 100644 --- a/src/examples/evas/evas-3d-cube.c +++ b/src/examples/evas/evas-3d-cube.c @@ -130,7 +130,7 @@ _camera_setup(Scene_Data *data) evas_3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0)); data->camera_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); eo_do(data->camera_node, evas_3d_node_camera_set(data->camera), @@ -150,7 +150,7 @@ _light_setup(Scene_Data *data) evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0)); data->light_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); eo_do(data->light_node, evas_3d_node_light_set(data->light), @@ -199,7 +199,7 @@ _mesh_setup(Scene_Data *data) evas_3d_mesh_frame_material_set(0, data->material)); data->mesh_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->root_node, evas_3d_node_member_add(data->mesh_node)); eo_do(data->mesh_node, evas_3d_node_mesh_add(data->mesh)); @@ -214,7 +214,7 @@ _scene_setup(Scene_Data *data) evas_3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0)); data->root_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); _camera_setup(data); diff --git a/src/examples/evas/evas-3d-cube2.c b/src/examples/evas/evas-3d-cube2.c index c255545950..68e30d7168 100644 --- a/src/examples/evas/evas-3d-cube2.c +++ b/src/examples/evas/evas-3d-cube2.c @@ -159,7 +159,7 @@ _camera_setup(Scene_Data *data) evas_3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0)); data->camera_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); eo_do(data->camera_node, evas_3d_node_camera_set(data->camera), @@ -180,7 +180,7 @@ _light_setup(Scene_Data *data) evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0)); data->light_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); eo_do(data->light_node, evas_3d_node_light_set(data->light), @@ -265,7 +265,7 @@ _mesh_setup(Scene_Data *data) evas_3d_mesh_frame_material_set(20, data->material1)); data->mesh_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->root_node, evas_3d_node_member_add(data->mesh_node)); eo_do(data->mesh_node, evas_3d_node_mesh_add(data->mesh)); @@ -280,7 +280,7 @@ _scene_setup(Scene_Data *data) evas_3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0)); data->root_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); _camera_setup(data); diff --git a/src/examples/evas/evas-3d-fog.c b/src/examples/evas/evas-3d-fog.c index 300b30a86d..33707431ec 100644 --- a/src/examples/evas/evas-3d-fog.c +++ b/src/examples/evas/evas-3d-fog.c @@ -102,7 +102,7 @@ _camera_setup(Scene_Data *data) evas_3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0)); data->camera_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); eo_do(data->camera_node, @@ -124,7 +124,7 @@ _light_setup(Scene_Data *data) evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0)); data->light_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); eo_do(data->light_node, evas_3d_node_light_set(data->light), @@ -223,14 +223,14 @@ _mesh_setup(Scene_Data *data) _set_ball(data->mesh1, 2, 0, 0, 0, 100, data->material); data->mesh_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->root_node, evas_3d_node_member_add(data->mesh_node)); eo_do(data->mesh_node, evas_3d_node_mesh_add(data->mesh)); data->mesh_node1 = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->root_node, evas_3d_node_member_add(data->mesh_node1)); @@ -250,7 +250,7 @@ _scene_setup(Scene_Data *data) evas_3d_scene_background_color_set(FOG_COLOR, 1)); data->root_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); _camera_setup(data); diff --git a/src/examples/evas/evas-3d-frustum.c b/src/examples/evas/evas-3d-frustum.c index d5c67ef8a6..be81addc9f 100644 --- a/src/examples/evas/evas-3d-frustum.c +++ b/src/examples/evas/evas-3d-frustum.c @@ -121,7 +121,7 @@ static void _camera_setup(Scene_Data *data) { data->camera = eo_add(EVAS_3D_CAMERA_CLASS, evas); - data->camera_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->camera_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); eo_do(data->camera_node, evas_3d_node_camera_set(data->camera), @@ -140,7 +140,7 @@ _light_setup(Scene_Data *data) evas_3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0); evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0)); - data->light_node = eo_add_custom(EVAS_3D_NODE_CLASS,evas, + data->light_node = eo_add(EVAS_3D_NODE_CLASS,evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); eo_do(data->light_node, evas_3d_node_light_set(data->light), @@ -185,13 +185,13 @@ _scene_setup(Scene_Data *data) { data->scene = eo_add(EVAS_3D_SCENE_CLASS, evas); - data->root_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->root_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); _camera_setup(data); _light_setup(data); _mesh_setup_model(data); - data->mesh_node_model = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_model = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->mesh_node_model, evas_3d_node_position_set(0, 0, 0); diff --git a/src/examples/evas/evas-3d-md2.c b/src/examples/evas/evas-3d-md2.c index 8a49ee62d9..c8f3362a3d 100644 --- a/src/examples/evas/evas-3d-md2.c +++ b/src/examples/evas/evas-3d-md2.c @@ -77,7 +77,7 @@ main(void) scene = eo_add(EVAS_3D_SCENE_CLASS, evas); /* Add the root node for the scene. */ - root_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + root_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); /* Add the camera. */ @@ -86,7 +86,7 @@ main(void) evas_3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0)); camera_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); eo_do(camera_node, evas_3d_node_camera_set(camera)); @@ -105,7 +105,7 @@ main(void) evas_3d_light_directional_set(EINA_TRUE)); light_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); eo_do(light_node, evas_3d_node_light_set(light), @@ -145,7 +145,7 @@ main(void) 1.0, 1.0, 1.0, 1.0), evas_3d_material_shininess_set(50.0)); - mesh_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + mesh_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(root_node, evas_3d_node_member_add(mesh_node)); diff --git a/src/examples/evas/evas-3d-moon-space.c b/src/examples/evas/evas-3d-moon-space.c index 540d119ce3..fbaec2a019 100644 --- a/src/examples/evas/evas-3d-moon-space.c +++ b/src/examples/evas/evas-3d-moon-space.c @@ -383,7 +383,7 @@ _camera_setup(Scene_Data *data) eo_do(data->camera, evas_3d_camera_projection_perspective_set(30.0, 1.0, 1.0, 100.0)); - data->camera_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->camera_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); eo_do(data->camera_node, evas_3d_node_camera_set(data->camera), @@ -403,7 +403,7 @@ _light_setup(Scene_Data *data) evas_3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0), evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0)); - data->light_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->light_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); eo_do(data->light_node, evas_3d_node_light_set(data->light), @@ -428,11 +428,11 @@ _mesh_setup(Scene_Data *data) data->texture_diffuse_planet = eo_add(EVAS_3D_TEXTURE_CLASS, evas); data->texture_diffuse_moon = eo_add(EVAS_3D_TEXTURE_CLASS, evas); - data->mesh_node_planet = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_planet = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); - data->mesh_node_cube = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_cube = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); - data->mesh_node_moon = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_moon = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); /* Setup material for cube. */ @@ -561,7 +561,7 @@ _scene_setup(Scene_Data *data) data->scene = eo_add(EVAS_3D_SCENE_CLASS, evas); /* Add the root node for the scene. */ - data->root_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->root_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); eo_do(data->scene, diff --git a/src/examples/evas/evas-3d-obj.c b/src/examples/evas/evas-3d-obj.c index 5651e2d67a..cab11f9c24 100644 --- a/src/examples/evas/evas-3d-obj.c +++ b/src/examples/evas/evas-3d-obj.c @@ -91,7 +91,7 @@ main(void) scene = eo_add(EVAS_3D_SCENE_CLASS, evas); /* Add the root node for the scene. */ - root_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + root_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); /* Add the camera. */ @@ -100,7 +100,7 @@ main(void) evas_3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0)); camera_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); eo_do(camera_node, evas_3d_node_camera_set(camera)); @@ -119,7 +119,7 @@ main(void) evas_3d_light_directional_set(EINA_TRUE)); light_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); eo_do(light_node, evas_3d_node_light_set(light), @@ -161,7 +161,7 @@ main(void) eo_do(mesh, evas_3d_mesh_save(EVAS_3D_MESH_FILE_TYPE_OBJ, "saved_man", NULL)); - mesh_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + mesh_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(root_node, evas_3d_node_member_add(mesh_node)); diff --git a/src/examples/evas/evas-3d-pick.c b/src/examples/evas/evas-3d-pick.c index 143094d538..321183ab63 100644 --- a/src/examples/evas/evas-3d-pick.c +++ b/src/examples/evas/evas-3d-pick.c @@ -294,7 +294,7 @@ main(void) scene = eo_add(EVAS_3D_SCENE_CLASS, evas); /* Add the root node for the scene. */ - root_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + root_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); /* Add the camera. */ @@ -303,7 +303,7 @@ main(void) evas_3d_camera_projection_perspective_set(30.0, 1.0, 1.0, 100.0)); camera_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); eo_do(camera_node, evas_3d_node_camera_set(camera), @@ -361,7 +361,7 @@ main(void) 1.0), evas_3d_material_shininess_set(50.0)); - mesh_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + mesh_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(root_node, evas_3d_node_member_add(mesh_node)); diff --git a/src/examples/evas/evas-3d-proxy.c b/src/examples/evas/evas-3d-proxy.c index ab9e6d6eb9..06f8abb127 100644 --- a/src/examples/evas/evas-3d-proxy.c +++ b/src/examples/evas/evas-3d-proxy.c @@ -154,7 +154,7 @@ _camera_setup(Scene_Data *data) evas_3d_camera_projection_perspective_set(30.0, 1.0, 2.0, 50.0)); data->camera_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); eo_do(data->camera_node, evas_3d_node_camera_set(data->camera), @@ -175,7 +175,7 @@ _light_setup(Scene_Data *data) evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0)); data->light_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); eo_do(data->light_node, evas_3d_node_light_set(data->light), @@ -232,7 +232,7 @@ _mesh_setup(Scene_Data *data) evas_3d_mesh_frame_material_set(0, data->material)); data->mesh_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->root_node, evas_3d_node_member_add(data->mesh_node)); @@ -248,7 +248,7 @@ _scene_setup(Scene_Data *data) evas_3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0)); data->root_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); _camera_setup(data); diff --git a/src/examples/evas/evas-3d-shadows.c b/src/examples/evas/evas-3d-shadows.c index 8bb32da083..88683d56dd 100644 --- a/src/examples/evas/evas-3d-shadows.c +++ b/src/examples/evas/evas-3d-shadows.c @@ -176,7 +176,7 @@ main(void) scene = eo_add(EVAS_3D_SCENE_CLASS, evas); /* Add the root node for the scene. */ - root_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + root_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); /* Add the camera. */ @@ -185,7 +185,7 @@ main(void) evas_3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 1000.0)); camera_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); eo_do(camera_node, evas_3d_node_camera_set(camera)); @@ -204,7 +204,7 @@ main(void) evas_3d_light_projection_perspective_set(45.0, 1.0, 2.0, 1000.0)); light_node = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); eo_do(light_node, evas_3d_node_light_set(light), @@ -246,7 +246,7 @@ main(void) 1.0, 1.0, 1.0, 1.0), evas_3d_material_shininess_set(50.0)); - mesh_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + mesh_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(root_node, evas_3d_node_member_add(mesh_node)); @@ -270,7 +270,7 @@ main(void) mesh_node1 = - eo_add_custom(EVAS_3D_NODE_CLASS, evas, + eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(root_node, evas_3d_node_member_add(mesh_node1)); eo_do(mesh_node1, evas_3d_node_mesh_add(mesh1)); diff --git a/src/examples/evas/shooter/evas-3d-shooter-header.c b/src/examples/evas/shooter/evas-3d-shooter-header.c index 6ed2224cca..28cf64b690 100644 --- a/src/examples/evas/shooter/evas-3d-shooter-header.c +++ b/src/examples/evas/shooter/evas-3d-shooter-header.c @@ -124,9 +124,9 @@ _camera_setup(Scene_Data *data) eo_do(data->camera, evas_3d_camera_projection_perspective_set(65.0, 1.0, 1.0, 100.0)); - data->mediator_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mediator_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); - data->camera_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->camera_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); eo_do(data->root_node, evas_3d_node_member_add(data->mediator_node)); @@ -148,7 +148,7 @@ _light_setup(Scene_Data *data) evas_3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0), evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0)); - data->light_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->light_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); eo_do(data->light_node, evas_3d_node_light_set(data->light), diff --git a/src/examples/evas/shooter/evas-3d-shooter.c b/src/examples/evas/shooter/evas-3d-shooter.c index f7a2fd2f67..b13aa11381 100644 --- a/src/examples/evas/shooter/evas-3d-shooter.c +++ b/src/examples/evas/shooter/evas-3d-shooter.c @@ -870,7 +870,7 @@ _mesh_setup_gun_planet(Scene_Data *data) eo_do(data->mesh_eagle, evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_DIFFUSE)); - data->mesh_node_eagle = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_eagle = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->mesh_node_eagle, @@ -904,7 +904,7 @@ _mesh_setup_gun_planet(Scene_Data *data) evas_3d_mesh_index_data_set(EVAS_3D_INDEX_FORMAT_UNSIGNED_SHORT, index_count, &indices[0]), evas_3d_mesh_vertex_assembly_set(EVAS_3D_VERTEX_ASSEMBLY_TRIANGLES)); - data->mesh_node_world = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_world = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->root_node, @@ -957,7 +957,7 @@ _mesh_setup_gun_planet(Scene_Data *data) evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG), evas_3d_mesh_frame_material_set(0, data->gun)); - data->mesh_node_gun = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_gun = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->mediator_node, @@ -1000,7 +1000,7 @@ _mesh_setup_gun_planet(Scene_Data *data) evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG), evas_3d_mesh_frame_material_set(0, data->material_gun_butt)); - data->mesh_node_gun_butt = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_gun_butt = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->mediator_node, evas_3d_node_member_add(data->mesh_node_gun_butt)); @@ -1040,7 +1040,7 @@ _mesh_setup_gun_planet(Scene_Data *data) evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG), evas_3d_mesh_frame_material_set(0, data->material_gun_cage)); - data->mesh_node_gun_cage = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_gun_cage = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->mediator_node, evas_3d_node_member_add(data->mesh_node_gun_cage)); @@ -1084,7 +1084,7 @@ _mesh_setup_gun_planet(Scene_Data *data) evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG), evas_3d_mesh_frame_material_set(0, data->rocket)); - data->mesh_node_rocket = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_rocket = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->mediator_node, evas_3d_node_member_add(data->mesh_node_rocket)); @@ -1111,7 +1111,7 @@ _mesh_setup_gun_planet(Scene_Data *data) evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_DIFFUSE), evas_3d_mesh_frame_material_set(0, data->material_cube)); - data->mesh_node_cube = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_cube = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->root_node, evas_3d_node_member_add(data->mesh_node_cube)); @@ -1159,7 +1159,7 @@ _mesh_setup_grass(Scene_Data *data, int index) 6, &grass_indices[0]), evas_3d_mesh_vertex_assembly_set(EVAS_3D_VERTEX_ASSEMBLY_TRIANGLES)); - data->mesh_node_grass[index] = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_grass[index] = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->root_node, @@ -1211,7 +1211,7 @@ _mesh_setup_gun_bling(Scene_Data *data, int index) evas_3d_mesh_index_data_set(EVAS_3D_INDEX_FORMAT_UNSIGNED_SHORT, index_count, &indices[0]), evas_3d_mesh_vertex_assembly_set(EVAS_3D_VERTEX_ASSEMBLY_TRIANGLES)); - data->mesh_node_gun_bling[index] = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_gun_bling[index] = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->mediator_node, @@ -1357,7 +1357,7 @@ _mesh_setup_snake(Scene_Data *data) eo_do(data->mesh_snake, evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_DIFFUSE)); - data->mesh_node_snake = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_snake = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->mesh_node_snake, @@ -1381,7 +1381,7 @@ _scene_setup(Scene_Data *data) evas_3d_scene_size_set(WIDTH, HEIGHT), evas_3d_scene_background_color_set(0.5, 0.5, 0.5, 0.0)); - data->root_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->root_node = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); _camera_setup(data); @@ -1398,7 +1398,7 @@ _scene_setup(Scene_Data *data) _mesh_setup(data, bricks_vertices, 0); _mesh_setup(data, wall_vertices, 1); - data->mesh_node_level[0] = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_level[0] = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->root_node, @@ -1415,7 +1415,7 @@ _scene_setup(Scene_Data *data) Evas_Real bx, by, bz; for ( i = 1; i < 10; ++i) { - data->mesh_node_level[i] = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_level[i] = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->mesh_node_level[i], @@ -1433,7 +1433,7 @@ _scene_setup(Scene_Data *data) } _mesh_setup_warrior(data, 2); - data->mesh_node_level[10] = eo_add_custom(EVAS_3D_NODE_CLASS, evas, + data->mesh_node_level[10] = eo_add(EVAS_3D_NODE_CLASS, evas, evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); eo_do(data->mesh_node_level[10], evas_3d_node_position_set(17, -10, 0), diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c index e85efe6f1e..7116538b7d 100644 --- a/src/lib/ecore/ecore_anim.c +++ b/src/lib/ecore/ecore_anim.c @@ -179,7 +179,6 @@ _ecore_animator_add(Ecore_Animator *obj, } animator->obj = obj; - eo_do_super(obj, MY_CLASS, eo_constructor()); eo_manual_free_set(obj, EINA_TRUE); if (!func) @@ -197,20 +196,13 @@ _ecore_animator_add(Ecore_Animator *obj, return EINA_TRUE; } -EOLIAN static void -_ecore_animator_eo_base_constructor(Eo *obj, Ecore_Animator_Data *_pd EINA_UNUSED) -{ - eo_error_set(obj); - ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME); -} - EAPI Ecore_Animator * ecore_animator_add(Ecore_Task_Cb func, const void *data) { Ecore_Animator *animator = NULL; - animator = eo_add_custom(MY_CLASS, _ecore_parent, + animator = eo_add(MY_CLASS, _ecore_parent, ecore_animator_constructor(func, data)); eo_unref(animator); return animator; @@ -230,7 +222,7 @@ ecore_animator_timeline_add(double runtime, const void *data) { Ecore_Animator *animator; - animator = eo_add_custom(MY_CLASS, _ecore_parent, + animator = eo_add(MY_CLASS, _ecore_parent, ecore_animator_timeline_constructor(runtime, func, data)); eo_unref(animator); return animator; diff --git a/src/lib/ecore/ecore_animator.eo b/src/lib/ecore/ecore_animator.eo index 81ed666ec1..0ba14c0813 100644 --- a/src/lib/ecore/ecore_animator.eo +++ b/src/lib/ecore/ecore_animator.eo @@ -21,7 +21,6 @@ class Ecore.Animator (Eo.Base) } } implements { - Eo.Base.constructor; Eo.Base.destructor; Eo.Base.event_freeze; Eo.Base.event_thaw; diff --git a/src/lib/ecore/ecore_idle_enterer.c b/src/lib/ecore/ecore_idle_enterer.c index 5be4f7abf3..f6d5b9997d 100644 --- a/src/lib/ecore/ecore_idle_enterer.c +++ b/src/lib/ecore/ecore_idle_enterer.c @@ -44,7 +44,6 @@ _ecore_idle_enterer_add(Ecore_Idle_Enterer *obj, } ie->obj = obj; - eo_do_super(obj, MY_CLASS, eo_constructor()); eo_manual_free_set(obj, EINA_TRUE); if (!func) @@ -64,7 +63,7 @@ ecore_idle_enterer_add(Ecore_Task_Cb func, const void *data) { Ecore_Idle_Enterer *ie = NULL; - ie = eo_add_custom(MY_CLASS, _ecore_parent, ecore_idle_enterer_after_constructor(func, data)); + ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_after_constructor(func, data)); eo_unref(ie); return ie; } @@ -86,7 +85,7 @@ ecore_idle_enterer_before_add(Ecore_Task_Cb func, const void *data) { Ecore_Idle_Enterer *ie = NULL; - ie = eo_add_custom(MY_CLASS, _ecore_parent, ecore_idle_enterer_before_constructor(func, data)); + ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_before_constructor(func, data)); eo_unref(ie); return ie; } @@ -103,13 +102,6 @@ unlock: _ecore_unlock(); } -EOLIAN static void -_ecore_idle_enterer_eo_base_constructor(Eo *obj, Ecore_Idle_Enterer_Data *_pd EINA_UNUSED) -{ - eo_error_set(obj); - ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME); -} - EAPI void * ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer) { diff --git a/src/lib/ecore/ecore_idle_enterer.eo b/src/lib/ecore/ecore_idle_enterer.eo index f28ca7eba2..4a85b7747f 100644 --- a/src/lib/ecore/ecore_idle_enterer.eo +++ b/src/lib/ecore/ecore_idle_enterer.eo @@ -20,7 +20,6 @@ class Ecore.Idle.Enterer (Eo.Base) } } implements { - Eo.Base.constructor; Eo.Base.destructor; } constructors { diff --git a/src/lib/ecore/ecore_idle_exiter.c b/src/lib/ecore/ecore_idle_exiter.c index 0c53ccbbd6..51c7d357e4 100644 --- a/src/lib/ecore/ecore_idle_exiter.c +++ b/src/lib/ecore/ecore_idle_exiter.c @@ -37,7 +37,7 @@ ecore_idle_exiter_add(Ecore_Task_Cb func, const void *data) { Ecore_Idle_Exiter *ie = NULL; - ie = eo_add_custom(MY_CLASS, _ecore_parent, ecore_idle_exiter_constructor(func, data)); + ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_exiter_constructor(func, data)); eo_unref(ie); return ie; } @@ -54,7 +54,6 @@ _ecore_idle_exiter_constructor(Eo *obj, Ecore_Idle_Exiter_Data *ie, Ecore_Task_C ie->obj = obj; - eo_do_super(obj, MY_CLASS, eo_constructor()); eo_manual_free_set(obj, EINA_TRUE); if (!func) @@ -71,13 +70,6 @@ _ecore_idle_exiter_constructor(Eo *obj, Ecore_Idle_Exiter_Data *ie, Ecore_Task_C _ecore_unlock(); } -EOLIAN static void -_ecore_idle_exiter_eo_base_constructor(Eo *obj, Ecore_Idle_Exiter_Data *_pd EINA_UNUSED) -{ - eo_error_set(obj); - ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME); -} - EAPI void * ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter) { diff --git a/src/lib/ecore/ecore_idle_exiter.eo b/src/lib/ecore/ecore_idle_exiter.eo index 22602ccaef..89104a1973 100644 --- a/src/lib/ecore/ecore_idle_exiter.eo +++ b/src/lib/ecore/ecore_idle_exiter.eo @@ -12,7 +12,6 @@ class Ecore.Idle.Exiter (Eo.Base) } } implements { - Eo.Base.constructor; Eo.Base.destructor; } constructors { diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c index 15b8cdcffc..0ac1bc6e72 100644 --- a/src/lib/ecore/ecore_idler.c +++ b/src/lib/ecore/ecore_idler.c @@ -39,7 +39,7 @@ ecore_idler_add(Ecore_Task_Cb func, _ecore_lock(); - ie = eo_add_custom(MY_CLASS, _ecore_parent, ecore_idler_constructor(func, data)); + ie = eo_add(MY_CLASS, _ecore_parent, ecore_idler_constructor(func, data)); eo_unref(ie); _ecore_unlock(); @@ -56,7 +56,6 @@ _ecore_idler_constructor(Eo *obj, Ecore_Idler_Data *ie, Ecore_Task_Cb func, cons } ie->obj = obj; - eo_do_super(obj, MY_CLASS, eo_constructor()); eo_manual_free_set(obj, EINA_TRUE); if (!func) @@ -71,13 +70,6 @@ _ecore_idler_constructor(Eo *obj, Ecore_Idler_Data *ie, Ecore_Task_Cb func, cons idlers = (Ecore_Idler_Data *)eina_inlist_append(EINA_INLIST_GET(idlers), EINA_INLIST_GET(ie)); } -EOLIAN static void -_ecore_idler_eo_base_constructor(Eo *obj, Ecore_Idler_Data *_pd EINA_UNUSED) -{ - eo_error_set(obj); - ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME); -} - EAPI void * ecore_idler_del(Ecore_Idler *idler) { diff --git a/src/lib/ecore/ecore_idler.eo b/src/lib/ecore/ecore_idler.eo index db6927742e..05d28e3505 100644 --- a/src/lib/ecore/ecore_idler.eo +++ b/src/lib/ecore/ecore_idler.eo @@ -12,7 +12,6 @@ class Ecore.Idler (Eo.Base) } } implements { - Eo.Base.constructor; Eo.Base.destructor; } constructors { diff --git a/src/lib/ecore/ecore_job.c b/src/lib/ecore/ecore_job.c index 93f1d0bd98..ef2b9c0660 100644 --- a/src/lib/ecore/ecore_job.c +++ b/src/lib/ecore/ecore_job.c @@ -49,7 +49,7 @@ EAPI Ecore_Job * ecore_job_add(Ecore_Cb func, const void *data) { - Ecore_Job *job = eo_add_custom(MY_CLASS, _ecore_parent, ecore_job_constructor(func, data)); + Ecore_Job *job = eo_add(MY_CLASS, _ecore_parent, ecore_job_constructor(func, data)); eo_unref(job); return job; } @@ -62,7 +62,6 @@ _ecore_job_constructor(Eo *obj, Ecore_Job_Data *job, Ecore_Cb func, const void * eo_error_set(obj); EINA_MAIN_LOOP_CHECK_RETURN; } - eo_do_super(obj, MY_CLASS, eo_constructor()); eo_manual_free_set(obj, EINA_TRUE); if (!func) @@ -83,13 +82,6 @@ _ecore_job_constructor(Eo *obj, Ecore_Job_Data *job, Ecore_Cb func, const void * job->data = (void *)data; } -EOLIAN static void -_ecore_job_eo_base_constructor(Eo *obj, Ecore_Job_Data *_pd EINA_UNUSED) -{ - eo_error_set(obj); - ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME); -} - EAPI void * ecore_job_del(Ecore_Job *obj) { diff --git a/src/lib/ecore/ecore_job.eo b/src/lib/ecore/ecore_job.eo index 2bc9d68b5c..86e8cb87b7 100644 --- a/src/lib/ecore/ecore_job.eo +++ b/src/lib/ecore/ecore_job.eo @@ -12,7 +12,6 @@ class Ecore.Job (Eo.Base) } } implements { - Eo.Base.constructor; Eo.Base.destructor; } constructors { diff --git a/src/lib/ecore/ecore_poller.c b/src/lib/ecore/ecore_poller.c index fc544e1fd8..e7fca873db 100644 --- a/src/lib/ecore/ecore_poller.c +++ b/src/lib/ecore/ecore_poller.c @@ -230,13 +230,6 @@ ecore_poller_poll_interval_get(Ecore_Poller_Type type EINA_UNUSED) return poll_interval; } -EOLIAN static void -_ecore_poller_eo_base_constructor(Eo *obj, Ecore_Poller_Data *_pd EINA_UNUSED) -{ - eo_error_set(obj); - ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME); -} - EAPI Ecore_Poller * ecore_poller_add(Ecore_Poller_Type type EINA_UNUSED, int interval, @@ -244,7 +237,7 @@ ecore_poller_add(Ecore_Poller_Type type EINA_UNUSED, const void *data) { Ecore_Poller *poller; - poller = eo_add_custom(MY_CLASS, _ecore_parent, + poller = eo_add(MY_CLASS, _ecore_parent, ecore_poller_constructor(type, interval, func, data)); eo_unref(poller); return poller; @@ -263,7 +256,6 @@ _ecore_poller_constructor(Eo *obj, Ecore_Poller_Data *poller, Ecore_Poller_Type EINA_MAIN_LOOP_CHECK_RETURN; } - eo_do_super(obj, MY_CLASS, eo_constructor()); eo_manual_free_set(obj, EINA_TRUE); if (!func) diff --git a/src/lib/ecore/ecore_poller.eo b/src/lib/ecore/ecore_poller.eo index c08a6055fd..696ca584c5 100644 --- a/src/lib/ecore/ecore_poller.eo +++ b/src/lib/ecore/ecore_poller.eo @@ -38,7 +38,6 @@ class Ecore.Poller (Eo.Base) } } implements { - Eo.Base.constructor; Eo.Base.destructor; } constructors { diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c index ff8e8b7e34..e2cb43b686 100644 --- a/src/lib/ecore/ecore_timer.c +++ b/src/lib/ecore/ecore_timer.c @@ -97,7 +97,7 @@ ecore_timer_add(double in, Ecore_Timer *timer = NULL; EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); - timer = eo_add_custom(MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(in, func, data)); + timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(in, func, data)); eo_unref(timer); return timer; } @@ -118,7 +118,6 @@ _ecore_timer_add(Ecore_Timer *obj, } timer->obj = obj; - eo_do_super(obj, MY_CLASS, eo_constructor()); eo_manual_free_set(obj, EINA_TRUE); if (!func) @@ -160,13 +159,6 @@ _ecore_timer_loop_constructor(Eo *obj, Ecore_Timer_Data *timer, double in, Ecore _ecore_timer_add(obj, timer, now, in, func, data); } -EOLIAN static void -_ecore_timer_eo_base_constructor(Eo *obj, Ecore_Timer_Data *_pd EINA_UNUSED) -{ - eo_error_set(obj); - ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME); -} - EAPI Ecore_Timer * ecore_timer_loop_add(double in, Ecore_Task_Cb func, @@ -407,7 +399,7 @@ _ecore_timer_loop_add(double in, const void *data) { Ecore_Timer *timer = NULL; - timer = eo_add_custom(MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(in, func, data)); + timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(in, func, data)); eo_unref(timer); return timer; diff --git a/src/lib/ecore/ecore_timer.eo b/src/lib/ecore/ecore_timer.eo index 165487a4ca..f1c04039e5 100644 --- a/src/lib/ecore/ecore_timer.eo +++ b/src/lib/ecore/ecore_timer.eo @@ -68,7 +68,6 @@ class Ecore.Timer (Eo.Base) } } implements { - Eo.Base.constructor; Eo.Base.destructor; Eo.Base.event_freeze; /* XXX: can't document overriden methods diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index bf64f2a435..561665bb7b 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -625,8 +625,6 @@ EAPI void eo_error_set_internal(const Eo *obj, const char *file, int line); * @param parent the parent to set to the object. * @param ... The ops to run. * @return An handle to the new object on success, NULL otherwise. - * - * @see #eo_add_custom */ #define eo_add(klass, parent, ...) \ ({ \ @@ -640,27 +638,6 @@ EAPI void eo_error_set_internal(const Eo *obj, const char *file, int line); _tmp_obj; \ }) -/** - * @def eo_add_custom - * @brief Create a new object with a custom constructor. - * @param klass the class of the object to create. - * @param parent the parent to set to the object. - * @param ... The ops to run. With the constructor being first. - * @return An handle to the new object on success, NULL otherwise. - * - * @see #eo_add - */ -#define eo_add_custom(klass, parent, ...) \ - ({ \ - const Eo_Class *_tmp_klass = klass; \ - Eo *_tmp_obj = _eo_add_internal_start(__FILE__, __LINE__, _tmp_klass, parent); \ - eo_do(_tmp_obj, \ - __VA_ARGS__; \ - _tmp_obj = eo_finalize(); \ - ); \ - _tmp_obj; \ - }) - EAPI Eo * _eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo *parent); /** diff --git a/src/lib/evas/canvas/evas_3d_node.c b/src/lib/evas/canvas/evas_3d_node.c index 2f31d2d7f4..25c01a72b8 100644 --- a/src/lib/evas/canvas/evas_3d_node.c +++ b/src/lib/evas/canvas/evas_3d_node.c @@ -775,7 +775,7 @@ evas_3d_node_add(Evas *e, Evas_3D_Node_Type type) MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); - Evas_Object *eo_obj = eo_add_custom(MY_CLASS, e, evas_3d_node_constructor(type)); + Evas_Object *eo_obj = eo_add(MY_CLASS, e, evas_3d_node_constructor(type)); eo_unref(eo_obj); return eo_obj; } @@ -783,8 +783,6 @@ evas_3d_node_add(Evas *e, Evas_3D_Node_Type type) EOLIAN static void _evas_3d_node_constructor(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node_Type type) { - eo_do_super(obj, MY_CLASS, eo_constructor()); - eo_do(obj, evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_NODE)); evas_vec3_set(&pd->position, 0.0, 0.0, 0.0); @@ -815,13 +813,6 @@ _evas_3d_node_constructor(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node_Type type } } -EOLIAN static void -_evas_3d_node_eo_base_constructor(Eo *obj, Evas_3D_Node_Data *pd EINA_UNUSED) -{ - eo_error_set(obj); - ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME); -} - EOLIAN static void _evas_3d_node_eo_base_destructor(Eo *obj, Evas_3D_Node_Data *pd EINA_UNUSED) { diff --git a/src/lib/evas/canvas/evas_3d_node.eo b/src/lib/evas/canvas/evas_3d_node.eo index b78079b09a..60b9d9e3b1 100644 --- a/src/lib/evas/canvas/evas_3d_node.eo +++ b/src/lib/evas/canvas/evas_3d_node.eo @@ -577,7 +577,6 @@ class Evas_3D_Node (Evas_3D_Object, Evas.Common_Interface) } } implements { - Eo.Base.constructor; Eo.Base.destructor; Evas_3D_Object.update_notify; Evas_3D_Object.change_notify; diff --git a/src/tests/ecore/ecore_test_animator.c b/src/tests/ecore/ecore_test_animator.c index 852e8b58d7..ed7f4ee886 100644 --- a/src/tests/ecore/ecore_test_animator.c +++ b/src/tests/ecore/ecore_test_animator.c @@ -29,7 +29,7 @@ START_TEST(ecore_test_animators) fail_if(!ecore_init(), "ERROR: Cannot init Ecore!\n"); ecore_animator_frametime_set(interval1); - animator = eo_add_custom(ECORE_ANIMATOR_CLASS, NULL, ecore_animator_timeline_constructor(1, _anim_cb, &interval1)); + animator = eo_add(ECORE_ANIMATOR_CLASS, NULL, ecore_animator_timeline_constructor(1, _anim_cb, &interval1)); fail_if(!animator); @@ -37,7 +37,7 @@ START_TEST(ecore_test_animators) ecore_animator_frametime_set(interval2); prev = 0; - animator = eo_add_custom(ECORE_ANIMATOR_CLASS, NULL, ecore_animator_timeline_constructor(1, _anim_cb, &interval2)); + animator = eo_add(ECORE_ANIMATOR_CLASS, NULL, ecore_animator_timeline_constructor(1, _anim_cb, &interval2)); fail_if(!animator); ecore_main_loop_begin(); diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c index 9830d6fd17..114d2443a4 100644 --- a/src/tests/eo/suite/eo_test_general.c +++ b/src/tests/eo/suite/eo_test_general.c @@ -772,7 +772,7 @@ START_TEST(eo_add_do_and_custom) Eo *obj = NULL; eo_init(); - obj = eo_add_custom(SIMPLE_CLASS, NULL, eo_constructor()); + obj = eo_add(SIMPLE_CLASS, NULL, eo_constructor()); fail_if(!obj); eo_unref(obj); @@ -782,7 +782,7 @@ START_TEST(eo_add_do_and_custom) fail_if(pd->a != 7); eo_unref(obj); - obj = eo_add_custom(SIMPLE_CLASS, NULL, eo_constructor(), simple_a_set(7)); + obj = eo_add(SIMPLE_CLASS, NULL, eo_constructor(), simple_a_set(7)); fail_if(!obj); pd = eo_data_scope_get(obj, SIMPLE_CLASS); fail_if(pd->a != 7); diff --git a/src/tests/eo/suite/eo_test_threaded_calls.c b/src/tests/eo/suite/eo_test_threaded_calls.c index ee7b70f526..e6f60e3738 100644 --- a/src/tests/eo/suite/eo_test_threaded_calls.c +++ b/src/tests/eo/suite/eo_test_threaded_calls.c @@ -49,12 +49,10 @@ _try_swap_stack(Eo *obj EINA_UNUSED, void *class_data) } static void -_constructor(Eo *obj, void *class_data EINA_UNUSED, int v) +_constructor(Eo *obj EINA_UNUSED, void *class_data EINA_UNUSED, int v) { Thread_Test_Public_Data *pd = class_data; - eo_do_super(obj, THREAD_TEST_CLASS, eo_constructor()); - pd->v = v; } @@ -87,7 +85,7 @@ _thread_job(void *data, Eina_Thread t EINA_UNUSED) if (v == 1) eina_spinlock_take(&locks[0]); - obj = eo_add_custom(THREAD_TEST_CLASS, NULL, thread_test_constructor(v)); + obj = eo_add(THREAD_TEST_CLASS, NULL, thread_test_constructor(v)); eo_do(obj, thread_test_try_swap_stack(), v = thread_test_v_get());