From f42c993425ba9047016c56762e84ddf1ac28692c Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Tue, 20 Jun 2017 14:50:05 +0900 Subject: [PATCH] Override multiwindow base methods The methods are init(), finish(), run() and exit(). The elementary dependency is removed from multiwindow base. Requires: - https://review.tizen.org/gerrit/#/c/134810/ Change-Id: Icc01285d3ca1313f20e5ad0767da7d78b8b6676e Signed-off-by: Hwankyu Jhun --- src/widget_app.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/widget_app.c b/src/widget_app.c index 3840ac2..4c20c2c 100755 --- a/src/widget_app.c +++ b/src/widget_app.c @@ -614,6 +614,33 @@ static int __widget_app_receive(aul_type type, bundle *b, void *data) return 0; } +static int __widget_app_init(int argc, char **argv, void *data) +{ + elm_init(argc, argv); + return 0; +} + +static void __widget_app_finish(void) +{ + elm_shutdown(); + + /* Check Loader case */ + if (getenv("AUL_LOADER_INIT")) { + unsetenv("AUL_LOADER_INIT"); + elm_shutdown(); + } +} + +static void __widget_app_run(void *data) +{ + elm_run(); +} + +static void __widget_app_exit(void *data) +{ + elm_exit(); +} + EXPORT_API int widget_app_main(int argc, char **argv, widget_app_lifecycle_callback_s *callback, void *user_data) { @@ -647,6 +674,11 @@ EXPORT_API int widget_app_main(int argc, char **argv, ops.base.control = __widget_app_control; ops.base.terminate = __widget_app_terminate; ops.base.receive = __widget_app_receive; + ops.base.init = __widget_app_init; + ops.base.finish = __widget_app_finish; + ops.base.run = __widget_app_run; + ops.base.exit = __widget_app_exit; + __context.callback = *callback; __context.data = user_data; kb = bundle_import_from_argv(argc, argv); @@ -929,7 +961,7 @@ EXPORT_API int widget_app_get_elm_win(widget_context_h context, snprintf(buffer, sizeof(buffer), "%s:%d", id, getpid()); evas_object_data_set(ret_win, "___PLUGID", strdup(buffer)); evas_object_event_callback_add(ret_win, EVAS_CALLBACK_DEL, __win_del_cb, NULL); - appcore_multiwindow_base_window_bind(cxt, ret_win); + appcore_multiwindow_base_window_bind(cxt, wl_win); _D("window created: %d", win_id); -- 2.7.4