summaryrefslogtreecommitdiff
path: root/src/legacy/appcore-efl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/legacy/appcore-efl.c')
-rw-r--r--src/legacy/appcore-efl.c59
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;
}
-
-