Enlightenment CVS committal

Author  : rephorm
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_layout.c e_layout.h 


Log Message:

better pager dragging
  * drag windows around within pager
  * dnd when going outside of the pager
  * window placed at location in pager of drop
  * window centered under mouse when dropped off of pager
  
  
I'm not sure yet to do with original window when dragging off the pager. Right 
now it stays at last "on pager" location, which is a bit ugly. Should it jump 
back to the original position? Or disappear entirely?

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_layout.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- e_layout.c  7 Jan 2006 10:39:45 -0000       1.10
+++ e_layout.c  29 Mar 2006 00:35:16 -0000      1.11
@@ -103,6 +103,28 @@
 }
 
 EAPI void
+e_layout_coord_canvas_to_virtual(Evas_Object *obj, Evas_Coord cx, Evas_Coord 
cy, Evas_Coord *vx, Evas_Coord *vy)
+{
+   E_Smart_Data *sd;
+
+   sd = evas_object_smart_data_get(obj);
+
+   if (vx) *vx = (cx - sd->x) * ((double)(sd->vw) / sd->w);
+   if (vy) *vy = (cy - sd->y) * ((double)(sd->vh) / sd->h);
+}
+
+EAPI void
+e_layout_coord_virtual_to_canvas(Evas_Object *obj, Evas_Coord vx, Evas_Coord 
vy, Evas_Coord *cx, Evas_Coord *cy)
+{
+   E_Smart_Data *sd;
+
+   sd = evas_object_smart_data_get(obj);
+
+   if (cx) *cx = vx * ((double)(sd->w) / sd->vw) + sd->x;
+   if (cy) *cy = vy * ((double)(sd->h) / sd->vh) + sd->y;
+}
+
+EAPI void
 e_layout_pack(Evas_Object *obj, Evas_Object *child)
 {
    E_Smart_Data *sd;
@@ -207,6 +229,20 @@
        evas_object_stack_above(obj, above);
        li->sd->items = evas_list_append_relative(li->sd->items, obj, above);
      }
+}
+
+EAPI void
+e_layout_child_geometry_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, 
Evas_Coord *w, Evas_Coord *h)
+{
+   E_Layout_Item *li;
+
+   li = evas_object_data_get(obj, "e_layout_data");
+   if (!li) return;
+   
+   if (x) *x = li->x;
+   if (y) *y = li->y;
+   if (w) *w = li->w;
+   if (h) *h = li->h;
 }
 
 EAPI void
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_layout.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- e_layout.h  18 Mar 2005 16:30:47 -0000      1.2
+++ e_layout.h  29 Mar 2006 00:35:16 -0000      1.3
@@ -11,6 +11,10 @@
 EAPI int          e_layout_thaw              (Evas_Object *obj);
 EAPI void         e_layout_virtual_size_set  (Evas_Object *obj, Evas_Coord w, 
Evas_Coord h);
 EAPI void         e_layout_virtual_size_get  (Evas_Object *obj, Evas_Coord *w, 
Evas_Coord *h);
+
+EAPI void e_layout_coord_canvas_to_virtual (Evas_Object *obj, Evas_Coord cx, 
Evas_Coord cy, Evas_Coord *vx, Evas_Coord *vy);
+EAPI void e_layout_coord_virtual_to_canvas (Evas_Object *obj, Evas_Coord vx, 
Evas_Coord vy, Evas_Coord *cx, Evas_Coord *cy);
+
 EAPI void         e_layout_pack              (Evas_Object *obj, Evas_Object 
*child);
 EAPI void         e_layout_child_move        (Evas_Object *obj, Evas_Coord x, 
Evas_Coord y);
 EAPI void         e_layout_child_resize      (Evas_Object *obj, Evas_Coord w, 
Evas_Coord h);
@@ -18,6 +22,7 @@
 EAPI void         e_layout_child_lower       (Evas_Object *obj);
 EAPI void         e_layout_child_raise_above (Evas_Object *obj, Evas_Object 
*above);
 EAPI void         e_layout_child_lower_below (Evas_Object *obj, Evas_Object 
*below);
+EAPI void         e_layout_child_geometry_get(Evas_Object *obj, Evas_Coord *x, 
Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
 EAPI void         e_layout_unpack            (Evas_Object *obj);
 
 #endif




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to