[Pkg-e-commits] [SCM] Core abstraction layer for enlightenment DR 0.17 branch, upstream-vcs, updated. fbccf3b6cae3945e0db311041de91f346fccbae1

doursse doursse at alioth.debian.org
Mon Jun 9 12:45:13 UTC 2008


The following commit has been merged in the upstream-vcs branch:
commit b6de0a63f167798236fab3ed4cf81c5ce7b60461
Author: doursse <doursse>
Date:   Fri Jun 6 12:20:47 2008 +0000

    add debug messages, formatting, fix initialisation of mouse_in and mouse_out events

diff --git a/src/lib/ecore_wince/ecore_wince.c b/src/lib/ecore_wince/ecore_wince.c
index 48bb114..71ebf77 100644
--- a/src/lib/ecore_wince/ecore_wince.c
+++ b/src/lib/ecore_wince/ecore_wince.c
@@ -91,6 +91,8 @@ ecore_wince_init()
         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 @@ _ecore_wince_window_procedure(HWND   window,
           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;
-
-             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);
-                    }
-
-               }
-          }
+            {
+               POINT pt;
+
+               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;
diff --git a/src/lib/ecore_wince/ecore_wince_event.c b/src/lib/ecore_wince/ecore_wince_event.c
index 09ad6eb..73fcd56 100644
--- a/src/lib/ecore_wince/ecore_wince_event.c
+++ b/src/lib/ecore_wince/ecore_wince_event.c
@@ -254,6 +254,7 @@ _ecore_wince_event_handle_motion_notify(Ecore_WinCE_Callback_Data *msg)
    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_event_handle_enter_notify(Ecore_WinCE_Callback_Data *msg)
    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_wince_event_handle_enter_notify(Ecore_WinCE_Callback_Data *msg)
 
       ecore_event_add(ECORE_WINCE_EVENT_MOUSE_IN, e, NULL, NULL);
    }
+   printf (" * ecore event enter notify 1\n");
 }
 
 void
@@ -336,6 +339,7 @@ _ecore_wince_event_handle_leave_notify(Ecore_WinCE_Callback_Data *msg)
 
       ecore_event_add(ECORE_WINCE_EVENT_MOUSE_OUT, e, NULL, NULL);
    }
+   printf (" * ecore event leave notify\n");
 }
 
 void
diff --git a/src/lib/ecore_wince/ecore_wince_window.c b/src/lib/ecore_wince/ecore_wince_window.c
index bb2bcd7..de97069 100644
--- a/src/lib/ecore_wince/ecore_wince_window.c
+++ b/src/lib/ecore_wince/ecore_wince_window.c
@@ -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 *****/
 

-- 
Core abstraction layer for enlightenment DR 0.17



More information about the Pkg-e-commits mailing list