* simplify a bit and fix init/shutdown functions
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 10 Oct 2009 03:45:35 +0000 (03:45 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 10 Oct 2009 03:45:35 +0000 (03:45 +0000)
 * rename logging macros

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@42993 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_wince/ecore_wince.c
src/lib/ecore_wince/ecore_wince_event.c
src/lib/ecore_wince/ecore_wince_private.h
src/lib/ecore_wince/ecore_wince_window.c

index 0a82b91..821a9d3 100644 (file)
@@ -27,7 +27,7 @@ double              _ecore_wince_double_click_time = 0.25;
 long                _ecore_wince_event_last_time = 0;
 Ecore_WinCE_Window *_ecore_wince_event_last_window = NULL;
 HINSTANCE           _ecore_wince_instance = NULL;
-int                 _ecore_wince_log_dom = -1;
+int                 _ecore_wince_log_dom_global = -1;
 
 int ECORE_WINCE_EVENT_MOUSE_IN              = 0;
 int ECORE_WINCE_EVENT_MOUSE_OUT             = 0;
@@ -67,29 +67,31 @@ ecore_wince_init()
 {
    WNDCLASS wc;
 
-   eina_log_print_cb_set(_ecore_wince_error_print_cb, NULL);
+   if (++_ecore_win32_init_count != 1)
+     return _ecore_win32_init_count;
 
-   if(_ecore_wince_log_dom < 0)
-     _ecore_wince_log_dom = eina_log_domain_register("ecore_wince", EINA_COLOR_LIGHTBLUE);
-   if(_ecore_wince_log_dom < 0)
-     {
-       EINA_LOG_ERR("Could not register log domain: ecore_wince");
-       return 0;
-     }
+   if (!eina_init())
+     return --_ecore_win32_init_count;
 
-   ECORE_WINCE_MSG_INFO("initializing ecore_wince (current count: %d)", _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);
+   if (_ecore_wince_log_dom_global < 0)
+     {
+        EINA_LOG_ERR("Ecore_WinCE: Could not register log domain");
+        goto shutdown_eina;
+      }
 
-   if (_ecore_wince_init_count > 0)
+   if (!ecore_event_init())
      {
-        _ecore_wince_init_count++;
-        return _ecore_wince_init_count;
+        ERR("Ecore_WinCE: Could not init ecore_event");
+        goto unregister_log_domain;
      }
 
    _ecore_wince_instance = GetModuleHandle(NULL);
    if (!_ecore_wince_instance)
      {
-        ECORE_WINCE_MSG_ERR("GetModuleHandle() failed");
-        return 0;
+        ERR("GetModuleHandle() failed");
+        goto shutdown_ecore_event;
      }
 
    memset (&wc, 0, sizeof (wc));
@@ -106,9 +108,8 @@ ecore_wince_init()
 
    if(!RegisterClass(&wc))
      {
-        ECORE_WINCE_MSG_ERR("RegisterClass() failed");
-        FreeLibrary(_ecore_wince_instance);
-        return 0;
+        ERR("RegisterClass() failed");
+        goto free_library;
      }
 
    if (!ECORE_WINCE_EVENT_MOUSE_IN)
@@ -125,11 +126,18 @@ ecore_wince_init()
         ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST = ecore_event_type_new();
      }
 
-   ecore_event_init();
+   return _ecore_wince_init_count;
 
-   _ecore_wince_init_count++;
+ free_library:
+   FreeLibrary(_ecore_win32_instance);
+ shutdown_ecore_event:
+   ecore_event_shutdown();
+ unregister_log_domain:
+   eina_log_domain_unregister(_ecore_win32_log_dom_global);
+ shutdown_eina:
+   eina_shutdown();
 
-   return _ecore_wince_init_count;
+   return --_ecore_win32_init_count;
 }
 
 int
@@ -137,12 +145,8 @@ ecore_wince_shutdown()
 {
    HWND task_bar;
 
-   ECORE_WINCE_MSG_INFO("shutting down ecore_wince (current count: %d)", _ecore_wince_init_count);
-
-   _ecore_wince_init_count--;
-   if (_ecore_wince_init_count > 0) return _ecore_wince_init_count;
-
-   ecore_event_shutdown();
+   if (--_ecore_wince_init_count != 0)
+     return _ecore_wince_init_count;
 
    /* force task bar to be shown (in case the application exits */
    /* while being fullscreen) */
@@ -154,18 +158,16 @@ ecore_wince_shutdown()
      }
 
    if (!UnregisterClass(ECORE_WINCE_WINDOW_CLASS, _ecore_wince_instance))
