Enlightenment CVS committal

Author  : metrics
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_gadcon.c e_gadcon.h 


Log Message:
More fixes of the autoscroll/drag and drop behaviour for gadgets in
shelves. Added callback to allow the current drop position to be
dynamically updated as the gadget scrolling is animated.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_gadcon.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- e_gadcon.c  12 Nov 2006 11:32:43 -0000      1.50
+++ e_gadcon.c  15 Nov 2006 06:24:30 -0000      1.51
@@ -1349,6 +1349,9 @@
        return 0;
      }
 
+   if (gcc->scroll_cb.func)
+     gcc->scroll_cb.func(gcc->scroll_cb.data);
+
    return 1;
 }
 
@@ -1395,6 +1398,13 @@
          gcc->scroll_animator = 
ecore_animator_add(_e_gadcon_cb_client_scroll_animator, gcc);
        gcc->scroll_wanted = d;
      }
+}
+
+EAPI void
+e_gadcon_client_autoscroll_cb_set(E_Gadcon_Client *gcc, void (*func)(void 
*data), void *data)
+{
+   gcc->scroll_cb.func = func;
+   gcc->scroll_cb.data = data;
 }
 
 static void
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_gadcon.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- e_gadcon.h  12 Nov 2006 11:32:43 -0000      1.28
+++ e_gadcon.h  15 Nov 2006 06:24:30 -0000      1.29
@@ -131,6 +131,11 @@
    Ecore_Animator        *scroll_animator;
    double                 scroll_pos;
    double                 scroll_wanted;
+   struct {
+       void *data;
+       void (*func) (void *data);
+   } scroll_cb;
+
    E_Menu                *menu;
    const char            *style;
    unsigned char          autoscroll : 1;
@@ -139,6 +144,7 @@
    unsigned char          moving : 1;
    unsigned char          resizing : 1;
    Evas_Coord             dx, dy;
+
 };
 
 EAPI int              e_gadcon_init(void);
@@ -176,6 +182,7 @@
 EAPI void             e_gadcon_client_aspect_set(E_Gadcon_Client *gcc, int w, 
int h);
 EAPI void             e_gadcon_client_autoscroll_set(E_Gadcon_Client *gcc, int 
autoscroll);
 EAPI void             e_gadcon_client_autoscroll_update(E_Gadcon_Client *gcc, 
int mx, int my);
+EAPI void             e_gadcon_client_autoscroll_cb_set(E_Gadcon_Client *gcc, 
void (*func)(void *data), void *data);
 EAPI void             e_gadcon_client_resizable_set(E_Gadcon_Client *gcc, int 
resizable);
 
 EAPI void             e_gadcon_client_util_menu_items_append(E_Gadcon_Client 
*gcc, E_Menu *menu, int flags);



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to