From 29218be70bc1344f03d4a942013161f0ce0ae751 Mon Sep 17 00:00:00 2001 From: englebass Date: Thu, 7 Jan 2010 00:30:05 +0000 Subject: [PATCH] Patch from Mathieu Taillefumier I modified some hearder file in ecore to ease the cleanup of the private header files in ecore. Each module has now a private header with its own log color (eina_log related). I also created two private header files for ecore_sdl and ecore_input for this purpose and corrected some typos in the xlib_xcb private header file. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@44933 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/ecore_con/ecore_con.c | 2 +- src/lib/ecore_con/ecore_con_private.h | 6 ++++ src/lib/ecore_config/ecore_config.c | 2 +- src/lib/ecore_config/ecore_config_private.h | 5 +++- src/lib/ecore_directfb/ecore_directfb.c | 4 ++- src/lib/ecore_directfb/ecore_directfb_private.h | 10 ++++++- src/lib/ecore_evas/ecore_evas.c | 2 +- src/lib/ecore_evas/ecore_evas_private.h | 5 ++++ src/lib/ecore_file/ecore_file.c | 2 +- src/lib/ecore_file/ecore_file_private.h | 6 ++++ src/lib/ecore_imf/ecore_imf.c | 2 +- src/lib/ecore_imf/ecore_imf_private.h | 5 ++++ src/lib/ecore_input/ecore_input.c | 31 ++++----------------- src/lib/ecore_input/ecore_input_private.h | 37 +++++++++++++++++++++++++ src/lib/ecore_ipc/ecore_ipc.c | 2 +- src/lib/ecore_ipc/ecore_ipc_private.h | 6 ++++ src/lib/ecore_job/ecore_job.c | 2 +- src/lib/ecore_job/ecore_job_private.h | 5 ++++ src/lib/ecore_sdl/ecore_sdl.c | 30 ++------------------ src/lib/ecore_sdl/ecore_sdl_private.h | 35 +++++++++++++++++++++++ src/lib/ecore_txt/ecore_txt_private.h | 5 ++++ src/lib/ecore_win32/ecore_win32.c | 2 +- src/lib/ecore_win32/ecore_win32_private.h | 15 ++++++++++ src/lib/ecore_wince/ecore_wince.c | 2 +- src/lib/ecore_wince/ecore_wince_private.h | 14 ++++++++++ src/lib/ecore_x/xcb/ecore_xcb.c | 2 +- src/lib/ecore_x/xcb/ecore_xcb_private.h | 7 ++++- src/lib/ecore_x/xlib/ecore_x.c | 2 +- src/lib/ecore_x/xlib/ecore_x_private.h | 4 +++ 29 files changed, 184 insertions(+), 68 deletions(-) create mode 100644 src/lib/ecore_input/ecore_input_private.h create mode 100644 src/lib/ecore_sdl/ecore_sdl_private.h diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c index e600485..213cc14 100644 --- a/src/lib/ecore_con/ecore_con.c +++ b/src/lib/ecore_con/ecore_con.c @@ -83,7 +83,7 @@ ecore_con_init(void) if (!ecore_init()) return --_ecore_con_init_count; - _ecore_con_log_dom = eina_log_domain_register("EcoreCon", ECORE_DEFAULT_LOG_COLOR); + _ecore_con_log_dom = eina_log_domain_register("EcoreCon", ECORE_CON_DEFAULT_LOG_COLOR); if(_ecore_con_log_dom < 0) { EINA_LOG_ERR("Impossible to create a log domain foe Ecore Con."); diff --git a/src/lib/ecore_con/ecore_con_private.h b/src/lib/ecore_con/ecore_con_private.h index 86fb340..7734be5 100644 --- a/src/lib/ecore_con/ecore_con_private.h +++ b/src/lib/ecore_con/ecore_con_private.h @@ -23,6 +23,12 @@ #define READBUFSIZ 65536 extern int _ecore_con_log_dom ; + +#ifdef ECORE_CON_DEFAULT_LOG_COLOR +#undef ECORE_LOG_DEFAULT_LOG_COLOR +#endif +#define ECORE_CON_DEFAULT_LOG_COLOR EINA_COLOR_BLUE + #ifdef ERR # undef ERR #endif diff --git a/src/lib/ecore_config/ecore_config.c b/src/lib/ecore_config/ecore_config.c index 491f121..956f596 100644 --- a/src/lib/ecore_config/ecore_config.c +++ b/src/lib/ecore_config/ecore_config.c @@ -1674,7 +1674,7 @@ ecore_config_init(const char *name) { char *path; Ecore_Config_Prop *list; - _ecore_config_log_dom = eina_log_domain_register("EcoreConfig", ECORE_DEFAULT_LOG_COLOR); + _ecore_config_log_dom = eina_log_domain_register("EcoreConfig", ECORE_CONFIG_DEFAULT_LOG_COLOR); if(_ecore_config_log_dom < 0) { EINA_LOG_ERR("Impossible to create a log domain for the Ecore config module."); diff --git a/src/lib/ecore_config/ecore_config_private.h b/src/lib/ecore_config/ecore_config_private.h index abbb1db..b97f695 100644 --- a/src/lib/ecore_config/ecore_config_private.h +++ b/src/lib/ecore_config/ecore_config_private.h @@ -1,6 +1,9 @@ #ifndef _ECORE_CONFIG_PRIVATE_H # define _ECORE_CONFIG_PRIVATE_H - +#ifdef ECORE_CONFIG_DEFAULT_LOG_COLOR +# undef ECORE_CONFIG_DEFAULT_LOG_COLOR +#endif +#define ECORE_CONFIG_DEFAULT_LOG_COLOR EINA_COLOR_BLUE /* eina_log related things */ extern int _ecore_config_log_dom; diff --git a/src/lib/ecore_directfb/ecore_directfb.c b/src/lib/ecore_directfb/ecore_directfb.c index b6d0706..2b6c44d 100644 --- a/src/lib/ecore_directfb/ecore_directfb.c +++ b/src/lib/ecore_directfb/ecore_directfb.c @@ -24,6 +24,8 @@ * - * */ int _ecore_directfb_log_dom = -1; + + static int _ecore_directfb_init_count = 0; static int _window_event_fd = 0; @@ -659,7 +661,7 @@ ecore_directfb_init(const char *name __UNUSED__) int i = 0; if (++_ecore_directfb_init_count != 1) return _ecore_directfb_init_count; - _ecore_directfb_log_dom = eina_log_domain_register("EcoreDirectFB", ECORE_DEFAULT_LOG_COLOR); + _ecore_directfb_log_dom = eina_log_domain_register("EcoreDirectFB", ECORE_DIRECTFB_DEFAULT_LOG_COLOR); if(_ecore_directfb_log_dom < 0) { EINA_LOG_ERR("Impossible to create a log domain for the Ecore directFB module."); diff --git a/src/lib/ecore_directfb/ecore_directfb_private.h b/src/lib/ecore_directfb/ecore_directfb_private.h index 0977a2f..e9124aa 100644 --- a/src/lib/ecore_directfb/ecore_directfb_private.h +++ b/src/lib/ecore_directfb/ecore_directfb_private.h @@ -1,7 +1,14 @@ - +#ifndef _ECORE_DIRECTFB_PRIVATE_H +#define _ECORE_DIRECTFB_PRIVATE_H /* eina_log related things */ extern int _ecore_directfb_log_dom; + +#ifdef ECORE_DIRECTFB_DEFAULT_LOG_COLOR +#undef ECORE_DIRECTFB_DEFAULT_LOG_COLOR +#endif +#define ECORE_DIRECTFB_DEFAULT_LOG_COLOR EINA_COLOR_BLUE + #ifdef ERR # undef ERR #endif @@ -42,3 +49,4 @@ struct keymap char *name; char *string; }; +#endif diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index ea96690..ca292ad 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -165,7 +165,7 @@ ecore_evas_init(void) if (!ecore_init()) goto shutdown_evas; - _ecore_evas_log_dom = eina_log_domain_register("Ecore_Evas", ECORE_DEFAULT_LOG_COLOR); + _ecore_evas_log_dom = eina_log_domain_register("Ecore_Evas", ECORE_EVAS_DEFAULT_LOG_COLOR); if(_ecore_evas_log_dom < 0) { EINA_LOG_ERR("Impossible to create a log domain for Ecore_Evas."); diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h index 026fb4c..d3c9b38 100644 --- a/src/lib/ecore_evas/ecore_evas_private.h +++ b/src/lib/ecore_evas/ecore_evas_private.h @@ -101,6 +101,11 @@ extern int _ecore_evas_log_dom; +#ifdef ECORE_EVAS_DEFAULT_LOG_COLOR +# undef ECORE_EVAS_DEFAULT_LOG_COLOR +#endif +#define ECORE_EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE + #ifdef ERR # undef ERR #endif diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c index fc61fa4..564c137 100644 --- a/src/lib/ecore_file/ecore_file.c +++ b/src/lib/ecore_file/ecore_file.c @@ -41,7 +41,7 @@ ecore_file_init() { if (++_ecore_file_init_count != 1) return _ecore_file_init_count; - _ecore_file_log_dom = eina_log_domain_register("EcoreFile", ECORE_DEFAULT_LOG_COLOR); + _ecore_file_log_dom = eina_log_domain_register("EcoreFile", ECORE_FILE_DEFAULT_LOG_COLOR); if(_ecore_file_log_dom < 0) { EINA_LOG_ERR("Impossible to create a log domain for the ecore file module."); diff --git a/src/lib/ecore_file/ecore_file_private.h b/src/lib/ecore_file/ecore_file_private.h index 073e446..0729872 100644 --- a/src/lib/ecore_file/ecore_file_private.h +++ b/src/lib/ecore_file/ecore_file_private.h @@ -19,6 +19,12 @@ #include "Ecore_File.h" extern int _ecore_file_log_dom; + +#ifdef ECORE_FILE_DEFAULT_LOG_COLOR +#undef ECORE_FILE_DEFAULT_LOG_COLOR +#endif +#define ECORE_FILE_DEFAULT_LOG_COLOR EINA_COLOR_BLUE + #ifdef ERR # undef ERR #endif diff --git a/src/lib/ecore_imf/ecore_imf.c b/src/lib/ecore_imf/ecore_imf.c index f563519..e3b2915 100644 --- a/src/lib/ecore_imf/ecore_imf.c +++ b/src/lib/ecore_imf/ecore_imf.c @@ -42,7 +42,7 @@ ecore_imf_init(void) if (!ecore_init()) return --_ecore_imf_init_count; - _ecore_imf_log_dom = eina_log_domain_register("EcoreIMF", ECORE_DEFAULT_LOG_COLOR); + _ecore_imf_log_dom = eina_log_domain_register("EcoreIMF", ECORE_IMF_DEFAULT_LOG_COLOR); if(_ecore_imf_log_dom < 0) { EINA_LOG_ERR("Impossible to create a log domain for the Ecore IMF module."); diff --git a/src/lib/ecore_imf/ecore_imf_private.h b/src/lib/ecore_imf/ecore_imf_private.h index 20e8bf4..76a9be4 100644 --- a/src/lib/ecore_imf/ecore_imf_private.h +++ b/src/lib/ecore_imf/ecore_imf_private.h @@ -3,6 +3,11 @@ #define ECORE_MAGIC_CONTEXT 0x56c1b39a +#ifdef ECORE_IMF_DEFAULT_LOG_COLOR +#undef ECORE_IMF_DEFAULT_LOG_COLOR +#endif +#define ECORE_IMF_DEFAULT_LOG_COLOR EINA_COLOR_BLUE + extern int _ecore_imf_log_dom; #ifdef ERR # undef ERR diff --git a/src/lib/ecore_input/ecore_input.c b/src/lib/ecore_input/ecore_input.c index 6372ea2..2a2d73e 100644 --- a/src/lib/ecore_input/ecore_input.c +++ b/src/lib/ecore_input/ecore_input.c @@ -10,37 +10,14 @@ #include #include "Ecore.h" +#include "ecore_input_private.h" #include "ecore_private.h" #include "Ecore_Input.h" #include "Evas.h" -static int _ecore_input_log_dom = -1; +int _ecore_input_log_dom = -1; -#ifdef ERR -# undef ERR -#endif -#define ERR(...) EINA_LOG_DOM_ERR(_ecore_input_log_dom, __VA_ARGS__) - -#ifdef DBG -# undef DBG -#endif -#define DBG(...) EINA_LOG_DOM_DBG(_ecore_input_log_dom, __VA_ARGS__) - -#ifdef INF -# undef INF -#endif -#define INF(...) EINA_LOG_DOM_INFO(_ecore_input_log_dom, __VA_ARGS__) - -#ifdef WRN -# undef WRN -#endif -#define WRN(...) EINA_LOG_DOM_WARN(_ecore_input_log_dom, __VA_ARGS__) - -#ifdef CRIT -# undef CRIT -#endif -#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_input_log_dom, __VA_ARGS__) typedef struct _Ecore_Input_Window Ecore_Input_Window; struct _Ecore_Input_Window @@ -71,12 +48,14 @@ ecore_event_init(void) { if (++_ecore_event_init_count != 1) return _ecore_event_init_count; - _ecore_input_log_dom = eina_log_domain_register("EcoreInput", ECORE_DEFAULT_LOG_COLOR); + + _ecore_input_log_dom = eina_log_domain_register("EcoreInput", ECORE_INPUT_DEFAULT_LOG_COLOR); if(_ecore_input_log_dom < 0) { EINA_LOG_ERR("Impossible to create a log domain for the ecore input module."); return --_ecore_event_init_count; } + ECORE_EVENT_KEY_DOWN = ecore_event_type_new(); ECORE_EVENT_KEY_UP = ecore_event_type_new(); ECORE_EVENT_MOUSE_BUTTON_DOWN = ecore_event_type_new(); diff --git a/src/lib/ecore_input/ecore_input_private.h b/src/lib/ecore_input/ecore_input_private.h new file mode 100644 index 0000000..5660a20 --- /dev/null +++ b/src/lib/ecore_input/ecore_input_private.h @@ -0,0 +1,37 @@ +#ifndef _ECORE_INPUT_PRIVATE_H +#define _ECORE_INPUT_PRIVATE_H + +extern int _ecore_input_log_dom; + +#ifdef ECORE_INPUT_DEFAULT_LOG_COLOR +# undef ECORE_INPUT_DEFAULT_LOG_COLOR +#endif + +#define ECORE_INPUT_DEFAULT_LOG_COLOR EINA_COLOR_BLUE + +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_ecore_input_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_ecore_input_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_ecore_input_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_ecore_input_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_input_log_dom, __VA_ARGS__) + +#endif diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c index e5d8a73..3e6c027 100644 --- a/src/lib/ecore_ipc/ecore_ipc.c +++ b/src/lib/ecore_ipc/ecore_ipc.c @@ -267,7 +267,7 @@ ecore_ipc_init(void) if (++_ecore_ipc_init_count != 1) return _ecore_ipc_init_count; - _ecore_ipc_log_dom = eina_log_domain_register("EcoreIpc", ECORE_DEFAULT_LOG_COLOR); + _ecore_ipc_log_dom = eina_log_domain_register("EcoreIpc", ECORE_IPC_DEFAULT_LOG_COLOR); if(_ecore_ipc_log_dom < 0) { EINA_LOG_ERR("Impossible to create a log domain for the Ecore IPC module."); diff --git a/src/lib/ecore_ipc/ecore_ipc_private.h b/src/lib/ecore_ipc/ecore_ipc_private.h index 4c0c702..b46f62b 100644 --- a/src/lib/ecore_ipc/ecore_ipc_private.h +++ b/src/lib/ecore_ipc/ecore_ipc_private.h @@ -3,6 +3,12 @@ extern int _ecore_ipc_log_dom; + +#ifdef ECORE_IPC_DEFAULT_LOG_COLOR +# undef ECORE_IPC_DEFAULT_LOG_COLOR +#endif +#define ECORE_IPC_DEFAULT_LOG_COLOR EINA_COLOR_BLUE + #ifdef ERR # undef ERR #endif diff --git a/src/lib/ecore_job/ecore_job.c b/src/lib/ecore_job/ecore_job.c index e125be9..d8e3f49 100644 --- a/src/lib/ecore_job/ecore_job.c +++ b/src/lib/ecore_job/ecore_job.c @@ -26,7 +26,7 @@ ecore_job_init(void) { if (++_ecore_job_init_count != 1) return _ecore_job_init_count; - _ecore_job_log_dom = eina_log_domain_register("EcoreJob", ECORE_DEFAULT_LOG_COLOR); + _ecore_job_log_dom = eina_log_domain_register("EcoreJob", ECORE_JOB_DEFAULT_LOG_COLOR); if(_ecore_job_log_dom < 0) { EINA_LOG_ERR("Impossible to create a log domain for the Ecore Job module."); diff --git a/src/lib/ecore_job/ecore_job_private.h b/src/lib/ecore_job/ecore_job_private.h index 96d0db8..8620626 100644 --- a/src/lib/ecore_job/ecore_job_private.h +++ b/src/lib/ecore_job/ecore_job_private.h @@ -4,6 +4,11 @@ #define ECORE_MAGIC_JOB 0x76543210 extern int _ecore_job_log_dom; +#ifdef ECORE_JOB_DEFAULT_LOG_COLOR +# undef ECORE_JOB_DEFAULT_LOG_COLOR +#endif +#define ECORE_JOB_DEFAULT_LOG_COLOR EINA_COLOR_BLUE + #ifdef ERR # undef ERR #endif diff --git a/src/lib/ecore_sdl/ecore_sdl.c b/src/lib/ecore_sdl/ecore_sdl.c index 7537dfb..f2d9c4f 100644 --- a/src/lib/ecore_sdl/ecore_sdl.c +++ b/src/lib/ecore_sdl/ecore_sdl.c @@ -12,37 +12,13 @@ #include "Ecore_Sdl.h" #include "Ecore_Input.h" #include "Ecore.h" +#include "ecore_sdl_private.h" #include "ecore_private.h" #include "Ecore_Sdl_Keys.h" #include -static int _ecore_sdl_log_dom = -1; - -#ifdef ERR -# undef ERR -#endif -#define ERR(...) EINA_LOG_DOM_ERR(_ecore_sdl_log_dom, __VA_ARGS__) - -#ifdef DBG -# undef DBG -#endif -#define DBG(...) EINA_LOG_DOM_DBG(_ecore_sdl_log_dom, __VA_ARGS__) - -#ifdef INF -# undef INF -#endif -#define INF(...) EINA_LOG_DOM_INFO(_ecore_sdl_log_dom, __VA_ARGS__) - -#ifdef WRN -# undef WRN -#endif -#define WRN(...) EINA_LOG_DOM_WARN(_ecore_sdl_log_dom, __VA_ARGS__) - -#ifdef CRIT -# undef CRIT -#endif -#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_sdl_log_dom, __VA_ARGS__) +int _ecore_sdl_log_dom = -1; typedef struct _Ecore_SDL_Pressed Ecore_SDL_Pressed; struct _Ecore_SDL_Pressed @@ -95,7 +71,7 @@ ecore_sdl_init(const char *name __UNUSED__) { if(++_ecore_sdl_init_count != 1) return _ecore_sdl_init_count; - _ecore_sdl_log_dom = eina_log_domain_register("EcoreSdl", ECORE_DEFAULT_LOG_COLOR); + _ecore_sdl_log_dom = eina_log_domain_register("EcoreSdl", ECORE_SDL_DEFAULT_LOG_COLOR); if(_ecore_sdl_log_dom < 0) { EINA_LOG_ERR("Impossible to create a log domain for the Ecore SDL module."); diff --git a/src/lib/ecore_sdl/ecore_sdl_private.h b/src/lib/ecore_sdl/ecore_sdl_private.h new file mode 100644 index 0000000..96ac856 --- /dev/null +++ b/src/lib/ecore_sdl/ecore_sdl_private.h @@ -0,0 +1,35 @@ +#ifndef _ECORE_SDL_PRIVATE_H +# define _ECORE_SDL_PRIVATE_H + +extern int _ecore_sdl_log_dom +#ifdef EINA_SDL_DEFAULT_LOG_COLOR +# undef EINA_SDL_DEFAULT_LOG_COLOR +#endif +#define EINA_SDL_DEFAULT_LOG_COLOR EINA_COLOR_BLUE + +#ifdef ERR +# undef ERR +#endif +#define ERR(...) EINA_LOG_DOM_ERR(_ecore_sdl_log_dom, __VA_ARGS__) + +#ifdef DBG +# undef DBG +#endif +#define DBG(...) EINA_LOG_DOM_DBG(_ecore_sdl_log_dom, __VA_ARGS__) + +#ifdef INF +# undef INF +#endif +#define INF(...) EINA_LOG_DOM_INFO(_ecore_sdl_log_dom, __VA_ARGS__) + +#ifdef WRN +# undef WRN +#endif +#define WRN(...) EINA_LOG_DOM_WARN(_ecore_sdl_log_dom, __VA_ARGS__) + +#ifdef CRIT +# undef CRIT +#endif +#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_sdl_log_dom, __VA_ARGS__) + +#endif diff --git a/src/lib/ecore_txt/ecore_txt_private.h b/src/lib/ecore_txt/ecore_txt_private.h index c6dbb36..8ab81db 100644 --- a/src/lib/ecore_txt/ecore_txt_private.h +++ b/src/lib/ecore_txt/ecore_txt_private.h @@ -3,6 +3,11 @@ extern int _ecore_txt_log_dom; +#ifdef ECORE_TXT_DEFAULT_LOG_COLOR +# undef ECORE_TXT_DEFAULT_LOG_COLOR +#endif +#define ECORE_TXT_DEFAULT_LOG_COLOR EINA_COLOR_BLUE + #ifdef ERR # undef ERR #endif diff --git a/src/lib/ecore_win32/ecore_win32.c b/src/lib/ecore_win32/ecore_win32.c index 65b4503..eb70763 100644 --- a/src/lib/ecore_win32/ecore_win32.c +++ b/src/lib/ecore_win32/ecore_win32.c @@ -89,7 +89,7 @@ ecore_win32_init() return --_ecore_win32_init_count; eina_log_print_cb_set(_ecore_win32_error_print_cb, NULL); - _ecore_win32_log_dom_global = eina_log_domain_register("ecore_win32", EINA_COLOR_LIGHTBLUE); + _ecore_win32_log_dom_global = eina_log_domain_register("ecore_win32", ECORE_WIN32_DEFAULT_LOG_COLOR); if (_ecore_win32_log_dom_global < 0) { EINA_LOG_ERR("Ecore_Win32: Could not register log domain"); diff --git a/src/lib/ecore_win32/ecore_win32_private.h b/src/lib/ecore_win32/ecore_win32_private.h index 9c12cff..e824dac 100644 --- a/src/lib/ecore_win32/ecore_win32_private.h +++ b/src/lib/ecore_win32/ecore_win32_private.h @@ -14,8 +14,23 @@ extern "C" { /* logging messages macros */ extern int _ecore_win32_log_dom_global; +#ifdef ECORE_WIN32_DEFAULT_LOG_COLOR +# undef ECORE_WIN32_DEFAULT_LOG_COLOR +#endif +#define ECORE_WIN32_DEFAULT_LOG_COLOR EINA_COLOR_LIGHTBLUE + +#ifdef ERR +# undef ERR +#endif #define ERR(...) EINA_LOG_DOM_ERR(_ecore_win32_log_dom_global , __VA_ARGS__) +#ifdef DBG +#undef DBG +#endif #define DBG(...) EINA_LOG_DOM_DBG(_ecore_win32_log_dom_global , __VA_ARGS__) + +#ifdef INF +#undef INF +#endif #define INF(...) EINA_LOG_DOM_INFO(_ecore_win32_log_dom_global , __VA_ARGS__) #define ECORE_WIN32_WINDOW_CLASS "Ecore_Win32_Window_Class" diff --git a/src/lib/ecore_wince/ecore_wince.c b/src/lib/ecore_wince/ecore_wince.c index 47a1fd1..c507471 100644 --- a/src/lib/ecore_wince/ecore_wince.c +++ b/src/lib/ecore_wince/ecore_wince.c @@ -74,7 +74,7 @@ ecore_wince_init() return --_ecore_wince_init_count; eina_log_print_cb_set(_ecore_wince_error_print_cb, NULL); - _ecore_wince_log_dom_global = eina_log_domain_register("ecore_wince", EINA_COLOR_LIGHTBLUE); + _ecore_wince_log_dom_global = eina_log_domain_register("ecore_wince", ECORE_WINCE_DEFAULT_LOG_COLOR); if (_ecore_wince_log_dom_global < 0) { EINA_LOG_ERR("Ecore_WinCE: Could not register log domain"); diff --git a/src/lib/ecore_wince/ecore_wince_private.h b/src/lib/ecore_wince/ecore_wince_private.h index 256f85b..09a2f0d 100644 --- a/src/lib/ecore_wince/ecore_wince_private.h +++ b/src/lib/ecore_wince/ecore_wince_private.h @@ -9,8 +9,22 @@ /* logging messages macros */ extern int _ecore_wince_log_dom_global; +#ifdef ECORE_WINCE_DEFAULT_LOG_COLOR +#undef ECORE_WINCE_DEFAULT_LOG_COLOR +#endif +#define ECORE_WINCE_DEFAULT_LOG_COLOR EINA_COLOR_LIGHTBLUE + +#ifdef ERR +# undef ERR +#endif #define ERR(...) EINA_LOG_DOM_ERR(_ecore_wince_log_dom_global , __VA_ARGS__) +#ifdef DBG +# undef DBG +#endif #define DBG(...) EINA_LOG_DOM_DBG(_ecore_wince_log_dom_global , __VA_ARGS__) +#ifdef INF +# undef INF +#endif #define INF(...) EINA_LOG_DOM_INFO(_ecore_wince_log_dom_global , __VA_ARGS__) #define ECORE_WINCE_WINDOW_CLASS L"Ecore_WinCE_Window_Class" diff --git a/src/lib/ecore_x/xcb/ecore_xcb.c b/src/lib/ecore_x/xcb/ecore_xcb.c index d9c9e45..f5a667d 100644 --- a/src/lib/ecore_x/xcb/ecore_xcb.c +++ b/src/lib/ecore_x/xcb/ecore_xcb.c @@ -196,7 +196,7 @@ ecore_x_init(const char *name) if (--_ecore_xcb_init_count != 1) return _ecore_xcb_init_count; - _ecore_x11xcb_log_dom = eina_log_domain_register("EcoreXCB", ECORE_DEFAULT_LOG_COLOR); + _ecore_x11xcb_log_dom = eina_log_domain_register("EcoreXCB", ECORE_XLIB_XCB_DEFAULT_LOG_COLOR); if(_ecore_x11xcb_log_dom < 0) { EINA_LOG_ERR("Impossible to create a log domain the Ecore XCB module."); diff --git a/src/lib/ecore_x/xcb/ecore_xcb_private.h b/src/lib/ecore_x/xcb/ecore_xcb_private.h index 8f494d2..115b1fd 100644 --- a/src/lib/ecore_x/xcb/ecore_xcb_private.h +++ b/src/lib/ecore_x/xcb/ecore_xcb_private.h @@ -61,7 +61,12 @@ /* FIXME: this is for simulation only */ #include "Ecore_Txt.h" -static int _ecore_x11xcb_log_dom -1; +extern int _ecore_x11xcb_log_dom ; + +#ifdef ECORE_XLIB_XCB_DEFAULT_LOG_COLOR +# undef ECORE_XLIB_XCB_DEFAULT_LOG_COLOR +#endif +#define ECORE_XLIB_XCB_DEFAULT_LOG_COLOR EINA_COLOR_BLUE #ifdef ERR # undef ERR diff --git a/src/lib/ecore_x/xlib/ecore_x.c b/src/lib/ecore_x/xlib/ecore_x.c index 9105313..d24873a 100644 --- a/src/lib/ecore_x/xlib/ecore_x.c +++ b/src/lib/ecore_x/xlib/ecore_x.c @@ -170,7 +170,7 @@ ecore_x_init(const char *name) if (++_ecore_x_init_count != 1) return _ecore_x_init_count; - _ecore_xlib_log_dom = eina_log_domain_register("EcoreX11", ECORE_DEFAULT_LOG_COLOR); + _ecore_xlib_log_dom = eina_log_domain_register("EcoreX11", ECORE_XLIB_DEFAULT_LOG_COLOR); if(_ecore_xlib_log_dom < 0) { EINA_LOG_ERR("Impossible to create a log domain for the Ecore Xlib module."); diff --git a/src/lib/ecore_x/xlib/ecore_x_private.h b/src/lib/ecore_x/xlib/ecore_x_private.h index 5874381..20f7530 100644 --- a/src/lib/ecore_x/xlib/ecore_x_private.h +++ b/src/lib/ecore_x/xlib/ecore_x_private.h @@ -59,6 +59,10 @@ #include "Ecore_Txt.h" extern int _ecore_xlib_log_dom; +#ifdef ECORE_XLIB_DEFAULT_LOG_COLOR +# undef ECORE_XLIB_DEFAULT_LOG_COLOR +#endif +#define ECORE_XLIB_DEFAULT_LOG_COLOR EINA_COLOR_BLUE #ifdef ERR # undef ERR -- 2.7.4