#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);
}
#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;
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);
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);
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);
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);
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);
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);
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);
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);
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);
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))
{
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))
{
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))
{
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;
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)
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;
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);
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);
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);
}
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;
{
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))
#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;
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);
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);
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);
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);
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);
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);
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);
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);
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);
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))
{
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))
{
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))
{
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)
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;
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;
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))
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)
{
_ecore_win32_instance = GetModuleHandle(NULL);
if (!_ecore_win32_instance)
{
- MESSAGE_ERR("GetModuleHandle() failed\n");
+ ECORE_WIN32_MSG_ERR("GetModuleHandle() failed\n");
return 0;
}
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;
}
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;
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;
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;
{
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);
}
else
{
- MESSAGE_ERR("GetClientRect() failed\n");
+ ECORE_WIN32_MSG_ERR("GetClientRect() failed\n");
}
_ecore_win32_event_handle_motion_notify(data);
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);
void
ecore_win32_cursor_free(Ecore_Win32_Cursor *cursor)
{
- MESSAGE_INFO("destroying cursor\n");
+ ECORE_WIN32_MSG_INFO("destroying cursor\n");
DestroyCursor(cursor);
}
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)
{
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);
{
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;
{
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;
{
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);
{
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);
{
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;
{
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;
{
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;
{
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;
{
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;
{
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;
{
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;
{
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;
{
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;
{
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;
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;
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;
{
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;
#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;
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);
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,
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,
if (!window) return;
- MESSAGE_INFO("destroying window\n");
+ ECORE_WIN32_MSG_INFO("destroying window\n");
if (wnd->shape.mask != NULL)
free(wnd->shape.mask);
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;
}
rect.bottom - rect.top,
TRUE))
{
- MESSAGE_ERR("MoveWindow() failed\n");
+ ECORE_WIN32_MSG_ERR("MoveWindow() failed\n");
}
}
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;
}
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;
}
rect.bottom - rect.top,
TRUE))
{
- MESSAGE_ERR("MoveWindow() failed\n");
+ ECORE_WIN32_MSG_ERR("MoveWindow() failed\n");
}
}
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;
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;
}
rect.bottom - rect.top,
TRUE))
{
- MESSAGE_ERR("MoveWindow() failed\n");
+ ECORE_WIN32_MSG_ERR("MoveWindow() failed\n");
}
}
int w;
int h;
- MESSAGE_INFO("getting window geometry\n");
+ ECORE_WIN32_MSG_INFO("getting window geometry\n");
if (!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;
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;
{
RECT rect;
- MESSAGE_INFO("getting window size\n");
+ ECORE_WIN32_MSG_INFO("getting window size\n");
if (!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;
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
else
if (!SetWindowRgn(wnd->window, NULL, TRUE))
{
- MESSAGE_ERR("SetWindowRgn() failed\n");
+ ECORE_WIN32_MSG_ERR("SetWindowRgn() failed\n");
}
return;
}
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;
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++)
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++)
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");
}
}
{
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");
}
}
{
if (!window) return;
- MESSAGE_INFO("hiding window\n");
+ ECORE_WIN32_MSG_INFO("hiding window\n");
ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_HIDE);
}
{
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");
}
}
{
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");
}
}
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");
}
}
{
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");
}
}
((!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;
((!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;
{
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;
}
}
{
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;
}
}
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;
((!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;
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;
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;
}
}
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,
ew->rect.bottom - ew->rect.top,
SWP_NOCOPYBITS | SWP_SHOWWINDOW))
{
- MESSAGE_ERR("SetWindowPos() failed\n");
+ ECORE_WIN32_MSG_ERR("SetWindowPos() failed\n");
return;
}
}
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");
}
}
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++)
{
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)
{
if (!SystemParametersInfo(SPI_GETWORKAREA, 0,
&rect, 0))
{
- MESSAGE_ERR("SystemParametersInfo() failed\n");
+ ECORE_WIN32_MSG_ERR("SystemParametersInfo() failed\n");
break;
}
y = rect.top;
if (!GetClientRect(w, &rect))
{
- MESSAGE_ERR("GetClientRect() failed\n");
+ ECORE_WIN32_MSG_ERR("GetClientRect() failed\n");
break;
}
height,
TRUE))
{
- MESSAGE_ERR("MoveWindow() failed\n");
+ ECORE_WIN32_MSG_ERR("MoveWindow() failed\n");
}
}
break;
if (!GetClientRect(w, &rect))
{
- MESSAGE_ERR("GetClientRect() failed\n");
+ ECORE_WIN32_MSG_ERR("GetClientRect() failed\n");
break;
}
rect.bottom - rect.top,
TRUE))
{
- MESSAGE_ERR("MoveWindow() failed\n");
+ ECORE_WIN32_MSG_ERR("MoveWindow() failed\n");
}
}
break;
if (!SystemParametersInfo(SPI_GETWORKAREA, 0,
&rect, 0))
{
- MESSAGE_ERR("SystemParametersInfo() failed\n");
+ ECORE_WIN32_MSG_ERR("SystemParametersInfo() failed\n");
break;
}
rect.bottom - rect.top,
TRUE))
{
- MESSAGE_ERR("MoveWindow() failed\n");
+ ECORE_WIN32_MSG_ERR("MoveWindow() failed\n");
}
}
break;
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:
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:
if (!window)
return;
- MESSAGE_INFO("setting window type\n");
+ ECORE_WIN32_MSG_INFO("setting window type\n");
switch (type)
{
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;
}
rect.bottom = height;
if (!AdjustWindowRect(&rect, style, FALSE))
{
- MESSAGE_ERR("AdjustWindowRect() failed\n");
+ ECORE_WIN32_MSG_ERR("AdjustWindowRect() failed\n");
free(w);
return NULL;
}
NULL, _ecore_win32_instance, NULL);
if (!w->window)
{
- MESSAGE_ERR("CreateWindowEx() failed\n");
+ ECORE_WIN32_MSG_ERR("CreateWindowEx() failed\n");
free(w);
return NULL;
}
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;
/***** 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,
{
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)
{
_ecore_wince_instance = GetModuleHandle(NULL);
if (!_ecore_wince_instance)
{
- MESSAGE_ERR("GetModuleHandle() failed\n");
+ ECORE_WINCE_MSG_ERR("GetModuleHandle() failed\n");
return 0;
}
if(!RegisterClass(&wc))
{
- MESSAGE_ERR("RegisterClass() failed\n");
+ ECORE_WINCE_MSG_ERR("RegisterClass() failed\n");
FreeLibrary(_ecore_wince_instance);
return 0;
}
{
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;
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;
{
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);
}
else
{
- MESSAGE_ERR("GetClientRect() failed\n");
+ ECORE_WINCE_MSG_ERR("GetClientRect() failed\n");
}
_ecore_wince_event_handle_motion_notify(data);
{
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;
{
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;
{
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);
{
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);
{
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;
{
Ecore_WinCE_Window *window;
- EINA_ERROR_PINFO("mouse in\n");
+ ECORE_WINCE_MSG_INFO("mouse in\n");
window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
{
Ecore_WinCE_Window *window;
- EINA_ERROR_PINFO("mouse out\n");
+ ECORE_WINCE_MSG_INFO("mouse out\n");
window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
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;
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;
{
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;
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;
{
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;
{
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;
{
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;
{
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;
{
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;
#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"
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);
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;
}
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;
}
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;
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;
{
if (!window) return;
- MESSAGE_INFO("destroying window\n");
+ ECORE_WINCE_MSG_INFO("destroying window\n");
DestroyWindow(((struct _Ecore_WinCE_Window *)window)->window);
free(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;
}
rect.bottom - rect.top,
TRUE))
{
- MESSAGE_ERR("MoveWindow() failed\n");
+ ECORE_WINCE_MSG_ERR("MoveWindow() failed\n");
}
}
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;
}
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;
}
rect.bottom - rect.top,
FALSE))
{
- MESSAGE_ERR("MoveWindow() failed\n");
+ ECORE_WINCE_MSG_ERR("MoveWindow() failed\n");
}
}
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;
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;
}
rect.bottom - rect.top,
TRUE))
{
- MESSAGE_ERR("MoveWindow() failed\n");
+ ECORE_WINCE_MSG_ERR("MoveWindow() failed\n");
}
}
{
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");
}
}
{
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");
}
}
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);
}
if (!window)
return;
- MESSAGE_INFO("setting backend\n");
+ ECORE_WINCE_MSG_INFO("setting backend\n");
w = (struct _Ecore_WinCE_Window *)window;
w->backend = backend;
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;
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;
int w;
int h;
- MESSAGE_INFO("getting window geometry\n");
+ ECORE_WINCE_MSG_INFO("getting window geometry\n");
if (!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;
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;
{
RECT rect;
- MESSAGE_INFO("getting window size\n");
+ ECORE_WINCE_MSG_INFO("getting window size\n");
if (!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;
((!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;
/* 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;
}
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 */
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.
GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN),
TRUE))
{
- MESSAGE_INFO("MoveWindow() failed\n");
+ ECORE_WINCE_MSG_INFO("MoveWindow() failed\n");
}
}
else
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,
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.
ew->rect.bottom - ew->rect.top,
TRUE))
{
- MESSAGE_INFO("MoveWindow() failed\n");
+ ECORE_WINCE_MSG_INFO("MoveWindow() failed\n");
}
}
}
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;
}