Ok, I finished to convert the wince and win32 modules to eina_log
messaging system. Since I do not have windows on my machine I could not
test if my modifications are compiling or not. the diff was made using
svn diff using the last version of the e tree. so normally it should be
ok, but I preer that someone checks the patch for mistakes.
Mathieu
On Fri, 4 Sep 2009, Mathieu Taillefumier wrote:
Hello,
someone was faster than me to submit the code. I also did these
modifications but did not find time to test if everything was ok (except
a compilation). a quick search through the svn tree gave me some few
more EINA_ERROR_PERR things. ecore win32 module is full of it and few
thing in e, exchange, e_dbus, etc... I can take care of ecore win32
module if someone else is not working on it already. e_dbus is
straightforward to do.
please, do that in ecore_win32 and ecore_wince :) less work for me :)
thank you
Vincent
Index: src/lib/ecore_win32/ecore_win32_window.c
===================================================================
--- src/lib/ecore_win32/ecore_win32_window.c (revision 42252)
+++ src/lib/ecore_win32/ecore_win32_window.c (working copy)
@@ -50,7 +50,7 @@
int width,
int height)
{
- EINA_ERROR_PINFO("creating window with border\n");
+ MESSAGE_INFO("creating window with border\n");
return ecore_win32_window_internal_new(parent,
x, y,
@@ -66,7 +66,7 @@
int width,
int height)
{
- EINA_ERROR_PINFO("creating window without border\n");
+ MESSAGE_INFO("creating window without border\n");
return ecore_win32_window_internal_new(parent,
x, y,
@@ -81,7 +81,7 @@
if (!window) return;
- EINA_ERROR_PINFO("destroying window\n");
+ MESSAGE_INFO("destroying window\n");
if (wnd->shape.mask != NULL)
free(wnd->shape.mask);
@@ -140,12 +140,12 @@
if (!window) return;
- EINA_ERROR_PINFO("moving window (%dx%d)\n", x, y);
+ MESSAGE_INFO("moving window (%dx%d)\n", x, y);
w = ((struct _Ecore_Win32_Window *)window)->window;
if (!GetWindowRect(w, &rect))
{
- EINA_ERROR_PERR("GetWindowRect() failed\n");
+ MESSAGE_ERR("GetWindowRect() failed\n");
return;
}
@@ -154,7 +154,7 @@
rect.bottom - rect.top,
TRUE))
{
- EINA_ERROR_PERR("MoveWindow() failed\n");
+ MESSAGE_ERR("MoveWindow() failed\n");
}
}
@@ -171,12 +171,12 @@
if (!window) return;
- EINA_ERROR_PINFO("resizing window (%dx%d)\n", width, height);
+ MESSAGE_INFO("resizing window (%dx%d)\n", width, height);
w = (struct _Ecore_Win32_Window *)window;
if (!GetWindowRect(w->window, &rect))
{
- EINA_ERROR_PERR("GetWindowRect() failed\n");
+ MESSAGE_ERR("GetWindowRect() failed\n");
return;
}
@@ -195,12 +195,12 @@
rect.bottom = height;
if (!(style = GetWindowLong(w->window, GWL_STYLE)))
{
- EINA_ERROR_PERR("GetWindowLong() failed\n");
+ MESSAGE_ERR("GetWindowLong() failed\n");
return;
}
if (!AdjustWindowRect(&rect, style, FALSE))
{
- EINA_ERROR_PERR("AdjustWindowRect() failed\n");
+ MESSAGE_ERR("AdjustWindowRect() failed\n");
return;
}
@@ -209,7 +209,7 @@
rect.bottom - rect.top,
TRUE))
{
- EINA_ERROR_PERR("MoveWindow() failed\n");
+ MESSAGE_ERR("MoveWindow() failed\n");
}
}
@@ -226,7 +226,7 @@
if (!window) return;
- EINA_ERROR_PINFO("moving and resizing window (%dx%d %dx%d)\n", x, y, width,
height);
+ MESSAGE_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 @@
rect.bottom = height;
if (!(style = GetWindowLong(w->window, GWL_STYLE)))
{
- EINA_ERROR_PERR("GetWindowLong() failed\n");
+ MESSAGE_ERR("GetWindowLong() failed\n");
return;
}
if (!AdjustWindowRect(&rect, style, FALSE))
{
- EINA_ERROR_PERR("AdjustWindowRect() failed\n");
+ MESSAGE_ERR("AdjustWindowRect() failed\n");
return;
}
@@ -253,7 +253,7 @@
rect.bottom - rect.top,
TRUE))
{
- EINA_ERROR_PERR("MoveWindow() failed\n");
+ MESSAGE_ERR("MoveWindow() failed\n");
}
}
@@ -268,7 +268,7 @@
int w;
int h;
- EINA_ERROR_PINFO("getting window geometry\n");
+ MESSAGE_INFO("getting window geometry\n");
if (!window)
{
@@ -283,7 +283,7 @@
if (!GetClientRect(((struct _Ecore_Win32_Window *)window)->window,
&rect))
{
- EINA_ERROR_PERR("GetClientRect() failed\n");
+ MESSAGE_ERR("GetClientRect() failed\n");
if (x) *x = 0;
if (y) *y = 0;
@@ -299,7 +299,7 @@
if (!GetWindowRect(((struct _Ecore_Win32_Window *)window)->window,
&rect))
{
- EINA_ERROR_PERR("GetWindowRect() failed\n");
+ MESSAGE_ERR("GetWindowRect() failed\n");
if (x) *x = 0;
if (y) *y = 0;
@@ -322,7 +322,7 @@
{
RECT rect;
- EINA_ERROR_PINFO("getting window size\n");
+ MESSAGE_INFO("getting window size\n");
if (!window)
{
@@ -335,7 +335,7 @@
if (!GetClientRect(((struct _Ecore_Win32_Window *)window)->window,
&rect))
{
- EINA_ERROR_PERR("GetClientRect() failed\n");
+ MESSAGE_ERR("GetClientRect() failed\n");
if (width) *width = 0;
if (height) *height = 0;
@@ -494,13 +494,13 @@
GetWindowLong(wnd->window, GWL_EXSTYLE) &
(~WS_EX_LAYERED)) &&
(GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
+ MESSAGE_ERR("SetWindowLongPtr() failed\n");
return;
}
if (!RedrawWindow(wnd->window, NULL, NULL,
RDW_ERASE | RDW_INVALIDATE | RDW_FRAME |
RDW_ALLCHILDREN))
{
- EINA_ERROR_PERR("RedrawWindow() failed\n");
+ MESSAGE_ERR("RedrawWindow() failed\n");
return;
}
#endif
@@ -508,7 +508,7 @@
else
if (!SetWindowRgn(wnd->window, NULL, TRUE))
{
- EINA_ERROR_PERR("SetWindowRgn() failed\n");
+ MESSAGE_ERR("SetWindowRgn() failed\n");
}
return;
}
@@ -542,7 +542,7 @@
GetWindowLong(wnd->window, GWL_EXSTYLE) |
WS_EX_LAYERED) &&
(GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
+ MESSAGE_ERR("SetWindowLongPtr() failed\n");
return;
}
wnd->shape.layered = 1;
@@ -552,7 +552,7 @@
if (!(rgn = CreateRectRgn(0, 0, 0, 0)))
{
- EINA_ERROR_PERR("CreateRectRgn() failed\n");
+ MESSAGE_ERR("CreateRectRgn() failed\n");
return;
}
for (y = 0; y < height; y++)
@@ -561,7 +561,7 @@
if (!(rgnLine = CreateRectRgn(0, 0, 0, 0)))
{
- EINA_ERROR_PERR("CreateRectRgn() failed\n");
+ MESSAGE_ERR("CreateRectRgn() failed\n");
return;
}
for (x = 0; x < width; x++)
@@ -572,33 +572,33 @@
if (!(rgnDot = CreateRectRgn(x, y, x + 1, y + 1)))
{
- EINA_ERROR_PERR("CreateRectRgn() failed\n");
+ MESSAGE_ERR("CreateRectRgn() failed\n");
return;
}
if (CombineRgn(rgnLine, rgnLine, rgnDot, RGN_OR) == ERROR)
{
- EINA_ERROR_PERR("CombineRgn() has not created a new
region\n");
+ MESSAGE_ERR("CombineRgn() has not created a new
region\n");
}
if (!DeleteObject(rgnDot))
{
- EINA_ERROR_PERR("DeleteObject() failed\n");
+ MESSAGE_ERR("DeleteObject() failed\n");
return;
}
}
}
if (CombineRgn(rgn, rgn, rgnLine, RGN_OR) == ERROR)
{
- EINA_ERROR_PERR("CombineRgn() has not created a new region\n");
+ MESSAGE_ERR("CombineRgn() has not created a new region\n");
}
if (!DeleteObject(rgnLine))
{
- EINA_ERROR_PERR("DeleteObject() failed\n");
+ MESSAGE_ERR("DeleteObject() failed\n");
return;
}
}
if (!SetWindowRgn(wnd->window, rgn, TRUE))
{
- EINA_ERROR_PERR("SetWindowRgn() failed\n");
+ MESSAGE_ERR("SetWindowRgn() failed\n");
}
}
@@ -607,12 +607,12 @@
{
if (!window) return;
- EINA_ERROR_PINFO("showing window\n");
+ MESSAGE_INFO("showing window\n");
ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_SHOWNORMAL);
if (!UpdateWindow(((struct _Ecore_Win32_Window *)window)->window))
{
- EINA_ERROR_PERR("UpdateWindow() failed\n");
+ MESSAGE_ERR("UpdateWindow() failed\n");
}
}
@@ -622,7 +622,7 @@
{
if (!window) return;
- EINA_ERROR_PINFO("hiding window\n");
+ MESSAGE_INFO("hiding window\n");
ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_HIDE);
}
@@ -632,13 +632,13 @@
{
if (!window) return;
- EINA_ERROR_PINFO("raising window\n");
+ MESSAGE_INFO("raising window\n");
if (!SetWindowPos(((struct _Ecore_Win32_Window *)window)->window,
HWND_TOP, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE))
{
- EINA_ERROR_PERR("SetWindowPos() failed\n");
+ MESSAGE_ERR("SetWindowPos() failed\n");
}
}
@@ -647,13 +647,13 @@
{
if (!window) return;
- EINA_ERROR_PINFO("lowering window\n");
+ MESSAGE_INFO("lowering window\n");
if (!SetWindowPos(((struct _Ecore_Win32_Window *)window)->window,
HWND_BOTTOM, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE))
{
- EINA_ERROR_PERR("SetWindowPos() failed\n");
+ MESSAGE_ERR("SetWindowPos() failed\n");
}
}
@@ -665,11 +665,11 @@
if (!title || !title[0]) return;
- EINA_ERROR_PINFO("setting window title\n");
+ MESSAGE_INFO("setting window title\n");
if (!SetWindowText(((struct _Ecore_Win32_Window *)window)->window, title))
{
- EINA_ERROR_PERR("SetWindowText() failed\n");
+ MESSAGE_ERR("SetWindowText() failed\n");
}
}
@@ -678,11 +678,11 @@
{
if (!window) return;
- EINA_ERROR_PINFO("focusing window\n");
+ MESSAGE_INFO("focusing window\n");
if (!SetFocus(((struct _Ecore_Win32_Window *)window)->window))
{
- EINA_ERROR_PERR("SetFocus() failed\n");
+ MESSAGE_ERR("SetFocus() failed\n");
}
}
@@ -699,7 +699,7 @@
((!ew->iconified) && (!on)))
return;
- EINA_ERROR_PINFO("iconifying window: %s\n", on ? "yes" : "no");
+ MESSAGE_INFO("iconifying window: %s\n", on ? "yes" : "no");
ShowWindow(ew->window, on ? SW_MINIMIZE : SW_RESTORE);
ew->iconified = on;
@@ -721,7 +721,7 @@
((!ew->borderless) && (!on)))
return;
- EINA_ERROR_PINFO("setting window without border: %s\n", on ? "yes" : "no");
+ MESSAGE_INFO("setting window without border: %s\n", on ? "yes" : "no");
w = ew->window;
@@ -730,13 +730,13 @@
{
if (!GetClientRect(w, &rect))
{
- EINA_ERROR_PERR("GetClientRect() failed\n");
+ MESSAGE_ERR("GetClientRect() failed\n");
return;
}
SetLastError(0);
if (!SetWindowLongPtr(w, GWL_STYLE, style & ~(WS_CAPTION |
WS_THICKFRAME)) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
+ MESSAGE_ERR("SetWindowLongPtr() failed\n");
return;
}
}
@@ -744,19 +744,19 @@
{
if (!GetWindowRect(w, &rect))
{
- EINA_ERROR_PERR("GetWindowRect() failed\n");
+ MESSAGE_ERR("GetWindowRect() failed\n");
return;
}
style |= WS_CAPTION | WS_THICKFRAME;
if (!AdjustWindowRect (&rect, style, FALSE))
{
- EINA_ERROR_PERR("AdjustWindowRect() failed\n");
+ MESSAGE_ERR("AdjustWindowRect() failed\n");
return;
}
SetLastError(0);
if (!SetWindowLongPtr(w, GWL_STYLE, style) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
+ MESSAGE_ERR("SetWindowLongPtr() failed\n");
return;
}
}
@@ -765,7 +765,7 @@
rect.right - rect.left, rect.bottom - rect.top,
SWP_NOMOVE | SWP_FRAMECHANGED))
{
- EINA_ERROR_PERR("SetWindowPos() failed\n");
+ MESSAGE_ERR("SetWindowPos() failed\n");
return;
}
ew->borderless = on;
@@ -785,7 +785,7 @@
((!ew->fullscreen) && (!on)))
return;
- EINA_ERROR_PINFO("setting fullscreen: %s\n", on ? "yes" : "no");
+ MESSAGE_INFO("setting fullscreen: %s\n", on ? "yes" : "no");
ew->fullscreen = !!on;
w = ew->window;
@@ -796,12 +796,12 @@
if (!GetWindowRect(w, &ew->rect))
{
- EINA_ERROR_PERR("GetWindowRect() failed\n");
+ MESSAGE_ERR("GetWindowRect() failed\n");
return;
}
if (!(ew->style = GetWindowLong(w, GWL_STYLE)))
{
- EINA_ERROR_PERR("GetWindowLong() failed\n");
+ MESSAGE_ERR("GetWindowLong() failed\n");
return;
}
style = ew->style & ~WS_OVERLAPPEDWINDOW & ~WS_SIZEBOX;
@@ -809,20 +809,20 @@
SetLastError(0);
if (!SetWindowLongPtr(w, GWL_STYLE, style) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
+ MESSAGE_ERR("SetWindowLongPtr() failed\n");
return;
}
SetLastError(0);
if (!SetWindowLongPtr(w, GWL_EXSTYLE, WS_EX_TOPMOST) &&
(GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
+ MESSAGE_ERR("SetWindowLongPtr() failed\n");
return;
}
if (!SetWindowPos(w, HWND_TOPMOST, 0, 0,
GetSystemMetrics (SM_CXSCREEN), GetSystemMetrics
(SM_CYSCREEN),
SWP_NOCOPYBITS | SWP_SHOWWINDOW))
{
- EINA_ERROR_PERR("SetWindowPos() failed\n");
+ MESSAGE_ERR("SetWindowPos() failed\n");
return;
}
}
@@ -831,13 +831,13 @@
SetLastError(0);
if (!SetWindowLongPtr(w, GWL_STYLE, ew->style) && (GetLastError() !=
0))
{
- EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
+ MESSAGE_ERR("SetWindowLongPtr() failed\n");
return;
}
SetLastError(0);
if (!SetWindowLongPtr(w, GWL_EXSTYLE, 0) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
+ MESSAGE_ERR("SetWindowLongPtr() failed\n");
return;
}
if (!SetWindowPos(w, HWND_NOTOPMOST,
@@ -847,7 +847,7 @@
ew->rect.bottom - ew->rect.top,
SWP_NOCOPYBITS | SWP_SHOWWINDOW))
{
- EINA_ERROR_PERR("SetWindowPos() failed\n");
+ MESSAGE_ERR("SetWindowPos() failed\n");
return;
}
}
@@ -857,12 +857,12 @@
ecore_win32_window_cursor_set(Ecore_Win32_Window *window,
Ecore_Win32_Cursor *cursor)
{
- EINA_ERROR_PINFO("setting cursor\n");
+ MESSAGE_INFO("setting cursor\n");
if (!SetClassLong(((struct _Ecore_Win32_Window *)window)->window,
GCL_HCURSOR, (LONG)cursor))
{
- EINA_ERROR_PERR("SetClassLong() failed\n");
+ MESSAGE_ERR("SetClassLong() failed\n");
}
}
@@ -876,7 +876,7 @@
if (!window || !state || !num)
return;
- EINA_ERROR_PINFO("setting cursor state\n");
+ MESSAGE_INFO("setting cursor state\n");
for (i = 0; i < num; i++)
{
@@ -939,7 +939,7 @@
ew = (struct _Ecore_Win32_Window *)window;
w = ew->window;
- EINA_ERROR_PINFO("sending cursor state\n");
+ MESSAGE_INFO("sending cursor state\n");
switch (state)
{
@@ -963,7 +963,7 @@
if (!SystemParametersInfo(SPI_GETWORKAREA, 0,
&rect, 0))
{
- EINA_ERROR_PERR("SystemParametersInfo() failed\n");
+ MESSAGE_ERR("SystemParametersInfo() failed\n");
break;
}
y = rect.top;
@@ -971,7 +971,7 @@
if (!GetClientRect(w, &rect))
{
- EINA_ERROR_PERR("GetClientRect() failed\n");
+ MESSAGE_ERR("GetClientRect() failed\n");
break;
}
@@ -980,7 +980,7 @@
height,
TRUE))
{
- EINA_ERROR_PERR("MoveWindow() failed\n");
+ MESSAGE_ERR("MoveWindow() failed\n");
}
}
break;
@@ -991,7 +991,7 @@
if (!GetClientRect(w, &rect))
{
- EINA_ERROR_PERR("GetClientRect() failed\n");
+ MESSAGE_ERR("GetClientRect() failed\n");
break;
}
@@ -1000,7 +1000,7 @@
rect.bottom - rect.top,
TRUE))
{
- EINA_ERROR_PERR("MoveWindow() failed\n");
+ MESSAGE_ERR("MoveWindow() failed\n");
}
}
break;
@@ -1012,7 +1012,7 @@
if (!SystemParametersInfo(SPI_GETWORKAREA, 0,
&rect, 0))
{
- EINA_ERROR_PERR("SystemParametersInfo() failed\n");
+ MESSAGE_ERR("SystemParametersInfo() failed\n");
break;
}
@@ -1021,7 +1021,7 @@
rect.bottom - rect.top,
TRUE))
{
- EINA_ERROR_PERR("MoveWindow() failed\n");
+ MESSAGE_ERR("MoveWindow() failed\n");
}
}
break;
@@ -1042,7 +1042,7 @@
0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW))
{
- EINA_ERROR_PERR("SetWindowPos() failed\n");
+ MESSAGE_ERR("SetWindowPos() failed\n");
}
break;
case ECORE_WIN32_WINDOW_STATE_BELOW:
@@ -1052,7 +1052,7 @@
0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW))
{
- EINA_ERROR_PERR("SetWindowPos() failed\n");
+ MESSAGE_ERR("SetWindowPos() failed\n");
}
break;
case ECORE_WIN32_WINDOW_STATE_DEMANDS_ATTENTION:
@@ -1071,7 +1071,7 @@
if (!window)
return;
- EINA_ERROR_PINFO("setting window type\n");
+ MESSAGE_INFO("setting window type\n");
switch (type)
{
@@ -1124,7 +1124,7 @@
w = (struct _Ecore_Win32_Window *)calloc(1, sizeof(struct
_Ecore_Win32_Window));
if (!w)
{
- EINA_ERROR_PERR("malloc() failed\n");
+ MESSAGE_ERR("malloc() failed\n");
return NULL;
}
@@ -1134,7 +1134,7 @@
rect.bottom = height;
if (!AdjustWindowRect(&rect, style, FALSE))
{
- EINA_ERROR_PERR("AdjustWindowRect() failed\n");
+ MESSAGE_ERR("AdjustWindowRect() failed\n");
free(w);
return NULL;
}
@@ -1164,7 +1164,7 @@
NULL, _ecore_win32_instance, NULL);
if (!w->window)
{
- EINA_ERROR_PERR("CreateWindowEx() failed\n");
+ MESSAGE_ERR("CreateWindowEx() failed\n");
free(w);
return NULL;
}
@@ -1172,7 +1172,7 @@
SetLastError(0);
if (!SetWindowLongPtr(w->window, GWL_USERDATA, (LONG)w) && (GetLastError()
!= 0))
{
- EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
+ MESSAGE_ERR("SetWindowLongPtr() failed\n");
DestroyWindow(w->window);
free(w);
return NULL;
Index: src/lib/ecore_win32/ecore_win32_cursor.c
===================================================================
--- src/lib/ecore_win32/ecore_win32_cursor.c (revision 42252)
+++ src/lib/ecore_win32/ecore_win32_cursor.c (working copy)
@@ -30,7 +30,7 @@
int cursor_width;
int cursor_height;
- EINA_ERROR_PINFO("creating cursor\n");
+ MESSAGE_INFO("creating cursor\n");
cursor_width = GetSystemMetrics(SM_CXCURSOR);
cursor_height = GetSystemMetrics(SM_CYCURSOR);
@@ -52,7 +52,7 @@
void
ecore_win32_cursor_free(Ecore_Win32_Cursor *cursor)
{
- EINA_ERROR_PINFO("destroying cursor\n");
+ MESSAGE_INFO("destroying cursor\n");
DestroyCursor(cursor);
}
@@ -63,7 +63,7 @@
Ecore_Win32_Cursor *cursor = NULL;
const char *cursor_name;
- EINA_ERROR_PINFO("geting shape cursor\n");
+ MESSAGE_INFO("geting shape cursor\n");
switch (shape)
{
@@ -125,7 +125,7 @@
int width;
int height;
- EINA_ERROR_PINFO("geting size cursor\n");
+ MESSAGE_INFO("geting size cursor\n");
width = GetSystemMetrics(SM_CXCURSOR);
height = GetSystemMetrics(SM_CYCURSOR);
Index: src/lib/ecore_win32/ecore_win32_private.h
===================================================================
--- src/lib/ecore_win32/ecore_win32_private.h (revision 42252)
+++ src/lib/ecore_win32/ecore_win32_private.h (working copy)
@@ -13,7 +13,13 @@
#define ECORE_WIN32_WINDOW_CLASS "Ecore_Win32_Window_Class"
+/* logging messages macros */
+extern static int _ecore_evas_win32_log_dom;
+#define MESSAGE_ERR(...) EINA_LOG_DOM_ERR(_ecore_evas_win32_log_dom ,
__VA_ARGS__)
+#define MESSAGE_DBG(...) EINA_LOG_DOM_DBG(_ecore_evas_win32_log_dom ,
__VA_ARGS__)
+#define MESSAGE_INFO(...) EINA_LOG_DOM_INFO(_ecore_evas_win32_log_dom ,
__VA_ARGS__)
+
typedef struct _Ecore_Win32_Callback_Data Ecore_Win32_Callback_Data;
struct _Ecore_Win32_Callback_Data
Index: src/lib/ecore_win32/ecore_win32.c
===================================================================
--- src/lib/ecore_win32/ecore_win32.c (revision 42252)
+++ src/lib/ecore_win32/ecore_win32.c (working copy)
@@ -82,8 +82,18 @@
eina_error_print_cb_set(_ecore_wince_error_print_cb, NULL);
- EINA_ERROR_PINFO("initializing ecore_win32 (current count: %d)\n",
_ecore_win32_init_count);
+ /* in case of double initialization of the module */
+ if(_ecore_evas_win32_log_dom < 0)
+ _ecore_evas_win32_log_dom = eina_log_domain_register("ecore_evas_win32",
EINA_LOG_COLOR_DEFAULT);
+ if (_eina_evas_win32_log_dom < 0)
+ {
+ EINA_LOG_ERR("Could not register log domain: ecore_evas_win32");
+ return 0;
+ }
+
+ MESSAGE_INFO("initializing ecore_win32 (current count: %d)\n",
_ecore_win32_init_count);
+
if (_ecore_win32_init_count > 0)
{
_ecore_win32_init_count++;
@@ -93,7 +103,7 @@
_ecore_win32_instance = GetModuleHandle(NULL);
if (!_ecore_win32_instance)
{
- EINA_ERROR_PERR("GetModuleHandle() failed\n");
+ MESSAGE_ERR("GetModuleHandle() failed\n");
return 0;
}
@@ -111,14 +121,14 @@
if(!RegisterClass(&wc))
{
- EINA_ERROR_PERR("RegisterClass() failed\n");
+ ESSAGE_ERR("RegisterClass() failed\n");
FreeLibrary(_ecore_win32_instance);
return 0;
}
if (!ecore_win32_dnd_init())
{
- EINA_ERROR_PERR("ecore_win32_dnd_init() failed\n");
+ MESSAGE_ERR("ecore_win32_dnd_init() failed\n");
FreeLibrary(_ecore_win32_instance);
return 0;
}
@@ -149,7 +159,7 @@
int
ecore_win32_shutdown()
{
- EINA_ERROR_PINFO("shutting down ecore_win32 (current count: %d)\n",
_ecore_win32_init_count);
+ MESSAGE_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;
@@ -159,14 +169,16 @@
ecore_win32_dnd_shutdown();
if (!UnregisterClass(ECORE_WIN32_WINDOW_CLASS, _ecore_win32_instance))
{
- EINA_ERROR_PERR("UnregisterClass() failed\n");
+ MESSAGE_INFO("UnregisterClass() failed\n");
}
if (!FreeLibrary(_ecore_win32_instance))
{
- EINA_ERROR_PERR("FreeLibrary() failed\n");
+ MESSAGE_INFO("FreeLibrary() failed\n");
}
_ecore_win32_instance = NULL;
+ eina_log_domain_unregister(_ecore_evas_win32_log_dom);
+
if (_ecore_win32_init_count < 0) _ecore_win32_init_count = 0;
return _ecore_win32_init_count;
@@ -178,19 +190,19 @@
HDC dc;
int depth;
- EINA_ERROR_PINFO("getting screen depth\n");
+ MESSAGE_INFO("getting screen depth\n");
dc = GetDC(NULL);
if (!dc)
{
- EINA_ERROR_PERR("GetDC() failed\n");
+ MESSAGE_ERR("GetDC() failed\n");
return 0;
}
depth = GetDeviceCaps(dc, BITSPIXEL);
if (!ReleaseDC(NULL, dc))
{
- EINA_ERROR_PERR("ReleaseDC() failed (device context not released)\n");
+ MESSAGE_ERR("ReleaseDC() failed (device context not released)\n");
}
return depth;
@@ -309,7 +321,7 @@
{
POINT pt;
- EINA_ERROR_PINFO("mouse in window\n");
+ MESSAGE_INFO("mouse in window\n");
pt.x = GET_X_LPARAM(data_param);
pt.y = GET_Y_LPARAM(data_param);
@@ -332,7 +344,7 @@
}
else
{
- EINA_ERROR_PERR("GetClientRect() failed\n");
+ MESSAGE_ERR("GetClientRect() failed\n");
}
_ecore_win32_event_handle_motion_notify(data);
Index: src/lib/ecore_win32/ecore_win32_event.c
===================================================================
--- src/lib/ecore_win32/ecore_win32_event.c (revision 42252)
+++ src/lib/ecore_win32/ecore_win32_event.c (working copy)
@@ -58,7 +58,7 @@
{
Ecore_Event_Key *e;
- EINA_ERROR_PINFO("key pressed\n");
+ MESSAGE_INFO("key pressed\n");
e = (Ecore_Event_Key *)malloc(sizeof(Ecore_Event_Key));
if (!e) return;
@@ -108,7 +108,7 @@
{
Ecore_Event_Key *e;
- EINA_ERROR_PINFO("key released\n");
+ MESSAGE_INFO("key released\n");
e = (Ecore_Event_Key *)calloc(1, sizeof(Ecore_Event_Key));
if (!e) return;
@@ -158,7 +158,7 @@
{
Ecore_Win32_Window *window;
- EINA_ERROR_PINFO("mouse button pressed\n");
+ MESSAGE_INFO("mouse button pressed\n");
window = (Ecore_Win32_Window *)GetWindowLong(msg->window, GWL_USERDATA);
@@ -260,7 +260,7 @@
{
Ecore_Win32_Window *window;
- EINA_ERROR_PINFO("mouse button released\n");
+ MESSAGE_INFO("mouse button released\n");
window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
@@ -318,7 +318,7 @@
{
Ecore_Event_Mouse_Move *e;
- EINA_ERROR_PINFO("mouse moved\n");
+ MESSAGE_INFO("mouse moved\n");
e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
if (!e) return;
@@ -337,7 +337,7 @@
{
Ecore_Event_Mouse_Move *e;
- EINA_ERROR_PINFO("mouse in\n");
+ MESSAGE_INFO("mouse in\n");
e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
if (!e) return;
@@ -376,7 +376,7 @@
{
Ecore_Event_Mouse_Move *e;
- EINA_ERROR_PINFO("mouse out\n");
+ MESSAGE_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_Window_Focus_In *e;
- EINA_ERROR_PINFO("focus in\n");
+ MESSAGE_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_Window_Focus_Out *e;
- EINA_ERROR_PINFO("focus out\n");
+ MESSAGE_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_Window_Damage *e;
- EINA_ERROR_PINFO("window expose\n");
+ MESSAGE_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_Window_Create *e;
- EINA_ERROR_PINFO("window create notify\n");
+ MESSAGE_INFO("window create notify\n");
e = calloc(1, sizeof(Ecore_Win32_Event_Window_Create));
if (!e) return;
@@ -489,7 +489,7 @@
{
Ecore_Win32_Event_Window_Destroy *e;
- EINA_ERROR_PINFO("window destroy notify\n");
+ MESSAGE_INFO("window destroy notify\n");
e = calloc(1, sizeof(Ecore_Win32_Event_Window_Destroy));
if (!e) return;
@@ -507,7 +507,7 @@
{
Ecore_Win32_Event_Window_Show *e;
- EINA_ERROR_PINFO("window map notify\n");
+ MESSAGE_INFO("window map notify\n");
e = calloc(1, sizeof(Ecore_Win32_Event_Window_Show));
if (!e) return;
@@ -524,7 +524,7 @@
{
Ecore_Win32_Event_Window_Hide *e;
- EINA_ERROR_PINFO("window unmap notify\n");
+ MESSAGE_INFO("window unmap notify\n");
e = calloc(1, sizeof(Ecore_Win32_Event_Window_Hide));
if (!e) return;
@@ -543,7 +543,7 @@
Ecore_Win32_Event_Window_Configure *e;
WINDOWPOS *window_pos;
- EINA_ERROR_PINFO("window configure notify\n");
+ MESSAGE_INFO("window configure notify\n");
e = calloc(1, sizeof(Ecore_Win32_Event_Window_Configure));
if (!e) return;
@@ -573,7 +573,7 @@
RECT rect;
Ecore_Win32_Event_Window_Resize *e;
- EINA_ERROR_PINFO("window resize\n");
+ MESSAGE_INFO("window resize\n");
if (!GetClientRect(msg->window, &rect))
return;
@@ -594,7 +594,7 @@
{
Ecore_Win32_Event_Window_Delete_Request *e;
- EINA_ERROR_PINFO("window delete request\n");
+ MESSAGE_INFO("window delete request\n");
e = calloc(1, sizeof(Ecore_Win32_Event_Window_Delete_Request));
if (!e) return;
Index: src/lib/ecore_wince/ecore_wince_private.h
===================================================================
--- src/lib/ecore_wince/ecore_wince_private.h (revision 42252)
+++ src/lib/ecore_wince/ecore_wince_private.h (working copy)
@@ -47,8 +47,8 @@
extern Ecore_WinCE_Window *_ecore_wince_event_last_window;
extern HINSTANCE _ecore_wince_instance;
+extern static int _ecore_wince_log_dom;
-
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);
void _ecore_wince_event_handle_button_press(Ecore_WinCE_Callback_Data *msg,
int button);
Index: src/lib/ecore_wince/ecore_wince.c
===================================================================
--- src/lib/ecore_wince/ecore_wince.c (revision 42252)
+++ src/lib/ecore_wince/ecore_wince.c (working copy)
@@ -43,8 +43,8 @@
/***** 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,
WPARAM window_param,
@@ -67,9 +67,17 @@
WNDCLASS wc;
eina_error_print_cb_set(_ecore_wince_error_print_cb, NULL);
+
+ if(_ecore_wince_log_dom < 0)
+ _ecore_wince_log_dom = eina_log_domain_register("ecore_evas_wince",
EINA_LOG_COLOR_DEFAULT);
+ if(_ecore_wince_log_dom < 0)
+ {
+ EINA_LOG_ERR("Could not register log domain: ecore_Evas_win32");
+ return 0;
+ }
+
+ MESSAGE_INFO("initializing ecore_wince (current count: %d)\n",
_ecore_wince_init_count);
- EINA_ERROR_PINFO("initializing ecore_wince (current count: %d)\n",
_ecore_wince_init_count);
-
if (_ecore_wince_init_count > 0)
{
_ecore_wince_init_count++;
@@ -79,7 +87,7 @@
_ecore_wince_instance = GetModuleHandle(NULL);
if (!_ecore_wince_instance)
{
- EINA_ERROR_PERR("GetModuleHandle() failed\n");
+ MESSAGE_ERR("GetModuleHandle() failed\n");
return 0;
}
@@ -97,7 +105,7 @@
if(!RegisterClass(&wc))
{
- EINA_ERROR_PERR("RegisterClass() failed\n");
+ MESSAGE_ERR("RegisterClass() failed\n");
FreeLibrary(_ecore_wince_instance);
return 0;
}
@@ -128,7 +136,7 @@
{
HWND task_bar;
- EINA_ERROR_PINFO("shutting down ecore_wince (current count: %d)\n",
_ecore_wince_init_count);
+ MESSAGE_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;
@@ -146,14 +154,16 @@
if (!UnregisterClass(ECORE_WINCE_WINDOW_CLASS, _ecore_wince_instance))
{
- EINA_ERROR_PERR("UnregisterClass() failed\n");
+ MESSAGE_ERR("UnregisterClass() failed\n");
}
if (!FreeLibrary(_ecore_wince_instance))
{
- EINA_ERROR_PERR("FreeLibrary() failed\n");
+ MESSAGE_ERR("FreeLibrary() failed\n");
}
_ecore_wince_instance = NULL;
+ eina_log_domain_unregister(_ecore_wince_log_dom);
+
if (_ecore_wince_init_count < 0) _ecore_wince_init_count = 0;
return _ecore_wince_init_count;
@@ -264,7 +274,7 @@
{
POINT pt;
- EINA_ERROR_PINFO("mouse in window\n");
+ MESSAGE_INFO("mouse in window\n");
pt.x = LOWORD(data_param);
pt.y = HIWORD(data_param);
@@ -287,7 +297,7 @@
}
else
{
- EINA_ERROR_PERR("GetClientRect() failed\n");
+ MESSAGE_ERR("GetClientRect() failed\n");
}
_ecore_wince_event_handle_motion_notify(data);
Index: src/lib/ecore_wince/ecore_wince_window.c
===================================================================
--- src/lib/ecore_wince/ecore_wince_window.c (revision 42252)
+++ src/lib/ecore_wince/ecore_wince_window.c (working copy)
@@ -37,12 +37,12 @@
HWND window;
RECT rect;
- EINA_ERROR_PINFO("creating window\n");
+ MESSAGE_INFO("creating window\n");
w = (struct _Ecore_WinCE_Window *)calloc(1, sizeof(struct
_Ecore_WinCE_Window));
if (!w)
{
- EINA_ERROR_PERR("malloc() failed\n");
+ MESSAGE_ERR("malloc() failed\n");
return NULL;
}
@@ -52,7 +52,7 @@
rect.bottom = height;
if (!AdjustWindowRectEx(&rect, WS_CAPTION | WS_SYSMENU | WS_VISIBLE, FALSE,
WS_EX_TOPMOST))
{
- EINA_ERROR_PERR("AdjustWindowRectEx() failed\n");
+ MESSAGE_ERR("AdjustWindowRectEx() failed\n");
free(w);
return NULL;
}
@@ -67,14 +67,14 @@
NULL, _ecore_wince_instance, NULL);
if (!window)
{
- EINA_ERROR_PERR("CreateWindowEx() failed\n");
+ MESSAGE_ERR("CreateWindowEx() failed\n");
free(w);
return NULL;
}
if (!_ecore_wince_hardware_keys_register(window))
{
- EINA_ERROR_PERR("_ecore_wince_hardware_keys_register() failed\n");
+ MESSAGE_ERR("_ecore_wince_hardware_keys_register() failed\n");
DestroyWindow(window);
free(w);
return NULL;
@@ -85,7 +85,7 @@
SetLastError(0);
if (!SetWindowLong(window, GWL_USERDATA, (LONG)w) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ MESSAGE_ERR("SetWindowLong() failed\n");
DestroyWindow(window);
free(w);
return NULL;
@@ -101,7 +101,7 @@
{
if (!window) return;
- EINA_ERROR_PINFO("destroying window\n");
+ MESSAGE_INFO("destroying window\n");
DestroyWindow(((struct _Ecore_WinCE_Window *)window)->window);
free(window);
@@ -127,12 +127,12 @@
if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
return;
- EINA_ERROR_PINFO("moving window (%dx%d)\n", x, y);
+ MESSAGE_INFO("moving window (%dx%d)\n", x, y);
w = ((struct _Ecore_WinCE_Window *)window)->window;
if (!GetWindowRect(w, &rect))
{
- EINA_ERROR_PERR("GetWindowRect() failed\n");
+ MESSAGE_ERR("GetWindowRect() failed\n");
return;
}
@@ -141,7 +141,7 @@
rect.bottom - rect.top,
TRUE))
{
- EINA_ERROR_PERR("MoveWindow() failed\n");
+ MESSAGE_ERR("MoveWindow() failed\n");
}
}
@@ -160,12 +160,12 @@
if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
return;
- EINA_ERROR_PINFO("resizing window (%dx%d)\n", width, height);
+ MESSAGE_INFO("resizing window (%dx%d)\n", width, height);
w = (struct _Ecore_WinCE_Window *)window;
if (!GetWindowRect(w->window, &rect))
{
- EINA_ERROR_PERR("GetWindowRect() failed\n");
+ MESSAGE_ERR("GetWindowRect() failed\n");
return;
}
@@ -177,17 +177,17 @@
rect.bottom = height;
if (!(style = GetWindowLong(w->window, GWL_STYLE)))
{
- EINA_ERROR_PERR("GetWindowLong() failed\n");
+ MESSAGE_ERR("GetWindowLong() failed\n");
return;
}
if (!(exstyle = GetWindowLong(w->window, GWL_EXSTYLE)))
{
- EINA_ERROR_PERR("GetWindowLong() failed\n");
+ MESSAGE_ERR("GetWindowLong() failed\n");
return;
}
if (!AdjustWindowRectEx(&rect, style, FALSE, exstyle))
{
- EINA_ERROR_PERR("AdjustWindowRectEx() failed\n");
+ MESSAGE_ERR("AdjustWindowRectEx() failed\n");
return;
}
@@ -196,7 +196,7 @@
rect.bottom - rect.top,
FALSE))
{
- EINA_ERROR_PERR("MoveWindow() failed\n");
+ MESSAGE_ERR("MoveWindow() failed\n");
}
}
@@ -215,7 +215,7 @@
if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
return;
- EINA_ERROR_PINFO("moving and resizing window (%dx%d %dx%d)\n", x, y, width,
height);
+ MESSAGE_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 @@
rect.bottom = height;
if (!(style = GetWindowLong(w->window, GWL_STYLE)))
{
- EINA_ERROR_PERR("GetWindowLong() failed\n");
+ MESSAGE_ERR("GetWindowLong() failed\n");
return;
}
if (!(exstyle = GetWindowLong(w->window, GWL_EXSTYLE)))
{
- EINA_ERROR_PERR("GetWindowLong() failed\n");
+ MESSAGE_ERR("GetWindowLong() failed\n");
return;
}
if (!AdjustWindowRectEx(&rect, style, FALSE, exstyle))
{
- EINA_ERROR_PERR("AdjustWindowRectEx() failed\n");
+ MESSAGE_ERR("AdjustWindowRectEx() failed\n");
return;
}
@@ -243,7 +243,7 @@
rect.bottom - rect.top,
TRUE))
{
- EINA_ERROR_PERR("MoveWindow() failed\n");
+ MESSAGE_ERR("MoveWindow() failed\n");
}
}
@@ -252,20 +252,20 @@
{
if (!window) return;
- EINA_ERROR_PINFO("showing window\n");
+ MESSAGE_INFO("showing window\n");
if (!ShowWindow(((struct _Ecore_WinCE_Window *)window)->window,
SW_SHOWNORMAL))
{
- EINA_ERROR_PERR("ShowWindow() failed\n");
+ MESSAGE_ERR("ShowWindow() failed\n");
return;
}
if (!UpdateWindow(((struct _Ecore_WinCE_Window *)window)->window))
{
- EINA_ERROR_PERR("UpdateWindow() failed\n");
+ MESSAGE_ERR("UpdateWindow() failed\n");
}
if (!SendMessage(((struct _Ecore_WinCE_Window *)window)->window,
WM_SHOWWINDOW, 1, 0))
{
- EINA_ERROR_PERR("SendMessage() failed\n");
+ MESSAGE_ERR("SendMessage() failed\n");
}
}
@@ -274,16 +274,16 @@
{
if (!window) return;
- EINA_ERROR_PINFO("hiding window\n");
+ MESSAGE_INFO("hiding window\n");
if (!ShowWindow(((struct _Ecore_WinCE_Window *)window)->window, SW_HIDE))
{
- EINA_ERROR_PERR("ShowWindow() failed\n");
+ MESSAGE_ERR("ShowWindow() failed\n");
return;
}
if (!SendMessage(((struct _Ecore_WinCE_Window *)window)->window,
WM_SHOWWINDOW, 0, 0))
{
- EINA_ERROR_PERR("SendMessage() failed\n");
+ MESSAGE_ERR("SendMessage() failed\n");
}
}
@@ -297,14 +297,14 @@
if (!title || !title[0]) return;
- EINA_ERROR_PINFO("setting window title\n");
+ MESSAGE_INFO("setting window title\n");
wtitle = evil_char_to_wchar(title);
if (!wtitle) return;
if (!SetWindowText(((struct _Ecore_WinCE_Window *)window)->window, wtitle))
{
- EINA_ERROR_PERR("SetWindowText() failed\n");
+ MESSAGE_ERR("SetWindowText() failed\n");
}
free(wtitle);
}
@@ -317,7 +317,7 @@
if (!window)
return;
- EINA_ERROR_PINFO("setting backend\n");
+ MESSAGE_INFO("setting backend\n");
w = (struct _Ecore_WinCE_Window *)window;
w->backend = backend;
@@ -331,7 +331,7 @@
if (!window)
return;
- EINA_ERROR_PINFO("setting suspend callback\n");
+ MESSAGE_INFO("setting suspend callback\n");
w = (struct _Ecore_WinCE_Window *)window;
w->suspend = suspend;
@@ -345,7 +345,7 @@
if (!window)
return;
- EINA_ERROR_PINFO("setting resume callback\n");
+ MESSAGE_INFO("setting resume callback\n");
w = (struct _Ecore_WinCE_Window *)window;
w->resume = resume;
@@ -362,7 +362,7 @@
int w;
int h;
- EINA_ERROR_PINFO("getting window geometry\n");
+ MESSAGE_INFO("getting window geometry\n");
if (!window)
{
@@ -377,7 +377,7 @@
if (!GetClientRect(((struct _Ecore_WinCE_Window *)window)->window,
&rect))
{
- EINA_ERROR_PERR("GetClientRect() failed\n");
+ MESSAGE_ERR("GetClientRect() failed\n");
if (x) *x = 0;
if (y) *y = 0;
@@ -393,7 +393,7 @@
if (!GetWindowRect(((struct _Ecore_WinCE_Window *)window)->window,
&rect))
{
- EINA_ERROR_PERR("GetWindowRect() failed\n");
+ MESSAGE_ERR("GetWindowRect() failed\n");
if (x) *x = 0;
if (y) *y = 0;
@@ -416,7 +416,7 @@
{
RECT rect;
- EINA_ERROR_PINFO("getting window size\n");
+ MESSAGE_INFO("getting window size\n");
if (!window)
{
@@ -429,7 +429,7 @@
if (!GetClientRect(((struct _Ecore_WinCE_Window *)window)->window,
&rect))
{
- EINA_ERROR_PERR("GetClientRect() failed\n");
+ MESSAGE_ERR("GetClientRect() failed\n");
if (width) *width = 0;
if (height) *height = 0;
@@ -454,7 +454,7 @@
((!ew->fullscreen) && (!on)))
return;
- EINA_ERROR_PINFO("setting fullscreen: %s\n", on ? "yes" : "no");
+ MESSAGE_INFO("setting fullscreen: %s\n", on ? "yes" : "no");
ew->fullscreen = !!on;
w = ew->window;
@@ -464,7 +464,7 @@
/* save the position and size of the window */
if (!GetWindowRect(w, &ew->rect))
{
- EINA_ERROR_PERR("GetWindowRect() failed\n");
+ MESSAGE_ERR("GetWindowRect() failed\n");
return;
}
@@ -472,21 +472,21 @@
task_bar = FindWindow(L"HHTaskBar", NULL);
if (!task_bar)
{
- EINA_ERROR_PINFO("FindWindow(): can not find task bar\n");
+ MESSAGE_INFO("FindWindow(): can not find task bar\n");
}
if (!ShowWindow(task_bar, SW_HIDE))
{
- EINA_ERROR_PINFO("ShowWindow(): task bar already hidden\n");
+ MESSAGE_INFO("ShowWindow(): task bar already hidden\n");
}
if (!EnableWindow(task_bar, FALSE))
{
- EINA_ERROR_PINFO("EnableWindow(): input already disabled\n");
+ MESSAGE_INFO("EnableWindow(): input already disabled\n");
}
/* style: visible + popup */
if (!SetWindowLong(w, GWL_STYLE, WS_POPUP | WS_VISIBLE))
{
- EINA_ERROR_PINFO("SetWindowLong() failed\n");
+ MESSAGE_INFO("SetWindowLong() failed\n");
}
/* resize window to fit the entire screen */
@@ -495,7 +495,7 @@
GetSystemMetrics(SM_CXSCREEN),
GetSystemMetrics(SM_CYSCREEN),
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
SWP_FRAMECHANGED))
{
- EINA_ERROR_PINFO("SetWindowPos() failed\n");
+ MESSAGE_INFO("SetWindowPos() failed\n");
}
/*
* It seems that SetWindowPos is not sufficient.
@@ -507,7 +507,7 @@
GetSystemMetrics(SM_CXSCREEN),
GetSystemMetrics(SM_CYSCREEN),
TRUE))
{
- EINA_ERROR_PINFO("MoveWindow() failed\n");
+ MESSAGE_INFO("MoveWindow() failed\n");
}
}
else
@@ -516,21 +516,21 @@
task_bar = FindWindow(L"HHTaskBar", NULL);
if (!task_bar)
{
- EINA_ERROR_PINFO("FindWindow(): can not find task bar\n");
+ MESSAGE_INFO("FindWindow(): can not find task bar\n");
}
if (!ShowWindow(task_bar, SW_SHOW))
{
- EINA_ERROR_PINFO("ShowWindow(): task bar already visible\n");
+ MESSAGE_INFO("ShowWindow(): task bar already visible\n");
}
if (!EnableWindow(task_bar, TRUE))
{
- EINA_ERROR_PINFO("EnableWindow(): input already enabled\n");
+ MESSAGE_INFO("EnableWindow(): input already enabled\n");
}
/* style: visible + caption + sysmenu */
if (!SetWindowLong(w, GWL_STYLE, WS_CAPTION | WS_SYSMENU | WS_VISIBLE))
{
- EINA_ERROR_PINFO("SetWindowLong() failed\n");
+ MESSAGE_INFO("SetWindowLong() failed\n");
}
/* restaure the position and size of the window */
if (!SetWindowPos(w, HWND_TOPMOST,
@@ -540,7 +540,7 @@
ew->rect.bottom - ew->rect.top,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
SWP_FRAMECHANGED))
{
- EINA_ERROR_PINFO("SetWindowLong() failed\n");
+ MESSAGE_INFO("SetWindowLong() failed\n");
}
/*
* It seems that SetWindowPos is not sufficient.
@@ -554,7 +554,7 @@
ew->rect.bottom - ew->rect.top,
TRUE))
{
- EINA_ERROR_PINFO("MoveWindow() failed\n");
+ MESSAGE_INFO("MoveWindow() failed\n");
}
}
}
@@ -572,14 +572,14 @@
core_dll = LoadLibrary(L"coredll.dll");
if (!core_dll)
{
- EINA_ERROR_PERR("LoadLibrary() failed\n");
+ MESSAGE_ERR("LoadLibrary() failed\n");
return 0;
}
unregister_fct = (UnregisterFunc1Proc)GetProcAddress(core_dll,
L"UnregisterFunc1");
if (!unregister_fct)
{
- EINA_ERROR_PERR("GetProcAddress() failed\n");
+ MESSAGE_ERR("GetProcAddress() failed\n");
FreeLibrary(core_dll);
return 0;
}
Index: src/lib/ecore_evas/ecore_evas_win32.c
===================================================================
--- src/lib/ecore_evas/ecore_evas_win32.c (revision 42252)
+++ src/lib/ecore_evas/ecore_evas_win32.c (working copy)
@@ -31,6 +31,7 @@
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 int _ecore_evas_win32_log_dom = -1;
static int _ecore_evas_win32_event_mouse_in(void *data __UNUSED__, int type
__UNUSED__, void *event);
@@ -167,7 +168,7 @@
Ecore_Evas *ee;
Ecore_Win32_Event_Mouse_In *e;
- EINA_ERROR_PINFO("mouse in\n");
+ MESSAGE_INFO("mouse in\n");
e = event;
ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -189,7 +190,7 @@
Ecore_Evas *ee;
Ecore_Win32_Event_Mouse_Out *e;
- EINA_ERROR_PINFO("mouse out\n");
+ MESSAGE_INFO("mouse out\n");
e = event;
ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -213,7 +214,7 @@
Ecore_Evas *ee;
Ecore_Win32_Event_Window_Damage *e;
- EINA_ERROR_PINFO("window damage\n");
+ MESSAGE_INFO("window damage\n");
e = event;
ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -265,7 +266,7 @@
Ecore_Evas *ee;
Ecore_Win32_Event_Window_Destroy *e;
- EINA_ERROR_PINFO("window destroy\n");
+ MESSAGE_INFO("window destroy\n");
e = event;
ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -283,7 +284,7 @@
Ecore_Evas *ee;
Ecore_Win32_Event_Window_Show *e;
- EINA_ERROR_PINFO("window show\n");
+ MESSAGE_INFO("window show\n");
e = event;
ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -302,7 +303,7 @@
Ecore_Evas *ee;
Ecore_Win32_Event_Window_Hide *e;
- EINA_ERROR_PINFO("window hide\n");
+ MESSAGE_INFO("window hide\n");
e = event;
ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -321,7 +322,7 @@
Ecore_Evas *ee;
Ecore_Win32_Event_Window_Configure *e;
- EINA_ERROR_PINFO("window configure\n");
+ MESSAGE_INFO("window configure\n");
e = event;
ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -379,7 +380,7 @@
Ecore_Evas *ee;
Ecore_Win32_Event_Window_Delete_Request *e;
- EINA_ERROR_PINFO("window delete request\n");
+ MESSAGE_INFO("window delete request\n");
e = event;
ee = ecore_event_window_match((Ecore_Window)e->window);
@@ -397,7 +398,7 @@
static void
_ecore_evas_win32_free(Ecore_Evas *ee)
{
- EINA_ERROR_PINFO("ecore evas free\n");
+ MESSAGE_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 +417,7 @@
static void
_ecore_evas_win32_move(Ecore_Evas *ee, int x, int y)
{
- EINA_ERROR_PINFO("ecore evas move (%dx%d)\n", x, y);
+ MESSAGE_INFO("ecore evas move (%dx%d)\n", x, y);
if ((x != ee->x) || (y != ee->y))
{
@@ -431,7 +432,7 @@
static void
_ecore_evas_win32_resize(Ecore_Evas *ee, int width, int height)
{
- EINA_ERROR_PINFO("ecore evas resize (%dx%d)\n", width, height);
+ MESSAGE_INFO("ecore evas resize (%dx%d)\n", width, height);
if ((ee->w != width) || (ee->h != height))
{
@@ -458,7 +459,7 @@
static void
_ecore_evas_win32_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);
+ MESSAGE_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 +565,7 @@
static void
_ecore_evas_win32_rotation_set(Ecore_Evas *ee, int rotation)
{
- EINA_ERROR_PINFO("ecore evas rotation: %s\n", rotation ? "yes" : "no");
+ MESSAGE_INFO("ecore evas rotation: %s\n", rotation ? "yes" : "no");
if (ee->rotation == rotation) return;
@@ -598,7 +599,7 @@
static void
_ecore_evas_win32_show(Ecore_Evas *ee)
{
- EINA_ERROR_PINFO("ecore evas show\n");
+ MESSAGE_INFO("ecore evas show\n");
ee->should_be_visible = 1;
if (ee->prop.avoid_damage)
@@ -611,7 +612,7 @@
static void
_ecore_evas_win32_hide(Ecore_Evas *ee)
{
- EINA_ERROR_PINFO("ecore evas hide\n");
+ MESSAGE_INFO("ecore evas hide\n");
ecore_win32_window_hide((struct _Ecore_Win32_Window *)ee->prop.window);
ee->should_be_visible = 0;
@@ -620,7 +621,7 @@
static void
_ecore_evas_win32_raise(Ecore_Evas *ee)
{
- EINA_ERROR_PINFO("ecore evas raise\n");
+ MESSAGE_INFO("ecore evas raise\n");
if (!ee->prop.fullscreen)
ecore_win32_window_raise((struct _Ecore_Win32_Window *)ee->prop.window);
@@ -631,7 +632,7 @@
static void
_ecore_evas_win32_lower(Ecore_Evas *ee)
{
- EINA_ERROR_PINFO("ecore evas lower\n");
+ MESSAGE_INFO("ecore evas lower\n");
if (!ee->prop.fullscreen)
ecore_win32_window_lower((struct _Ecore_Win32_Window *)ee->prop.window);
@@ -642,7 +643,7 @@
static void
_ecore_evas_win32_activate(Ecore_Evas *ee)
{
- EINA_ERROR_PINFO("ecore evas activate\n");
+ MESSAGE_INFO("ecore evas activate\n");
ecore_win32_window_focus_set((struct _Ecore_Win32_Window *)ee->prop.window);
}
@@ -650,7 +651,7 @@
static void
_ecore_evas_win32_title_set(Ecore_Evas *ee, const char *title)
{
- EINA_ERROR_PINFO("ecore evas title set\n");
+ MESSAGE_INFO("ecore evas title set\n");
if (ee->prop.title) free(ee->prop.title);
ee->prop.title = NULL;
@@ -774,7 +775,7 @@
{
struct _Ecore_Win32_Window *window;
- EINA_ERROR_PINFO("ecore evas fullscreen set\n");
+ MESSAGE_INFO("ecore evas fullscreen set\n");
if ((ee->engine.win32.state.fullscreen && on) ||
(!ee->engine.win32.state.fullscreen && !on))
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel