summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-09-25 10:31:35 +0100
committerTom Hacohen <tom@stosb.com>2014-09-25 10:46:04 +0100
commit86e6b8bc5ba8e7939a18e14fe9e37d80d2699fe8 (patch)
tree2ea9191dc77e07ba5d2a06396d3fd829ce2d0887
parent56aa60364aea6824d216182e77315a6765a5de54 (diff)
Eo: Get rid of eo_add_custom.
This has been deprecated for a while and is now completely dropped.
-rw-r--r--src/bin/test_application_server.c4
-rw-r--r--src/bin/test_task_switcher.c2
-rw-r--r--src/examples/evas3d_map_example.c10
-rw-r--r--src/examples/evas3d_object_on_button_example.c8
-rw-r--r--src/examples/evas3d_scene_on_button_example.c8
-rw-r--r--src/lib/elm_app_client.c13
-rw-r--r--src/lib/elm_app_client.eo1
-rw-r--r--src/lib/elm_app_server.c11
-rw-r--r--src/lib/elm_app_server.eo1
-rw-r--r--src/lib/elm_win.c7
10 files changed, 22 insertions, 43 deletions
diff --git a/src/bin/test_application_server.c b/src/bin/test_application_server.c
index 05bffda29..126a2853e 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_custom(ELM_APP_SERVER_VIEW_CLASS, app_server, 103 view = eo_add(ELM_APP_SERVER_VIEW_CLASS, app_server,
104 elm_app_server_view_constructor(NULL)); 104 elm_app_server_view_constructor(NULL));
105 105
106 eo_do(view, id = elm_app_server_view_id_get()); 106 eo_do(view, id = elm_app_server_view_id_get());
@@ -142,7 +142,7 @@ test_application_server_common(const char *pkg)
142 Elm_App_Server_View *view; 142 Elm_App_Server_View *view;
143 Elm_App_Server *server; 143 Elm_App_Server *server;
144 144
145 server = eo_add_custom(ELM_APP_SERVER_CLASS, NULL, 145 server = eo_add(ELM_APP_SERVER_CLASS, NULL,
146 elm_app_server_constructor(pkg, _create_view_cb)); 146 elm_app_server_constructor(pkg, _create_view_cb));
147 eo_do(server, elm_app_server_title_set(pkg), 147 eo_do(server, elm_app_server_title_set(pkg),
148 views_iter = elm_app_server_views_get(), 148 views_iter = elm_app_server_views_get(),
diff --git a/src/bin/test_task_switcher.c b/src/bin/test_task_switcher.c
index e6858c84b..93bbe5562 100644
--- a/src/bin/test_task_switcher.c
+++ b/src/bin/test_task_switcher.c
@@ -304,7 +304,7 @@ _app_open(const char *package)
304 return; 304 return;
305 } 305 }
306 306
307 app = eo_add_custom(ELM_APP_CLIENT_CLASS, NULL, 307 app = eo_add(ELM_APP_CLIENT_CLASS, NULL,
308 elm_app_client_constructor(package)); 308 elm_app_client_constructor(package));
309 eo_do(app, 309 eo_do(app,
310 eo_event_callback_add(ELM_APP_CLIENT_EVENT_VIEW_LIST_LOADED, 310 eo_event_callback_add(ELM_APP_CLIENT_EVENT_VIEW_LIST_LOADED,
diff --git a/src/examples/evas3d_map_example.c b/src/examples/evas3d_map_example.c
index eab1afb05..22361879a 100644
--- a/src/examples/evas3d_map_example.c
+++ b/src/examples/evas3d_map_example.c
@@ -901,7 +901,7 @@ skybox_setup(void)
901 evas_3d_material_color_set(EVAS_3D_MATERIAL_SPECULAR, 0.1, 0.1, 0.1, 1.0), 901 evas_3d_material_color_set(EVAS_3D_MATERIAL_SPECULAR, 0.1, 0.1, 0.1, 1.0),
902 evas_3d_material_shininess_set(50.0)); 902 evas_3d_material_shininess_set(50.0));
903 903
904 skybox_mesh_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, 904 skybox_mesh_node = eo_add(EVAS_3D_NODE_CLASS, evas,
905 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); 905 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH));
906 eo_do(root_node, evas_3d_node_member_add(skybox_mesh_node)); 906 eo_do(root_node, evas_3d_node_member_add(skybox_mesh_node));
907 eo_do(skybox_mesh_node, evas_3d_node_mesh_add(skybox_mesh)); 907 eo_do(skybox_mesh_node, evas_3d_node_mesh_add(skybox_mesh));
@@ -961,7 +961,7 @@ camera_setup(void)
961 camera_right_vec.y = 0.0; 961 camera_right_vec.y = 0.0;
962 camera_right_vec.z = 0.0; 962 camera_right_vec.z = 0.0;
963 963
964 camera_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, 964 camera_node = eo_add(EVAS_3D_NODE_CLASS, evas,
965 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); 965 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA));
966 eo_do(camera_node, 966 eo_do(camera_node,
967 evas_3d_node_camera_set(camera), 967 evas_3d_node_camera_set(camera),
@@ -980,7 +980,7 @@ light_setup(void)
980 evas_3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0), 980 evas_3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
981 evas_3d_light_specular_set(0.2, 0.2, 0.2, 1.0)); 981 evas_3d_light_specular_set(0.2, 0.2, 0.2, 1.0));
982 982
983 light_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, 983 light_node = eo_add(EVAS_3D_NODE_CLASS, evas,
984 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); 984 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT));
985 eo_do(light_node, 985 eo_do(light_node,
986 evas_3d_node_light_set(light), 986 evas_3d_node_light_set(light),
@@ -1042,7 +1042,7 @@ mesh_setup(void)
1042 evas_3d_material_color_set(EVAS_3D_MATERIAL_SPECULAR, 0.1, 0.1, 0.1, 1.0), 1042 evas_3d_material_color_set(EVAS_3D_MATERIAL_SPECULAR, 0.1, 0.1, 0.1, 1.0),
1043 evas_3d_material_shininess_set(50.0)); 1043 evas_3d_material_shininess_set(50.0));
1044 1044
1045 mesh_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, 1045 mesh_node = eo_add(EVAS_3D_NODE_CLASS, evas,
1046 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); 1046 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH));
1047 eo_do(root_node, evas_3d_node_member_add(mesh_node)); 1047 eo_do(root_node, evas_3d_node_member_add(mesh_node));
1048 eo_do(mesh_node, evas_3d_node_mesh_add(mesh)); 1048 eo_do(mesh_node, evas_3d_node_mesh_add(mesh));
@@ -1215,7 +1215,7 @@ elm_main(int argc, char **argv)
1215 scene = eo_add(EVAS_3D_SCENE_CLASS, evas); 1215 scene = eo_add(EVAS_3D_SCENE_CLASS, evas);
1216 1216
1217 /* Add a root node for the scene. */ 1217 /* Add a root node for the scene. */
1218 root_node = eo_add_custom(EVAS_3D_NODE_CLASS, evas, 1218 root_node = eo_add(EVAS_3D_NODE_CLASS, evas,
1219 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); 1219 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE));
1220 1220
1221 skybox_setup(); 1221 skybox_setup();
diff --git a/src/examples/evas3d_object_on_button_example.c b/src/examples/evas3d_object_on_button_example.c
index 14bd97d17..0f97f8a20 100644
--- a/src/examples/evas3d_object_on_button_example.c
+++ b/src/examples/evas3d_object_on_button_example.c
@@ -163,7 +163,7 @@ _camera_setup(Scene_Data *data)
163 evas_3d_camera_projection_perspective_set(20.0, 1.0, 2.0, 50.0)); 163 evas_3d_camera_projection_perspective_set(20.0, 1.0, 2.0, 50.0));
164 164
165 data->camera_node = 165 data->camera_node =
166 eo_add_custom(EVAS_3D_NODE_CLASS, evas, 166 eo_add(EVAS_3D_NODE_CLASS, evas,
167 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); 167 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA));
168 eo_do(data->camera_node, 168 eo_do(data->camera_node,
169 evas_3d_node_camera_set(data->camera), 169 evas_3d_node_camera_set(data->camera),
@@ -183,7 +183,7 @@ _light_setup(Scene_Data *data)
183 evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0)); 183 evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
184 184
185 data->light_node = 185 data->light_node =
186 eo_add_custom(EVAS_3D_NODE_CLASS, evas, 186 eo_add(EVAS_3D_NODE_CLASS, evas,
187 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); 187 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT));
188 eo_do(data->light_node, 188 eo_do(data->light_node,
189 evas_3d_node_light_set(data->light), 189 evas_3d_node_light_set(data->light),
@@ -239,7 +239,7 @@ _mesh_setup(Scene_Data *data)
239 evas_3d_mesh_frame_material_set(0, data->material)); 239 evas_3d_mesh_frame_material_set(0, data->material));
240 240
241 data->mesh_node = 241 data->mesh_node =
242 eo_add_custom(EVAS_3D_NODE_CLASS, evas, 242 eo_add(EVAS_3D_NODE_CLASS, evas,
243 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); 243 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH));
244 eo_do(data->root_node, evas_3d_node_member_add(data->mesh_node)); 244 eo_do(data->root_node, evas_3d_node_member_add(data->mesh_node));
245 eo_do(data->mesh_node, evas_3d_node_mesh_add(data->mesh)); 245 eo_do(data->mesh_node, evas_3d_node_mesh_add(data->mesh));
@@ -254,7 +254,7 @@ _scene_setup(Scene_Data *data)
254 evas_3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0)); 254 evas_3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
255 255
256 data->root_node = 256 data->root_node =
257 eo_add_custom(EVAS_3D_NODE_CLASS, evas, 257 eo_add(EVAS_3D_NODE_CLASS, evas,
258 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); 258 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE));
259 259
260 _camera_setup(data); 260 _camera_setup(data);
diff --git a/src/examples/evas3d_scene_on_button_example.c b/src/examples/evas3d_scene_on_button_example.c
index 19990e785..9662cc57a 100644
--- a/src/examples/evas3d_scene_on_button_example.c
+++ b/src/examples/evas3d_scene_on_button_example.c
@@ -127,7 +127,7 @@ _camera_setup(Scene_Data *data)
127 evas_3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0)); 127 evas_3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
128 128
129 data->camera_node = 129 data->camera_node =
130 eo_add_custom(EVAS_3D_NODE_CLASS, evas, 130 eo_add(EVAS_3D_NODE_CLASS, evas,
131 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); 131 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA));
132 eo_do(data->camera_node, 132 eo_do(data->camera_node,
133 evas_3d_node_camera_set(data->camera), 133 evas_3d_node_camera_set(data->camera),
@@ -147,7 +147,7 @@ _light_setup(Scene_Data *data)
147 evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0)); 147 evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
148 148
149 data->light_node = 149 data->light_node =
150 eo_add_custom(EVAS_3D_NODE_CLASS, evas, 150 eo_add(EVAS_3D_NODE_CLASS, evas,
151 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); 151 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT));
152 eo_do(data->light_node, 152 eo_do(data->light_node,
153 evas_3d_node_light_set(data->light), 153 evas_3d_node_light_set(data->light),
@@ -201,7 +201,7 @@ _mesh_setup(Scene_Data *data)
201 evas_3d_mesh_frame_material_set(0, data->material)); 201 evas_3d_mesh_frame_material_set(0, data->material));
202 202
203 data->mesh_node = 203 data->mesh_node =
204 eo_add_custom(EVAS_3D_NODE_CLASS, evas, 204 eo_add(EVAS_3D_NODE_CLASS, evas,
205 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); 205 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH));
206 eo_do(data->root_node, evas_3d_node_member_add(data->mesh_node)); 206 eo_do(data->root_node, evas_3d_node_member_add(data->mesh_node));
207 eo_do(data->mesh_node, evas_3d_node_mesh_add(data->mesh)); 207 eo_do(data->mesh_node, evas_3d_node_mesh_add(data->mesh));
@@ -216,7 +216,7 @@ _scene_setup(Scene_Data *data)
216 evas_3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0)); 216 evas_3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
217 217
218 data->root_node = 218 data->root_node =
219 eo_add_custom(EVAS_3D_NODE_CLASS, evas, 219 eo_add(EVAS_3D_NODE_CLASS, evas,
220 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); 220 evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE));
221 221
222 _camera_setup(data); 222 _camera_setup(data);
diff --git a/src/lib/elm_app_client.c b/src/lib/elm_app_client.c
index d4085d19a..c5bb56047 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_custom(ELM_APP_CLIENT_VIEW_CLASS, eo, 40 view = eo_add(ELM_APP_CLIENT_VIEW_CLASS, eo,
41 elm_app_client_view_constructor(obj_path)); 41 elm_app_client_view_constructor(obj_path));
42 eina_hash_add(data->views, obj_path, view); 42 eina_hash_add(data->views, obj_path, view);
43 if (!loading_list) 43 if (!loading_list)
@@ -162,8 +162,6 @@ _elm_app_client_constructor(Eo *eo, Elm_App_Client_Data *data, const char *pkg)
162 162
163 EINA_SAFETY_ON_NULL_GOTO(pkg, error); 163 EINA_SAFETY_ON_NULL_GOTO(pkg, error);
164 164
165 eo_do_super(eo, MY_CLASS, eo_constructor());
166
167 data->views = eina_hash_string_small_new(NULL); 165 data->views = eina_hash_string_small_new(NULL);
168 166
169 path = _dbus_package_to_path(pkg); 167 path = _dbus_package_to_path(pkg);
@@ -221,7 +219,7 @@ _create_view_cb(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending)
221 view = eina_hash_find(cdata->views, view_path); 219 view = eina_hash_find(cdata->views, view_path);
222 if (!view) 220 if (!view)
223 { 221 {
224 view = eo_add_custom(ELM_APP_CLIENT_VIEW_CLASS, eo, 222 view = eo_add(ELM_APP_CLIENT_VIEW_CLASS, eo,
225 elm_app_client_view_constructor(view_path)); 223 elm_app_client_view_constructor(view_path));
226 eina_hash_add(cdata->views, view_path, view); 224 eina_hash_add(cdata->views, view_path, view);
227 eo_do(eo, eo_event_callback_call(ELM_APP_CLIENT_EVENT_VIEW_CREATED, 225 eo_do(eo, eo_event_callback_call(ELM_APP_CLIENT_EVENT_VIEW_CREATED,
@@ -308,13 +306,6 @@ _elm_app_client_view_open_cancel(Eo *eo EINA_UNUSED, Elm_App_Client_Data *_pd EI
308} 306}
309 307
310EOLIAN static void 308EOLIAN static void
311_elm_app_client_eo_base_constructor(Eo *obj, Elm_App_Client_Data *_pd EINA_UNUSED)
312{
313 eo_error_set(obj);
314 ERR("Only custom constructor can be used with '%s' class", MY_CLASS_NAME);
315}
316
317EOLIAN static void
318_elm_app_client_eo_base_destructor(Eo *eo, Elm_App_Client_Data *data) 309_elm_app_client_eo_base_destructor(Eo *eo, Elm_App_Client_Data *data)
319{ 310{
320 Eldbus_Object *obj; 311 Eldbus_Object *obj;
diff --git a/src/lib/elm_app_client.eo b/src/lib/elm_app_client.eo
index d54264a23..c2b4bdd1e 100644
--- a/src/lib/elm_app_client.eo
+++ b/src/lib/elm_app_client.eo
@@ -51,7 +51,6 @@ class Elm_App_Client (Eo.Base)
51 } 51 }
52 } 52 }
53 implements { 53 implements {
54 Eo.Base.constructor;
55 Eo.Base.destructor; 54 Eo.Base.destructor;
56 } 55 }
57 constructors { 56 constructors {
diff --git a/src/lib/elm_app_server.c b/src/lib/elm_app_server.c
index 4acc022b9..e5dc559ce 100644
--- a/src/lib/elm_app_server.c
+++ b/src/lib/elm_app_server.c
@@ -205,8 +205,6 @@ _elm_app_server_constructor(Eo *obj, Elm_App_Server_Data *data, const char *pkg,
205 EINA_SAFETY_ON_NULL_GOTO(data->create_view_cb, error); 205 EINA_SAFETY_ON_NULL_GOTO(data->create_view_cb, error);
206 EINA_SAFETY_ON_TRUE_GOTO(!pkg, error); 206 EINA_SAFETY_ON_TRUE_GOTO(!pkg, error);
207 207
208 eo_do_super(obj, MY_CLASS, eo_constructor());
209
210 data->views = eina_hash_string_small_new(NULL); 208 data->views = eina_hash_string_small_new(NULL);
211 data->PID = getpid(); 209 data->PID = getpid();
212 data->title = eina_stringshare_add(""); 210 data->title = eina_stringshare_add("");
@@ -257,7 +255,7 @@ _elm_app_server_constructor(Eo *obj, Elm_App_Server_Data *data, const char *pkg,
257 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);
258 progress = elm_app_server_view_props_progress_get(view_eet_props); 256 progress = elm_app_server_view_props_progress_get(view_eet_props);
259 257
260 view = eo_add_custom(ELM_APP_SERVER_VIEW_CLASS, obj, 258 view = eo_add(ELM_APP_SERVER_VIEW_CLASS, obj,
261 elm_app_server_view_constructor(view_id)); 259 elm_app_server_view_constructor(view_id));
262 if (!view) 260 if (!view)
263 continue; 261 continue;
@@ -446,11 +444,4 @@ _elm_app_server_eo_base_destructor(Eo *obj, Elm_App_Server_Data *data)
446 eo_do_super(obj, MY_CLASS, eo_destructor()); 444 eo_do_super(obj, MY_CLASS, eo_destructor());
447} 445}
448 446
449EOLIAN static void
450_elm_app_server_eo_base_constructor(Eo *obj, Elm_App_Server_Data *_pd EINA_UNUSED)
451{
452 eo_error_set(obj);
453 ERR("Only custom constructor can be used with '%s' class", MY_CLASS_NAME);
454}
455
456#include "elm_app_server.eo.c" 447#include "elm_app_server.eo.c"
diff --git a/src/lib/elm_app_server.eo b/src/lib/elm_app_server.eo
index bd7748eb0..a15ebcabf 100644
--- a/src/lib/elm_app_server.eo
+++ b/src/lib/elm_app_server.eo
@@ -89,7 +89,6 @@ class Elm_App_Server (Eo.Base)
89 } 89 }
90 } 90 }
91 implements { 91 implements {
92 Eo.Base.constructor;
93 Eo.Base.destructor; 92 Eo.Base.destructor;
94 } 93 }
95 constructors { 94 constructors {
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index e3b05650d..54d1853d7 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -2864,7 +2864,7 @@ elm_win_add(Evas_Object *parent,
2864 const char *name, 2864 const char *name,
2865 Elm_Win_Type type) 2865 Elm_Win_Type type)
2866{ 2866{
2867 Evas_Object *obj = eo_add_custom(MY_CLASS, parent, elm_obj_win_constructor(name, type)); 2867 Evas_Object *obj = eo_add(MY_CLASS, parent, elm_obj_win_constructor(name, type));
2868 eo_unref(obj); 2868 eo_unref(obj);
2869 return obj; 2869 return obj;
2870} 2870}
@@ -3505,10 +3505,9 @@ _elm_win_constructor(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_Type t
3505} 3505}
3506 3506
3507EOLIAN static void 3507EOLIAN static void
3508_elm_win_eo_base_constructor(Eo *obj, Elm_Win_Data *_pd EINA_UNUSED) 3508_elm_win_eo_base_constructor(Eo *obj EINA_UNUSED, Elm_Win_Data *_pd EINA_UNUSED)
3509{ 3509{
3510 eo_error_set(obj); 3510 /* Do nothing. */
3511 ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME);
3512} 3511}
3513 3512
3514EOLIAN static Elm_Win_Type 3513EOLIAN static Elm_Win_Type