#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>
/* 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;
_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 */
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");
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");
/* 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);
{
_W("_watch_core_resume");
- appcore_ui_base_on_resume();
+ appcore_efl_base_on_resume();
if (__context.ambient_mode) {
__context.ambient_mode_skip_resume = false;
{
_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();
__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;
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)
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);
}
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) {
__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;
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;
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)