summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSemun Lee <sm79.lee@samsung.com>2015-10-16 15:29:37 +0900
committerSemun Lee <sm79.lee@samsung.com>2015-10-16 15:29:37 +0900
commit470f3c2d88ab6d475062b9fb81a07df8e835f0d6 (patch)
tree4466ebbaa5a577920ec526bf5edab6a2055c0c58
parent2f94c5b3021f1d9c28d077a97974ceee580a730e (diff)
downloadapp-core-470f3c2d88ab6d475062b9fb81a07df8e835f0d6.tar.gz
app-core-470f3c2d88ab6d475062b9fb81a07df8e835f0d6.tar.bz2
app-core-470f3c2d88ab6d475062b9fb81a07df8e835f0d6.zip
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 <sm79.lee@samsung.com>
-rw-r--r--include/appcore-efl.h6
-rw-r--r--src/appcore-efl.c22
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;
}