summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCedric Bail <cedric@osg.samsung.com>2017-10-27 16:37:58 -0700
committerCedric Bail <cedric@osg.samsung.com>2017-10-27 16:37:58 -0700
commit173de925ed9bb3c1e219cf02a69d5724947ab727 (patch)
tree3af728b727c21f167313086b6964a3e7bf21eb74 /src/lib
parenta959337a2908db0e829dd2bdf8f92f1e13843ef4 (diff)
elementary, ecore: move efl_exit helper to Ecore.
Diffstat (limited to '')
-rw-r--r--src/lib/ecore/Ecore_Eo.h12
-rw-r--r--src/lib/ecore/ecore_main.c10
-rw-r--r--src/lib/elementary/elm_general.h12
-rw-r--r--src/lib/elementary/elm_main.c10
4 files changed, 22 insertions, 22 deletions
diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h
index f9b1428180..05de244d43 100644
--- a/src/lib/ecore/Ecore_Eo.h
+++ b/src/lib/ecore/Ecore_Eo.h
@@ -38,6 +38,18 @@ extern "C" {
38 38
39#include "efl_loop.eo.h" 39#include "efl_loop.eo.h"
40 40
41/**
42 * @brief Quits the main loop once all the events currently on the queue have
43 * been processed.
44 *
45 * @param[in] exit_code Returned value by begin()
46 *
47 * @note This function can only be called from the main loop.
48 *
49 * @ingroup Efl_Loop
50 */
51EAPI void efl_exit(int exit_code);
52
41EAPI int efl_loop_exit_code_process(Eina_Value *value); 53EAPI int efl_loop_exit_code_process(Eina_Value *value);
42 54
43#include "efl_loop_user.eo.h" 55#include "efl_loop_user.eo.h"
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 932744ba9e..4b7c93d79c 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -2867,6 +2867,16 @@ _efl_loop_quit(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED, Eina_Value ex
2867 _ecore_exit_code = exit_code; 2867 _ecore_exit_code = exit_code;
2868} 2868}
2869 2869
2870EAPI void
2871efl_exit(int exit_code)
2872{
2873 Eina_Value v = EINA_VALUE_EMPTY;
2874
2875 eina_value_setup(&v, EINA_VALUE_TYPE_INT);
2876 eina_value_set(&v, &exit_code);
2877 efl_loop_quit(ecore_main_loop_get(), v);
2878}
2879
2870EOLIAN static Efl_Object * 2880EOLIAN static Efl_Object *
2871_efl_loop_efl_object_provider_find(Eo *obj, Efl_Loop_Data *pd, const Efl_Object *klass) 2881_efl_loop_efl_object_provider_find(Eo *obj, Efl_Loop_Data *pd, const Efl_Object *klass)
2872{ 2882{
diff --git a/src/lib/elementary/elm_general.h b/src/lib/elementary/elm_general.h
index 3367a96f3b..4e3097eac1 100644
--- a/src/lib/elementary/elm_general.h
+++ b/src/lib/elementary/elm_general.h
@@ -164,18 +164,6 @@ extern EAPI double _elm_startup_time;
164 return real__; \ 164 return real__; \
165 } 165 }
166 166
167/**
168 * @brief Quits the main loop once all the events currently on the queue have
169 * been processed.
170 *
171 * @param[in] exit_code Returned value by begin()
172 *
173 * @note This function can only be called from the main loop.
174 *
175 * @ingroup Efl_Loop
176 */
177EAPI void efl_exit(int exit_code);
178
179#endif /* EFL_BETA_API_SUPPORT */ 167#endif /* EFL_BETA_API_SUPPORT */
180 168
181 169
diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index ddcddd9179..faf2ecaee1 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -1355,16 +1355,6 @@ _on_terminate(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
1355} 1355}
1356 1356
1357EAPI void 1357EAPI void
1358efl_exit(int exit_code)
1359{
1360 Eina_Value v = EINA_VALUE_EMPTY;
1361
1362 eina_value_setup(&v, EINA_VALUE_TYPE_INT);
1363 eina_value_set(&v, &exit_code);
1364 efl_loop_quit(ecore_main_loop_get(), v);
1365}
1366
1367EAPI void
1368elm_exit(void) 1358elm_exit(void)
1369{ 1359{
1370 efl_exit(0); 1360 efl_exit(0);