From: Semun Lee Date: Fri, 16 Oct 2015 06:29:37 +0000 (+0900) Subject: Add new api for customizing main loop X-Git-Tag: accepted/tizen/mobile/20151111.232018~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F36%2F49636%2F1;p=platform%2Fcore%2Fappfw%2Fapp-core.git Add new api for customizing main loop - appcore_efl_init, appcore_efl_fini are added - appcore_efl_init doesn't call elm_run() Change-Id: Ie0d9916ac7851148e81976b3709695e7bb9c5678 Signed-off-by: Semun Lee --- diff --git a/include/appcore-efl.h b/include/appcore-efl.h index 794734a..e79b863 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 071dc8f..939e2cc 100644 --- a/src/appcore-efl.c +++ b/src/appcore-efl.c @@ -977,8 +977,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; @@ -993,13 +993,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; }