From 7c8b2da2863bb734236f5758288a00eb0d8c047a Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 4 Apr 2016 17:12:38 +0900 Subject: [PATCH] efl ecore - init vpath on ecore init so we have a base object working this inits a new vpath object and adds it at priority 0 to the vpath manager so you can use the vpath manager to create vpath file objects and look things up. @feature --- src/lib/ecore/Ecore.h | 1 + src/lib/ecore/ecore.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/lib/ecore/Ecore.h b/src/lib/ecore/Ecore.h index e843038964..477335ac2d 100644 --- a/src/lib/ecore/Ecore.h +++ b/src/lib/ecore/Ecore.h @@ -296,6 +296,7 @@ #define _ECORE_H #include +#include #ifdef _MSC_VER # include diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c index 247612b4cf..d7eead345d 100644 --- a/src/lib/ecore/ecore.c +++ b/src/lib/ecore/ecore.c @@ -30,6 +30,7 @@ #include "Ecore.h" #include "ecore_private.h" +#include "Efl.h" #if defined(HAVE_MALLINFO) || defined(HAVE_MALLOC_INFO) #include @@ -116,6 +117,8 @@ static Ecore_Memory_State _ecore_memory_state = ECORE_MEMORY_STATE_NORMAL; static Ecore_Timer *_systemd_watchdog = NULL; #endif +static Efl_Vpath *vpath = NULL; + Eina_Lock _ecore_main_loop_lock; int _ecore_main_lock_count; @@ -243,6 +246,10 @@ ecore_init(void) if (_ecore_fps_debug) _ecore_fps_debug_init(); if (!ecore_mempool_init()) goto shutdown_mempool; _ecore_main_loop_init(); + + vpath = eo_add(EFL_VPATH_CORE_CLASS, NULL); + if (vpath) efl_vpath_manager_register(EFL_VPATH_MANAGER_CLASS, 0, vpath); + _ecore_signal_init(); #ifndef HAVE_EXOTIC _ecore_exe_init(); @@ -394,6 +401,13 @@ ecore_shutdown(void) _ecore_event_shutdown(); _ecore_main_shutdown(); _ecore_signal_shutdown(); + + if (vpath) + { + eo_del(vpath); + vpath = NULL; + } + _ecore_main_loop_shutdown(); #if defined(HAVE_MALLINFO) || defined(HAVE_MALLOC_INFO)