Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_border.c e_dnd.c e_dnd.h 


Log Message:
DND work.

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -3 -r1.151 -r1.152
--- e_border.c  24 Apr 2005 21:11:43 -0000      1.151
+++ e_border.c  25 Apr 2005 18:02:25 -0000      1.152
@@ -1964,6 +1964,7 @@
          {
             e_drag_start(bd->zone, "enlightenment/border", bd, 
                          a->path, "icon");
+            e_util_container_fake_mouse_up_later(bd->zone->container, 1);
          }
      }
 }
@@ -2744,10 +2745,8 @@
                                        _e_border_cb_signal_resize_stop, bd);
        edje_object_signal_callback_add(o, "action", "*",
                                        _e_border_cb_signal_action, bd);
-#if 0
        edje_object_signal_callback_add(o, "drag", "*",
                                        _e_border_cb_signal_drag, bd);
-#endif
        if (bd->focused)
          edje_object_signal_emit(bd->bg_object, "active", "");
        evas_object_move(o, 0, 0);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_dnd.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e_dnd.c     24 Apr 2005 21:11:44 -0000      1.3
+++ e_dnd.c     25 Apr 2005 18:02:25 -0000      1.4
@@ -132,6 +132,7 @@
 e_drag_end(int x, int y)
 {
    Evas_List *l;
+   E_Drop_Event *e;
 
    printf("drag_end\n");
 
@@ -146,6 +147,11 @@
    ecore_x_keyboard_ungrab();
    ecore_x_window_del(drag_win);
 
+   e = E_NEW(E_Drop_Event, 1);
+   e->data = drag_data;
+   e->x = x;
+   e->y = y;
+
    for (l = drop_handlers; l; l = l->next)
      {
        E_Drop_Handler *h;
@@ -155,10 +161,11 @@
        if ((x >= h->x) && (x < h->x + h->w) && (y >= h->y) && (y < h->y + h->h)
            && (!strcmp(h->type, drag_type)))
          {
-            h->func(h->data, drag_type, drag_data);
+            h->func(h->data, drag_type, e);
          }
      }
 
+   free(e);
    free(drag_type);
    drag_type = NULL;
    drag_data = NULL;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_dnd.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_dnd.h     24 Apr 2005 16:04:09 -0000      1.2
+++ e_dnd.h     25 Apr 2005 18:02:25 -0000      1.3
@@ -5,6 +5,7 @@
 #ifdef E_TYPEDEFS
 
 typedef struct _E_Drop_Handler E_Drop_Handler;
+typedef struct _E_Drop_Event   E_Drop_Event;
 
 #else
 #ifndef E_DND_H
@@ -18,6 +19,12 @@
    int x, y, w, h;
 };
 
+struct _E_Drop_Event
+{
+   void *data;
+   int x, y;
+};
+
 EAPI int  e_dnd_init(void);
 EAPI int  e_dnd_shutdown(void);
 
@@ -25,7 +32,7 @@
 EAPI void e_drag_update(int x, int y);
 EAPI void e_drag_end(int x, int y);
 
-EAPI E_Drop_Handler *e_drop_handler_add(void *data, void (*func)(void *data, 
const char *type, void *drop), const char *type, int x, int y, int w, int h);
+EAPI E_Drop_Handler *e_drop_handler_add(void *data, void (*func)(void *data, 
const char *type, void *event_info), const char *type, int x, int y, int w, int 
h);
 EAPI void e_drop_handler_del(E_Drop_Handler *handler);
 
 #endif




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to