e_module: added a new init function for initializing module events at pre-stage of... 21/158721/1
authorGwanglim Lee <gl77.lee@samsung.com>
Thu, 2 Nov 2017 14:47:20 +0000 (23:47 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Thu, 2 Nov 2017 14:47:20 +0000 (23:47 +0900)
Change-Id: I94ebea2fd0b5798683f8b8de99b6aebe220dae7e

src/bin/e_main.c
src/bin/e_module.c
src/bin/e_module.h

index f03234c..d005fd3 100644 (file)
@@ -625,6 +625,8 @@ main(int argc, char **argv)
      }
    TRACE_DS_END();
 
+   e_module_event_init();
+
    TSB("E_Pointer Init");
    if (!e_pointer_init())
      {
index ae02e06..1d2b5b4 100644 (file)
@@ -127,6 +127,16 @@ _module_is_important(const char *name)
 }
 
 /* externally accessible functions */
+EINTERN void
+e_module_event_init(void)
+{
+   if (E_EVENT_MODULE_UPDATE) return;
+
+   E_EVENT_MODULE_UPDATE = ecore_event_type_new();
+   E_EVENT_MODULE_INIT_END = ecore_event_type_new();
+   E_EVENT_MODULE_DEFER_JOB = ecore_event_type_new();
+}
+
 EINTERN int
 e_module_init(void)
 {
@@ -137,10 +147,6 @@ e_module_init(void)
 
    if (_e_modules_hash) return 1;
 
-   E_EVENT_MODULE_UPDATE = ecore_event_type_new();
-   E_EVENT_MODULE_INIT_END = ecore_event_type_new();
-   E_EVENT_MODULE_DEFER_JOB = ecore_event_type_new();
-
    _e_module_path_hash = eina_hash_string_superfast_new((Eina_Free_Cb)eina_stringshare_del);
    _e_modules_hash = eina_hash_string_superfast_new(NULL);
 
index 3d742e2..b7f3e34 100644 (file)
@@ -52,6 +52,7 @@ struct _E_Module_Api
    const char *name;
 };
 
+EINTERN void         e_module_event_init(void);
 EINTERN int          e_module_init(void);
 EINTERN int          e_module_shutdown(void);