diff options
author | Semun Lee <sm79.lee@samsung.com> | 2015-11-09 22:55:10 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.vlan103.tizen.org> | 2015-11-09 22:55:10 -0800 |
commit | 878874dea8d4db4e0abee982561a264b56ce8e1e (patch) | |
tree | 08271f06265b3b7288b73c2d29ea61aab001bf61 | |
parent | 9ced94b3e72d6794cf1e3ab0ba7925262b94b88b (diff) | |
parent | 470f3c2d88ab6d475062b9fb81a07df8e835f0d6 (diff) | |
download | app-core-878874dea8d4db4e0abee982561a264b56ce8e1e.tar.gz app-core-878874dea8d4db4e0abee982561a264b56ce8e1e.tar.bz2 app-core-878874dea8d4db4e0abee982561a264b56ce8e1e.zip |
Merge "Add new api for customizing main loop" into tizen
-rw-r--r-- | include/appcore-efl.h | 6 | ||||
-rw-r--r-- | src/appcore-efl.c | 22 |
2 files changed, 25 insertions, 3 deletions
diff --git a/include/appcore-efl.h b/include/appcore-efl.h index 70171bd..f6ade44 100644 --- a/include/appcore-efl.h +++ b/include/appcore-efl.h @@ -52,6 +52,12 @@ extern "C" { #endif +int appcore_efl_init(const char *name, int *argc, char ***argv, + struct appcore_ops *ops); + +void appcore_efl_fini(void); + + /** * @par Description: * This is a main function for EFL application on SLP platform. \n diff --git a/src/appcore-efl.c b/src/appcore-efl.c index 9d9f21f..b7f7842 100644 --- a/src/appcore-efl.c +++ b/src/appcore-efl.c @@ -986,8 +986,8 @@ static struct ui_wm_rotate wm_rotate = { __wm_resume_rotation_cb }; -EXPORT_API int appcore_efl_main(const char *name, int *argc, char ***argv, - struct appcore_ops *ops) +EXPORT_API int appcore_efl_init(const char *name, int *argc, char ***argv, + struct appcore_ops *ops) { int r; @@ -1002,13 +1002,29 @@ EXPORT_API int appcore_efl_main(const char *name, int *argc, char ***argv, return -1; } - elm_run(); + return 0; +} +EXPORT_API void appcore_efl_fini(void) +{ aul_status_update(STATUS_DYING); __after_loop(&priv); __unset_data(&priv); +} + +EXPORT_API int appcore_efl_main(const char *name, int *argc, char ***argv, + struct appcore_ops *ops) +{ + int r; + + r = appcore_efl_init(name, argc, argv, ops); + _retv_if(r == -1, -1); + + elm_run(); + + appcore_efl_fini(); return 0; } |