diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2017-06-02 13:17:26 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2017-06-05 10:01:54 +0900 |
commit | d82ac10ce2075e4ee89ea37594e05cfc4adc3d87 (patch) | |
tree | 3d5867e28653d16c14493acc711ce341e77ba135 /src/legacy | |
parent | 2d7b58b2d4c0888571886446facc7bb78eea5812 (diff) | |
download | app-core-d82ac10ce2075e4ee89ea37594e05cfc4adc3d87.tar.gz app-core-d82ac10ce2075e4ee89ea37594e05cfc4adc3d87.tar.bz2 app-core-d82ac10ce2075e4ee89ea37594e05cfc4adc3d87.zip |
Separate appcore-ui package from appcore-efl package
This patch is for deleting elementary dependency from appcore_ui_base API.
- Add appcore_efl_base API (appcore_ui_base wrapper API)
- Add appcore_ui_base_get_hint API
- Delete elementary dependency from appcore-ui
- Add init and finish callback on appcore base
Change-Id: Ief47c6b4e7c9c26d955bf8c30c69efec05c5ee99
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Diffstat (limited to 'src/legacy')
-rw-r--r-- | src/legacy/appcore-efl.c | 59 |
1 files changed, 24 insertions, 35 deletions
diff --git a/src/legacy/appcore-efl.c b/src/legacy/appcore-efl.c index 17053ae..503e550 100644 --- a/src/legacy/appcore-efl.c +++ b/src/legacy/appcore-efl.c @@ -17,18 +17,11 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> - -#include <glib-object.h> -#include <malloc.h> -#include <glib.h> -#include <gio/gio.h> #include <stdbool.h> -#include <Elementary.h> #include "appcore-internal.h" #include "appcore-efl.h" -#include "appcore_ui_base.h" -#include <system_info.h> +#include "appcore_efl_base.h" struct appcore_efl_context { struct appcore_ops ops; @@ -38,7 +31,7 @@ static struct appcore_efl_context __context; static int __ui_app_create(void *data) { - appcore_ui_base_on_create(); + appcore_efl_base_on_create(); if (__context.ops.create) { if (__context.ops.create(__context.ops.data) < 0) @@ -50,7 +43,7 @@ static int __ui_app_create(void *data) static int __ui_app_terminate(void *data) { - appcore_ui_base_on_terminate(); + appcore_efl_base_on_terminate(); if (__context.ops.terminate) __context.ops.terminate(__context.ops.data); @@ -60,7 +53,7 @@ static int __ui_app_terminate(void *data) static int __ui_app_control(bundle *b, void *data) { - appcore_ui_base_on_control(b); + appcore_efl_base_on_control(b); if (__context.ops.reset) __context.ops.reset(b, __context.ops.data); @@ -70,7 +63,7 @@ static int __ui_app_control(bundle *b, void *data) static int __ui_app_pause(void *data) { - appcore_ui_base_on_pause(); + appcore_efl_base_on_pause(); if (__context.ops.pause) __context.ops.pause(__context.ops.data); @@ -79,7 +72,7 @@ static int __ui_app_pause(void *data) static int __ui_app_resume(void *data) { - appcore_ui_base_on_resume(); + appcore_efl_base_on_resume(); if (__context.ops.resume) __context.ops.resume(__context.ops.data); @@ -90,31 +83,30 @@ EXPORT_API int appcore_efl_init(const char *name, int *argc, char ***argv, struct appcore_ops *ops) { int ret; - appcore_ui_base_ops ui_ops = appcore_ui_base_get_default_ops(); + appcore_efl_base_ops efl_ops = appcore_efl_base_get_default_ops(); /* override methods */ - ui_ops.base.create = __ui_app_create; - ui_ops.base.control = __ui_app_control; - ui_ops.base.terminate = __ui_app_terminate; - ui_ops.pause = __ui_app_pause; - ui_ops.resume = __ui_app_resume; - ui_ops.base.run = NULL; + efl_ops.ui_base.base.create = __ui_app_create; + efl_ops.ui_base.base.control = __ui_app_control; + efl_ops.ui_base.base.terminate = __ui_app_terminate; + efl_ops.ui_base.pause = __ui_app_pause; + efl_ops.ui_base.resume = __ui_app_resume; __context.ops = *ops; - ret = appcore_ui_base_init(ui_ops, *argc, *argv, NULL, - APPCORE_UI_BASE_HINT_WINDOW_GROUP_CONTROL | - APPCORE_UI_BASE_HINT_WINDOW_STACK_CONTROL | - APPCORE_UI_BASE_HINT_BG_LAUNCH_CONTROL | - APPCORE_UI_BASE_HINT_HW_ACC_CONTROL | - APPCORE_UI_BASE_HINT_WINDOW_AUTO_CONTROL); + ret = appcore_efl_base_init(efl_ops, *argc, *argv, NULL, + APPCORE_EFL_BASE_HINT_WINDOW_GROUP_CONTROL | + APPCORE_EFL_BASE_HINT_WINDOW_STACK_CONTROL | + APPCORE_EFL_BASE_HINT_BG_LAUNCH_CONTROL | + APPCORE_EFL_BASE_HINT_HW_ACC_CONTROL | + APPCORE_EFL_BASE_HINT_WINDOW_AUTO_CONTROL); return ret; } EXPORT_API void appcore_efl_fini(void) { - appcore_ui_base_fini(); + appcore_efl_base_fini(); } EXPORT_API int appcore_efl_main(const char *name, int *argc, char ***argv, @@ -123,9 +115,8 @@ EXPORT_API int appcore_efl_main(const char *name, int *argc, char ***argv, int r; r = appcore_efl_init(name, argc, argv, ops); - - if (r >= 0) - elm_run(); + if (r < 0) + return r; appcore_efl_fini(); @@ -134,17 +125,17 @@ EXPORT_API int appcore_efl_main(const char *name, int *argc, char ***argv, EXPORT_API void appcore_group_attach() { - appcore_ui_base_group_add(); + appcore_efl_base_group_add(); } EXPORT_API void appcore_group_lower() { - appcore_ui_base_group_remove(); + appcore_efl_base_group_remove(); } EXPORT_API unsigned int appcore_get_main_window(void) { - return appcore_ui_base_get_main_window(); + return appcore_efl_base_get_main_window(); } EXPORT_API unsigned int appcore_get_main_surface(void) @@ -156,5 +147,3 @@ EXPORT_API int appcore_set_system_resource_reclaiming(bool enable) { return 0; } - - |