#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
+#include <Eina.h>
+
#include "Ecore.h"
#include "Ecore_WinCE.h"
#include "ecore_wince_private.h"
WPARAM window_param,
LPARAM data_param);
+static void _ecore_wince_error_print_cb(Eina_Error_Level level,
+ const char *file,
+ const char *fnc,
+ int line,
+ const char *fmt,
+ void *data,
+ va_list args);
+
/***** API *****/
{
WNDCLASS wc;
+ eina_error_print_cb_set(_ecore_wince_error_print_cb, NULL);
+
+ EINA_ERROR_PINFO("initializing ecore_wince (current count: %d)\n", _ecore_wince_init_count);
+
if (_ecore_wince_init_count > 0)
{
_ecore_wince_init_count++;
_ecore_wince_instance = GetModuleHandle(NULL);
if (!_ecore_wince_instance)
- return 0;
+ {
+ EINA_ERROR_PERR("GetModuleHandle() failed\n");
+ return 0;
+ }
memset (&wc, 0, sizeof (wc));
wc.style = CS_HREDRAW | CS_VREDRAW;
if(!RegisterClass(&wc))
{
+ EINA_ERROR_PERR("RegisterClass() failed\n");
FreeLibrary(_ecore_wince_instance);
return 0;
}
{
HWND task_bar;
+ EINA_ERROR_PINFO("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;
if (!_ecore_wince_instance) return _ecore_wince_init_count;
EnableWindow(task_bar, TRUE);
}
- UnregisterClass(ECORE_WINCE_WINDOW_CLASS, _ecore_wince_instance);
- FreeLibrary(_ecore_wince_instance);
+ if (!UnregisterClass(ECORE_WINCE_WINDOW_CLASS, _ecore_wince_instance))
+ {
+ EINA_ERROR_PERR("UnregisterClass() failed\n");
+ }
+ if (!FreeLibrary(_ecore_wince_instance))
+ {
+ EINA_ERROR_PERR("FreeLibrary() failed\n");
+ }
_ecore_wince_instance = NULL;
if (_ecore_wince_init_count < 0) _ecore_wince_init_count = 0;
{
/* Keyboard input notifications */
case WM_HOTKEY:
- printf (" * ecore message : keystroke down (hotkey)\n");
_ecore_wince_event_handle_key_press(data);
- return 0;
+ break;
case WM_KEYDOWN:
- printf (" * ecore message : keystroke down\n");
_ecore_wince_event_handle_key_press(data);
- return 0;
+ break;
case WM_KEYUP:
- printf (" * ecore message : keystroke up\n");
_ecore_wince_event_handle_key_release(data);
- return 0;
+ break;
case WM_SETFOCUS:
- printf (" * ecore message : focus in\n");
_ecore_wince_event_handle_focus_in(data);
- return 0;
+ break;
case WM_KILLFOCUS:
- printf (" * ecore message : focus out\n");
_ecore_wince_event_handle_focus_out(data);
- return 0;
+ break;
/* Mouse input notifications */
case WM_LBUTTONDOWN:
- printf (" * ecore message : lbuttondown\n");
_ecore_wince_event_handle_button_press(data, 1);
- return 0;
+ break;
case WM_LBUTTONUP:
- printf (" * ecore message : lbuttonup\n");
_ecore_wince_event_handle_button_release(data, 1);
- return 0;
+ break;
case WM_MOUSEMOVE:
{
RECT rect;
struct _Ecore_WinCE_Window *w = NULL;
w = (struct _Ecore_WinCE_Window *)GetWindowLong(window, GWL_USERDATA);
- printf (" * ecore message : mouse move\n");
if (GetClientRect(window, &rect))
{
POINT pt;
- printf ("GetClientRect !!\n");
+ EINA_ERROR_PINFO("mouse in window\n");
+
pt.x = LOWORD(data_param);
pt.y = HIWORD(data_param);
if (!PtInRect(&rect, pt))
{
- printf ("pas dans rect...\n");
if (w->pointer_is_in)
{
w->pointer_is_in = 0;
}
else
{
- printf ("dans rect... %d\n", w->pointer_is_in);
if (!w->pointer_is_in)
{
- printf ("w->pointer_is_in a 0\n");
w->pointer_is_in = 1;
_ecore_wince_event_handle_enter_notify(data);
}
}
else
{
- printf ("pas de GetClientRect !!\n");
+ EINA_ERROR_PERR("GetClientRect() failed\n");
}
_ecore_wince_event_handle_motion_notify(data);
- return 0;
+ break;
}
/* Window notifications */
case WM_CREATE:
- {
- RECT rect;
- GetClientRect(window, &rect);
- printf (" *** ecore message : create %ld %ld\n",
- rect.right - rect.left, rect.bottom - rect.top);
- }
_ecore_wince_event_handle_create_notify(data);
- return 0;
+ break;
case WM_DESTROY:
- printf (" *** ecore message : destroy\n");
_ecore_wince_event_handle_destroy_notify(data);
- return 0;
+ break;
case WM_SHOWWINDOW:
- {
- RECT rect;
- GetClientRect(window, &rect);
- printf (" *** ecore message : show %ld %ld\n",
- rect.right - rect.left, rect.bottom - rect.top);
- }
if ((data->data_param == SW_OTHERUNZOOM) ||
(data->data_param == SW_OTHERUNZOOM))
- return 0;
+ break;
if (data->window_param)
_ecore_wince_event_handle_map_notify(data);
else
_ecore_wince_event_handle_unmap_notify(data);
- return 0;
+ break;
case WM_CLOSE:
- printf (" *** ecore message : close\n");
_ecore_wince_event_handle_delete_request(data);
- return 0;
+ break;
/* GDI notifications */
case WM_PAINT:
{
- RECT rect;
PAINTSTRUCT paint;
-/* printf (" * ecore message : paint\n"); */
if (BeginPaint(window, &paint))
{
-/* printf (" * ecore message : painting...\n"); */
data->update = paint.rcPaint;
_ecore_wince_event_handle_expose(data);
EndPaint(window, &paint);
}
- return 0;
+ break;
}
default:
return DefWindowProc(window, message, window_param, data_param);
}
+ return 0;
+}
+
+static void
+_ecore_wince_error_print_cb(Eina_Error_Level level __UNUSED__,
+ const char *file __UNUSED__,
+ const char *fnc,
+ int line,
+ const char *fmt,
+ void *data __UNUSED__,
+ va_list args)
+{
+ fprintf(stderr, "[%s:%d] ", fnc, line);
+ vfprintf(stderr, fmt, args);
}
#endif
#include <stdlib.h>
-#include <stdio.h> /* for printf */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
+#include <Eina.h>
+
#include "Ecore.h"
#include "Ecore_WinCE.h"
#include "ecore_wince_private.h"
{
Ecore_WinCE_Event_Key_Down *e;
+ EINA_ERROR_PINFO("key pressed\n");
+
e = (Ecore_WinCE_Event_Key_Down *)malloc(sizeof(Ecore_WinCE_Event_Key_Down));
if (!e) return;
{
Ecore_WinCE_Event_Key_Up *e;
+ EINA_ERROR_PINFO("key released\n");
+
e = (Ecore_WinCE_Event_Key_Up *)calloc(1, sizeof(Ecore_WinCE_Event_Key_Up));
if (!e) return;
{
Ecore_WinCE_Window *window;
+ EINA_ERROR_PINFO("mouse button pressed\n");
+
window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
{
ecore_event_add(ECORE_WINCE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
}
- printf (" * ecore event button press\n");
}
void
{
Ecore_WinCE_Window *window;
+ EINA_ERROR_PINFO("mouse button released\n");
+
window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
{
ecore_event_add(ECORE_WINCE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
}
-
- printf (" * ecore event button release\n");
}
void
{
Ecore_WinCE_Event_Mouse_Move *e;
+ EINA_ERROR_PINFO("mouse moved\n");
+
e = (Ecore_WinCE_Event_Mouse_Move *)calloc(1, sizeof(Ecore_WinCE_Event_Mouse_Move));
if (!e) return;
e->time = (double)msg->time / 1000.0;
ecore_event_add(ECORE_WINCE_EVENT_MOUSE_MOVE, e, NULL, NULL);
- printf (" * ecore event motion notify\n");
}
void
{
Ecore_WinCE_Window *window;
+ EINA_ERROR_PINFO("mouse in\n");
+
window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
-/* printf (" * ecore event enter notify 0\n"); */
{
Ecore_WinCE_Event_Mouse_Move *e;
ecore_event_add(ECORE_WINCE_EVENT_MOUSE_IN, e, NULL, NULL);
}
-/* printf (" * ecore event enter notify 1\n"); */
}
void
{
Ecore_WinCE_Window *window;
+ EINA_ERROR_PINFO("mouse out\n");
+
window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
{
ecore_event_add(ECORE_WINCE_EVENT_MOUSE_OUT, e, NULL, NULL);
}
- printf (" * ecore event leave notify\n");
}
void
Ecore_WinCE_Event_Window_Focus_In *e;
struct _Ecore_WinCE_Window *window;
+ EINA_ERROR_PINFO("focus in\n");
+
e = (Ecore_WinCE_Event_Window_Focus_In *)calloc(1, sizeof(Ecore_WinCE_Event_Window_Focus_In));
if (!e) return;
Ecore_WinCE_Event_Window_Focus_Out *e;
struct _Ecore_WinCE_Window *window;
+ EINA_ERROR_PINFO("focus out\n");
+
e = (Ecore_WinCE_Event_Window_Focus_Out *)calloc(1, sizeof(Ecore_WinCE_Event_Window_Focus_Out));
if (!e) return;
{
Ecore_WinCE_Event_Window_Damage *e;
+ EINA_ERROR_PINFO("window expose\n");
+
e = (Ecore_WinCE_Event_Window_Damage *)calloc(1, sizeof(Ecore_WinCE_Event_Window_Damage));
if (!e) return;
e->y = msg->update.top;
e->width = msg->update.right - msg->update.left;
e->height = msg->update.bottom - msg->update.top;
- printf (" * ecore : event expose %d %d\n", e->width, e->height);
+ EINA_ERROR_PINFO("window expose size: %dx%d\n", e->width, e->height);
e->time = _ecore_wince_event_last_time;
{
Ecore_WinCE_Event_Window_Create *e;
+ EINA_ERROR_PINFO("window create notify\n");
+
e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Create));
if (!e) return;
{
Ecore_WinCE_Event_Window_Destroy *e;
+ EINA_ERROR_PINFO("window destroy notify\n");
+
e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Destroy));
if (!e) return;
{
Ecore_WinCE_Event_Window_Show *e;
+ EINA_ERROR_PINFO("window map notify\n");
+
e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Show));
if (!e) return;
{
Ecore_WinCE_Event_Window_Hide *e;
+ EINA_ERROR_PINFO("window unmap notify\n");
+
e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Hide));
if (!e) return;
{
Ecore_WinCE_Event_Window_Delete_Request *e;
+ EINA_ERROR_PINFO("window delete request\n");
+
e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Delete_Request));
if (!e) return;
#undef WIN32_LEAN_AND_MEAN
#include <Evil.h>
+#include <Eina.h>
#include "Ecore_WinCE.h"
#include "ecore_wince_private.h"
HWND window;
RECT rect;
+ EINA_ERROR_PINFO("creating window\n");
+
w = (struct _Ecore_WinCE_Window *)calloc(1, sizeof(struct _Ecore_WinCE_Window));
if (!w)
- return NULL;
+ {
+ EINA_ERROR_PERR("malloc() failed\n");
+ return NULL;
+ }
rect.left = 0;
rect.top = 0;
rect.bottom = height;
if (!AdjustWindowRectEx(&rect, WS_CAPTION | WS_SYSMENU | WS_VISIBLE, FALSE, WS_EX_TOPMOST))
{
+ EINA_ERROR_PERR("AdjustWindowRectEx() failed\n");
free(w);
return NULL;
}
NULL, _ecore_wince_instance, NULL);
if (!window)
{
+ EINA_ERROR_PERR("CreateWindowEx() failed\n");
free(w);
return NULL;
}
if (!_ecore_wince_hardware_keys_register(window))
{
+ EINA_ERROR_PERR("_ecore_wince_hardware_keys_register() failed\n");
DestroyWindow(window);
free(w);
return NULL;
SetLastError(0);
if (!SetWindowLong(window, GWL_USERDATA, (LONG)w) && (GetLastError() != 0))
{
+ EINA_ERROR_PERR("SetWindowLong() failed\n");
DestroyWindow(window);
free(w);
return NULL;
void
ecore_wince_window_del(Ecore_WinCE_Window *window)
{
- Ecore_WinCE_Window *w;
-
if (!window) return;
+ EINA_ERROR_PINFO("destroying window\n");
+
DestroyWindow(((struct _Ecore_WinCE_Window *)window)->window);
free(window);
- fprintf (stderr, "ecore_wince_window_del\n");
}
void *
ecore_wince_window_hwnd_get(Ecore_WinCE_Window *window)
{
- struct _Ecore_WinCE_Window *w;
-
if (!window)
return NULL;
if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
return;
- printf ("ecore_wince_window_move %p : %d %d\n", window, x, y);
+ EINA_ERROR_PINFO("moving window (%dx%d)\n", x, y);
+
w = ((struct _Ecore_WinCE_Window *)window)->window;
if (!GetWindowRect(w, &rect))
- return;
+ {
+ EINA_ERROR_PERR("GetWindowRect() failed\n");
+ return;
+ }
- MoveWindow(w, x, y,
- rect.right - rect.left,
- rect.bottom - rect.top,
- TRUE);
+ if (!MoveWindow(w, x, y,
+ rect.right - rect.left,
+ rect.bottom - rect.top,
+ TRUE))
+ {
+ EINA_ERROR_PERR("MoveWindow() failed\n");
+ }
}
void
if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
return;
- w = (struct _Ecore_WinCE_Window *)window;
- if (!GetWindowRect(w->window, &rect)) return;
+ EINA_ERROR_PINFO("resizing window (%dx%d)\n", width, height);
- printf ("ecore_wince_window_resize 0 : %p (%d %d)\n",
- w,
- width,
- height);
+ w = (struct _Ecore_WinCE_Window *)window;
+ if (!GetWindowRect(w->window, &rect))
+ {
+ EINA_ERROR_PERR("GetWindowRect() failed\n");
+ return;
+ }
x = rect.left;
y = rect.top;
rect.top = 0;
rect.right = width;
rect.bottom = height;
- style = GetWindowLong(w->window, GWL_STYLE);
- exstyle = GetWindowLong(w->window, GWL_EXSTYLE);
+ if (!(style = GetWindowLong(w->window, GWL_STYLE)))
+ {
+ EINA_ERROR_PERR("GetWindowLong() failed\n");
+ return;
+ }
+ if (!(exstyle = GetWindowLong(w->window, GWL_EXSTYLE)))
+ {
+ EINA_ERROR_PERR("GetWindowLong() failed\n");
+ return;
+ }
if (!AdjustWindowRectEx(&rect, style, FALSE, exstyle))
- return;
+ {
+ EINA_ERROR_PERR("AdjustWindowRectEx() failed\n");
+ return;
+ }
if (!MoveWindow(w->window, x, y,
rect.right - rect.left,
rect.bottom - rect.top,
FALSE))
{
- printf (" MEEERDE !!!\n");
+ EINA_ERROR_PERR("MoveWindow() failed\n");
}
- printf ("ecore_wince_window_resize 4 : %d %d\n", width, height);
}
void
if (!window || ((struct _Ecore_WinCE_Window *)window)->fullscreen)
return;
- printf ("ecore_wince_window_move_resize 0 : %p %d %d\n", window, width, height);
+ EINA_ERROR_PINFO("moving and resizing window (%dx%d %dx%d)\n", x, y, width, height);
+
w = ((struct _Ecore_WinCE_Window *)window);
rect.left = 0;
rect.top = 0;
- printf ("ecore_wince_window_move_resize 1 : %d %d\n", width, height);
rect.right = width;
rect.bottom = height;
- style = GetWindowLong(w->window, GWL_STYLE);
- exstyle = GetWindowLong(w->window, GWL_EXSTYLE);
+ if (!(style = GetWindowLong(w->window, GWL_STYLE)))
+ {
+ EINA_ERROR_PERR("GetWindowLong() failed\n");
+ return;
+ }
+ if (!(exstyle = GetWindowLong(w->window, GWL_EXSTYLE)))
+ {
+ EINA_ERROR_PERR("GetWindowLong() failed\n");
+ return;
+ }
if (!AdjustWindowRectEx(&rect, style, FALSE, exstyle))
- return;
+ {
+ EINA_ERROR_PERR("AdjustWindowRectEx() failed\n");
+ return;
+ }
- MoveWindow(w->window, x, y,
+ if (!MoveWindow(w->window, x, y,
rect.right - rect.left,
rect.bottom - rect.top,
- TRUE);
+ TRUE))
+ {
+ EINA_ERROR_PERR("MoveWindow() failed\n");
+ }
}
void
{
if (!window) return;
- fprintf (stderr, " ** ecore_wince_window_show %p\n", window);
- ShowWindow(((struct _Ecore_WinCE_Window *)window)->window, SW_SHOWNORMAL);
- UpdateWindow(((struct _Ecore_WinCE_Window *)window)->window);
- SendMessage(((struct _Ecore_WinCE_Window *)window)->window, WM_SHOWWINDOW, 1, 0);
+ EINA_ERROR_PINFO("showing window\n");
+
+ if (!ShowWindow(((struct _Ecore_WinCE_Window *)window)->window, SW_SHOWNORMAL))
+ {
+ EINA_ERROR_PERR("ShowWindow() failed\n");
+ return;
+ }
+ if (!UpdateWindow(((struct _Ecore_WinCE_Window *)window)->window))
+ {
+ EINA_ERROR_PERR("UpdateWindow() failed\n");
+ }
+ if (!SendMessage(((struct _Ecore_WinCE_Window *)window)->window, WM_SHOWWINDOW, 1, 0))
+ {
+ EINA_ERROR_PERR("SendMessage() failed\n");
+ }
}
void
{
if (!window) return;
- fprintf (stderr, " ** ecore_wince_window_hide %p\n", window);
- ShowWindow(((struct _Ecore_WinCE_Window *)window)->window, SW_HIDE);
- SendMessage(((struct _Ecore_WinCE_Window *)window)->window, WM_SHOWWINDOW, 0, 0);
+ EINA_ERROR_PINFO("hiding window\n");
+
+ if (!ShowWindow(((struct _Ecore_WinCE_Window *)window)->window, SW_HIDE))
+ {
+ EINA_ERROR_PERR("ShowWindow() failed\n");
+ return;
+ }
+ if (!SendMessage(((struct _Ecore_WinCE_Window *)window)->window, WM_SHOWWINDOW, 0, 0))
+ {
+ EINA_ERROR_PERR("SendMessage() failed\n");
+ }
}
void
if (!title || !title[0]) return;
+ EINA_ERROR_PINFO("setting window title\n");
+
wtitle = evil_char_to_wchar(title);
if (!wtitle) return;
- SetWindowText(((struct _Ecore_WinCE_Window *)window)->window, wtitle);
+ if (!SetWindowText(((struct _Ecore_WinCE_Window *)window)->window, wtitle))
+ {
+ EINA_ERROR_PERR("SetWindowText() failed\n");
+ }
free(wtitle);
}
if (!window)
return;
+ EINA_ERROR_PINFO("setting backend\n");
+
w = (struct _Ecore_WinCE_Window *)window;
w->backend = backend;
}
if (!window)
return;
+ EINA_ERROR_PINFO("setting suspend callback\n");
+
w = (struct _Ecore_WinCE_Window *)window;
w->suspend = suspend;
}
if (!window)
return;
+ EINA_ERROR_PINFO("setting resume callback\n");
+
w = (struct _Ecore_WinCE_Window *)window;
w->resume = resume;
}
int w;
int h;
- printf ("ecore_wince_window_geometry_get %p\n", window);
+ EINA_ERROR_PINFO("getting window geometry\n");
+
if (!window)
{
if (x) *x = 0;
if (!GetClientRect(((struct _Ecore_WinCE_Window *)window)->window,
&rect))
{
+ EINA_ERROR_PERR("GetClientRect() failed\n");
+
if (x) *x = 0;
if (y) *y = 0;
if (width) *width = 0;
if (!GetWindowRect(((struct _Ecore_WinCE_Window *)window)->window,
&rect))
{
+ EINA_ERROR_PERR("GetWindowRect() failed\n");
+
if (x) *x = 0;
if (y) *y = 0;
if (width) *width = 0;
{
RECT rect;
+ EINA_ERROR_PINFO("getting window size\n");
+
if (!window)
{
if (width) *width = GetSystemMetrics(SM_CXSCREEN);
if (!GetClientRect(((struct _Ecore_WinCE_Window *)window)->window,
&rect))
{
+ EINA_ERROR_PERR("GetClientRect() failed\n");
+
if (width) *width = 0;
if (height) *height = 0;
}
struct _Ecore_WinCE_Window *ew;
HWND w;
HWND task_bar;
- int width;
- int height;
if (!window) return;
((!ew->fullscreen) && (!on)))
return;
+ EINA_ERROR_PINFO("setting fullscreen: %s\n", on ? "yes" : "no");
+
ew->fullscreen = !!on;
w = ew->window;
if (on)
{
/* save the position and size of the window */
- if (!GetWindowRect(w, &ew->rect)) return;
+ if (!GetWindowRect(w, &ew->rect))
+ {
+ EINA_ERROR_PERR("GetWindowRect() failed\n");
+ return;
+ }
/* hide task bar */
task_bar = FindWindow(L"HHTaskBar", NULL);
- if (!task_bar) return;
- ShowWindow(task_bar, SW_HIDE);
- EnableWindow(task_bar, FALSE);
+ if (!task_bar)
+ {
+ EINA_ERROR_PERR("FindWindow() failed\n");
+ return;
+ }
+ if (!ShowWindow(task_bar, SW_HIDE))
+ {
+ EINA_ERROR_PERR("ShowWindow() failed\n");
+ return;
+ }
+ if (!EnableWindow(task_bar, FALSE))
+ {
+ EINA_ERROR_PERR("EnableWindow() failed\n");
+ return;
+ }
/* style: visible + popup */
- if (!SetWindowLong(w, GWL_STYLE, WS_POPUP | WS_VISIBLE)) return;
+ if (!SetWindowLong(w, GWL_STYLE, WS_POPUP | WS_VISIBLE))
+ {
+ EINA_ERROR_PERR("SetWindowLong() failed\n");
+ return;
+ }
/* resize window to fit the entire screen */
- SetWindowPos(w, HWND_TOPMOST,
- 0, 0,
- GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN),
- SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
+ if (!SetWindowPos(w, HWND_TOPMOST,
+ 0, 0,
+ GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN),
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED))
+ {
+ EINA_ERROR_PERR("SetWindowLong() failed\n");
+ return;
+ }
/*
* It seems that SetWindowPos is not sufficient.
* Call MoveWindow with the correct size and force painting.
* Note that UpdateWindow (forcing repainting) is not sufficient
*/
- MoveWindow(w,
- 0, 0,
- GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN),
- TRUE);
+ if (!MoveWindow(w,
+ 0, 0,
+ GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN),
+ TRUE))
+ {
+ EINA_ERROR_PERR("MoveWindow() failed\n");
+ }
}
else
{
/* show task bar */
task_bar = FindWindow(L"HHTaskBar", NULL);
- if (!task_bar) return;
- ShowWindow(task_bar, SW_SHOW);
- EnableWindow(task_bar, TRUE);
+ if (!task_bar)
+ {
+ EINA_ERROR_PERR("FindWindow() failed\n");
+ return;
+ }
+ if (!ShowWindow(task_bar, SW_SHOW))
+ {
+ EINA_ERROR_PERR("ShowWindow() failed\n");
+ return;
+ }
+ if (!EnableWindow(task_bar, TRUE))
+ {
+ EINA_ERROR_PERR("EnableWindow() failed\n");
+ return;
+ }
/* style: visible + caption + sysmenu */
- if (!SetWindowLong(w, GWL_STYLE, WS_CAPTION | WS_SYSMENU | WS_VISIBLE)) return;
+ if (!SetWindowLong(w, GWL_STYLE, WS_CAPTION | WS_SYSMENU | WS_VISIBLE))
+ {
+ EINA_ERROR_PERR("SetWindowLong() failed\n");
+ return;
+ }
/* restaure the position and size of the window */
- SetWindowPos(w, HWND_TOPMOST,
- ew->rect.left,
- ew->rect.top,
- ew->rect.right - ew->rect.left,
- ew->rect.bottom - ew->rect.top,
- SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
+ if (!SetWindowPos(w, HWND_TOPMOST,
+ ew->rect.left,
+ ew->rect.top,
+ ew->rect.right - ew->rect.left,
+ ew->rect.bottom - ew->rect.top,
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED))
+ {
+ EINA_ERROR_PERR("SetWindowLong() failed\n");
+ return;
+ }
/*
* It seems that SetWindowPos is not sufficient.
* Call MoveWindow with the correct size and force painting.
* Note that UpdateWindow (forcing repainting) is not sufficient
*/
- MoveWindow(w,
- ew->rect.left,
- ew->rect.top,
- ew->rect.right - ew->rect.left,
- ew->rect.bottom - ew->rect.top,
- TRUE);
+ if (!MoveWindow(w,
+ ew->rect.left,
+ ew->rect.top,
+ ew->rect.right - ew->rect.left,
+ ew->rect.bottom - ew->rect.top,
+ TRUE))
+ {
+ EINA_ERROR_PERR("MoveWindow() failed\n");
+ }
}
}
core_dll = LoadLibrary(L"coredll.dll");
if (!core_dll)
- return 0;
+ {
+ EINA_ERROR_PERR("LoadLibrary() failed\n");
+ return 0;
+ }
unregister_fct = (UnregisterFunc1Proc)GetProcAddress(core_dll, L"UnregisterFunc1");
if (!unregister_fct)
{
+ EINA_ERROR_PERR("GetProcAddress() failed\n");
FreeLibrary(core_dll);
return 0;
}