From 470f3c2d88ab6d475062b9fb81a07df8e835f0d6 Mon Sep 17 00:00:00 2001 From: Semun Lee Date: Fri, 16 Oct 2015 15:29:37 +0900 Subject: 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 --- include/appcore-efl.h | 6 ++++++ 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 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; } -- cgit v1.2.3