Use appcore_efl_base instead of appcore_ui_base 22/132322/1
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 2 Jun 2017 08:28:55 +0000 (17:28 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Fri, 2 Jun 2017 08:28:55 +0000 (17:28 +0900)
Requires:
 - https://review.tizen.org/gerrit/132268 [app-core]

Change-Id: Ifb8cec296155877a0a872252af86569ed3e9f7fe
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/watch_app_main.c

index 1e2e1e6..df4f9c7 100755 (executable)
@@ -39,7 +39,7 @@
 #include <Elementary.h>
 #include <Ecore_Wayland.h>
 #include <screen_connector_provider.h>
-#include <appcore_ui_base.h>
+#include <appcore_efl_base.h>
 #include <alarm.h>
 #include <vconf.h>
 #include <glib-object.h>
@@ -344,8 +344,8 @@ static int __signal_alpm_handler(int ambient, void *data)
 
        /* Enter the ambient mode */
        if (ambient) {
-               if (appcore_ui_base_is_resumed()) {
-                       appcore_ui_base_on_pause();
+               if (appcore_efl_base_is_resumed()) {
+                       appcore_efl_base_on_pause();
                        __context.ambient_mode_skip_resume = false;
                } else {
                        __context.ambient_mode_skip_resume = true;
@@ -366,7 +366,7 @@ static int __signal_alpm_handler(int ambient, void *data)
                _D("Resume check: %d", __context.ambient_mode_skip_resume);
                if (!__context.ambient_mode_skip_resume) {
                        _D("Call the resume after ambient mode changed");
-                       appcore_ui_base_resume();
+                       appcore_efl_base_resume();
                }
 
                /* Disable alarm */
@@ -483,7 +483,7 @@ static int __on_create(void *data)
 
        create_cb = __context.callback.create;
 
-       appcore_ui_base_on_create();
+       appcore_efl_base_on_create();
        if (create_cb == NULL || create_cb(__context.width, __context.height, __context.data) == false)
                return watch_app_error(APP_ERROR_INVALID_CONTEXT, __FUNCTION__,
                                "watch_app_create_cb() returns false");
@@ -502,7 +502,7 @@ static int __on_create(void *data)
 static int __on_control(bundle *b, void *data)
 {
        app_control_h app_control = NULL;
-       appcore_ui_base_on_control(b);
+       appcore_efl_base_on_control(b);
 
        _W("_watch_core_control");
 
@@ -529,7 +529,7 @@ static int __on_pause(void *data)
        /* Cancel the time_tick callback */
        __time_tick_cancel();
 
-       appcore_ui_base_on_pause();
+       appcore_efl_base_on_pause();
        if (__context.callback.pause)
                __context.callback.pause(__context.data);
 
@@ -541,7 +541,7 @@ static int __on_resume(void *data)
 {
        _W("_watch_core_resume");
 
-       appcore_ui_base_on_resume();
+       appcore_efl_base_on_resume();
 
        if (__context.ambient_mode) {
                __context.ambient_mode_skip_resume = false;
@@ -565,8 +565,8 @@ static int __on_terminate(void *data)
 {
        _W("_watch_core_terminate");
 
-       if (appcore_ui_base_is_resumed())
-               appcore_ui_base_pause();
+       if (appcore_efl_base_is_resumed())
+               appcore_efl_base_pause();
 
        /* Cancel the time_tick callback */
        __time_tick_cancel();
@@ -575,7 +575,7 @@ static int __on_terminate(void *data)
                __context.callback.terminate(__context.data);
 
        alarmmgr_fini();
-       appcore_ui_base_on_terminate();
+       appcore_efl_base_on_terminate();
        screen_connector_provider_fini();
 
        return APP_ERROR_NONE;
@@ -623,8 +623,8 @@ static void __on_ambient_changed(int ambient, void *data)
 
 static void __on_window_show(int type, void *event, void *data)
 {
-       appcore_ui_base_window_on_show(type, event);
-       appcore_ui_base_resume();
+       appcore_efl_base_window_on_show(type, event);
+       appcore_efl_base_resume();
 }
 
 static int __set_ambient_tick_type(watch_app_ambient_tick_type_e type)
@@ -663,7 +663,7 @@ static int __set_time_tick_frequency(int ticks, watch_app_time_tick_resolution_e
        watch_tick = ecore_timer_add(sec, __time_tick_cb, NULL);
        _D("next time tick: %f", sec);
 
-       if (appcore_ui_base_is_resumed()) {
+       if (appcore_efl_base_is_resumed()) {
                __get_timeinfo(&timeinfo);
                __on_time_tick(&timeinfo, NULL);
        }
@@ -687,15 +687,15 @@ EXPORT_API int watch_app_main(int argc, char **argv,
        char *height_str = NULL;
        int width = 360;
        int height = 360;
-       appcore_ui_base_ops ops = appcore_ui_base_get_default_ops();
+       appcore_efl_base_ops ops = appcore_efl_base_get_default_ops();
 
        /* override methods */
-       ops.base.create = __on_create;
-       ops.base.control = __on_control;
-       ops.base.terminate = __on_terminate;
-       ops.pause = __on_pause;
-       ops.resume = __on_resume;
-       ops.window.show = __on_window_show;
+       ops.ui_base.base.create = __on_create;
+       ops.ui_base.base.control = __on_control;
+       ops.ui_base.base.terminate = __on_terminate;
+       ops.ui_base.pause = __on_pause;
+       ops.ui_base.resume = __on_resume;
+       ops.ui_base.window.show = __on_window_show;
 
        kb = bundle_import_from_argv(argc, argv);
        if (kb) {
@@ -739,7 +739,7 @@ EXPORT_API int watch_app_main(int argc, char **argv,
        __context.data = user_data;
        __context.state = WATCH_APP_STATE_CREATING;
 
-       ret = appcore_ui_base_init(ops, argc, argv, NULL, 0);
+       ret = appcore_efl_base_init(ops, argc, argv, NULL, 0);
        free(__context.appid);
        __context.appid = NULL;
 
@@ -748,7 +748,7 @@ EXPORT_API int watch_app_main(int argc, char **argv,
                return watch_app_error(APP_ERROR_INVALID_CONTEXT, __FUNCTION__, NULL);
        }
 
-       appcore_ui_base_fini();
+       appcore_efl_base_fini();
        __context.state = WATCH_APP_STATE_NOT_RUNNING;
 
        return APP_ERROR_NONE;
@@ -757,7 +757,7 @@ EXPORT_API int watch_app_main(int argc, char **argv,
 EXPORT_API void watch_app_exit(void)
 {
        _I("watch_app_exit");
-       appcore_ui_base_exit();
+       appcore_efl_base_exit();
 }
 
 static int __event_cb(void *event, void *data)