/** * @brief Shuts down Etk. It decrements the init-counter. If the counter reaches 0, it frees all the resources used by Etk * @return Returns the new value of the init-counter. If 0 is returned, it means that the resources has effectively * been freed. */ int etk_shutdown(void) { if (_etk_main_init_count <= 0) return 0; _etk_main_init_count--; if (_etk_main_init_count == 0) { ecore_idle_enterer_del(_etk_main_idle_enterer); _etk_main_idle_enterer = NULL; /* Shutdown the subsystems of Etk */ etk_object_shutdown(); etk_type_shutdown(); etk_signal_shutdown(); etk_tooltips_shutdown(); etk_event_shutdown(); etk_engine_shutdown(); etk_config_shutdown(); etk_theme_shutdown(); etk_argument_shutdown(); /* Shutdown the EFL*/ edje_shutdown(); ecore_imf_shutdown(); ecore_shutdown(); evas_shutdown(); } return _etk_main_init_count; }
int ewk_shutdown(void) { if (--_ewkInitCount) return _ewkInitCount; #ifdef HAVE_ECORE_X ecore_x_shutdown(); #endif ecore_imf_shutdown(); ecore_evas_shutdown(); ecore_shutdown(); evas_shutdown(); eina_log_domain_unregister(_ewk_log_dom); _ewk_log_dom = -1; eina_shutdown(); return 0; }
int EwkMain::finalize() { if (--m_initCount) return m_initCount; edje_shutdown(); #ifdef HAVE_ECORE_X ecore_x_shutdown(); #endif efreet_shutdown(); ecore_imf_shutdown(); ecore_evas_shutdown(); ecore_shutdown(); evas_shutdown(); eina_log_domain_unregister(m_logDomainId); m_logDomainId = -1; eina_shutdown(); return 0; }
void EwkMain::shutdownInitializedEFLModules(EFLModuleInitFailure module) { switch (module) { case EFLModuleInitFailure::Edje: #ifdef HAVE_ECORE_X ecore_x_shutdown(); #endif case EFLModuleInitFailure::EcoreX: efreet_shutdown(); case EFLModuleInitFailure::Efreet: ecore_imf_shutdown(); case EFLModuleInitFailure::EcoreImf: ecore_evas_shutdown(); case EFLModuleInitFailure::EcoreEvas: ecore_shutdown(); case EFLModuleInitFailure::Ecore: evas_shutdown(); case EFLModuleInitFailure::Evas: eina_log_domain_unregister(m_logDomainId); m_logDomainId = -1; case EFLModuleInitFailure::EinaLog: eina_shutdown(); } }
int ewk_init(void) { if (_ewkInitCount) return ++_ewkInitCount; if (!eina_init()) goto error_eina; _ewk_log_dom = eina_log_domain_register("ewebkit2", EINA_COLOR_ORANGE); if (_ewk_log_dom < 0) { EINA_LOG_CRIT("could not register log domain 'ewebkit2'"); goto error_log_domain; } if (!evas_init()) { CRITICAL("could not init evas."); goto error_evas; } if (!ecore_init()) { CRITICAL("could not init ecore."); goto error_ecore; } if (!ecore_evas_init()) { CRITICAL("could not init ecore_evas."); goto error_ecore_evas; } if (!ecore_imf_init()) { CRITICAL("could not init ecore_imf."); goto error_ecore_imf; } if (!efreet_init()) { CRITICAL("could not init efreet."); goto error_efreet; } #ifdef HAVE_ECORE_X if (!ecore_x_init(0)) { CRITICAL("could not init ecore_x."); goto error_ecore_x; } #endif if (!edje_init()) { CRITICAL("Could not init edje."); goto error_edje; } if (!ecore_main_loop_glib_integrate()) { WARN("Ecore was not compiled with GLib support, some plugins will not " "work (ie: Adobe Flash)"); } return ++_ewkInitCount; error_edje: #ifdef HAVE_ECORE_X ecore_x_shutdown(); error_ecore_x: #else efreet_shutdown(); #endif error_efreet: ecore_imf_shutdown(); error_ecore_imf: ecore_evas_shutdown(); error_ecore_evas: ecore_shutdown(); error_ecore: evas_shutdown(); error_evas: eina_log_domain_unregister(_ewk_log_dom); _ewk_log_dom = -1; error_log_domain: eina_shutdown(); error_eina: return 0; }