Enlightenment CVS committal
Author : doursse
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_wince
Modified Files:
ecore_wince.c ecore_wince_event.c ecore_wince_window.c
Log Message:
add debug messages, formatting, fix initialisation of mouse_in and mouse_out
events
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_wince/ecore_wince.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ecore_wince.c 5 Jun 2008 05:27:29 -0000 1.3
+++ ecore_wince.c 6 Jun 2008 12:20:47 -0000 1.4
@@ -91,6 +91,8 @@
ECORE_WINCE_EVENT_MOUSE_BUTTON_DOWN = ecore_event_type_new();
ECORE_WINCE_EVENT_MOUSE_BUTTON_UP = ecore_event_type_new();
ECORE_WINCE_EVENT_MOUSE_MOVE = ecore_event_type_new();
+ ECORE_WINCE_EVENT_MOUSE_IN = ecore_event_type_new();
+ ECORE_WINCE_EVENT_MOUSE_OUT = ecore_event_type_new();
ECORE_WINCE_EVENT_WINDOW_FOCUS_IN = ecore_event_type_new();
ECORE_WINCE_EVENT_WINDOW_FOCUS_OUT = ecore_event_type_new();
ECORE_WINCE_EVENT_WINDOW_DAMAGE = ecore_event_type_new();
@@ -226,31 +228,39 @@
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;
+ {
+ POINT pt;
- pt.x = LOWORD(data_param);
- pt.y = HIWORD(data_param);
- if (!PtInRect(&rect, pt))
- {
- if (w->pointer_is_in)
- {
- w->pointer_is_in = 0;
- _ecore_wince_event_handle_leave_notify(data);
- }
- }
- else
- {
- if (!w->pointer_is_in)
- {
- w->pointer_is_in = 1;
- _ecore_wince_event_handle_enter_notify(data);
- }
-
- }
- }
+ printf ("GetClientRect !!\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;
+ _ecore_wince_event_handle_leave_notify(data);
+ }
+ }
+ 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");
+ }
_ecore_wince_event_handle_motion_notify(data);
return 0;
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_wince/ecore_wince_event.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ecore_wince_event.c 5 Jun 2008 07:23:41 -0000 1.3
+++ ecore_wince_event.c 6 Jun 2008 12:20:47 -0000 1.4
@@ -254,6 +254,7 @@
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
@@ -262,6 +263,7 @@
Ecore_WinCE_Window *window;
window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
+ printf (" * ecore event enter notify 0\n");
{
Ecore_WinCE_Event_Mouse_Move *e;
@@ -295,6 +297,7 @@
ecore_event_add(ECORE_WINCE_EVENT_MOUSE_IN, e, NULL, NULL);
}
+ printf (" * ecore event enter notify 1\n");
}
void
@@ -336,6 +339,7 @@
ecore_event_add(ECORE_WINCE_EVENT_MOUSE_OUT, e, NULL, NULL);
}
+ printf (" * ecore event leave notify\n");
}
void
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_wince/ecore_wince_window.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ecore_wince_window.c 5 Jun 2008 07:37:10 -0000 1.6
+++ ecore_wince_window.c 6 Jun 2008 12:20:47 -0000 1.7
@@ -13,28 +13,6 @@
#include "Ecore_WinCE.h"
#include "ecore_wince_private.h"
-char *
-_wchar_to_char(const wchar_t *text)
-{
- char * atext;
- int size;
- int asize;
-
- size = wcslen(text) + 1;
-
- asize = WideCharToMultiByte(CP_ACP, 0, text, size, NULL, 0, NULL, NULL);
- if (asize == 0)
- return NULL;
-
- atext = (char*)malloc((asize + 1) * sizeof(char));
-
- if (atext)
- if (!WideCharToMultiByte(CP_ACP, 0, text, size, atext, asize, NULL, NULL))
- return NULL;
- atext[asize] = '\0';
-
- return atext;
-}
/***** Private declarations *****/
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs