{
WNDCLASS wc;
- eina_log_print_cb_set(_ecore_win32_error_print_cb, NULL);
+ if (++_ecore_win32_init_count != 1)
+ return _ecore_win32_init_count;
- /* in case of double initialization of the module */
- if(_ecore_win32_log_dom < 0)
- _ecore_win32_log_dom = eina_log_domain_register("ecore_win32", EINA_COLOR_LIGHTBLUE);
+ if (!eina_init())
+ return --_ecore_win32_init_count;
- if (_ecore_win32_log_dom < 0)
+ eina_log_print_cb_set(_ecore_win32_error_print_cb, NULL);
+ _ecore_win32_log_dom_global = eina_log_domain_register("ecore_win32", EINA_COLOR_LIGHTBLUE);
+ if (_ecore_win32_log_dom_global < 0)
{
- EINA_LOG_ERR("Could not register log domain: ecore_win32");
- return 0;
+ EINA_LOG_ERR("Ecore_Win32: Could not register log domain");
+ goto shutdown_eina;
}
- ECORE_WIN32_MSG_INFO("initializing ecore_win32 (current count: %d)", _ecore_win32_init_count);
-
- if (_ecore_win32_init_count > 0)
+ if (!ecore_event_init())
{
- _ecore_win32_init_count++;
- return _ecore_win32_init_count;
+ ERR("Ecore_Win32: Could not init ecore_event");
+ goto unregister_log_domain;
}
_ecore_win32_instance = GetModuleHandle(NULL);
if (!_ecore_win32_instance)
{
- ECORE_WIN32_MSG_ERR("GetModuleHandle() failed");
- return 0;
+ ERR("GetModuleHandle() failed");
+ goto shutdown_ecore_event;
}
memset (&wc, 0, sizeof (WNDCLASS));
if(!RegisterClass(&wc))
{
- ECORE_WIN32_MSG_ERR("RegisterClass() failed");
- FreeLibrary(_ecore_win32_instance);
- return 0;
+ ERR("RegisterClass() failed");
+ goto free_library;
}
if (!ecore_win32_dnd_init())
{
- ECORE_WIN32_MSG_ERR("ecore_win32_dnd_init() failed");
- FreeLibrary(_ecore_win32_instance);
- return 0;
+ ERR("ecore_win32_dnd_init() failed");
+ goto unregister_class;
}
if (!ECORE_WIN32_EVENT_MOUSE_IN)
ECORE_WIN32_EVENT_WINDOW_DELETE_REQUEST = ecore_event_type_new();
}
- ecore_event_init();
+ return _ecore_win32_init_count;
- _ecore_win32_init_count++;
+ unregister_class:
+ UnregisterClass(ECORE_WIN32_WINDOW_CLASS, _ecore_win32_instance);
+ free_library:
+ FreeLibrary(_ecore_win32_instance);
+ shutdown_ecore_event:
+ ecore_event_shutdown();
+ unregister_log_domain:
+ eina_log_domain_unregister(_ecore_win32_log_dom_global);
+ shutdown_eina:
+ eina_shutdown();
- return _ecore_win32_init_count;
+ return --_ecore_win32_init_count;
}
int
ecore_win32_shutdown()
{
- ECORE_WIN32_MSG_INFO("shutting down ecore_win32 (current count: %d)", _ecore_win32_init_count);
-
- _ecore_win32_init_count--;
- if (_ecore_win32_init_count > 0) return _ecore_win32_init_count;
-
- ecore_event_shutdown();
+ if (--_ecore_win32_init_count != 0)
+ return _ecore_win32_init_count;
ecore_win32_dnd_shutdown();
+
if (!UnregisterClass(ECORE_WIN32_WINDOW_CLASS, _ecore_win32_instance))
- {
- ECORE_WIN32_MSG_INFO("UnregisterClass() failed");
- }
+ INF("UnregisterClass() failed");
+
if (!FreeLibrary(_ecore_win32_instance))
- {
- ECORE_WIN32_MSG_INFO("FreeLibrary() failed");
- }
- _ecore_win32_instance = NULL;
+ INF("FreeLibrary() failed");
- eina_log_domain_unregister(_ecore_win32_log_dom);
+ _ecore_win32_instance = NULL;
- if (_ecore_win32_init_count < 0) _ecore_win32_init_count = 0;
+ ecore_event_shutdown();
+ eina_log_domain_unregister(_ecore_win32_log_dom_global);
+ eina_shutdown();
return _ecore_win32_init_count;
}
HDC dc;
int depth;
- ECORE_WIN32_MSG_INFO("getting screen depth");
+ INF("getting screen depth");
dc = GetDC(NULL);
if (!dc)
{
- ECORE_WIN32_MSG_ERR("GetDC() failed");
+ ERR("GetDC() failed");
return 0;
}
depth = GetDeviceCaps(dc, BITSPIXEL);
if (!ReleaseDC(NULL, dc))
{
- ECORE_WIN32_MSG_ERR("ReleaseDC() failed (device context not released)");
+ ERR("ReleaseDC() failed (device context not released)");
}
return depth;
{
POINT pt;
- ECORE_WIN32_MSG_INFO("mouse in window");
+ INF("mouse in window");
pt.x = GET_X_LPARAM(data_param);
pt.y = GET_Y_LPARAM(data_param);
}
else
{
- ECORE_WIN32_MSG_ERR("GetClientRect() failed");
+ ERR("GetClientRect() failed");
}
_ecore_win32_event_handle_motion_notify(data);
{
Ecore_Event_Key *e;
- ECORE_WIN32_MSG_INFO("key pressed");
+ INF("key pressed");
e = (Ecore_Event_Key *)malloc(sizeof(Ecore_Event_Key));
if (!e) return;
{
Ecore_Event_Key *e;
- ECORE_WIN32_MSG_INFO("key released");
+ INF("key released");
e = (Ecore_Event_Key *)calloc(1, sizeof(Ecore_Event_Key));
if (!e) return;
{
Ecore_Win32_Window *window;
- ECORE_WIN32_MSG_INFO("mouse button pressed");
+ INF("mouse button pressed");
window = (Ecore_Win32_Window *)GetWindowLong(msg->window, GWL_USERDATA);
{
Ecore_Win32_Window *window;
- ECORE_WIN32_MSG_INFO("mouse button released");
+ INF("mouse button released");
window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
{
Ecore_Event_Mouse_Move *e;
- ECORE_WIN32_MSG_INFO("mouse moved");
+ INF("mouse moved");
e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
if (!e) return;
{
Ecore_Event_Mouse_Move *e;
- ECORE_WIN32_MSG_INFO("mouse in");
+ INF("mouse in");
e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
if (!e) return;
{
Ecore_Event_Mouse_Move *e;
- ECORE_WIN32_MSG_INFO("mouse out");
+ INF("mouse out");
e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
if (!e) return;
{
Ecore_Win32_Event_Window_Focus_In *e;
- ECORE_WIN32_MSG_INFO("focus in");
+ INF("focus in");
e = (Ecore_Win32_Event_Window_Focus_In *)calloc(1, sizeof(Ecore_Win32_Event_Window_Focus_In));
if (!e) return;
{
Ecore_Win32_Event_Window_Focus_Out *e;
- ECORE_WIN32_MSG_INFO("focus out");
+ INF("focus out");
e = (Ecore_Win32_Event_Window_Focus_Out *)calloc(1, sizeof(Ecore_Win32_Event_Window_Focus_Out));
if (!e) return;
{
Ecore_Win32_Event_Window_Damage *e;
- ECORE_WIN32_MSG_INFO("window expose");
+ INF("window expose");
e = (Ecore_Win32_Event_Window_Damage *)calloc(1, sizeof(Ecore_Win32_Event_Window_Damage));
if (!e) return;
{
Ecore_Win32_Event_Window_Create *e;
- ECORE_WIN32_MSG_INFO("window create notify");
+ INF("window create notify");
e = calloc(1, sizeof(Ecore_Win32_Event_Window_Create));
if (!e) return;
{
Ecore_Win32_Event_Window_Destroy *e;
- ECORE_WIN32_MSG_INFO("window destroy notify");
+ INF("window destroy notify");
e = calloc(1, sizeof(Ecore_Win32_Event_Window_Destroy));
if (!e) return;
{
Ecore_Win32_Event_Window_Show *e;
- ECORE_WIN32_MSG_INFO("window map notify");
+ INF("window map notify");
e = calloc(1, sizeof(Ecore_Win32_Event_Window_Show));
if (!e) return;
{
Ecore_Win32_Event_Window_Hide *e;
- ECORE_WIN32_MSG_INFO("window unmap notify");
+ INF("window unmap notify");
e = calloc(1, sizeof(Ecore_Win32_Event_Window_Hide));
if (!e) return;
void
_ecore_win32_event_handle_configure_notify(Ecore_Win32_Callback_Data *msg)
{
- WINDOWINFO wi;
+ WINDOWINF wi;
Ecore_Win32_Event_Window_Configure *e;
WINDOWPOS *window_pos;
- ECORE_WIN32_MSG_INFO("window configure notify");
+ INF("window configure notify");
e = calloc(1, sizeof(Ecore_Win32_Event_Window_Configure));
if (!e) return;
window_pos = (WINDOWPOS *)msg->data_param;
- wi.cbSize = sizeof(WINDOWINFO);
+ wi.cbSize = sizeof(WINDOWINF);
if (!GetWindowInfo(window_pos->hwnd, &wi))
{
free(e);
RECT rect;
Ecore_Win32_Event_Window_Resize *e;
- ECORE_WIN32_MSG_INFO("window resize");
+ INF("window resize");
if (!GetClientRect(msg->window, &rect))
return;
{
Ecore_Win32_Event_Window_Delete_Request *e;
- ECORE_WIN32_MSG_INFO("window delete request");
+ INF("window delete request");
e = calloc(1, sizeof(Ecore_Win32_Event_Window_Delete_Request));
if (!e) return;
int width,
int height)
{
- ECORE_WIN32_MSG_INFO("creating window with border");
+ INF("creating window with border");
return ecore_win32_window_internal_new(parent,
x, y,
int width,
int height)
{
- ECORE_WIN32_MSG_INFO("creating window without border");
+ INF("creating window without border");
return ecore_win32_window_internal_new(parent,
x, y,
if (!window) return;
- ECORE_WIN32_MSG_INFO("destroying window");
+ INF("destroying window");
if (wnd->shape.mask != NULL)
free(wnd->shape.mask);
if (!window) return;
- ECORE_WIN32_MSG_INFO("moving window (%dx%d)", x, y);
+ INF("moving window (%dx%d)", x, y);
w = ((struct _Ecore_Win32_Window *)window)->window;
if (!GetWindowRect(w, &rect))
{
- ECORE_WIN32_MSG_ERR("GetWindowRect() failed");
+ ERR("GetWindowRect() failed");
return;
}
rect.bottom - rect.top,
TRUE))
{
- ECORE_WIN32_MSG_ERR("MoveWindow() failed");
+ ERR("MoveWindow() failed");
}
}
if (!window) return;
- ECORE_WIN32_MSG_INFO("resizing window (%dx%d)", width, height);
+ INF("resizing window (%dx%d)", width, height);
w = (struct _Ecore_Win32_Window *)window;
if (!GetWindowRect(w->window, &rect))
{
- ECORE_WIN32_MSG_ERR("GetWindowRect() failed");
+ ERR("GetWindowRect() failed");
return;
}
rect.bottom = height;
if (!(style = GetWindowLong(w->window, GWL_STYLE)))
{
- ECORE_WIN32_MSG_ERR("GetWindowLong() failed");
+ ERR("GetWindowLong() failed");
return;
}
if (!AdjustWindowRect(&rect, style, FALSE))
{
- ECORE_WIN32_MSG_ERR("AdjustWindowRect() failed");
+ ERR("AdjustWindowRect() failed");
return;
}
rect.bottom - rect.top,
TRUE))
{
- ECORE_WIN32_MSG_ERR("MoveWindow() failed");
+ ERR("MoveWindow() failed");
}
}
if (!window) return;
- ECORE_WIN32_MSG_INFO("moving and resizing window (%dx%d %dx%d)", x, y, width, height);
+ INF("moving and resizing window (%dx%d %dx%d)", x, y, width, height);
w = ((struct _Ecore_Win32_Window *)window);
rect.left = 0;
rect.bottom = height;
if (!(style = GetWindowLong(w->window, GWL_STYLE)))
{
- ECORE_WIN32_MSG_ERR("GetWindowLong() failed");
+ ERR("GetWindowLong() failed");
return;
}
if (!AdjustWindowRect(&rect, style, FALSE))
{
- ECORE_WIN32_MSG_ERR("AdjustWindowRect() failed");
+ ERR("AdjustWindowRect() failed");
return;
}
rect.bottom - rect.top,
TRUE))
{
- ECORE_WIN32_MSG_ERR("MoveWindow() failed");
+ ERR("MoveWindow() failed");
}
}
int w;
int h;
- ECORE_WIN32_MSG_INFO("getting window geometry");
+ INF("getting window geometry");
if (!window)
{
if (!GetClientRect(((struct _Ecore_Win32_Window *)window)->window,
&rect))
{
- ECORE_WIN32_MSG_ERR("GetClientRect() failed");
+ ERR("GetClientRect() failed");
if (x) *x = 0;
if (y) *y = 0;
if (!GetWindowRect(((struct _Ecore_Win32_Window *)window)->window,
&rect))
{
- ECORE_WIN32_MSG_ERR("GetWindowRect() failed");
+ ERR("GetWindowRect() failed");
if (x) *x = 0;
if (y) *y = 0;
{
RECT rect;
- ECORE_WIN32_MSG_INFO("getting window size");
+ INF("getting window size");
if (!window)
{
if (!GetClientRect(((struct _Ecore_Win32_Window *)window)->window,
&rect))
{
- ECORE_WIN32_MSG_ERR("GetClientRect() failed");
+ ERR("GetClientRect() failed");
if (width) *width = 0;
if (height) *height = 0;
HRGN rgn;
int x;
int y;
- OSVERSIONINFO version_info;
+ OSVERSIONINF version_info;
if (window == NULL)
return;
GetWindowLong(wnd->window, GWL_EXSTYLE) & (~WS_EX_LAYERED)) &&
(GetLastError() != 0))
{
- ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed");
+ ERR("SetWindowLongPtr() failed");
return;
}
if (!RedrawWindow(wnd->window, NULL, NULL,
RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN))
{
- ECORE_WIN32_MSG_ERR("RedrawWindow() failed");
+ ERR("RedrawWindow() failed");
return;
}
#endif
else
if (!SetWindowRgn(wnd->window, NULL, TRUE))
{
- ECORE_WIN32_MSG_ERR("SetWindowRgn() failed");
+ ERR("SetWindowRgn() failed");
}
return;
}
GetWindowLong(wnd->window, GWL_EXSTYLE) | WS_EX_LAYERED) &&
(GetLastError() != 0))
{
- ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed");
+ ERR("SetWindowLongPtr() failed");
return;
}
wnd->shape.layered = 1;
if (!(rgn = CreateRectRgn(0, 0, 0, 0)))
{
- ECORE_WIN32_MSG_ERR("CreateRectRgn() failed");
+ ERR("CreateRectRgn() failed");
return;
}
for (y = 0; y < height; y++)
if (!(rgnLine = CreateRectRgn(0, 0, 0, 0)))
{
- ECORE_WIN32_MSG_ERR("CreateRectRgn() failed");
+ ERR("CreateRectRgn() failed");
return;
}
for (x = 0; x < width; x++)
if (!(rgnDot = CreateRectRgn(x, y, x + 1, y + 1)))
{
- ECORE_WIN32_MSG_ERR("CreateRectRgn() failed");
+ ERR("CreateRectRgn() failed");
return;
}
if (CombineRgn(rgnLine, rgnLine, rgnDot, RGN_OR) == ERROR)
{
- ECORE_WIN32_MSG_ERR("CombineRgn() has not created a new region");
+ ERR("CombineRgn() has not created a new region");
}
if (!DeleteObject(rgnDot))
{
- ECORE_WIN32_MSG_ERR("DeleteObject() failed");
+ ERR("DeleteObject() failed");
return;
}
}
}
if (CombineRgn(rgn, rgn, rgnLine, RGN_OR) == ERROR)
{
- ECORE_WIN32_MSG_ERR("CombineRgn() has not created a new region");
+ ERR("CombineRgn() has not created a new region");
}
if (!DeleteObject(rgnLine))
{
- ECORE_WIN32_MSG_ERR("DeleteObject() failed");
+ ERR("DeleteObject() failed");
return;
}
}
if (!SetWindowRgn(wnd->window, rgn, TRUE))
{
- ECORE_WIN32_MSG_ERR("SetWindowRgn() failed");
+ ERR("SetWindowRgn() failed");
}
}
{
if (!window) return;
- ECORE_WIN32_MSG_INFO("showing window");
+ INF("showing window");
ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_SHOWNORMAL);
if (!UpdateWindow(((struct _Ecore_Win32_Window *)window)->window))
{
- ECORE_WIN32_MSG_ERR("UpdateWindow() failed");
+ ERR("UpdateWindow() failed");
}
}
{
if (!window) return;
- ECORE_WIN32_MSG_INFO("hiding window");
+ INF("hiding window");
ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_HIDE);
}
{
if (!window) return;
- ECORE_WIN32_MSG_INFO("raising window");
+ INF("raising window");
if (!SetWindowPos(((struct _Ecore_Win32_Window *)window)->window,
HWND_TOP, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE))
{
- ECORE_WIN32_MSG_ERR("SetWindowPos() failed");
+ ERR("SetWindowPos() failed");
}
}
{
if (!window) return;
- ECORE_WIN32_MSG_INFO("lowering window");
+ INF("lowering window");
if (!SetWindowPos(((struct _Ecore_Win32_Window *)window)->window,
HWND_BOTTOM, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE))
{
- ECORE_WIN32_MSG_ERR("SetWindowPos() failed");
+ ERR("SetWindowPos() failed");
}
}
if (!title || !title[0]) return;
- ECORE_WIN32_MSG_INFO("setting window title");
+ INF("setting window title");
if (!SetWindowText(((struct _Ecore_Win32_Window *)window)->window, title))
{
- ECORE_WIN32_MSG_ERR("SetWindowText() failed");
+ ERR("SetWindowText() failed");
}
}
{
if (!window) return;
- ECORE_WIN32_MSG_INFO("focusing window");
+ INF("focusing window");
if (!SetFocus(((struct _Ecore_Win32_Window *)window)->window))
{
- ECORE_WIN32_MSG_ERR("SetFocus() failed");
+ ERR("SetFocus() failed");
}
}
((!ew->iconified) && (!on)))
return;
- ECORE_WIN32_MSG_INFO("iconifying window: %s", on ? "yes" : "no");
+ INF("iconifying window: %s", on ? "yes" : "no");
ShowWindow(ew->window, on ? SW_MINIMIZE : SW_RESTORE);
ew->iconified = on;
((!ew->borderless) && (!on)))
return;
- ECORE_WIN32_MSG_INFO("setting window without border: %s", on ? "yes" : "no");
+ INF("setting window without border: %s", on ? "yes" : "no");
w = ew->window;
{
if (!GetClientRect(w, &rect))
{
- ECORE_WIN32_MSG_ERR("GetClientRect() failed");
+ ERR("GetClientRect() failed");
return;
}
SetLastError(0);
if (!SetWindowLongPtr(w, GWL_STYLE, style & ~(WS_CAPTION | WS_THICKFRAME)) && (GetLastError() != 0))
{
- ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed");
+ ERR("SetWindowLongPtr() failed");
return;
}
}
{
if (!GetWindowRect(w, &rect))
{
- ECORE_WIN32_MSG_ERR("GetWindowRect() failed");
+ ERR("GetWindowRect() failed");
return;
}
style |= WS_CAPTION | WS_THICKFRAME;
if (!AdjustWindowRect (&rect, style, FALSE))
{
- ECORE_WIN32_MSG_ERR("AdjustWindowRect() failed");
+ ERR("AdjustWindowRect() failed");
return;
}
SetLastError(0);
if (!SetWindowLongPtr(w, GWL_STYLE, style) && (GetLastError() != 0))
{
- ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed");
+ ERR("SetWindowLongPtr() failed");
return;
}
}
rect.right - rect.left, rect.bottom - rect.top,
SWP_NOMOVE | SWP_FRAMECHANGED))
{
- ECORE_WIN32_MSG_ERR("SetWindowPos() failed");
+ ERR("SetWindowPos() failed");
return;
}
ew->borderless = on;
((!ew->fullscreen) && (!on)))
return;
- ECORE_WIN32_MSG_INFO("setting fullscreen: %s", on ? "yes" : "no");
+ INF("setting fullscreen: %s", on ? "yes" : "no");
ew->fullscreen = !!on;
w = ew->window;
if (!GetWindowRect(w, &ew->rect))
{
- ECORE_WIN32_MSG_ERR("GetWindowRect() failed");
+ ERR("GetWindowRect() failed");
return;
}
if (!(ew->style = GetWindowLong(w, GWL_STYLE)))
{
- ECORE_WIN32_MSG_ERR("GetWindowLong() failed");
+ ERR("GetWindowLong() failed");
return;
}
style = ew->style & ~WS_OVERLAPPEDWINDOW & ~WS_SIZEBOX;
SetLastError(0);
if (!SetWindowLongPtr(w, GWL_STYLE, style) && (GetLastError() != 0))
{
- ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed");
+ ERR("SetWindowLongPtr() failed");
return;
}
SetLastError(0);
if (!SetWindowLongPtr(w, GWL_EXSTYLE, WS_EX_TOPMOST) && (GetLastError() != 0))
{
- ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed");
+ ERR("SetWindowLongPtr() failed");
return;
}
if (!SetWindowPos(w, HWND_TOPMOST, 0, 0,
GetSystemMetrics (SM_CXSCREEN), GetSystemMetrics (SM_CYSCREEN),
SWP_NOCOPYBITS | SWP_SHOWWINDOW))
{
- ECORE_WIN32_MSG_ERR("SetWindowPos() failed");
+ ERR("SetWindowPos() failed");
return;
}
}
SetLastError(0);
if (!SetWindowLongPtr(w, GWL_STYLE, ew->style) && (GetLastError() != 0))
{
- ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed");
+ ERR("SetWindowLongPtr() failed");
return;
}
SetLastError(0);
if (!SetWindowLongPtr(w, GWL_EXSTYLE, 0) && (GetLastError() != 0))
{
- ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed");
+ ERR("SetWindowLongPtr() failed");
return;
}
if (!SetWindowPos(w, HWND_NOTOPMOST,
ew->rect.bottom - ew->rect.top,
SWP_NOCOPYBITS | SWP_SHOWWINDOW))
{
- ECORE_WIN32_MSG_ERR("SetWindowPos() failed");
+ ERR("SetWindowPos() failed");
return;
}
}
ecore_win32_window_cursor_set(Ecore_Win32_Window *window,
Ecore_Win32_Cursor *cursor)
{
- ECORE_WIN32_MSG_INFO("setting cursor");
+ INF("setting cursor");
if (!SetClassLong(((struct _Ecore_Win32_Window *)window)->window,
GCL_HCURSOR, (LONG)cursor))
{
- ECORE_WIN32_MSG_ERR("SetClassLong() failed");
+ ERR("SetClassLong() failed");
}
}
if (!window || !state || !num)
return;
- ECORE_WIN32_MSG_INFO("setting cursor state");
+ INF("setting cursor state");
for (i = 0; i < num; i++)
{
ew = (struct _Ecore_Win32_Window *)window;
w = ew->window;
- ECORE_WIN32_MSG_INFO("sending cursor state");
+ INF("sending cursor state");
switch (state)
{
if (!SystemParametersInfo(SPI_GETWORKAREA, 0,
&rect, 0))
{
- ECORE_WIN32_MSG_ERR("SystemParametersInfo() failed");
+ ERR("SystemParametersInfo() failed");
break;
}
y = rect.top;
if (!GetClientRect(w, &rect))
{
- ECORE_WIN32_MSG_ERR("GetClientRect() failed");
+ ERR("GetClientRect() failed");
break;
}
height,
TRUE))
{
- ECORE_WIN32_MSG_ERR("MoveWindow() failed");
+ ERR("MoveWindow() failed");
}
}
break;
if (!GetClientRect(w, &rect))
{
- ECORE_WIN32_MSG_ERR("GetClientRect() failed");
+ ERR("GetClientRect() failed");
break;
}
rect.bottom - rect.top,
TRUE))
{
- ECORE_WIN32_MSG_ERR("MoveWindow() failed");
+ ERR("MoveWindow() failed");
}
}
break;
if (!SystemParametersInfo(SPI_GETWORKAREA, 0,
&rect, 0))
{
- ECORE_WIN32_MSG_ERR("SystemParametersInfo() failed");
+ ERR("SystemParametersInfo() failed");
break;
}
rect.bottom - rect.top,
TRUE))
{
- ECORE_WIN32_MSG_ERR("MoveWindow() failed");
+ ERR("MoveWindow() failed");
}
}
break;
0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW))
{
- ECORE_WIN32_MSG_ERR("SetWindowPos() failed");
+ ERR("SetWindowPos() failed");
}
break;
case ECORE_WIN32_WINDOW_STATE_BELOW:
0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW))
{
- ECORE_WIN32_MSG_ERR("SetWindowPos() failed");
+ ERR("SetWindowPos() failed");
}
break;
case ECORE_WIN32_WINDOW_STATE_DEMANDS_ATTENTION:
if (!window)
return;
- ECORE_WIN32_MSG_INFO("setting window type");
+ INF("setting window type");
switch (type)
{
w = (struct _Ecore_Win32_Window *)calloc(1, sizeof(struct _Ecore_Win32_Window));
if (!w)
{
- ECORE_WIN32_MSG_ERR("malloc() failed");
+ ERR("malloc() failed");
return NULL;
}
rect.bottom = height;
if (!AdjustWindowRect(&rect, style, FALSE))
{
- ECORE_WIN32_MSG_ERR("AdjustWindowRect() failed");
+ ERR("AdjustWindowRect() failed");
free(w);
return NULL;
}
NULL, _ecore_win32_instance, NULL);
if (!w->window)
{
- ECORE_WIN32_MSG_ERR("CreateWindowEx() failed");
+ ERR("CreateWindowEx() failed");
free(w);
return NULL;
}
SetLastError(0);
if (!SetWindowLongPtr(w->window, GWL_USERDATA, (LONG)w) && (GetLastError() != 0))
{
- ECORE_WIN32_MSG_ERR("SetWindowLongPtr() failed");
+ ERR("SetWindowLongPtr() failed");
DestroyWindow(w->window);
free(w);
return NULL;