X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fefl_base%2Fappcore_efl_base.c;h=0e8dde559f7d1442a883da27c08cb850f2f6c2fc;hb=29cda67cb2383002fbc1932f382bbd559b384947;hp=a30c2dabdd360adf8401025ea96751c114fe0c41;hpb=b65a6993791f770f0e4ea199a3d6bf66caeaa460;p=platform%2Fcore%2Fappfw%2Fapp-core.git diff --git a/src/efl_base/appcore_efl_base.c b/src/efl_base/appcore_efl_base.c index a30c2da..0e8dde5 100644 --- a/src/efl_base/appcore_efl_base.c +++ b/src/efl_base/appcore_efl_base.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -141,6 +142,14 @@ static void __vc_elm_finish(void) } } +static gboolean __init_vc_elm(gpointer data) +{ + /* VC voice touch setting */ + __vc_elm_init(); + + return G_SOURCE_REMOVE; +} + static void __efl_app_init(int argc, char **argv, void *data) { int hint; @@ -164,8 +173,8 @@ static void __efl_app_init(int argc, char **argv, void *data) } } - /* VC voice touch setting */ - __vc_elm_init(); + /* Postpone initialization to improve app launching performance */ + g_idle_add(__init_vc_elm, NULL); } static void __efl_app_finish(void) @@ -191,6 +200,13 @@ static void __efl_app_exit(void *data) elm_exit(); } +static void __efl_app_trim_memory(void *data) +{ + _DBG("Trim memory"); + elm_cache_all_flush(); + appcore_base_on_trim_memory(); +} + EXPORT_API int appcore_efl_base_init(appcore_efl_base_ops ops, int argc, char **argv, void *data, unsigned int hint) { @@ -213,6 +229,7 @@ EXPORT_API appcore_efl_base_ops appcore_efl_base_get_default_ops(void) ops.ui_base.base.finish = __efl_app_finish; ops.ui_base.base.run = __efl_app_run; ops.ui_base.base.exit = __efl_app_exit; + ops.ui_base.base.trim_memory = __efl_app_trim_memory; return ops; } @@ -247,6 +264,11 @@ EXPORT_API int appcore_efl_base_on_control(bundle *b) return appcore_ui_base_on_control(b); } +EXPORT_API int appcore_efl_base_on_trim_memory(void) +{ + return appcore_ui_base_on_trim_memory(); +} + EXPORT_API void appcore_efl_base_window_on_show(int type, void *event) { appcore_ui_base_window_on_show(type, event); @@ -267,6 +289,16 @@ EXPORT_API void appcore_efl_base_window_on_visibility(int type, void *event) appcore_ui_base_window_on_visibility(type, event); } +EXPORT_API void appcore_efl_base_window_on_pre_visibility(int type, void *event) +{ + appcore_ui_base_window_on_pre_visibility(type, event); +} + +EXPORT_API void appcore_efl_base_window_on_aux_message(int type, void *event) +{ + appcore_ui_base_window_on_aux_message(type, event); +} + EXPORT_API void appcore_efl_base_pause(void) { appcore_ui_base_pause(); @@ -321,3 +353,8 @@ EXPORT_API void appcore_efl_base_set_bg_state(bool bg_state) { appcore_ui_base_set_bg_state(bg_state); } + +EXPORT_API void appcore_efl_base_set_system_resource_reclaiming(bool enable) +{ + appcore_ui_base_set_system_resource_reclaiming(enable); +}