* fix logging for Windows XP and CE port
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 8 Sep 2009 05:39:09 +0000 (05:39 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 8 Sep 2009 05:39:09 +0000 (05:39 +0000)
   by adding namespace to logging macros
 * formatting and warning cleanup

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@42341 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

12 files changed:
src/lib/ecore_evas/ecore_evas.c
src/lib/ecore_evas/ecore_evas_win32.c
src/lib/ecore_evas/ecore_evas_wince.c
src/lib/ecore_win32/ecore_win32.c
src/lib/ecore_win32/ecore_win32_cursor.c
src/lib/ecore_win32/ecore_win32_event.c
src/lib/ecore_win32/ecore_win32_private.h
src/lib/ecore_win32/ecore_win32_window.c
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 47617c3..f63c0e6 100644 (file)
@@ -463,25 +463,25 @@ _ecore_evas_constructor_software_16_ddraw(int x, int y, int w, int h, const char
 
 #ifdef BUILD_ECORE_EVAS_SOFTWARE_16_WINCE
 static Ecore_Evas *
-_ecore_evas_constructor_software_16_wince(int x, int y, int w, int h, const char *extra_options)
+_ecore_evas_constructor_software_16_wince(int x, int y, int w, int h, const char *extra_options __UNUSED__)
 {
    return ecore_evas_software_wince_new(NULL, x, y, w, h);
 }
 
 static Ecore_Evas *
-_ecore_evas_constructor_software_16_wince_fb(int x, int y, int w, int h, const char *extra_options)
+_ecore_evas_constructor_software_16_wince_fb(int x, int y, int w, int h, const char *extra_options __UNUSED__)
 {
    return ecore_evas_software_wince_fb_new(NULL, x, y, w, h);
 }
 
 static Ecore_Evas *
-_ecore_evas_constructor_software_16_wince_gapi(int x, int y, int w, int h, const char *extra_options)
+_ecore_evas_constructor_software_16_wince_gapi(int x, int y, int w, int h, const char *extra_options __UNUSED__)
 {
    return ecore_evas_software_wince_gapi_new(NULL, x, y, w, h);
 }
 
 static Ecore_Evas *
-_ecore_evas_constructor_software_16_wince_gdi(int x, int y, int w, int h, const char *extra_options)
+_ecore_evas_constructor_software_16_wince_gdi(int x, int y, int w, int h, const char *extra_options __UNUSED__)
 {
    return ecore_evas_software_wince_gdi_new(NULL, x, y, w, h);
 }
index d407679..d3d939e 100644 (file)
 
 #ifdef BUILD_ECORE_EVAS_WIN32
 
+/* logging messages macros */
+int _ecore_evas_log_dom = -1;
+
+#define ECORE_EVAS_MSG_ERR(...) EINA_LOG_DOM_ERR(_ecore_evas_log_dom , __VA_ARGS__)
+#define ECORE_EVAS_MSG_DBG(...) EINA_LOG_DOM_DBG(_ecore_evas_log_dom , __VA_ARGS__)
+#define ECORE_EVAS_MSG_INFO(...) EINA_LOG_DOM_INFO(_ecore_evas_log_dom , __VA_ARGS__)
+
 #define ECORE_EVAS_EVENT_COUNT 8
 
 static int _ecore_evas_init_count = 0;
@@ -167,7 +174,7 @@ _ecore_evas_win32_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, voi
    Ecore_Evas                 *ee;
    Ecore_Win32_Event_Mouse_In *e;
 
-   MESSAGE_INFO("mouse in\n");
+   ECORE_EVAS_MSG_INFO("mouse in\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -189,7 +196,7 @@ _ecore_evas_win32_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, vo
    Ecore_Evas                  *ee;
    Ecore_Win32_Event_Mouse_Out *e;
 
-   MESSAGE_INFO("mouse out\n");
+   ECORE_EVAS_MSG_INFO("mouse out\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -213,7 +220,7 @@ _ecore_evas_win32_event_window_damage(void *data __UNUSED__, int type __UNUSED__
    Ecore_Evas                      *ee;
    Ecore_Win32_Event_Window_Damage *e;
 
-   MESSAGE_INFO("window damage\n");
+   ECORE_EVAS_MSG_INFO("window damage\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -265,7 +272,7 @@ _ecore_evas_win32_event_window_destroy(void *data __UNUSED__, int type __UNUSED_
    Ecore_Evas                       *ee;
    Ecore_Win32_Event_Window_Destroy *e;
 
-   MESSAGE_INFO("window destroy\n");
+   ECORE_EVAS_MSG_INFO("window destroy\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -283,7 +290,7 @@ _ecore_evas_win32_event_window_show(void *data __UNUSED__, int type __UNUSED__,
    Ecore_Evas                    *ee;
    Ecore_Win32_Event_Window_Show *e;
 
-   MESSAGE_INFO("window show\n");
+   ECORE_EVAS_MSG_INFO("window show\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -302,7 +309,7 @@ _ecore_evas_win32_event_window_hide(void *data __UNUSED__, int type __UNUSED__,
    Ecore_Evas                    *ee;
    Ecore_Win32_Event_Window_Hide *e;
 
-   MESSAGE_INFO("window hide\n");
+   ECORE_EVAS_MSG_INFO("window hide\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -321,7 +328,7 @@ _ecore_evas_win32_event_window_configure(void *data __UNUSED__, int type __UNUSE
    Ecore_Evas                         *ee;
    Ecore_Win32_Event_Window_Configure *e;
 
-   MESSAGE_INFO("window configure\n");
+   ECORE_EVAS_MSG_INFO("window configure\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -379,7 +386,7 @@ _ecore_evas_win32_event_window_delete_request(void *data __UNUSED__, int type __
    Ecore_Evas                              *ee;
    Ecore_Win32_Event_Window_Delete_Request *e;
 
-   MESSAGE_INFO("window delete request\n");
+   ECORE_EVAS_MSG_INFO("window delete request\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -397,7 +404,7 @@ _ecore_evas_win32_event_window_delete_request(void *data __UNUSED__, int type __
 static void
 _ecore_evas_win32_free(Ecore_Evas *ee)
 {
-   MESSAGE_INFO("ecore evas free\n");
+   ECORE_EVAS_MSG_INFO("ecore evas free\n");
 
    ecore_win32_window_free((struct _Ecore_Win32_Window *)ee->prop.window);
    ecore_event_window_unregister(ee->prop.window);
@@ -416,7 +423,7 @@ _ecore_evas_win32_callback_delete_request_set(Ecore_Evas *ee,
 static void
 _ecore_evas_win32_move(Ecore_Evas *ee, int x, int y)
 {
-  MESSAGE_INFO("ecore evas move (%dx%d)\n", x, y);
+  ECORE_EVAS_MSG_INFO("ecore evas move (%dx%d)\n", x, y);
 
    if ((x != ee->x) || (y != ee->y))
      {
@@ -431,7 +438,7 @@ _ecore_evas_win32_move(Ecore_Evas *ee, int x, int y)
 static void
 _ecore_evas_win32_resize(Ecore_Evas *ee, int width, int height)
 {
-   MESSAGE_INFO("ecore evas resize (%dx%d)\n", width, height);
+   ECORE_EVAS_MSG_INFO("ecore evas resize (%dx%d)\n", width, height);
 
    if ((ee->w != width) || (ee->h != height))
      {
@@ -458,7 +465,7 @@ _ecore_evas_win32_resize(Ecore_Evas *ee, int width, int height)
 static void
 _ecore_evas_win32_move_resize(Ecore_Evas *ee, int x, int y, int width, int height)
 {
-   MESSAGE_INFO("ecore evas resize (%dx%d %dx%d)\n", x, y, width, height);
+   ECORE_EVAS_MSG_INFO("ecore evas resize (%dx%d %dx%d)\n", x, y, width, height);
 
    if ((ee->w != width) || (ee->h != height) || (x != ee->x) || (y != ee->y))
      {
@@ -564,7 +571,7 @@ _ecore_evas_win32_rotation_set_internal(Ecore_Evas *ee, int rotation)
 static void
 _ecore_evas_win32_rotation_set(Ecore_Evas *ee, int rotation)
 {
-   MESSAGE_INFO("ecore evas rotation: %s\n", rotation ? "yes" : "no");
+   ECORE_EVAS_MSG_INFO("ecore evas rotation: %s\n", rotation ? "yes" : "no");
 
    if (ee->rotation == rotation) return;
 
@@ -598,7 +605,7 @@ _ecore_evas_win32_rotation_set(Ecore_Evas *ee, int rotation)
 static void
 _ecore_evas_win32_show(Ecore_Evas *ee)
 {
-   MESSAGE_INFO("ecore evas show\n");
+   ECORE_EVAS_MSG_INFO("ecore evas show\n");
 
    ee->should_be_visible = 1;
    if (ee->prop.avoid_damage)
@@ -611,7 +618,7 @@ _ecore_evas_win32_show(Ecore_Evas *ee)
 static void
 _ecore_evas_win32_hide(Ecore_Evas *ee)
 {
-   MESSAGE_INFO("ecore evas hide\n");
+   ECORE_EVAS_MSG_INFO("ecore evas hide\n");
 
    ecore_win32_window_hide((struct _Ecore_Win32_Window *)ee->prop.window);
    ee->should_be_visible = 0;
@@ -620,7 +627,7 @@ _ecore_evas_win32_hide(Ecore_Evas *ee)
 static void
 _ecore_evas_win32_raise(Ecore_Evas *ee)
 {
-   MESSAGE_INFO("ecore evas raise\n");
+   ECORE_EVAS_MSG_INFO("ecore evas raise\n");
 
    if (!ee->prop.fullscreen)
      ecore_win32_window_raise((struct _Ecore_Win32_Window *)ee->prop.window);
@@ -631,7 +638,7 @@ _ecore_evas_win32_raise(Ecore_Evas *ee)
 static void
 _ecore_evas_win32_lower(Ecore_Evas *ee)
 {
-   MESSAGE_INFO("ecore evas lower\n");
+   ECORE_EVAS_MSG_INFO("ecore evas lower\n");
 
    if (!ee->prop.fullscreen)
      ecore_win32_window_lower((struct _Ecore_Win32_Window *)ee->prop.window);
@@ -642,7 +649,7 @@ _ecore_evas_win32_lower(Ecore_Evas *ee)
 static void
 _ecore_evas_win32_activate(Ecore_Evas *ee)
 {
-   MESSAGE_INFO("ecore evas activate\n");
+   ECORE_EVAS_MSG_INFO("ecore evas activate\n");
 
    ecore_win32_window_focus_set((struct _Ecore_Win32_Window *)ee->prop.window);
 }
@@ -650,7 +657,7 @@ _ecore_evas_win32_activate(Ecore_Evas *ee)
 static void
 _ecore_evas_win32_title_set(Ecore_Evas *ee, const char *title)
 {
-   MESSAGE_INFO("ecore evas title set\n");
+   ECORE_EVAS_MSG_INFO("ecore evas title set\n");
 
    if (ee->prop.title) free(ee->prop.title);
    ee->prop.title = NULL;
@@ -774,7 +781,7 @@ _ecore_evas_win32_fullscreen_set(Ecore_Evas *ee, int on)
 {
    struct _Ecore_Win32_Window *window;
 
-   MESSAGE_INFO("ecore evas fullscreen set\n");
+   ECORE_EVAS_MSG_INFO("ecore evas fullscreen set\n");
 
    if ((ee->engine.win32.state.fullscreen && on) ||
       (!ee->engine.win32.state.fullscreen && !on))
index bc9c420..52ee583 100644 (file)
 
 #ifdef BUILD_ECORE_EVAS_SOFTWARE_16_WINCE
 
+/* logging messages macros */
+int _ecore_evas_log_dom = -1;
+
+#define ECORE_EVAS_MSG_ERR(...) EINA_LOG_DOM_ERR(_ecore_evas_log_dom , __VA_ARGS__)
+#define ECORE_EVAS_MSG_DBG(...) EINA_LOG_DOM_DBG(_ecore_evas_log_dom , __VA_ARGS__)
+#define ECORE_EVAS_MSG_INFO(...) EINA_LOG_DOM_INFO(_ecore_evas_log_dom , __VA_ARGS__)
+
 #define ECORE_EVAS_EVENT_COUNT 7
 
 static int _ecore_evas_init_count = 0;
@@ -31,7 +38,6 @@ static int _ecore_evas_fps_debug  = 0;
 static Ecore_Event_Handler *ecore_evas_event_handlers[ECORE_EVAS_EVENT_COUNT];
 static Ecore_Idle_Enterer  *ecore_evas_idle_enterer = NULL;
 static Ecore_Evas          *ecore_evases = NULL;
-static Eina_Hash           *ecore_evases_hash = NULL;
 
 static int _ecore_evas_wince_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event);
 
@@ -167,7 +173,7 @@ _ecore_evas_wince_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, voi
    Ecore_Evas                 *ee;
    Ecore_WinCE_Event_Mouse_In *e;
 
-   EINA_ERROR_PINFO("mouse in\n");
+   ECORE_EVAS_MSG_INFO("mouse in\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -189,7 +195,7 @@ _ecore_evas_wince_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, vo
    Ecore_Evas                  *ee;
    Ecore_WinCE_Event_Mouse_Out *e;
 
-   EINA_ERROR_PINFO("mouse out\n");
+   ECORE_EVAS_MSG_INFO("mouse out\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -213,7 +219,7 @@ _ecore_evas_wince_event_window_damage(void *data __UNUSED__, int type __UNUSED__
    Ecore_Evas                      *ee;
    Ecore_WinCE_Event_Window_Damage *e;
 
-   EINA_ERROR_PINFO("window damage\n");
+   ECORE_EVAS_MSG_INFO("window damage\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -261,7 +267,7 @@ _ecore_evas_wince_event_window_destroy(void *data __UNUSED__, int type __UNUSED_
    Ecore_Evas                       *ee;
    Ecore_WinCE_Event_Window_Destroy *e;
 
-   EINA_ERROR_PINFO("window destroy\n");
+   ECORE_EVAS_MSG_INFO("window destroy\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -279,7 +285,7 @@ _ecore_evas_wince_event_window_show(void *data __UNUSED__, int type __UNUSED__,
    Ecore_Evas                    *ee;
    Ecore_WinCE_Event_Window_Show *e;
 
-   EINA_ERROR_PINFO("window show\n");
+   ECORE_EVAS_MSG_INFO("window show\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -298,7 +304,7 @@ _ecore_evas_wince_event_window_hide(void *data __UNUSED__, int type __UNUSED__,
    Ecore_Evas                    *ee;
    Ecore_WinCE_Event_Window_Hide *e;
 
-   EINA_ERROR_PINFO("window hide\n");
+   ECORE_EVAS_MSG_INFO("window hide\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -317,7 +323,7 @@ _ecore_evas_wince_event_window_delete_request(void *data __UNUSED__, int type __
    Ecore_Evas                              *ee;
    Ecore_WinCE_Event_Window_Delete_Request *e;
 
-   EINA_ERROR_PINFO("window delete request\n");
+   ECORE_EVAS_MSG_INFO("window delete request\n");
 
    e = event;
    ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -334,7 +340,7 @@ _ecore_evas_wince_event_window_delete_request(void *data __UNUSED__, int type __
 static void
 _ecore_evas_wince_free(Ecore_Evas *ee)
 {
-   EINA_ERROR_PINFO("ecore evas free\n");
+   ECORE_EVAS_MSG_INFO("ecore evas free\n");
 
    ecore_wince_window_free((Ecore_WinCE_Window *)ee->prop.window);
    ecore_event_window_unregister(ee->prop.window);
@@ -353,7 +359,7 @@ _ecore_evas_wince_callback_delete_request_set(Ecore_Evas *ee,
 static void
 _ecore_evas_wince_move(Ecore_Evas *ee, int x, int y)
 {
-  EINA_ERROR_PINFO("ecore evas move (%dx%d)\n", x, y);
+  ECORE_EVAS_MSG_INFO("ecore evas move (%dx%d)\n", x, y);
 
    if ((x != ee->x) || (y != ee->y))
      {
@@ -367,7 +373,7 @@ _ecore_evas_wince_move(Ecore_Evas *ee, int x, int y)
 static void
 _ecore_evas_wince_resize(Ecore_Evas *ee, int width, int height)
 {
-   EINA_ERROR_PINFO("ecore evas resize (%dx%d)\n", width, height);
+   ECORE_EVAS_MSG_INFO("ecore evas resize (%dx%d)\n", width, height);
 
    if ((ee->w != width) || (ee->h != height))
      {
@@ -393,7 +399,7 @@ _ecore_evas_wince_resize(Ecore_Evas *ee, int width, int height)
 static void
 _ecore_evas_wince_move_resize(Ecore_Evas *ee, int x, int y, int width, int height)
 {
-   EINA_ERROR_PINFO("ecore evas resize (%dx%d %dx%d)\n", x, y, width, height);
+   ECORE_EVAS_MSG_INFO("ecore evas resize (%dx%d %dx%d)\n", x, y, width, height);
 
    if ((ee->w != width) || (ee->h != height) || (x != ee->x) || (y != ee->y))
      {
@@ -505,7 +511,7 @@ _ecore_evas_wince_move_resize(Ecore_Evas *ee, int x, int y, int width, int heigh
 static void
 _ecore_evas_wince_show(Ecore_Evas *ee)
 {
-   EINA_ERROR_PINFO("ecore evas show\n");
+   ECORE_EVAS_MSG_INFO("ecore evas show\n");
 
    ee->should_be_visible = 1;
    if (ee->prop.avoid_damage)
@@ -518,7 +524,7 @@ _ecore_evas_wince_show(Ecore_Evas *ee)
 static void
 _ecore_evas_wince_hide(Ecore_Evas *ee)
 {
-   EINA_ERROR_PINFO("ecore evas hide\n");
+   ECORE_EVAS_MSG_INFO("ecore evas hide\n");
 
    ecore_wince_window_hide((Ecore_WinCE_Window *)ee->prop.window);
    ee->should_be_visible = 0;
@@ -545,7 +551,7 @@ _ecore_evas_wince_hide(Ecore_Evas *ee)
 static void
 _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
 {
-   EINA_ERROR_PINFO("ecore evas title set\n");
+   ECORE_EVAS_MSG_INFO("ecore evas title set\n");
 
    if (ee->prop.title) free(ee->prop.title);
    ee->prop.title = NULL;
@@ -663,7 +669,7 @@ _ecore_evas_wince_fullscreen_set(Ecore_Evas *ee, int on)
    Evas_Engine_Info_Software_16_WinCE *einfo;
    struct _Ecore_WinCE_Window         *window;
 
-   EINA_ERROR_PINFO("ecore evas fullscreen set\n");
+   ECORE_EVAS_MSG_INFO("ecore evas fullscreen set\n");
 
    if ((ee->engine.wince.state.fullscreen && on) ||
       (!ee->engine.wince.state.fullscreen && !on))
index 52f5f8a..100bee6 100644 (file)
@@ -94,7 +94,7 @@ ecore_win32_init()
         return 0;
      }
 
-   MESSAGE_INFO("initializing ecore_win32 (current count: %d)\n", _ecore_win32_init_count);
+   ECORE_WIN32_MSG_INFO("initializing ecore_win32 (current count: %d)\n", _ecore_win32_init_count);
 
    if (_ecore_win32_init_count > 0)
      {
@@ -105,7 +105,7 @@ ecore_win32_init()
    _ecore_win32_instance = GetModuleHandle(NULL);
    if (!_ecore_win32_instance)
      {
-        MESSAGE_ERR("GetModuleHandle() failed\n");
+        ECORE_WIN32_MSG_ERR("GetModuleHandle() failed\n");
         return 0;
      }
 
@@ -123,14 +123,14 @@ ecore_win32_init()
 
    if(!RegisterClass(&wc))
      {
-        MESSAGE_ERR("RegisterClass() failed\n");
+        ECORE_WIN32_MSG_ERR("RegisterClass() failed\n");
         FreeLibrary(_ecore_win32_instance);
         return 0;
      }
 
    if (!ecore_win32_dnd_init())
      {
-        MESSAGE_ERR("ecore_win32_dnd_init() failed\n");
+        ECORE_WIN32_MSG_ERR("ecore_win32_dnd_init() failed\n");
         FreeLibrary(_ecore_win32_instance);
         return 0;
      }
@@ -161,7 +161,7 @@ ecore_win32_init()
 int
 ecore_win32_shutdown()
 {
-   MESSAGE_INFO("shutting down ecore_win32 (current count: %d)\n", _ecore_win32_init_count);
+   ECORE_WIN32_MSG_INFO("shutting down ecore_win32 (current count: %d)\n", _ecore_win32_init_count);
 
    _ecore_win32_init_count--;
    if (_ecore_win32_init_count > 0) return _ecore_win32_init_count;
@@ -171,11 +171,11 @@ ecore_win32_shutdown()
    ecore_win32_dnd_shutdown();
    if (!UnregisterClass(ECORE_WIN32_WINDOW_CLASS, _ecore_win32_instance))
      {
-        MESSAGE_INFO("UnregisterClass() failed\n");
+        ECORE_WIN32_MSG_INFO("UnregisterClass() failed\n");
      }
    if (!FreeLibrary(_ecore_win32_instance))
      {
-        MESSAGE_INFO("FreeLibrary() failed\n");
+        ECORE_WIN32_MSG_INFO("FreeLibrary() failed\n");
      }
    _ecore_win32_instance = NULL;
 
@@ -192,19 +192,19 @@ ecore_win32_screen_depth_get()
    HDC dc;
    int depth;
 
-   MESSAGE_INFO("getting screen depth\n");
+   ECORE_WIN32_MSG_INFO("getting screen depth\n");
 
    dc = GetDC(NULL);
    if (!dc)
      {
-        MESSAGE_ERR("GetDC() failed\n");
+        ECORE_WIN32_MSG_ERR("GetDC() failed\n");
         return 0;
      }
 
    depth = GetDeviceCaps(dc, BITSPIXEL);
    if (!ReleaseDC(NULL, dc))
      {
-        MESSAGE_ERR("ReleaseDC() failed (device context not released)\n");
+        ECORE_WIN32_MSG_ERR("ReleaseDC() failed (device context not released)\n");
      }
 
    return depth;
@@ -323,7 +323,7 @@ _ecore_win32_window_procedure(HWND   window,
             {
                POINT pt;
 
-               MESSAGE_INFO("mouse in window\n");
+               ECORE_WIN32_MSG_INFO("mouse in window\n");
 
                pt.x = GET_X_LPARAM(data_param);
                pt.y = GET_Y_LPARAM(data_param);
@@ -346,7 +346,7 @@ _ecore_win32_window_procedure(HWND   window,
             }
           else
             {
-               MESSAGE_ERR("GetClientRect() failed\n");
+               ECORE_WIN32_MSG_ERR("GetClientRect() failed\n");
             }
           _ecore_win32_event_handle_motion_notify(data);
 
index 2590d00..6eff0ff 100644 (file)
@@ -30,7 +30,7 @@ ecore_win32_cursor_new(const void *pixels_and,
    int                 cursor_width;
    int                 cursor_height;
 
-   MESSAGE_INFO("creating cursor\n");
+   ECORE_WIN32_MSG_INFO("creating cursor\n");
 
    cursor_width = GetSystemMetrics(SM_CXCURSOR);
    cursor_height = GetSystemMetrics(SM_CYCURSOR);
@@ -52,7 +52,7 @@ ecore_win32_cursor_new(const void *pixels_and,
 void
 ecore_win32_cursor_free(Ecore_Win32_Cursor *cursor)
 {
-   MESSAGE_INFO("destroying cursor\n");
+   ECORE_WIN32_MSG_INFO("destroying cursor\n");
 
    DestroyCursor(cursor);
 }
@@ -63,7 +63,7 @@ ecore_win32_cursor_shape_get(Ecore_Win32_Cursor_Shape shape)
    Ecore_Win32_Cursor *cursor = NULL;
    const char         *cursor_name;
 
-   MESSAGE_INFO("geting shape cursor\n");
+   ECORE_WIN32_MSG_INFO("geting shape cursor\n");
 
    switch (shape)
      {
@@ -125,7 +125,7 @@ ecore_win32_cursor_size_get(void)
    int width;
    int height;
 
-   MESSAGE_INFO("geting size cursor\n");
+   ECORE_WIN32_MSG_INFO("geting size cursor\n");
 
    width = GetSystemMetrics(SM_CXCURSOR);
    height = GetSystemMetrics(SM_CYCURSOR);
index 87dc482..1af86fc 100644 (file)
@@ -58,7 +58,7 @@ _ecore_win32_event_handle_key_press(Ecore_Win32_Callback_Data *msg,
 {
    Ecore_Event_Key *e;
 
-   MESSAGE_INFO("key pressed\n");
+   ECORE_WIN32_MSG_INFO("key pressed\n");
 
    e = (Ecore_Event_Key *)malloc(sizeof(Ecore_Event_Key));
    if (!e) return;
@@ -108,7 +108,7 @@ _ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg,
 {
    Ecore_Event_Key *e;
 
-   MESSAGE_INFO("key released\n");
+   ECORE_WIN32_MSG_INFO("key released\n");
 
    e = (Ecore_Event_Key *)calloc(1, sizeof(Ecore_Event_Key));
    if (!e) return;
@@ -158,7 +158,7 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg,
 {
    Ecore_Win32_Window *window;
 
-   MESSAGE_INFO("mouse button pressed\n");
+   ECORE_WIN32_MSG_INFO("mouse button pressed\n");
 
    window = (Ecore_Win32_Window *)GetWindowLong(msg->window, GWL_USERDATA);
 
@@ -260,7 +260,7 @@ _ecore_win32_event_handle_button_release(Ecore_Win32_Callback_Data *msg,
 {
    Ecore_Win32_Window *window;
 
-   MESSAGE_INFO("mouse button released\n");
+   ECORE_WIN32_MSG_INFO("mouse button released\n");
 
    window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
 
@@ -318,7 +318,7 @@ _ecore_win32_event_handle_motion_notify(Ecore_Win32_Callback_Data *msg)
 {
    Ecore_Event_Mouse_Move *e;
 
-   MESSAGE_INFO("mouse moved\n");
+   ECORE_WIN32_MSG_INFO("mouse moved\n");
 
    e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
    if (!e) return;
@@ -337,7 +337,7 @@ _ecore_win32_event_handle_enter_notify(Ecore_Win32_Callback_Data *msg)
   {
      Ecore_Event_Mouse_Move *e;
 
-     MESSAGE_INFO("mouse in\n");
+     ECORE_WIN32_MSG_INFO("mouse in\n");
 
      e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
      if (!e) return;
@@ -376,7 +376,7 @@ _ecore_win32_event_handle_leave_notify(Ecore_Win32_Callback_Data *msg)
   {
      Ecore_Event_Mouse_Move *e;
 
-     MESSAGE_INFO("mouse out\n");
+     ECORE_WIN32_MSG_INFO("mouse out\n");
 
      e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
      if (!e) return;
@@ -414,7 +414,7 @@ _ecore_win32_event_handle_focus_in(Ecore_Win32_Callback_Data *msg)
 {
    Ecore_Win32_Event_Window_Focus_In *e;
 
-   MESSAGE_INFO("focus in\n");
+   ECORE_WIN32_MSG_INFO("focus in\n");
 
    e = (Ecore_Win32_Event_Window_Focus_In *)calloc(1, sizeof(Ecore_Win32_Event_Window_Focus_In));
    if (!e) return;
@@ -432,7 +432,7 @@ _ecore_win32_event_handle_focus_out(Ecore_Win32_Callback_Data *msg)
 {
    Ecore_Win32_Event_Window_Focus_Out *e;
 
-   MESSAGE_INFO("focus out\n");
+   ECORE_WIN32_MSG_INFO("focus out\n");
 
    e = (Ecore_Win32_Event_Window_Focus_Out *)calloc(1, sizeof(Ecore_Win32_Event_Window_Focus_Out));
    if (!e) return;
@@ -450,7 +450,7 @@ _ecore_win32_event_handle_expose(Ecore_Win32_Callback_Data *msg)
 {
    Ecore_Win32_Event_Window_Damage *e;
 
-   MESSAGE_INFO("window expose\n");
+   ECORE_WIN32_MSG_INFO("window expose\n");
 
    e = (Ecore_Win32_Event_Window_Damage *)calloc(1, sizeof(Ecore_Win32_Event_Window_Damage));
    if (!e) return;
@@ -472,7 +472,7 @@ _ecore_win32_event_handle_create_notify(Ecore_Win32_Callback_Data *msg)
 {
    Ecore_Win32_Event_Window_Create *e;
 
-   MESSAGE_INFO("window create notify\n");
+   ECORE_WIN32_MSG_INFO("window create notify\n");
 
    e = calloc(1, sizeof(Ecore_Win32_Event_Window_Create));
    if (!e) return;
@@ -489,7 +489,7 @@ _ecore_win32_event_handle_destroy_notify(Ecore_Win32_Callback_Data *msg)
 {
    Ecore_Win32_Event_Window_Destroy *e;
 
-   MESSAGE_INFO("window destroy notify\n");
+   ECORE_WIN32_MSG_INFO("window destroy notify\n");
 
    e = calloc(1, sizeof(Ecore_Win32_Event_Window_Destroy));
    if (!e) return;
@@ -507,7 +507,7 @@ _ecore_win32_event_handle_map_notify(Ecore_Win32_Callback_Data *msg)
 {
    Ecore_Win32_Event_Window_Show *e;
 
-   MESSAGE_INFO("window map notify\n");
+   ECORE_WIN32_MSG_INFO("window map notify\n");
 
    e = calloc(1, sizeof(Ecore_Win32_Event_Window_Show));
    if (!e) return;
@@ -524,7 +524,7 @@ _ecore_win32_event_handle_unmap_notify(Ecore_Win32_Callback_Data *msg)
 {
    Ecore_Win32_Event_Window_Hide *e;
 
-   MESSAGE_INFO("window unmap notify\n");
+   ECORE_WIN32_MSG_INFO("window unmap notify\n");
 
    e = calloc(1, sizeof(Ecore_Win32_Event_Window_Hide));
    if (!e) return;
@@ -543,7 +543,7 @@ _ecore_win32_event_handle_configure_notify(Ecore_Win32_Callback_Data *msg)
    Ecore_Win32_Event_Window_Configure *e;
    WINDOWPOS                          *window_pos;
 
-   MESSAGE_INFO("window configure notify\n");
+   ECORE_WIN32_MSG_INFO("window configure notify\n");
 
    e = calloc(1, sizeof(Ecore_Win32_Event_Window_Configure));
    if (!e) return;
@@ -573,7 +573,7 @@ _ecore_win32_event_handle_resize(Ecore_Win32_Callback_Data *msg)
    RECT                             rect;
    Ecore_Win32_Event_Window_Resize *e;
 
-   MESSAGE_INFO("window resize\n");
+   ECORE_WIN32_MSG_INFO("window resize\n");
 
    if (!GetClientRect(msg->window, &rect))
      return;
@@ -594,7 +594,7 @@ _ecore_win32_event_handle_delete_request(Ecore_Win32_Callback_Data *msg)
 {
    Ecore_Win32_Event_Window_Delete_Request *e;
 
-   MESSAGE_INFO("window delete request\n");
+   ECORE_WIN32_MSG_INFO("window delete request\n");
 
    e = calloc(1, sizeof(Ecore_Win32_Event_Window_Delete_Request));
    if (!e) return;
index 7194313..8ca82e7 100644 (file)
@@ -11,14 +11,14 @@ extern "C" {
 #endif
 
 
-#define ECORE_WIN32_WINDOW_CLASS "Ecore_Win32_Window_Class"
-
 /* logging messages macros */
 extern int _ecore_win32_log_dom;
 
-#define MESSAGE_ERR(...) EINA_LOG_DOM_ERR(_ecore_win32_log_dom , __VA_ARGS__)
-#define MESSAGE_DBG(...) EINA_LOG_DOM_DBG(_ecore_win32_log_dom , __VA_ARGS__)
-#define MESSAGE_INFO(...) EINA_LOG_DOM_INFO(_ecore_win32_log_dom , __VA_ARGS__)
+#define ECORE_WIN32_MSG_ERR(...) EINA_LOG_DOM_ERR(_ecore_win32_log_dom , __VA_ARGS__)
+#define ECORE_WIN32_MSG_DBG(...) EINA_LOG_DOM_DBG(_ecore_win32_log_dom , __VA_ARGS__)
+#define ECORE_WIN32_MSG_INFO(...) EINA_LOG_DOM_INFO(_ecore_win32_log_dom , __VA_ARGS__)
+
+#define ECORE_WIN32_WINDOW_CLASS "Ecore_Win32_Window_Class"
 
 typedef struct _Ecore_Win32_Callback_Data Ecore_Win32_Callback_Data;
 
@@ -98,8 +98,6 @@ extern double              _ecore_win32_event_last_time;
 extern Ecore_Win32_Window *_ecore_win32_event_last_window;
 
 
-char *_ecore_win32_hwnd_str_get(HWND window);
-
 void  _ecore_win32_event_handle_key_press(Ecore_Win32_Callback_Data *msg, int is_keystroke);
 void  _ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg, int is_keystroke);
 void  _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg, int button);
index 96153e6..fa7ae54 100644 (file)
@@ -50,7 +50,7 @@ ecore_win32_window_new(Ecore_Win32_Window *parent,
                        int                 width,
                        int                 height)
 {
-   MESSAGE_INFO("creating window with border\n");
+   ECORE_WIN32_MSG_INFO("creating window with border\n");
 
    return ecore_win32_window_internal_new(parent,
                                           x, y,
@@ -66,7 +66,7 @@ ecore_win32_window_override_new(Ecore_Win32_Window *parent,
                                 int                 width,
                                 int                 height)
 {
-   MESSAGE_INFO("creating window without border\n");
+   ECORE_WIN32_MSG_INFO("creating window without border\n");
 
    return ecore_win32_window_internal_new(parent,
                                           x, y,
@@ -81,7 +81,7 @@ ecore_win32_window_free(Ecore_Win32_Window *window)
 
    if (!window) return;
 
-   MESSAGE_INFO("destroying window\n");
+   ECORE_WIN32_MSG_INFO("destroying window\n");
 
    if (wnd->shape.mask != NULL)
       free(wnd->shape.mask);
@@ -140,12 +140,12 @@ ecore_win32_window_move(Ecore_Win32_Window *window,
 
    if (!window) return;
 
-   MESSAGE_INFO("moving window (%dx%d)\n", x, y);
+   ECORE_WIN32_MSG_INFO("moving window (%dx%d)\n", x, y);
 
    w = ((struct _Ecore_Win32_Window *)window)->window;
    if (!GetWindowRect(w, &rect))
      {
-        MESSAGE_ERR("GetWindowRect() failed\n");
+        ECORE_WIN32_MSG_ERR("GetWindowRect() failed\n");
         return;
      }
 
@@ -154,7 +154,7 @@ ecore_win32_window_move(Ecore_Win32_Window *window,
                    rect.bottom - rect.top,
                    TRUE))
      {
-        MESSAGE_ERR("MoveWindow() failed\n");
+        ECORE_WIN32_MSG_ERR("MoveWindow() failed\n");
      }
 }
 
@@ -171,12 +171,12 @@ ecore_win32_window_resize(Ecore_Win32_Window *window,
 
    if (!window) return;
 
-   MESSAGE_INFO("resizing window (%dx%d)\n", width, height);
+   ECORE_WIN32_MSG_INFO("resizing window (%dx%d)\n", width, height);
 
    w = (struct _Ecore_Win32_Window *)window;
    if (!GetWindowRect(w->window, &rect))
      {
-        MESSAGE_ERR("GetWindowRect() failed\n");
+        ECORE_WIN32_MSG_ERR("GetWindowRect() failed\n");
         return;
      }
 
@@ -195,12 +195,12 @@ ecore_win32_window_resize(Ecore_Win32_Window *window,
    rect.bottom = height;
    if (!(style = GetWindowLong(w->window, GWL_STYLE)))
      {
-        MESSAGE_ERR("GetWindowLong() failed\n");
+        ECORE_WIN32_MSG_ERR("GetWindowLong() failed\n");
         return;
      }
    if (!AdjustWindowRect(&rect, style, FALSE))
      {
-        MESSAGE_ERR("AdjustWindowRect() failed\n");
+        ECORE_WIN32_MSG_ERR("AdjustWindowRect() failed\n");
         return;
      }
 
@@ -209,7 +209,7 @@ ecore_win32_window_resize(Ecore_Win32_Window *window,
                    rect.bottom - rect.top,
                    TRUE))
      {
-        MESSAGE_ERR("MoveWindow() failed\n");
+        ECORE_WIN32_MSG_ERR("MoveWindow() failed\n");
      }
 }
 
@@ -226,7 +226,7 @@ ecore_win32_window_move_resize(Ecore_Win32_Window *window,
 
    if (!window) return;
 
-   MESSAGE_INFO("moving and resizing window (%dx%d %dx%d)\n", x, y, width, height);
+   ECORE_WIN32_MSG_INFO("moving and resizing window (%dx%d %dx%d)\n", x, y, width, height);
 
    w = ((struct _Ecore_Win32_Window *)window);
    rect.left = 0;
@@ -239,12 +239,12 @@ ecore_win32_window_move_resize(Ecore_Win32_Window *window,
    rect.bottom = height;
    if (!(style = GetWindowLong(w->window, GWL_STYLE)))
      {
-        MESSAGE_ERR("GetWindowLong() failed\n");
+        ECORE_WIN32_MSG_ERR("GetWindowLong() failed\n");
         return;
      }
    if (!AdjustWindowRect(&rect, style, FALSE))
      {
-        MESSAGE_ERR("AdjustWindowRect() failed\n");
+        ECORE_WIN32_MSG_ERR("AdjustWindowRect() failed\n");
         return;
      }
 
@@ -253,7 +253,7 @@ ecore_win32_window_move_resize(Ecore_Win32_Window *window,
                    rect.bottom - rect.top,
                    TRUE))
      {
-        MESSAGE_ERR("MoveWindow() failed\n");
+        ECORE_WIN32_MSG_ERR("MoveWindow() failed\n");
      }
 }
 
@@ -268,7 +268,7 @@ ecore_win32_window_geometry_get(Ecore_Win32_Window *window,
    int  w;
    int  h;
 
-   MESSAGE_INFO("getting window geometry\n");
+   ECORE_WIN32_MSG_INFO("getting window geometry\n");
 
    if (!window)
      {
@@ -283,7 +283,7 @@ ecore_win32_window_geometry_get(Ecore_Win32_Window *window,
    if (!GetClientRect(((struct _Ecore_Win32_Window *)window)->window,
                       &rect))
      {
-        MESSAGE_ERR("GetClientRect() failed\n");
+        ECORE_WIN32_MSG_ERR("GetClientRect() failed\n");
 
         if (x) *x = 0;
         if (y) *y = 0;
@@ -299,7 +299,7 @@ ecore_win32_window_geometry_get(Ecore_Win32_Window *window,
    if (!GetWindowRect(((struct _Ecore_Win32_Window *)window)->window,
                       &rect))
      {
-        MESSAGE_ERR("GetWindowRect() failed\n");
+        ECORE_WIN32_MSG_ERR("GetWindowRect() failed\n");
 
         if (x) *x = 0;
         if (y) *y = 0;
@@ -322,7 +322,7 @@ ecore_win32_window_size_get(Ecore_Win32_Window *window,
 {
    RECT rect;
 
-   MESSAGE_INFO("getting window size\n");
+   ECORE_WIN32_MSG_INFO("getting window size\n");
 
    if (!window)
      {
@@ -335,7 +335,7 @@ ecore_win32_window_size_get(Ecore_Win32_Window *window,
    if (!GetClientRect(((struct _Ecore_Win32_Window *)window)->window,
                       &rect))
      {
-        MESSAGE_ERR("GetClientRect() failed\n");
+        ECORE_WIN32_MSG_ERR("GetClientRect() failed\n");
 
         if (width) *width = 0;
         if (height) *height = 0;
@@ -494,13 +494,13 @@ ecore_win32_window_shape_set(Ecore_Win32_Window *window,
                                    GetWindowLong(wnd->window, GWL_EXSTYLE) & (~WS_EX_LAYERED)) &&
                  (GetLastError() != 0))
                {
-                  MESSAGE_ERR("SetWindowLongPtr() failed\n");
+                  ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed\n");
                   return;
                }
              if (!RedrawWindow(wnd->window, NULL, NULL,
                                RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN))
                {
-                  MESSAGE_ERR("RedrawWindow() failed\n");
+                  ECORE_WIN32_MSG_ERR("RedrawWindow() failed\n");
                   return;
                }
 #endif
@@ -508,7 +508,7 @@ ecore_win32_window_shape_set(Ecore_Win32_Window *window,
         else
           if (!SetWindowRgn(wnd->window, NULL, TRUE))
             {
-               MESSAGE_ERR("SetWindowRgn() failed\n");
+               ECORE_WIN32_MSG_ERR("SetWindowRgn() failed\n");
             }
         return;
      }
@@ -542,7 +542,7 @@ ecore_win32_window_shape_set(Ecore_Win32_Window *window,
                              GetWindowLong(wnd->window, GWL_EXSTYLE) | WS_EX_LAYERED) &&
            (GetLastError() != 0))
             {
-               MESSAGE_ERR("SetWindowLongPtr() failed\n");
+               ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed\n");
                return;
             }
        wnd->shape.layered = 1;
@@ -552,7 +552,7 @@ ecore_win32_window_shape_set(Ecore_Win32_Window *window,
 
    if (!(rgn = CreateRectRgn(0, 0, 0, 0)))
      {
-        MESSAGE_ERR("CreateRectRgn() failed\n");
+        ECORE_WIN32_MSG_ERR("CreateRectRgn() failed\n");
         return;
      }
    for (y = 0; y < height; y++)
@@ -561,7 +561,7 @@ ecore_win32_window_shape_set(Ecore_Win32_Window *window,
 
         if (!(rgnLine = CreateRectRgn(0, 0, 0, 0)))
           {
-             MESSAGE_ERR("CreateRectRgn() failed\n");
+             ECORE_WIN32_MSG_ERR("CreateRectRgn() failed\n");
              return;
           }
         for (x = 0; x < width; x++)
@@ -572,33 +572,33 @@ ecore_win32_window_shape_set(Ecore_Win32_Window *window,
 
                   if (!(rgnDot = CreateRectRgn(x, y, x + 1, y + 1)))
                     {
-                       MESSAGE_ERR("CreateRectRgn() failed\n");
+                       ECORE_WIN32_MSG_ERR("CreateRectRgn() failed\n");
                        return;
                     }
                   if (CombineRgn(rgnLine, rgnLine, rgnDot, RGN_OR) == ERROR)
                     {
-                       MESSAGE_ERR("CombineRgn() has not created a new region\n");
+                       ECORE_WIN32_MSG_ERR("CombineRgn() has not created a new region\n");
                     }
                   if (!DeleteObject(rgnDot))
                     {
-                       MESSAGE_ERR("DeleteObject() failed\n");
+                       ECORE_WIN32_MSG_ERR("DeleteObject() failed\n");
                        return;
                     }
                }
           }
         if (CombineRgn(rgn, rgn, rgnLine, RGN_OR) == ERROR)
           {
-             MESSAGE_ERR("CombineRgn() has not created a new region\n");
+             ECORE_WIN32_MSG_ERR("CombineRgn() has not created a new region\n");
           }
         if (!DeleteObject(rgnLine))
           {
-             MESSAGE_ERR("DeleteObject() failed\n");
+             ECORE_WIN32_MSG_ERR("DeleteObject() failed\n");
              return;
           }
      }
    if (!SetWindowRgn(wnd->window, rgn, TRUE))
      {
-        MESSAGE_ERR("SetWindowRgn() failed\n");
+        ECORE_WIN32_MSG_ERR("SetWindowRgn() failed\n");
      }
 }
 
@@ -607,12 +607,12 @@ ecore_win32_window_show(Ecore_Win32_Window *window)
 {
    if (!window) return;
 
-   MESSAGE_INFO("showing window\n");
+   ECORE_WIN32_MSG_INFO("showing window\n");
 
    ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_SHOWNORMAL);
    if (!UpdateWindow(((struct _Ecore_Win32_Window *)window)->window))
      {
-        MESSAGE_ERR("UpdateWindow() failed\n");
+        ECORE_WIN32_MSG_ERR("UpdateWindow() failed\n");
      }
 }
 
@@ -622,7 +622,7 @@ ecore_win32_window_hide(Ecore_Win32_Window *window)
 {
    if (!window) return;
 
-   MESSAGE_INFO("hiding window\n");
+   ECORE_WIN32_MSG_INFO("hiding window\n");
 
    ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_HIDE);
 }
@@ -632,13 +632,13 @@ ecore_win32_window_raise(Ecore_Win32_Window *window)
 {
    if (!window) return;
 
-   MESSAGE_INFO("raising window\n");
+   ECORE_WIN32_MSG_INFO("raising window\n");
 
    if (!SetWindowPos(((struct _Ecore_Win32_Window *)window)->window,
                      HWND_TOP, 0, 0, 0, 0,
                      SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE))
      {
-        MESSAGE_ERR("SetWindowPos() failed\n");
+        ECORE_WIN32_MSG_ERR("SetWindowPos() failed\n");
      }
 }
 
@@ -647,13 +647,13 @@ ecore_win32_window_lower(Ecore_Win32_Window *window)
 {
    if (!window) return;
 
-   MESSAGE_INFO("lowering window\n");
+   ECORE_WIN32_MSG_INFO("lowering window\n");
 
    if (!SetWindowPos(((struct _Ecore_Win32_Window *)window)->window,
                      HWND_BOTTOM, 0, 0, 0, 0,
                      SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE))
      {
-        MESSAGE_ERR("SetWindowPos() failed\n");
+        ECORE_WIN32_MSG_ERR("SetWindowPos() failed\n");
      }
 }
 
@@ -665,11 +665,11 @@ ecore_win32_window_title_set(Ecore_Win32_Window *window,
 
    if (!title || !title[0]) return;
 
-   MESSAGE_INFO("setting window title\n");
+   ECORE_WIN32_MSG_INFO("setting window title\n");
 
    if (!SetWindowText(((struct _Ecore_Win32_Window *)window)->window, title))
      {
-        MESSAGE_ERR("SetWindowText() failed\n");
+        ECORE_WIN32_MSG_ERR("SetWindowText() failed\n");
      }
 }
 
@@ -678,11 +678,11 @@ ecore_win32_window_focus_set(Ecore_Win32_Window *window)
 {
    if (!window) return;
 
-   MESSAGE_INFO("focusing window\n");
+   ECORE_WIN32_MSG_INFO("focusing window\n");
 
    if (!SetFocus(((struct _Ecore_Win32_Window *)window)->window))
      {
-        MESSAGE_ERR("SetFocus() failed\n");
+        ECORE_WIN32_MSG_ERR("SetFocus() failed\n");
      }
 }
 
@@ -699,7 +699,7 @@ ecore_win32_window_iconified_set(Ecore_Win32_Window *window,
        ((!ew->iconified) && (!on)))
      return;
 
-   MESSAGE_INFO("iconifying window: %s\n", on ? "yes" : "no");
+   ECORE_WIN32_MSG_INFO("iconifying window: %s\n", on ? "yes" : "no");
 
    ShowWindow(ew->window, on ? SW_MINIMIZE : SW_RESTORE);
    ew->iconified = on;
@@ -721,7 +721,7 @@ ecore_win32_window_borderless_set(Ecore_Win32_Window *window,
        ((!ew->borderless) && (!on)))
      return;
 
-   MESSAGE_INFO("setting window without border: %s\n", on ? "yes" : "no");
+   ECORE_WIN32_MSG_INFO("setting window without border: %s\n", on ? "yes" : "no");
 
    w = ew->window;
 
@@ -730,13 +730,13 @@ ecore_win32_window_borderless_set(Ecore_Win32_Window *window,
      {
         if (!GetClientRect(w, &rect))
           {
-             MESSAGE_ERR("GetClientRect() failed\n");
+             ECORE_WIN32_MSG_ERR("GetClientRect() failed\n");
              return;
           }
         SetLastError(0);
         if (!SetWindowLongPtr(w, GWL_STYLE, style & ~(WS_CAPTION | WS_THICKFRAME)) && (GetLastError() != 0))
           {
-             MESSAGE_ERR("SetWindowLongPtr() failed\n");
+             ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed\n");
              return;
           }
      }
@@ -744,19 +744,19 @@ ecore_win32_window_borderless_set(Ecore_Win32_Window *window,
      {
         if (!GetWindowRect(w, &rect))
           {
-             MESSAGE_ERR("GetWindowRect() failed\n");
+             ECORE_WIN32_MSG_ERR("GetWindowRect() failed\n");
              return;
           }
         style |= WS_CAPTION | WS_THICKFRAME;
         if (!AdjustWindowRect (&rect, style, FALSE))
           {
-             MESSAGE_ERR("AdjustWindowRect() failed\n");
+             ECORE_WIN32_MSG_ERR("AdjustWindowRect() failed\n");
              return;
           }
         SetLastError(0);
         if (!SetWindowLongPtr(w, GWL_STYLE, style) && (GetLastError() != 0))
           {
-             MESSAGE_ERR("SetWindowLongPtr() failed\n");
+             ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed\n");
              return;
           }
      }
@@ -765,7 +765,7 @@ ecore_win32_window_borderless_set(Ecore_Win32_Window *window,
                      rect.right - rect.left, rect.bottom - rect.top,
                      SWP_NOMOVE | SWP_FRAMECHANGED))
      {
-        MESSAGE_ERR("SetWindowPos() failed\n");
+        ECORE_WIN32_MSG_ERR("SetWindowPos() failed\n");
         return;
      }
    ew->borderless = on;
@@ -785,7 +785,7 @@ ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window,
        ((!ew->fullscreen) && (!on)))
      return;
 
-   MESSAGE_INFO("setting fullscreen: %s\n", on ? "yes" : "no");
+   ECORE_WIN32_MSG_INFO("setting fullscreen: %s\n", on ? "yes" : "no");
 
    ew->fullscreen = !!on;
    w = ew->window;
@@ -796,12 +796,12 @@ ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window,
 
         if (!GetWindowRect(w, &ew->rect))
           {
-             MESSAGE_ERR("GetWindowRect() failed\n");
+             ECORE_WIN32_MSG_ERR("GetWindowRect() failed\n");
              return;
           }
         if (!(ew->style = GetWindowLong(w, GWL_STYLE)))
           {
-             MESSAGE_ERR("GetWindowLong() failed\n");
+             ECORE_WIN32_MSG_ERR("GetWindowLong() failed\n");
              return;
           }
         style = ew->style & ~WS_OVERLAPPEDWINDOW & ~WS_SIZEBOX;
@@ -809,20 +809,20 @@ ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window,
         SetLastError(0);
         if (!SetWindowLongPtr(w, GWL_STYLE, style) && (GetLastError() != 0))
           {
-             MESSAGE_ERR("SetWindowLongPtr() failed\n");
+             ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed\n");
              return;
           }
         SetLastError(0);
         if (!SetWindowLongPtr(w, GWL_EXSTYLE, WS_EX_TOPMOST) && (GetLastError() != 0))
           {
-             MESSAGE_ERR("SetWindowLongPtr() failed\n");
+             ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed\n");
              return;
           }
         if (!SetWindowPos(w, HWND_TOPMOST, 0, 0,
                           GetSystemMetrics (SM_CXSCREEN), GetSystemMetrics (SM_CYSCREEN),
                           SWP_NOCOPYBITS | SWP_SHOWWINDOW))
           {
-             MESSAGE_ERR("SetWindowPos() failed\n");
+             ECORE_WIN32_MSG_ERR("SetWindowPos() failed\n");
              return;
           }
      }
@@ -831,13 +831,13 @@ ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window,
         SetLastError(0);
         if (!SetWindowLongPtr(w, GWL_STYLE, ew->style) && (GetLastError() != 0))
           {
-             MESSAGE_ERR("SetWindowLongPtr() failed\n");
+             ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed\n");
              return;
           }
         SetLastError(0);
         if (!SetWindowLongPtr(w, GWL_EXSTYLE, 0) && (GetLastError() != 0))
           {
-             MESSAGE_ERR("SetWindowLongPtr() failed\n");
+             ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed\n");
              return;
           }
         if (!SetWindowPos(w, HWND_NOTOPMOST,
@@ -847,7 +847,7 @@ ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window,
                           ew->rect.bottom - ew->rect.top,
                           SWP_NOCOPYBITS | SWP_SHOWWINDOW))
           {
-             MESSAGE_ERR("SetWindowPos() failed\n");
+             ECORE_WIN32_MSG_ERR("SetWindowPos() failed\n");
              return;
           }
      }
@@ -857,12 +857,12 @@ void
 ecore_win32_window_cursor_set(Ecore_Win32_Window *window,
                               Ecore_Win32_Cursor *cursor)
 {
-   MESSAGE_INFO("setting cursor\n");
+   ECORE_WIN32_MSG_INFO("setting cursor\n");
 
    if (!SetClassLong(((struct _Ecore_Win32_Window *)window)->window,
                      GCL_HCURSOR, (LONG)cursor))
      {
-        MESSAGE_ERR("SetClassLong() failed\n");
+        ECORE_WIN32_MSG_ERR("SetClassLong() failed\n");
      }
 }
 
@@ -876,7 +876,7 @@ ecore_win32_window_state_set(Ecore_Win32_Window       *window,
    if (!window || !state || !num)
      return;
 
-   MESSAGE_INFO("setting cursor state\n");
+   ECORE_WIN32_MSG_INFO("setting cursor state\n");
 
    for (i = 0; i < num; i++)
      {
@@ -939,7 +939,7 @@ ecore_win32_window_state_request_send(Ecore_Win32_Window      *window,
    ew = (struct _Ecore_Win32_Window *)window;
    w = ew->window;
 
-   MESSAGE_INFO("sending cursor state\n");
+   ECORE_WIN32_MSG_INFO("sending cursor state\n");
 
    switch (state)
      {
@@ -963,7 +963,7 @@ ecore_win32_window_state_request_send(Ecore_Win32_Window      *window,
               if (!SystemParametersInfo(SPI_GETWORKAREA, 0,
                                         &rect, 0))
                 {
-                   MESSAGE_ERR("SystemParametersInfo() failed\n");
+                   ECORE_WIN32_MSG_ERR("SystemParametersInfo() failed\n");
                    break;
                 }
               y = rect.top;
@@ -971,7 +971,7 @@ ecore_win32_window_state_request_send(Ecore_Win32_Window      *window,
 
               if (!GetClientRect(w, &rect))
                 {
-                   MESSAGE_ERR("GetClientRect() failed\n");
+                   ECORE_WIN32_MSG_ERR("GetClientRect() failed\n");
                    break;
                 }
 
@@ -980,7 +980,7 @@ ecore_win32_window_state_request_send(Ecore_Win32_Window      *window,
                               height,
                               TRUE))
                 {
-                   MESSAGE_ERR("MoveWindow() failed\n");
+                   ECORE_WIN32_MSG_ERR("MoveWindow() failed\n");
                 }
            }
          break;
@@ -991,7 +991,7 @@ ecore_win32_window_state_request_send(Ecore_Win32_Window      *window,
 
               if (!GetClientRect(w, &rect))
                 {
-                   MESSAGE_ERR("GetClientRect() failed\n");
+                   ECORE_WIN32_MSG_ERR("GetClientRect() failed\n");
                    break;
                 }
 
@@ -1000,7 +1000,7 @@ ecore_win32_window_state_request_send(Ecore_Win32_Window      *window,
                               rect.bottom - rect.top,
                               TRUE))
                 {
-                   MESSAGE_ERR("MoveWindow() failed\n");
+                   ECORE_WIN32_MSG_ERR("MoveWindow() failed\n");
                 }
            }
          break;
@@ -1012,7 +1012,7 @@ ecore_win32_window_state_request_send(Ecore_Win32_Window      *window,
               if (!SystemParametersInfo(SPI_GETWORKAREA, 0,
                                         &rect, 0))
                 {
-                   MESSAGE_ERR("SystemParametersInfo() failed\n");
+                   ECORE_WIN32_MSG_ERR("SystemParametersInfo() failed\n");
                    break;
                 }
 
@@ -1021,7 +1021,7 @@ ecore_win32_window_state_request_send(Ecore_Win32_Window      *window,
                               rect.bottom - rect.top,
                               TRUE))
                 {
-                   MESSAGE_ERR("MoveWindow() failed\n");
+                   ECORE_WIN32_MSG_ERR("MoveWindow() failed\n");
                 }
            }
          break;
@@ -1042,7 +1042,7 @@ ecore_win32_window_state_request_send(Ecore_Win32_Window      *window,
                              0, 0,
                              SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW))
              {
-                MESSAGE_ERR("SetWindowPos() failed\n");
+                ECORE_WIN32_MSG_ERR("SetWindowPos() failed\n");
              }
          break;
       case ECORE_WIN32_WINDOW_STATE_BELOW:
@@ -1052,7 +1052,7 @@ ecore_win32_window_state_request_send(Ecore_Win32_Window      *window,
                              0, 0,
                              SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW))
              {
-                MESSAGE_ERR("SetWindowPos() failed\n");
+                ECORE_WIN32_MSG_ERR("SetWindowPos() failed\n");
              }
          break;
       case ECORE_WIN32_WINDOW_STATE_DEMANDS_ATTENTION:
@@ -1071,7 +1071,7 @@ ecore_win32_window_type_set(Ecore_Win32_Window      *window,
    if (!window)
      return;
 
-   MESSAGE_INFO("setting window type\n");
+   ECORE_WIN32_MSG_INFO("setting window type\n");
 
    switch (type)
      {
@@ -1124,7 +1124,7 @@ ecore_win32_window_internal_new(Ecore_Win32_Window *parent,
    w = (struct _Ecore_Win32_Window *)calloc(1, sizeof(struct _Ecore_Win32_Window));
    if (!w)
      {
-        MESSAGE_ERR("malloc() failed\n");
+        ECORE_WIN32_MSG_ERR("malloc() failed\n");
         return NULL;
      }
 
@@ -1134,7 +1134,7 @@ ecore_win32_window_internal_new(Ecore_Win32_Window *parent,
    rect.bottom = height;
    if (!AdjustWindowRect(&rect, style, FALSE))
      {
-        MESSAGE_ERR("AdjustWindowRect() failed\n");
+        ECORE_WIN32_MSG_ERR("AdjustWindowRect() failed\n");
         free(w);
         return NULL;
      }
@@ -1164,7 +1164,7 @@ ecore_win32_window_internal_new(Ecore_Win32_Window *parent,
                               NULL, _ecore_win32_instance, NULL);
    if (!w->window)
      {
-        MESSAGE_ERR("CreateWindowEx() failed\n");
+        ECORE_WIN32_MSG_ERR("CreateWindowEx() failed\n");
         free(w);
         return NULL;
      }
@@ -1172,7 +1172,7 @@ ecore_win32_window_internal_new(Ecore_Win32_Window *parent,
    SetLastError(0);
    if (!SetWindowLongPtr(w->window, GWL_USERDATA, (LONG)w) && (GetLastError() != 0))
      {
-        MESSAGE_ERR("SetWindowLongPtr() failed\n");
+        ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed\n");
         DestroyWindow(w->window);
         free(w);
         return NULL;
index d2df3c5..2561076 100644 (file)
@@ -44,7 +44,6 @@ int ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST = 0;
 /***** Private declarations *****/
 
 static int       _ecore_wince_init_count = 0;
-static int       _ecore_wince_log_dom = -1;
 
 LRESULT CALLBACK _ecore_wince_window_procedure(HWND   window,
                                                UINT   message,
@@ -68,17 +67,17 @@ ecore_wince_init()
 {
    WNDCLASS wc;
 
-   _ecore_wince_error_print_cb_set(_ecore_wince_error_print_cb, NULL);
+   eina_log_print_cb_set(_ecore_wince_error_print_cb, NULL);
 
    if(_ecore_wince_log_dom < 0)
-     _ecore_wince_log_dom = eina_log_domain_register("ecore_wince", EINA_LOG_COLOR_LIGHTBLUE);
+     _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;
      }
 
-   MESSAGE_INFO("initializing ecore_wince (current count: %d)\n", _ecore_wince_init_count);
+   ECORE_WINCE_MSG_INFO("initializing ecore_wince (current count: %d)\n", _ecore_wince_init_count);
 
    if (_ecore_wince_init_count > 0)
      {
@@ -89,7 +88,7 @@ ecore_wince_init()
    _ecore_wince_instance = GetModuleHandle(NULL);
    if (!_ecore_wince_instance)
      {
-        MESSAGE_ERR("GetModuleHandle() failed\n");
+        ECORE_WINCE_MSG_ERR("GetModuleHandle() failed\n");
         return 0;
      }
 
@@ -107,7 +106,7 @@ ecore_wince_init()
 
    if(!RegisterClass(&wc))
      {
-        MESSAGE_ERR("RegisterClass() failed\n");
+        ECORE_WINCE_MSG_ERR("RegisterClass() failed\n");
         FreeLibrary(_ecore_wince_instance);
         return 0;
      }
@@ -138,7 +137,7 @@ ecore_wince_shutdown()
 {
    HWND task_bar;
 
-   MESSAGE_INFO("shutting down ecore_wince (current count: %d)\n", _ecore_wince_init_count);
+   ECORE_WINCE_MSG_INFO("shutting down ecore_wince (current count: %d)\n", _ecore_wince_init_count);
 
    _ecore_wince_init_count--;
    if (_ecore_wince_init_count > 0) return _ecore_wince_init_count;
@@ -156,11 +155,11 @@ ecore_wince_shutdown()
 
    if (!UnregisterClass(ECORE_WINCE_WINDOW_CLASS, _ecore_wince_instance))
      {
-        MESSAGE_ERR("UnregisterClass() failed\n");
+        ECORE_WINCE_MSG_ERR("UnregisterClass() failed\n");
      }
    if (!FreeLibrary(_ecore_wince_instance))
      {
-        MESSAGE_ERR("FreeLibrary() failed\n");
+        ECORE_WINCE_MSG_ERR("FreeLibrary() failed\n");
      }
    _ecore_wince_instance = NULL;
 
@@ -276,7 +275,7 @@ _ecore_wince_window_procedure(HWND   window,
             {
                POINT pt;
 
-               MESSAGE_INFO("mouse in window\n");
+               ECORE_WINCE_MSG_INFO("mouse in window\n");
 
                pt.x = LOWORD(data_param);
                pt.y = HIWORD(data_param);
@@ -299,7 +298,7 @@ _ecore_wince_window_procedure(HWND   window,
             }
           else
             {
-               MESSAGE_ERR("GetClientRect() failed\n");
+               ECORE_WINCE_MSG_ERR("GetClientRect() failed\n");
             }
           _ecore_wince_event_handle_motion_notify(data);
 
index 6826d5e..927c2a3 100644 (file)
@@ -55,7 +55,7 @@ _ecore_wince_event_handle_key_press(Ecore_WinCE_Callback_Data *msg,
 {
    Ecore_Event_Key *e;
 
-   EINA_ERROR_PINFO("key pressed\n");
+   ECORE_WINCE_MSG_INFO("key pressed\n");
 
    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;
 
-   EINA_ERROR_PINFO("key released\n");
+   ECORE_WINCE_MSG_INFO("key released\n");
 
    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;
 
-   EINA_ERROR_PINFO("mouse button pressed\n");
+   ECORE_WINCE_MSG_INFO("mouse button pressed\n");
 
    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;
 
-   EINA_ERROR_PINFO("mouse button released\n");
+   ECORE_WINCE_MSG_INFO("mouse button released\n");
 
    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;
 
-   EINA_ERROR_PINFO("mouse moved\n");
+   ECORE_WINCE_MSG_INFO("mouse moved\n");
 
    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;
 
-   EINA_ERROR_PINFO("mouse in\n");
+   ECORE_WINCE_MSG_INFO("mouse in\n");
 
    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;
 
-   EINA_ERROR_PINFO("mouse out\n");
+   ECORE_WINCE_MSG_INFO("mouse out\n");
 
    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;
 
-   EINA_ERROR_PINFO("focus in\n");
+   ECORE_WINCE_MSG_INFO("focus in\n");
 
    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;
 
-   EINA_ERROR_PINFO("focus out\n");
+   ECORE_WINCE_MSG_INFO("focus out\n");
 
    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;
 
-   EINA_ERROR_PINFO("window expose\n");
+   ECORE_WINCE_MSG_INFO("window expose\n");
 
    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;
-   EINA_ERROR_PINFO("window expose size: %dx%d\n", e->width, e->height);
+   ECORE_WINCE_MSG_INFO("window expose size: %dx%d\n", 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;
 
-   EINA_ERROR_PINFO("window create notify\n");
+   ECORE_WINCE_MSG_INFO("window create notify\n");
 
    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;
 
-   EINA_ERROR_PINFO("window destroy notify\n");
+   ECORE_WINCE_MSG_INFO("window destroy notify\n");
 
    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;
 
-   EINA_ERROR_PINFO("window map notify\n");
+   ECORE_WINCE_MSG_INFO("window map notify\n");
 
    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;
 
-   EINA_ERROR_PINFO("window unmap notify\n");
+   ECORE_WINCE_MSG_INFO("window unmap notify\n");
 
    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;
 
-   EINA_ERROR_PINFO("window delete request\n");
+   ECORE_WINCE_MSG_INFO("window delete request\n");
 
    e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Delete_Request));
    if (!e) return;
index a9b13af..14824e2 100644 (file)
@@ -6,6 +6,13 @@
 #define __ECORE_WINCE_PRIVATE_H__
 
 
+/* logging messages macros */
+extern int _ecore_wince_log_dom;
+
+#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 ECORE_WINCE_WINDOW_CLASS L"Ecore_WinCE_Window_Class"
 
 
@@ -42,16 +49,11 @@ struct _Ecore_WinCE_Window
    unsigned int        fullscreen    : 1;
 };
 
+extern HINSTANCE           _ecore_wince_instance;
 extern double              _ecore_wince_double_click_time;
 extern double              _ecore_wince_event_last_time;
 extern Ecore_WinCE_Window *_ecore_wince_event_last_window;
 
-extern HINSTANCE           _ecore_wince_instance;
-
-extern int                 _ecore_wince_log_dom;
-#define MESSAGE_ERR(...) EINA_LOG_DOM_ERR(_ecore_wince_log_dom , __VA_ARGS__)
-#define MESSAGE_DBG(...) EINA_LOG_DOM_DBG(_ecore_wince_log_dom , __VA_ARGS__)
-#define MESSAGE_INFO(...) EINA_LOG_DOM_INFO(_ecore_wince_log_dom , __VA_ARGS__)
 
 void  _ecore_wince_event_handle_key_press(Ecore_WinCE_Callback_Data *msg, int is_keystroke);
 void  _ecore_wince_event_handle_key_release(Ecore_WinCE_Callback_Data *msg, int is_keystroke);
index 8cb2289..9b8d92a 100644 (file)
@@ -37,12 +37,12 @@ ecore_wince_window_new(Ecore_WinCE_Window *parent,
    HWND                        window;
    RECT                        rect;
 
-   MESSAGE_INFO("creating window\n");
+   ECORE_WINCE_MSG_INFO("creating window\n");
 
    w = (struct _Ecore_WinCE_Window *)calloc(1, sizeof(struct _Ecore_WinCE_Window));
    if (!w)
      {
-        MESSAGE_ERR("malloc() failed\n");
+        ECORE_WINCE_MSG_ERR("malloc() failed\n");
         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))
      {
-        MESSAGE_ERR("AdjustWindowRectEx() failed\n");
+        ECORE_WINCE_MSG_ERR("AdjustWindowRectEx() failed\n");
         free(w);
         return NULL;
      }
@@ -67,14 +67,14 @@ ecore_wince_window_new(Ecore_WinCE_Window *parent,
                            NULL, _ecore_wince_instance, NULL);
    if (!window)
      {
-        MESSAGE_ERR("CreateWindowEx() failed\n");
+        ECORE_WINCE_MSG_ERR("CreateWindowEx() failed\n");
         free(w);
         return NULL;
      }
 
    if (!_ecore_wince_hardware_keys_register(window))
      {
-        MESSAGE_ERR("_ecore_wince_hardware_keys_register() failed\n");
+        ECORE_WINCE_MSG_ERR("_ecore_wince_hardware_keys_register() failed\n");
         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))
      {
-        MESSAGE_ERR("SetWindowLong() failed\n");
+        ECORE_WINCE_MSG_ERR("SetWindowLong() failed\n");
         DestroyWindow(window);
         free(w);
         return NULL;
@@ -101,7 +101,7 @@ ecore_wince_window_free(Ecore_WinCE_Window *window)
 {
    if (!window) return;
 
-   MESSAGE_INFO("destroying window\n");
+   ECORE_WINCE_MSG_INFO("destroying window\n");
 
    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;
 
-   MESSAGE_INFO("moving window (%dx%d)\n", x, y);
+   ECORE_WINCE_MSG_INFO("moving window (%dx%d)\n", x, y);
 
    w = ((struct _Ecore_WinCE_Window *)window)->window;
    if (!GetWindowRect(w, &rect))
      {
-        MESSAGE_ERR("GetWindowRect() failed\n");
+        ECORE_WINCE_MSG_ERR("GetWindowRect() failed\n");
         return;
      }
 
@@ -141,7 +141,7 @@ ecore_wince_window_move(Ecore_WinCE_Window *window,
                    rect.bottom - rect.top,
                    TRUE))
      {
-        MESSAGE_ERR("MoveWindow() failed\n");
+        ECORE_WINCE_MSG_ERR("MoveWindow() failed\n");
      }
 }
 
@@ -160,12 +160,12 @@ ecore_wince_window_resize(Ecore_WinCE_Window *window,
    if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
      return;
 
-   MESSAGE_INFO("resizing window (%dx%d)\n", width, height);
+   ECORE_WINCE_MSG_INFO("resizing window (%dx%d)\n", width, height);
 
    w = (struct _Ecore_WinCE_Window *)window;
    if (!GetWindowRect(w->window, &rect))
      {
-        MESSAGE_ERR("GetWindowRect() failed\n");
+        ECORE_WINCE_MSG_ERR("GetWindowRect() failed\n");
         return;
      }
 
@@ -177,17 +177,17 @@ ecore_wince_window_resize(Ecore_WinCE_Window *window,
    rect.bottom = height;
    if (!(style = GetWindowLong(w->window, GWL_STYLE)))
      {
-        MESSAGE_ERR("GetWindowLong() failed\n");
+        ECORE_WINCE_MSG_ERR("GetWindowLong() failed\n");
         return;
      }
    if (!(exstyle = GetWindowLong(w->window, GWL_EXSTYLE)))
      {
-        MESSAGE_ERR("GetWindowLong() failed\n");
+        ECORE_WINCE_MSG_ERR("GetWindowLong() failed\n");
         return;
      }
    if (!AdjustWindowRectEx(&rect, style, FALSE, exstyle))
      {
-        MESSAGE_ERR("AdjustWindowRectEx() failed\n");
+        ECORE_WINCE_MSG_ERR("AdjustWindowRectEx() failed\n");
         return;
      }
 
@@ -196,7 +196,7 @@ ecore_wince_window_resize(Ecore_WinCE_Window *window,
                    rect.bottom - rect.top,
                    FALSE))
      {
-        MESSAGE_ERR("MoveWindow() failed\n");
+        ECORE_WINCE_MSG_ERR("MoveWindow() failed\n");
      }
 }
 
@@ -215,7 +215,7 @@ ecore_wince_window_move_resize(Ecore_WinCE_Window *window,
    if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
      return;
 
-   MESSAGE_INFO("moving and resizing window (%dx%d %dx%d)\n", x, y, width, height);
+   ECORE_WINCE_MSG_INFO("moving and resizing window (%dx%d %dx%d)\n", 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)))
      {
-        MESSAGE_ERR("GetWindowLong() failed\n");
+        ECORE_WINCE_MSG_ERR("GetWindowLong() failed\n");
         return;
      }
    if (!(exstyle = GetWindowLong(w->window, GWL_EXSTYLE)))
      {
-        MESSAGE_ERR("GetWindowLong() failed\n");
+        ECORE_WINCE_MSG_ERR("GetWindowLong() failed\n");
         return;
      }
    if (!AdjustWindowRectEx(&rect, style, FALSE, exstyle))
      {
-        MESSAGE_ERR("AdjustWindowRectEx() failed\n");
+        ECORE_WINCE_MSG_ERR("AdjustWindowRectEx() failed\n");
         return;
      }
 
@@ -243,7 +243,7 @@ ecore_wince_window_move_resize(Ecore_WinCE_Window *window,
               rect.bottom - rect.top,
               TRUE))
      {
-        MESSAGE_ERR("MoveWindow() failed\n");
+        ECORE_WINCE_MSG_ERR("MoveWindow() failed\n");
      }
 }
 
@@ -252,20 +252,20 @@ ecore_wince_window_show(Ecore_WinCE_Window *window)
 {
    if (!window) return;
 
-   MESSAGE_INFO("showing window\n");
+   ECORE_WINCE_MSG_INFO("showing window\n");
 
    if (!ShowWindow(((struct _Ecore_WinCE_Window *)window)->window, SW_SHOWNORMAL))
      {
-        MESSAGE_ERR("ShowWindow() failed\n");
+        ECORE_WINCE_MSG_ERR("ShowWindow() failed\n");
         return;
      }
    if (!UpdateWindow(((struct _Ecore_WinCE_Window *)window)->window))
      {
-        MESSAGE_ERR("UpdateWindow() failed\n");
+        ECORE_WINCE_MSG_ERR("UpdateWindow() failed\n");
      }
    if (!SendMessage(((struct _Ecore_WinCE_Window *)window)->window, WM_SHOWWINDOW, 1, 0))
      {
-        MESSAGE_ERR("SendMessage() failed\n");
+        ECORE_WINCE_MSG_ERR("SendMessage() failed\n");
      }
 }
 
@@ -274,16 +274,16 @@ ecore_wince_window_hide(Ecore_WinCE_Window *window)
 {
    if (!window) return;
 
-   MESSAGE_INFO("hiding window\n");
+   ECORE_WINCE_MSG_INFO("hiding window\n");
 
    if (!ShowWindow(((struct _Ecore_WinCE_Window *)window)->window, SW_HIDE))
      {
-        MESSAGE_ERR("ShowWindow() failed\n");
+        ECORE_WINCE_MSG_ERR("ShowWindow() failed\n");
         return;
      }
    if (!SendMessage(((struct _Ecore_WinCE_Window *)window)->window, WM_SHOWWINDOW, 0, 0))
      {
-        MESSAGE_ERR("SendMessage() failed\n");
+        ECORE_WINCE_MSG_ERR("SendMessage() failed\n");
      }
 }
 
@@ -297,14 +297,14 @@ ecore_wince_window_title_set(Ecore_WinCE_Window *window,
 
    if (!title || !title[0]) return;
 
-   MESSAGE_INFO("setting window title\n");
+   ECORE_WINCE_MSG_INFO("setting window title\n");
 
    wtitle = evil_char_to_wchar(title);
    if (!wtitle) return;
 
    if (!SetWindowText(((struct _Ecore_WinCE_Window *)window)->window, wtitle))
      {
-        MESSAGE_ERR("SetWindowText() failed\n");
+        ECORE_WINCE_MSG_ERR("SetWindowText() failed\n");
      }
    free(wtitle);
 }
@@ -317,7 +317,7 @@ ecore_wince_window_backend_set(Ecore_WinCE_Window *window, int backend)
    if (!window)
      return;
 
-   MESSAGE_INFO("setting backend\n");
+   ECORE_WINCE_MSG_INFO("setting backend\n");
 
    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;
 
-   MESSAGE_INFO("setting suspend callback\n");
+   ECORE_WINCE_MSG_INFO("setting suspend callback\n");
 
    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;
 
-   MESSAGE_INFO("setting resume callback\n");
+   ECORE_WINCE_MSG_INFO("setting resume callback\n");
 
    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;
 
-   MESSAGE_INFO("getting window geometry\n");
+   ECORE_WINCE_MSG_INFO("getting window geometry\n");
 
    if (!window)
      {
@@ -377,7 +377,7 @@ ecore_wince_window_geometry_get(Ecore_WinCE_Window *window,
    if (!GetClientRect(((struct _Ecore_WinCE_Window *)window)->window,
                       &rect))
      {
-        MESSAGE_ERR("GetClientRect() failed\n");
+        ECORE_WINCE_MSG_ERR("GetClientRect() failed\n");
 
         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))
      {
-        MESSAGE_ERR("GetWindowRect() failed\n");
+        ECORE_WINCE_MSG_ERR("GetWindowRect() failed\n");
 
         if (x) *x = 0;
         if (y) *y = 0;
@@ -416,7 +416,7 @@ ecore_wince_window_size_get(Ecore_WinCE_Window *window,
 {
    RECT rect;
 
-   MESSAGE_INFO("getting window size\n");
+   ECORE_WINCE_MSG_INFO("getting window size\n");
 
    if (!window)
      {
@@ -429,7 +429,7 @@ ecore_wince_window_size_get(Ecore_WinCE_Window *window,
    if (!GetClientRect(((struct _Ecore_WinCE_Window *)window)->window,
                       &rect))
      {
-        MESSAGE_ERR("GetClientRect() failed\n");
+        ECORE_WINCE_MSG_ERR("GetClientRect() failed\n");
 
         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;
 
-   MESSAGE_INFO("setting fullscreen: %s\n", on ? "yes" : "no");
+   ECORE_WINCE_MSG_INFO("setting fullscreen: %s\n", 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))
           {
-             MESSAGE_ERR("GetWindowRect() failed\n");
+             ECORE_WINCE_MSG_ERR("GetWindowRect() failed\n");
              return;
           }
 
@@ -472,21 +472,21 @@ ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
         task_bar = FindWindow(L"HHTaskBar", NULL);
         if (!task_bar)
           {
-             MESSAGE_INFO("FindWindow(): can not find task bar\n");
+             ECORE_WINCE_MSG_INFO("FindWindow(): can not find task bar\n");
           }
         if (!ShowWindow(task_bar, SW_HIDE))
           {
-             MESSAGE_INFO("ShowWindow(): task bar already hidden\n");
+             ECORE_WINCE_MSG_INFO("ShowWindow(): task bar already hidden\n");
           }
         if (!EnableWindow(task_bar, FALSE))
           {
-             MESSAGE_INFO("EnableWindow(): input already disabled\n");
+             ECORE_WINCE_MSG_INFO("EnableWindow(): input already disabled\n");
           }
 
         /* style: visible + popup */
         if (!SetWindowLong(w, GWL_STYLE, WS_POPUP | WS_VISIBLE))
           {
-             MESSAGE_INFO("SetWindowLong() failed\n");
+             ECORE_WINCE_MSG_INFO("SetWindowLong() failed\n");
           }
 
         /* 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))
           {
-             MESSAGE_INFO("SetWindowPos() failed\n");
+             ECORE_WINCE_MSG_INFO("SetWindowPos() failed\n");
           }
         /*
          * 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))
           {
-             MESSAGE_INFO("MoveWindow() failed\n");
+             ECORE_WINCE_MSG_INFO("MoveWindow() failed\n");
           }
      }
    else
@@ -516,21 +516,21 @@ ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
         task_bar = FindWindow(L"HHTaskBar", NULL);
         if (!task_bar)
           {
-             MESSAGE_INFO("FindWindow(): can not find task bar\n");
+             ECORE_WINCE_MSG_INFO("FindWindow(): can not find task bar\n");
           }
         if (!ShowWindow(task_bar, SW_SHOW))
           {
-             MESSAGE_INFO("ShowWindow(): task bar already visible\n");
+             ECORE_WINCE_MSG_INFO("ShowWindow(): task bar already visible\n");
           }
         if (!EnableWindow(task_bar, TRUE))
           {
-             MESSAGE_INFO("EnableWindow():  input already enabled\n");
+             ECORE_WINCE_MSG_INFO("EnableWindow():  input already enabled\n");
           }
 
         /* style: visible + caption + sysmenu */
         if (!SetWindowLong(w, GWL_STYLE, WS_CAPTION | WS_SYSMENU | WS_VISIBLE))
           {
-             MESSAGE_INFO("SetWindowLong() failed\n");
+             ECORE_WINCE_MSG_INFO("SetWindowLong() failed\n");
           }
         /* 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))
           {
-             MESSAGE_INFO("SetWindowLong() failed\n");
+             ECORE_WINCE_MSG_INFO("SetWindowLong() failed\n");
           }
         /*
          * 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))
           {
-             MESSAGE_INFO("MoveWindow() failed\n");
+             ECORE_WINCE_MSG_INFO("MoveWindow() failed\n");
           }
      }
 }
@@ -572,14 +572,14 @@ _ecore_wince_hardware_keys_register(HWND window)
    core_dll = LoadLibrary(L"coredll.dll");
    if (!core_dll)
      {
-        MESSAGE_ERR("LoadLibrary() failed\n");
+        ECORE_WINCE_MSG_ERR("LoadLibrary() failed\n");
         return 0;
      }
 
    unregister_fct = (UnregisterFunc1Proc)GetProcAddress(core_dll, L"UnregisterFunc1");
    if (!unregister_fct)
      {
-        MESSAGE_ERR("GetProcAddress() failed\n");
+        ECORE_WINCE_MSG_ERR("GetProcAddress() failed\n");
         FreeLibrary(core_dll);
         return 0;
      }