diff options
author | Sebastian Dransfeld <sd@tango.flipp.net> | 2010-01-07 00:30:05 +0000 |
---|---|---|
committer | Sebastian Dransfeld <sd@tango.flipp.net> | 2010-01-07 00:30:05 +0000 |
commit | 8007e730772d012bd65237a2e8650f72590659d6 (patch) | |
tree | 89673da66c4087a7c4d3869a60ce7b968fb6c77a /legacy/ecore/src/lib/ecore_input | |
parent | ff86d2766313980961245d3cde25b79c80e07330 (diff) |
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.
SVN revision: 44933
Diffstat (limited to 'legacy/ecore/src/lib/ecore_input')
-rw-r--r-- | legacy/ecore/src/lib/ecore_input/ecore_input.c | 31 | ||||
-rw-r--r-- | legacy/ecore/src/lib/ecore_input/ecore_input_private.h | 37 |
2 files changed, 42 insertions, 26 deletions
diff --git a/legacy/ecore/src/lib/ecore_input/ecore_input.c b/legacy/ecore/src/lib/ecore_input/ecore_input.c index 6372ea2717..2a2d73ece8 100644 --- a/legacy/ecore/src/lib/ecore_input/ecore_input.c +++ b/legacy/ecore/src/lib/ecore_input/ecore_input.c | |||
@@ -10,37 +10,14 @@ | |||
10 | #include <string.h> | 10 | #include <string.h> |
11 | 11 | ||
12 | #include "Ecore.h" | 12 | #include "Ecore.h" |
13 | #include "ecore_input_private.h" | ||
13 | #include "ecore_private.h" | 14 | #include "ecore_private.h" |
14 | #include "Ecore_Input.h" | 15 | #include "Ecore_Input.h" |
15 | #include "Evas.h" | 16 | #include "Evas.h" |
16 | 17 | ||
17 | 18 | ||
18 | static int _ecore_input_log_dom = -1; | 19 | int _ecore_input_log_dom = -1; |
19 | 20 | ||
20 | #ifdef ERR | ||
21 | # undef ERR | ||
22 | #endif | ||
23 | #define ERR(...) EINA_LOG_DOM_ERR(_ecore_input_log_dom, __VA_ARGS__) | ||
24 | |||
25 | #ifdef DBG | ||
26 | # undef DBG | ||
27 | #endif | ||
28 | #define DBG(...) EINA_LOG_DOM_DBG(_ecore_input_log_dom, __VA_ARGS__) | ||
29 | |||
30 | #ifdef INF | ||
31 | # undef INF | ||
32 | #endif | ||
33 | #define INF(...) EINA_LOG_DOM_INFO(_ecore_input_log_dom, __VA_ARGS__) | ||
34 | |||
35 | #ifdef WRN | ||
36 | # undef WRN | ||
37 | #endif | ||
38 | #define WRN(...) EINA_LOG_DOM_WARN(_ecore_input_log_dom, __VA_ARGS__) | ||
39 | |||
40 | #ifdef CRIT | ||
41 | # undef CRIT | ||
42 | #endif | ||
43 | #define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_input_log_dom, __VA_ARGS__) | ||
44 | 21 | ||
45 | typedef struct _Ecore_Input_Window Ecore_Input_Window; | 22 | typedef struct _Ecore_Input_Window Ecore_Input_Window; |
46 | struct _Ecore_Input_Window | 23 | struct _Ecore_Input_Window |
@@ -71,12 +48,14 @@ ecore_event_init(void) | |||
71 | { | 48 | { |
72 | if (++_ecore_event_init_count != 1) | 49 | if (++_ecore_event_init_count != 1) |
73 | return _ecore_event_init_count; | 50 | return _ecore_event_init_count; |
74 | _ecore_input_log_dom = eina_log_domain_register("EcoreInput", ECORE_DEFAULT_LOG_COLOR); | 51 | |
52 | _ecore_input_log_dom = eina_log_domain_register("EcoreInput", ECORE_INPUT_DEFAULT_LOG_COLOR); | ||
75 | if(_ecore_input_log_dom < 0) | 53 | if(_ecore_input_log_dom < 0) |
76 | { | 54 | { |
77 | EINA_LOG_ERR("Impossible to create a log domain for the ecore input module."); | 55 | EINA_LOG_ERR("Impossible to create a log domain for the ecore input module."); |
78 | return --_ecore_event_init_count; | 56 | return --_ecore_event_init_count; |
79 | } | 57 | } |
58 | |||
80 | ECORE_EVENT_KEY_DOWN = ecore_event_type_new(); | 59 | ECORE_EVENT_KEY_DOWN = ecore_event_type_new(); |
81 | ECORE_EVENT_KEY_UP = ecore_event_type_new(); | 60 | ECORE_EVENT_KEY_UP = ecore_event_type_new(); |
82 | ECORE_EVENT_MOUSE_BUTTON_DOWN = ecore_event_type_new(); | 61 | ECORE_EVENT_MOUSE_BUTTON_DOWN = ecore_event_type_new(); |
diff --git a/legacy/ecore/src/lib/ecore_input/ecore_input_private.h b/legacy/ecore/src/lib/ecore_input/ecore_input_private.h new file mode 100644 index 0000000000..5660a2024a --- /dev/null +++ b/legacy/ecore/src/lib/ecore_input/ecore_input_private.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #ifndef _ECORE_INPUT_PRIVATE_H | ||
2 | #define _ECORE_INPUT_PRIVATE_H | ||
3 | |||
4 | extern int _ecore_input_log_dom; | ||
5 | |||
6 | #ifdef ECORE_INPUT_DEFAULT_LOG_COLOR | ||
7 | # undef ECORE_INPUT_DEFAULT_LOG_COLOR | ||
8 | #endif | ||
9 | |||
10 | #define ECORE_INPUT_DEFAULT_LOG_COLOR EINA_COLOR_BLUE | ||
11 | |||
12 | #ifdef ERR | ||
13 | # undef ERR | ||
14 | #endif | ||
15 | #define ERR(...) EINA_LOG_DOM_ERR(_ecore_input_log_dom, __VA_ARGS__) | ||
16 | |||
17 | #ifdef DBG | ||
18 | # undef DBG | ||
19 | #endif | ||
20 | #define DBG(...) EINA_LOG_DOM_DBG(_ecore_input_log_dom, __VA_ARGS__) | ||
21 | |||
22 | #ifdef INF | ||
23 | # undef INF | ||
24 | #endif | ||
25 | #define INF(...) EINA_LOG_DOM_INFO(_ecore_input_log_dom, __VA_ARGS__) | ||
26 | |||
27 | #ifdef WRN | ||
28 | # undef WRN | ||
29 | #endif | ||
30 | #define WRN(...) EINA_LOG_DOM_WARN(_ecore_input_log_dom, __VA_ARGS__) | ||
31 | |||
32 | #ifdef CRIT | ||
33 | # undef CRIT | ||
34 | #endif | ||
35 | #define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_input_log_dom, __VA_ARGS__) | ||
36 | |||
37 | #endif | ||