-     {
-        ECORE_WINCE_MSG_ERR("UnregisterClass() failed");
-     }
+     ERR("UnregisterClass() failed");
+
    if (!FreeLibrary(_ecore_wince_instance))
-     {
-        ECORE_WINCE_MSG_ERR("FreeLibrary() failed");
-     }
-   _ecore_wince_instance = NULL;
+     ERR("FreeLibrary() failed");
 
-   eina_log_domain_unregister(_ecore_wince_log_dom);
+   _ecore_wince_instance = NULL;
 
-   if (_ecore_wince_init_count < 0) _ecore_wince_init_count = 0;
+   ecore_event_shutdown();
+   eina_log_domain_unregister(_ecore_wince_log_dom_global);
+   eina_shutdown();
 
    return _ecore_wince_init_count;
 }
@@ -275,7 +277,7 @@ _ecore_wince_window_procedure(HWND   window,
             {
                POINT pt;
 
-               ECORE_WINCE_MSG_INFO("mouse in window");
+               INF("mouse in window");
 
                pt.x = LOWORD(data_param);
                pt.y = HIWORD(data_param);
@@ -298,7 +300,7 @@ _ecore_wince_window_procedure(HWND   window,
             }
           else
             {
-               ECORE_WINCE_MSG_ERR("GetClientRect() failed");
+               ERR("GetClientRect() failed");
             }
           _ecore_wince_event_handle_motion_notify(data);
 
index 9f21e19..f61f5f9 100644 (file)
@@ -55,7 +55,7 @@ _ecore_wince_event_handle_key_press(Ecore_WinCE_Callback_Data *msg,
 {
    Ecore_Event_Key *e;
 
-   ECORE_WINCE_MSG_INFO("key pressed");
+   INF("key pressed");
 
    e = (Ecore_Event_Key *)malloc(sizeof(Ecore_Event_Key));
    if (!e) return;
@@ -102,7 +102,7 @@ _ecore_wince_event_handle_key_release(Ecore_WinCE_Callback_Data *msg,
 {
    Ecore_Event_Key *e;
 
-   ECORE_WINCE_MSG_INFO("key released");
+   INF("key released");
 
    e = (Ecore_Event_Key *)calloc(1, sizeof(Ecore_Event_Key));
    if (!e) return;
@@ -149,7 +149,7 @@ _ecore_wince_event_handle_button_press(Ecore_WinCE_Callback_Data *msg,
 {
    Ecore_WinCE_Window *window;
 
-   ECORE_WINCE_MSG_INFO("mouse button pressed");
+   INF("mouse button pressed");
 
    window = (Ecore_WinCE_Window *)GetWindowLong(msg->window, GWL_USERDATA);
 
@@ -228,7 +228,7 @@ _ecore_wince_event_handle_button_release(Ecore_WinCE_Callback_Data *msg,
 {
    Ecore_WinCE_Window *window;
 
-   ECORE_WINCE_MSG_INFO("mouse button released");
+   INF("mouse button released");
 
    window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
 
@@ -286,7 +286,7 @@ _ecore_wince_event_handle_motion_notify(Ecore_WinCE_Callback_Data *msg)
 {
    Ecore_Event_Mouse_Move *e;
 
-   ECORE_WINCE_MSG_INFO("mouse moved");
+   INF("mouse moved");
 
    e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
    if (!e) return;
@@ -304,7 +304,7 @@ _ecore_wince_event_handle_enter_notify(Ecore_WinCE_Callback_Data *msg)
 {
    Ecore_WinCE_Window *window;
 
-   ECORE_WINCE_MSG_INFO("mouse in");
+   INF("mouse in");
 
    window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
 
@@ -347,7 +347,7 @@ _ecore_wince_event_handle_leave_notify(Ecore_WinCE_Callback_Data *msg)
 {
    Ecore_WinCE_Window *window;
 
-   ECORE_WINCE_MSG_INFO("mouse out");
+   INF("mouse out");
 
    window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
 
@@ -391,7 +391,7 @@ _ecore_wince_event_handle_focus_in(Ecore_WinCE_Callback_Data *msg)
    Ecore_WinCE_Event_Window_Focus_In *e;
    struct _Ecore_WinCE_Window        *window;
 
-   ECORE_WINCE_MSG_INFO("focus in");
+   INF("focus in");
 
    e = (Ecore_WinCE_Event_Window_Focus_In *)calloc(1, sizeof(Ecore_WinCE_Event_Window_Focus_In));
    if (!e) return;
@@ -420,7 +420,7 @@ _ecore_wince_event_handle_focus_out(Ecore_WinCE_Callback_Data *msg)
    Ecore_WinCE_Event_Window_Focus_Out *e;
    struct _Ecore_WinCE_Window         *window;
 
-   ECORE_WINCE_MSG_INFO("focus out");
+   INF("focus out");
 
    e = (Ecore_WinCE_Event_Window_Focus_Out *)calloc(1, sizeof(Ecore_WinCE_Event_Window_Focus_Out));
    if (!e) return;
@@ -447,7 +447,7 @@ _ecore_wince_event_handle_expose(Ecore_WinCE_Callback_Data *msg)
 {
    Ecore_WinCE_Event_Window_Damage *e;
 
-   ECORE_WINCE_MSG_INFO("window expose");
+   INF("window expose");
 
    e = (Ecore_WinCE_Event_Window_Damage *)calloc(1, sizeof(Ecore_WinCE_Event_Window_Damage));
    if (!e) return;
@@ -463,7 +463,7 @@ _ecore_wince_event_handle_expose(Ecore_WinCE_Callback_Data *msg)
    e->y = msg->update.top;
    e->width = msg->update.right - msg->update.left;
    e->height = msg->update.bottom - msg->update.top;
-   ECORE_WINCE_MSG_INFO("window expose size: %dx%d", e->width, e->height);
+   INF("window expose size: %dx%d", e->width, e->height);
 
    e->time = _ecore_wince_event_last_time;
 
@@ -475,7 +475,7 @@ _ecore_wince_event_handle_create_notify(Ecore_WinCE_Callback_Data *msg)
 {
    Ecore_WinCE_Event_Window_Create *e;
 
-   ECORE_WINCE_MSG_INFO("window create notify");
+   INF("window create notify");
 
    e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Create));
    if (!e) return;
@@ -497,7 +497,7 @@ _ecore_wince_event_handle_destroy_notify(Ecore_WinCE_Callback_Data *msg)
 {
    Ecore_WinCE_Event_Window_Destroy *e;
 
-   ECORE_WINCE_MSG_INFO("window destroy notify");
+   INF("window destroy notify");
 
    e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Destroy));
    if (!e) return;
@@ -520,7 +520,7 @@ _ecore_wince_event_handle_map_notify(Ecore_WinCE_Callback_Data *msg)
 {
    Ecore_WinCE_Event_Window_Show *e;
 
-   ECORE_WINCE_MSG_INFO("window map notify");
+   INF("window map notify");
 
    e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Show));
    if (!e) return;
@@ -542,7 +542,7 @@ _ecore_wince_event_handle_unmap_notify(Ecore_WinCE_Callback_Data *msg)
 {
    Ecore_WinCE_Event_Window_Hide *e;
 
-   ECORE_WINCE_MSG_INFO("window unmap notify");
+   INF("window unmap notify");
 
    e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Hide));
    if (!e) return;
@@ -564,7 +564,7 @@ _ecore_wince_event_handle_delete_request(Ecore_WinCE_Callback_Data *msg)
 {
    Ecore_WinCE_Event_Window_Delete_Request *e;
 
-   ECORE_WINCE_MSG_INFO("window delete request");
+   INF("window delete request");
 
    e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Delete_Request));
    if (!e) return;
index af65e13..256f85b 100644 (file)
@@ -7,11 +7,11 @@
 
 
 /* logging messages macros */
-extern int _ecore_wince_log_dom;
+extern int _ecore_wince_log_dom_global;
 
-#define ECORE_WINCE_MSG_ERR(...) EINA_LOG_DOM_ERR(_ecore_wince_log_dom , __VA_ARGS__)
-#define ECORE_WINCE_MSG_DBG(...) EINA_LOG_DOM_DBG(_ecore_wince_log_dom , __VA_ARGS__)
-#define ECORE_WINCE_MSG_INFO(...) EINA_LOG_DOM_INFO(_ecore_wince_log_dom , __VA_ARGS__)
+#define ERR(...) EINA_LOG_DOM_ERR(_ecore_wince_log_dom_global , __VA_ARGS__)
+#define DBG(...) EINA_LOG_DOM_DBG(_ecore_wince_log_dom_global , __VA_ARGS__)
+#define INF(...) EINA_LOG_DOM_INFO(_ecore_wince_log_dom_global , __VA_ARGS__)
 
 #define ECORE_WINCE_WINDOW_CLASS L"Ecore_WinCE_Window_Class"
 
index 452f767..cf6b23f 100644 (file)
@@ -37,12 +37,12 @@ ecore_wince_window_new(Ecore_WinCE_Window *parent,
    HWND                        window;
    RECT                        rect;
 
-   ECORE_WINCE_MSG_INFO("creating window");
+   INF("creating window");
 
    w = (struct _Ecore_WinCE_Window *)calloc(1, sizeof(struct _Ecore_WinCE_Window));
    if (!w)
      {
-        ECORE_WINCE_MSG_ERR("malloc() failed");
+        ERR("malloc() failed");
         return NULL;
      }
 
@@ -52,7 +52,7 @@ ecore_wince_window_new(Ecore_WinCE_Window *parent,
    rect.bottom = height;
    if (!AdjustWindowRectEx(&rect, WS_CAPTION | WS_SYSMENU | WS_VISIBLE, FALSE, WS_EX_TOPMOST))
      {
-        ECORE_WINCE_MSG_ERR("AdjustWindowRectEx() failed");
+        ERR("AdjustWindowRectEx() failed");
         free(w);
         return NULL;
      }
@@ -67,14 +67,14 @@ ecore_wince_window_new(Ecore_WinCE_Window *parent,
                            NULL, _ecore_wince_instance, NULL);
    if (!window)
      {
-        ECORE_WINCE_MSG_ERR("CreateWindowEx() failed");
+        ERR("CreateWindowEx() failed");
         free(w);
         return NULL;
      }
 
    if (!_ecore_wince_hardware_keys_register(window))
      {
-        ECORE_WINCE_MSG_ERR("_ecore_wince_hardware_keys_register() failed");
+        ERR("_ecore_wince_hardware_keys_register() failed");
         DestroyWindow(window);
         free(w);
         return NULL;
@@ -85,7 +85,7 @@ ecore_wince_window_new(Ecore_WinCE_Window *parent,
    SetLastError(0);
    if (!SetWindowLong(window, GWL_USERDATA, (LONG)w) && (GetLastError() != 0))
      {
-        ECORE_WINCE_MSG_ERR("SetWindowLong() failed");
+        ERR("SetWindowLong() failed");
         DestroyWindow(window);
         free(w);
         return NULL;
@@ -101,7 +101,7 @@ ecore_wince_window_free(Ecore_WinCE_Window *window)
 {
    if (!window) return;
 
-   ECORE_WINCE_MSG_INFO("destroying window");
+   INF("destroying window");
 
    DestroyWindow(((struct _Ecore_WinCE_Window *)window)->window);
    free(window);
@@ -127,12 +127,12 @@ ecore_wince_window_move(Ecore_WinCE_Window *window,
    if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
      return;
 
-   ECORE_WINCE_MSG_INFO("moving window (%dx%d)", x, y);
+   INF("moving window (%dx%d)", x, y);
 
    w = ((struct _Ecore_WinCE_Window *)window)->window;
    if (!GetWindowRect(w, &rect))
      {
-        ECORE_WINCE_MSG_ERR("GetWindowRect() failed");
+        ERR("GetWindowRect() failed");
         return;
      }
 
@@ -141,7 +141,7 @@ ecore_wince_window_move(Ecore_WinCE_Window *window,
                    rect.bottom - rect.top,
                    TRUE))
      {
-        ECORE_WINCE_MSG_ERR("MoveWindow() failed");
+        ERR("MoveWindow() failed");
      }
 }
 
@@ -160,12 +160,12 @@ ecore_wince_window_resize(Ecore_WinCE_Window *window,
    if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
      return;
 
-   ECORE_WINCE_MSG_INFO("resizing window (%dx%d)", width, height);
+   INF("resizing window (%dx%d)", width, height);
 
    w = (struct _Ecore_WinCE_Window *)window;
    if (!GetWindowRect(w->window, &rect))
      {
-        ECORE_WINCE_MSG_ERR("GetWindowRect() failed");
+        ERR("GetWindowRect() failed");
         return;
      }
 
@@ -177,17 +177,17 @@ ecore_wince_window_resize(Ecore_WinCE_Window *window,
    rect.bottom = height;
    if (!(style = GetWindowLong(w->window, GWL_STYLE)))
      {
-        ECORE_WINCE_MSG_ERR("GetWindowLong() failed");
+        ERR("GetWindowLong() failed");
         return;
      }
    if (!(exstyle = GetWindowLong(w->window, GWL_EXSTYLE)))
      {
-        ECORE_WINCE_MSG_ERR("GetWindowLong() failed");
+        ERR("GetWindowLong() failed");
         return;
      }
    if (!AdjustWindowRectEx(&rect, style, FALSE, exstyle))
      {
-        ECORE_WINCE_MSG_ERR("AdjustWindowRectEx() failed");
+        ERR("AdjustWindowRectEx() failed");
         return;
      }
 
@@ -196,7 +196,7 @@ ecore_wince_window_resize(Ecore_WinCE_Window *window,
                    rect.bottom - rect.top,
                    FALSE))
      {
-        ECORE_WINCE_MSG_ERR("MoveWindow() failed");
+        ERR("MoveWindow() failed");
      }
 }
 
@@ -215,7 +215,7 @@ ecore_wince_window_move_resize(Ecore_WinCE_Window *window,
    if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
      return;
 
-   ECORE_WINCE_MSG_INFO("moving and resizing window (%dx%d %dx%d)", x, y, width, height);
+   INF("moving and resizing window (%dx%d %dx%d)", x, y, width, height);
 
    w = ((struct _Ecore_WinCE_Window *)window);
    rect.left = 0;
@@ -224,17 +224,17 @@ ecore_wince_window_move_resize(Ecore_WinCE_Window *window,
    rect.bottom = height;
    if (!(style = GetWindowLong(w->window, GWL_STYLE)))
      {
-        ECORE_WINCE_MSG_ERR("GetWindowLong() failed");
+        ERR("GetWindowLong() failed");
         return;
      }
    if (!(exstyle = GetWindowLong(w->window, GWL_EXSTYLE)))
      {
-        ECORE_WINCE_MSG_ERR("GetWindowLong() failed");
+        ERR("GetWindowLong() failed");
         return;
      }
    if (!AdjustWindowRectEx(&rect, style, FALSE, exstyle))
      {
-        ECORE_WINCE_MSG_ERR("AdjustWindowRectEx() failed");
+        ERR("AdjustWindowRectEx() failed");
         return;
      }
 
@@ -243,7 +243,7 @@ ecore_wince_window_move_resize(Ecore_WinCE_Window *window,
               rect.bottom - rect.top,
               TRUE))
      {
-        ECORE_WINCE_MSG_ERR("MoveWindow() failed");
+        ERR("MoveWindow() failed");
      }
 }
 
@@ -252,20 +252,20 @@ ecore_wince_window_show(Ecore_WinCE_Window *window)
 {
    if (!window) return;
 
-   ECORE_WINCE_MSG_INFO("showing window");
+   INF("showing window");
 
    if (!ShowWindow(((struct _Ecore_WinCE_Window *)window)->window, SW_SHOWNORMAL))
      {
-        ECORE_WINCE_MSG_ERR("ShowWindow() failed");
+        ERR("ShowWindow() failed");
         return;
      }
    if (!UpdateWindow(((struct _Ecore_WinCE_Window *)window)->window))
      {
-        ECORE_WINCE_MSG_ERR("UpdateWindow() failed");
+        ERR("UpdateWindow() failed");
      }
    if (!SendMessage(((struct _Ecore_WinCE_Window *)window)->window, WM_SHOWWINDOW, 1, 0))
      {
-        ECORE_WINCE_MSG_ERR("SendMessage() failed");
+        ERR("SendMessage() failed");
      }
 }
 
@@ -274,16 +274,16 @@ ecore_wince_window_hide(Ecore_WinCE_Window *window)
 {
    if (!window) return;
 
-   ECORE_WINCE_MSG_INFO("hiding window");
+   INF("hiding window");
 
    if (!ShowWindow(((struct _Ecore_WinCE_Window *)window)->window, SW_HIDE))
      {
-        ECORE_WINCE_MSG_ERR("ShowWindow() failed");
+        ERR("ShowWindow() failed");
         return;
      }
    if (!SendMessage(((struct _Ecore_WinCE_Window *)window)->window, WM_SHOWWINDOW, 0, 0))
      {
-        ECORE_WINCE_MSG_ERR("SendMessage() failed");
+        ERR("SendMessage() failed");
      }
 }
 
@@ -297,14 +297,14 @@ ecore_wince_window_title_set(Ecore_WinCE_Window *window,
 
    if (!title || !title[0]) return;
 
-   ECORE_WINCE_MSG_INFO("setting window title");
+   INF("setting window title");
 
    wtitle = evil_char_to_wchar(title);
    if (!wtitle) return;
 
    if (!SetWindowText(((struct _Ecore_WinCE_Window *)window)->window, wtitle))
      {
-        ECORE_WINCE_MSG_ERR("SetWindowText() failed");
+        ERR("SetWindowText() failed");
      }
    free(wtitle);
 }
@@ -317,7 +317,7 @@ ecore_wince_window_backend_set(Ecore_WinCE_Window *window, int backend)
    if (!window)
      return;
 
-   ECORE_WINCE_MSG_INFO("setting backend");
+   INF("setting backend");
 
    w = (struct _Ecore_WinCE_Window *)window;
    w->backend = backend;
@@ -331,7 +331,7 @@ ecore_wince_window_suspend_set(Ecore_WinCE_Window *window, int (*suspend)(int))
    if (!window)
      return;
 
-   ECORE_WINCE_MSG_INFO("setting suspend callback");
+   INF("setting suspend callback");
 
    w = (struct _Ecore_WinCE_Window *)window;
    w->suspend = suspend;
@@ -345,7 +345,7 @@ ecore_wince_window_resume_set(Ecore_WinCE_Window *window, int (*resume)(int))
    if (!window)
      return;
 
-   ECORE_WINCE_MSG_INFO("setting resume callback");
+   INF("setting resume callback");
 
    w = (struct _Ecore_WinCE_Window *)window;
    w->resume = resume;
@@ -362,7 +362,7 @@ ecore_wince_window_geometry_get(Ecore_WinCE_Window *window,
    int  w;
    int  h;
 
-   ECORE_WINCE_MSG_INFO("getting window geometry");
+   INF("getting window geometry");
 
    if (!window)
      {
@@ -377,7 +377,7 @@ ecore_wince_window_geometry_get(Ecore_WinCE_Window *window,
    if (!GetClientRect(((struct _Ecore_WinCE_Window *)window)->window,
                       &rect))
      {
-        ECORE_WINCE_MSG_ERR("GetClientRect() failed");
+        ERR("GetClientRect() failed");
 
         if (x) *x = 0;
         if (y) *y = 0;
@@ -393,7 +393,7 @@ ecore_wince_window_geometry_get(Ecore_WinCE_Window *window,
    if (!GetWindowRect(((struct _Ecore_WinCE_Window *)window)->window,
                       &rect))
      {
-        ECORE_WINCE_MSG_ERR("GetWindowRect() failed");
+        ERR("GetWindowRect() failed");
 
         if (x) *x = 0;
         if (y) *y = 0;
@@ -416,7 +416,7 @@ ecore_wince_window_size_get(Ecore_WinCE_Window *window,
 {
    RECT rect;
 
-   ECORE_WINCE_MSG_INFO("getting window size");
+   INF("getting window size");
 
    if (!window)
      {
@@ -429,7 +429,7 @@ ecore_wince_window_size_get(Ecore_WinCE_Window *window,
    if (!GetClientRect(((struct _Ecore_WinCE_Window *)window)->window,
                       &rect))
      {
-        ECORE_WINCE_MSG_ERR("GetClientRect() failed");
+        ERR("GetClientRect() failed");
 
         if (width) *width = 0;
         if (height) *height = 0;
@@ -454,7 +454,7 @@ ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
        ((!ew->fullscreen) && (!on)))
      return;
 
-   ECORE_WINCE_MSG_INFO("setting fullscreen: %s", on ? "yes" : "no");
+   INF("setting fullscreen: %s", on ? "yes" : "no");
 
    ew->fullscreen = !!on;
    w = ew->window;
@@ -464,7 +464,7 @@ ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
         /* save the position and size of the window */
         if (!GetWindowRect(w, &ew->rect))
           {
-             ECORE_WINCE_MSG_ERR("GetWindowRect() failed");
+             ERR("GetWindowRect() failed");
              return;
           }
 
@@ -472,21 +472,21 @@ ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
         task_bar = FindWindow(L"HHTaskBar", NULL);
         if (!task_bar)
           {
-             ECORE_WINCE_MSG_INFO("FindWindow(): can not find task bar");
+             INF("FindWindow(): can not find task bar");
           }
         if (!ShowWindow(task_bar, SW_HIDE))
           {
-             ECORE_WINCE_MSG_INFO("ShowWindow(): task bar already hidden");
+             INF("ShowWindow(): task bar already hidden");
           }
         if (!EnableWindow(task_bar, FALSE))
           {
-             ECORE_WINCE_MSG_INFO("EnableWindow(): input already disabled");
+             INF("EnableWindow(): input already disabled");
           }
 
         /* style: visible + popup */
         if (!SetWindowLong(w, GWL_STYLE, WS_POPUP | WS_VISIBLE))
           {
-             ECORE_WINCE_MSG_INFO("SetWindowLong() failed");
+             INF("SetWindowLong() failed");
           }
 
         /* resize window to fit the entire screen */
@@ -495,7 +495,7 @@ ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
                           GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN),
                           SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED))
           {
-             ECORE_WINCE_MSG_INFO("SetWindowPos() failed");
+             INF("SetWindowPos() failed");
           }
         /*
          * It seems that SetWindowPos is not sufficient.
@@ -507,7 +507,7 @@ ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
                         GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN),
                         TRUE))
           {
-             ECORE_WINCE_MSG_INFO("MoveWindow() failed");
+             INF("MoveWindow() failed");
           }
      }
    else
@@ -516,21 +516,21 @@ ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
         task_bar = FindWindow(L"HHTaskBar", NULL);
         if (!task_bar)
           {
-             ECORE_WINCE_MSG_INFO("FindWindow(): can not find task bar");
+             INF("FindWindow(): can not find task bar");
           }
         if (!ShowWindow(task_bar, SW_SHOW))
           {
-             ECORE_WINCE_MSG_INFO("ShowWindow(): task bar already visible");
+             INF("ShowWindow(): task bar already visible");
           }
         if (!EnableWindow(task_bar, TRUE))
           {
-             ECORE_WINCE_MSG_INFO("EnableWindow():  input already enabled");
+             INF("EnableWindow():  input already enabled");
           }
 
         /* style: visible + caption + sysmenu */
         if (!SetWindowLong(w, GWL_STYLE, WS_CAPTION | WS_SYSMENU | WS_VISIBLE))
           {
-             ECORE_WINCE_MSG_INFO("SetWindowLong() failed");
+             INF("SetWindowLong() failed");
           }
         /* restaure the position and size of the window */
         if (!SetWindowPos(w, HWND_TOPMOST,
@@ -540,7 +540,7 @@ ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
                           ew->rect.bottom - ew->rect.top,
                           SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED))
           {
-             ECORE_WINCE_MSG_INFO("SetWindowLong() failed");
+             INF("SetWindowLong() failed");
           }
         /*
          * It seems that SetWindowPos is not sufficient.
@@ -554,7 +554,7 @@ ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
                         ew->rect.bottom - ew->rect.top,
                         TRUE))
           {
-             ECORE_WINCE_MSG_INFO("MoveWindow() failed");
+             INF("MoveWindow() failed");
           }
      }
 }
@@ -572,14 +572,14 @@ _ecore_wince_hardware_keys_register(HWND window)
    core_dll = LoadLibrary(L"coredll.dll");
    if (!core_dll)
      {
-        ECORE_WINCE_MSG_ERR("LoadLibrary() failed");
+        ERR("LoadLibrary() failed");
         return 0;
      }
 
    unregister_fct = (UnregisterFunc1Proc)GetProcAddress(core_dll, L"UnregisterFunc1");
    if (!unregister_fct)
      {
-        ECORE_WINCE_MSG_ERR("GetProcAddress() failed");
+        ERR("GetProcAddress() failed");
         FreeLibrary(core_dll);
         return 0;
      }