elementary, ecore: move efl_exit helper to Ecore.

This commit is contained in:
Cedric Bail 2017-10-27 16:37:58 -07:00
parent a959337a29
commit 173de925ed
4 changed files with 22 additions and 22 deletions

View File

@ -38,6 +38,18 @@ extern "C" {
#include "efl_loop.eo.h"
/**
* @brief Quits the main loop once all the events currently on the queue have
* been processed.
*
* @param[in] exit_code Returned value by begin()
*
* @note This function can only be called from the main loop.
*
* @ingroup Efl_Loop
*/
EAPI void efl_exit(int exit_code);
EAPI int efl_loop_exit_code_process(Eina_Value *value);
#include "efl_loop_user.eo.h"

View File

@ -2867,6 +2867,16 @@ _efl_loop_quit(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED, Eina_Value ex
_ecore_exit_code = exit_code;
}
EAPI void
efl_exit(int exit_code)
{
Eina_Value v = EINA_VALUE_EMPTY;
eina_value_setup(&v, EINA_VALUE_TYPE_INT);
eina_value_set(&v, &exit_code);
efl_loop_quit(ecore_main_loop_get(), v);
}
EOLIAN static Efl_Object *
_efl_loop_efl_object_provider_find(Eo *obj, Efl_Loop_Data *pd, const Efl_Object *klass)
{

View File

@ -164,18 +164,6 @@ extern EAPI double _elm_startup_time;
return real__; \
}
/**
* @brief Quits the main loop once all the events currently on the queue have
* been processed.
*
* @param[in] exit_code Returned value by begin()
*
* @note This function can only be called from the main loop.
*
* @ingroup Efl_Loop
*/
EAPI void efl_exit(int exit_code);
#endif /* EFL_BETA_API_SUPPORT */

View File

@ -1354,16 +1354,6 @@ _on_terminate(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
evas_object_del(win);
}
EAPI void
efl_exit(int exit_code)
{
Eina_Value v = EINA_VALUE_EMPTY;
eina_value_setup(&v, EINA_VALUE_TYPE_INT);
eina_value_set(&v, &exit_code);
efl_loop_quit(ecore_main_loop_get(), v);
}
EAPI void
elm_exit(void)
{