eina_prefix_free(_ecore_pfx);
_ecore_pfx = NULL;
+ eo_unref(_ecore_parent);
+ eo_shutdown();
+
eina_shutdown();
#ifdef HAVE_EVIL
evil_shutdown();
#endif
- eo_unref(_ecore_parent);
- eo_shutdown();
end:
return _ecore_init_count;
}
if (hnd_add) ecore_event_handler_del(hnd_add);
if (hnd_del) ecore_event_handler_del(hnd_del);
if (hnd_data) ecore_event_handler_del(hnd_data);
+
+ ecore_ipc_shutdown();
+
ipc = NULL;
pfx = NULL;
hnd_add = NULL;
eina_log_domain_unregister(_embryo_default_log_dom);
_embryo_default_log_dom = -1;
+ eina_shutdown();
return _embryo_init_count;
}
void
_evas_canvas3d_eet_file_init()
{
- eina_init();
- eet_init();
-
/* initialization of bonding between structure units in eet file */
Eet_Data_Descriptor_Class eddc;
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Vec2_Eet);
if (!eina_init())
goto shutdown_evil;
+ if (!eet_init())
+ goto shutdown_eet;
+
_evas_log_dom_global = eina_log_domain_register
("evas_main", EVAS_DEFAULT_LOG_COLOR);
if (_evas_log_dom_global < 0)
shutdown_module:
evas_module_shutdown();
eina_log_domain_unregister(_evas_log_dom_global);
+ shutdown_eet:
+ eet_shutdown();
shutdown_eina:
eina_shutdown();
shutdown_evil:
eina_log_domain_unregister(_evas_log_dom_global);
+ eet_shutdown();
+
eina_shutdown();
#ifdef HAVE_EVIL
evil_shutdown();
eina_array_data_set(evas_engines, em->id_engine - 1, NULL);
eina_hash_del(evas_modules[type], module->name, em);
+
+ if (em->loaded)
+ {
+ em->definition->func.close(em);
+ em->loaded = 0;
+ }
+
LKD(em->lock);
free(em);
if ((unsigned int)type > 3) return NULL;
em = eina_hash_find(evas_modules[type], name);
- if (em) return em;
+ if (em)
+ {
+ evas_module_load(em);
+ return em;
+ }
run_in_tree = !!getenv("EFL_RUN_IN_TREE");
static Eina_Prefix *pfx = NULL;
+static Eina_Bool
+_cb_mod_close(const Eina_Hash *hash EINA_UNUSED,
+ const void *key EINA_UNUSED,
+ void *data, void *fdata EINA_UNUSED)
+{
+ Evas_Module *em = data;
+
+ em->definition->func.close(em);
+ em->loaded = 0;
+ return EINA_TRUE;
+}
+
/* will dlclose all the modules loaded and free all the structs */
void
evas_module_shutdown(void)
// eina_module_free(en);
}
+ eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_ENGINE], _cb_mod_close, NULL);
+ eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER], _cb_mod_close, NULL);
+ eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER], _cb_mod_close, NULL);
+ eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_OBJECT], _cb_mod_close, NULL);
+
eina_hash_free(evas_modules[EVAS_MODULE_TYPE_ENGINE]);
evas_modules[EVAS_MODULE_TYPE_ENGINE] = NULL;
eina_hash_free(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER]);
if (_ecore_imf_xim_log_dom < 0)
{
EINA_LOG_ERR("Could not register log domain: ecore_imf_xim");
- return EINA_FALSE;
}
DBG(" ");
module_open(Evas_Module *em)
{
if (!em) return 0;
- eet_init();
em->functions = (void *)(&evas_image_load_eet_func);
return 1;
}
static void
module_close(Evas_Module *em EINA_UNUSED)
{
- eet_shutdown();
}
static Evas_Module_Api evas_modapi =
static inline Eina_Bool
_read_ply_header(char *map, Evas_Model_Load_Save_Header *header)
{
- eina_init();
-
Eina_Bool reading_vertices = EINA_TRUE, check_next_char = EINA_FALSE;
int vertex_lines, triangles = 0, vertices_in_current_face = 0;
char **helping_pointer;
Eina_Stringshare *str, *cur_str, *cur_index;
unsigned short cur_hu;
- eina_init();
Eina_Hash *vb;
#define WRITE_OBJ_VERTEX_DATA(name, num, format) \
if (header.existence_of_##name) \
WRITE_OBJ_VERTEX_DATA(tex_coords, 2, "vt")
WRITE_OBJ_VERTEX_DATA(normals, 3, "vn")
#undef WRITE_OBJ_VERTEX_DATA
- eina_shutdown();
}
static inline void