Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_dnd.c e_dnd.h 


Log Message:
Prepare for move callback.

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_dnd.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- e_dnd.c     1 May 2005 15:30:51 -0000       1.11
+++ e_dnd.c     1 May 2005 15:55:01 -0000       1.12
@@ -197,9 +197,10 @@
        h = l->data;
        
        if ((x >= h->x) && (x < h->x + h->w) && (y >= h->y) && (y < h->y + h->h)
-           && (!strcmp(h->type, drag_type)))
+           && (!strcmp(h->type, drag_type))
+           && (h->func.drop))
          {
-            h->func(h->data, drag_type, ev);
+            h->func.drop(h->data, drag_type, ev);
          }
      }
 
@@ -211,7 +212,10 @@
 }
 
 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)
+e_drop_handler_add(void *data,
+                  void (*drop_func)(void *data, const char *type, void *event),
+                  void (*move_func)(void *data, const char *type, void *event),
+                  const char *type, int x, int y, int w, int h)
 {
    E_Drop_Handler *handler;
 
@@ -219,7 +223,8 @@
    if (!handler) return NULL;
 
    handler->data = data;
-   handler->func = func;
+   handler->func.drop = drop_func;
+   handler->func.move = move_func;
    handler->type = strdup(type);
    handler->x = x;
    handler->y = y;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_dnd.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- e_dnd.h     1 May 2005 15:30:51 -0000       1.7
+++ e_dnd.h     1 May 2005 15:55:01 -0000       1.8
@@ -6,6 +6,7 @@
 
 typedef struct _E_Drop_Handler E_Drop_Handler;
 typedef struct _E_Drop_Event   E_Drop_Event;
+typedef struct _E_Move_Event   E_Move_Event;
 
 #else
 #ifndef E_DND_H
@@ -14,7 +15,10 @@
 struct _E_Drop_Handler
 {
    void *data;
-   void (*func)(void *data, const char *type, void *drop);
+   struct {
+       void (*drop)(void *data, const char *type, void *event);
+       void (*move)(void *data, const char *type, void *event);
+   } func;
    char *type;
    int x, y, w, h;
 };
@@ -25,6 +29,11 @@
    int x, y;
 };
 
+struct _E_Move_Event
+{
+   int x, y;
+};
+
 EAPI int  e_dnd_init(void);
 EAPI int  e_dnd_shutdown(void);
 
@@ -36,7 +45,8 @@
 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 *event_info),
+                                       void (*drop_func)(void *data, const 
char *type, void *event),
+                                       void (*move_func)(void *data, const 
char *type, void *event),
                                        const char *type, int x, int y, int w, 
int h);
 EAPI void e_drop_handler_del(E_Drop_Handler *handler);
 




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to