elementary: add an exit_code to efl_exit as originally planned.
T6228
This commit is contained in:
parent
0fb1d6e1fa
commit
6998134669
|
@ -151,7 +151,7 @@ config_exit(void *data EINA_UNUSED,
|
||||||
fndata.cur_style = NULL;
|
fndata.cur_style = NULL;
|
||||||
|
|
||||||
elm_config_save();
|
elm_config_save();
|
||||||
efl_exit(); /* exit the program's main loop that runs in elm_run() */
|
efl_exit(0); /* exit the program's main loop that runs in elm_run() */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -4255,7 +4255,7 @@ win_create(void)
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_exit_timer(void *data EINA_UNUSED)
|
_exit_timer(void *data EINA_UNUSED)
|
||||||
{
|
{
|
||||||
efl_exit();
|
efl_exit(0);
|
||||||
return ECORE_CALLBACK_CANCEL;
|
return ECORE_CALLBACK_CANCEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4360,7 +4360,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
|
||||||
|
|
||||||
elm_config_all_flush();
|
elm_config_all_flush();
|
||||||
|
|
||||||
if (quiet) efl_exit();
|
if (quiet) efl_exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -378,7 +378,7 @@ _elm_test_add(Eina_List **p_list, const char *icon, const char *category, const
|
||||||
void
|
void
|
||||||
my_win_del(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
my_win_del(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
efl_exit(); /* exit the program's main loop that runs in elm_run() */
|
efl_exit(0); /* exit the program's main loop that runs in elm_run() */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1119,7 +1119,7 @@ add_tests:
|
||||||
free(t);
|
free(t);
|
||||||
|
|
||||||
if (!l)
|
if (!l)
|
||||||
efl_exit();
|
efl_exit(0);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,7 +151,17 @@ extern EAPI double _elm_startup_time;
|
||||||
#define EFL_MAIN_EX() int main(int argc, char **argv) { int ret__; _EFL_APP_VERSION_SET(); _elm_startup_time = ecore_time_unix_get(); ret__ = efl_quicklaunch_fallback(argc, argv); elm_shutdown(); return ret__; (void) efl_main(NULL, NULL); (void) efl_pause(NULL, NULL); (void) efl_resume(NULL, NULL); (void) efl_terminate(NULL, NULL); return 0; }
|
#define EFL_MAIN_EX() int main(int argc, char **argv) { int ret__; _EFL_APP_VERSION_SET(); _elm_startup_time = ecore_time_unix_get(); ret__ = efl_quicklaunch_fallback(argc, argv); elm_shutdown(); return ret__; (void) efl_main(NULL, NULL); (void) efl_pause(NULL, NULL); (void) efl_resume(NULL, NULL); (void) efl_terminate(NULL, NULL); return 0; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define efl_exit() elm_exit()
|
/**
|
||||||
|
* @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(unsigned char exit_code);
|
||||||
|
|
||||||
#endif /* EFL_BETA_API_SUPPORT */
|
#endif /* EFL_BETA_API_SUPPORT */
|
||||||
|
|
||||||
|
|
|
@ -1362,9 +1362,9 @@ elm_run(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_exit(void)
|
efl_exit(unsigned char exit_code)
|
||||||
{
|
{
|
||||||
ecore_main_loop_quit();
|
efl_loop_quit(ecore_main_loop_get(), exit_code);
|
||||||
|
|
||||||
if (elm_policy_get(ELM_POLICY_EXIT) == ELM_POLICY_EXIT_WINDOWS_DEL)
|
if (elm_policy_get(ELM_POLICY_EXIT) == ELM_POLICY_EXIT_WINDOWS_DEL)
|
||||||
{
|
{
|
||||||
|
@ -1376,6 +1376,12 @@ elm_exit(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_exit(void)
|
||||||
|
{
|
||||||
|
efl_exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
//FIXME: Use Elm_Policy Parameter when 2.0 is released.
|
//FIXME: Use Elm_Policy Parameter when 2.0 is released.
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
elm_policy_set(unsigned int policy,
|
elm_policy_set(unsigned int policy,
|
||||||
|
|
Loading…
Reference in New Issue