Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_container.c e_container.h e_gadman.c
Log Message:
iner zone moves? need to test...
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_container.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- e_container.c 15 Jan 2005 09:50:26 -0000 1.20
+++ e_container.c 19 Jan 2005 15:39:36 -0000 1.21
@@ -190,10 +190,27 @@
Evas_List *
e_container_clients_list_get(E_Container *con)
{
- E_OBJECT_CHECK_RETURN(con, NULL);
- return con->clients;
+ E_OBJECT_CHECK_RETURN(con, NULL);
+ return con->clients;
}
+E_Zone *
+e_container_zone_at_point_get(E_Container *con, int x, int y)
+{
+ Evas_List *l;
+
+ E_OBJECT_CHECK_RETURN(con, NULL);
+ for (l = con->zones; l; l = l->next)
+ {
+ E_Zone *zone;
+
+ zone = l->data;
+ if ((E_SPANS_COMMON(zone->x, zone->w, x, 1)) &&
+ (E_SPANS_COMMON(zone->y, zone->h, y, 1)))
+ return zone;
+ }
+ return NULL;
+}
E_Container_Shape *
e_container_shape_add(E_Container *con)
@@ -318,7 +335,6 @@
-
/* local subsystem functions */
static void
_e_container_free(E_Container *con)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_container.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- e_container.h 15 Jan 2005 09:50:26 -0000 1.9
+++ e_container.h 19 Jan 2005 15:39:36 -0000 1.10
@@ -79,7 +79,8 @@
EAPI void e_container_lower(E_Container *con);
EAPI Evas_List *e_container_clients_list_get(E_Container *con);
-
+EAPI E_Zone *e_container_zone_at_point_get(E_Container *con, int x, int
y);
+
EAPI E_Container_Shape *e_container_shape_add(E_Container *con);
EAPI void e_container_shape_show(E_Container_Shape *es);
EAPI void e_container_shape_hide(E_Container_Shape *es);
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_gadman.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- e_gadman.c 19 Jan 2005 14:31:40 -0000 1.9
+++ e_gadman.c 19 Jan 2005 15:39:36 -0000 1.10
@@ -6,10 +6,11 @@
/* FIXME: corner case if module is sized to full screen... cant stop edit or */
/* re-enter edit mode (cant access root menu) */
-/* FIXME: handle edge move/changes */
/* FIXME: handle drag from zone to zone */
/* FIXME: handle save */
/* FIXME: handle load */
+/* FIXME: start move - raise and callback */
+/* FIXME: if u set align, or minmax size or edge then figure out new-coords */
/* FIXME: handle move resist */
/* FIXME: handle resize resist */
@@ -570,6 +571,9 @@
if (_e_gadman_client_is_being_modified(gmc)) return;
_e_gadman_client_down_store(gmc);
gmc->moving = 1;
+ evas_object_raise(gmc->control_object);
+ evas_object_raise(gmc->event_object);
+ /* FIXME: call callback to raise */
}
static void
@@ -600,6 +604,19 @@
E_Gadman_Edge ne;
ne = gmc->edge;
+
+ if (!(gmc->policy & E_GADMAN_POLICY_FIXED_ZONE))
+ {
+ E_Zone *nz;
+
+ nz = e_container_zone_at_point_get(gmc->zone->container, x, y);
+ if (nz != gmc->zone)
+ {
+ gmc->zone = nz;
+ new_zone = 1;
+ }
+ }
+
xr = (double)(x - gmc->zone->x) / (double)gmc->zone->w;
yr = (double)(y - gmc->zone->y) / (double)gmc->zone->h;
@@ -668,6 +685,17 @@
gmc->y = gmc->down_store_y;
gmc->w = gmc->down_store_w;
gmc->h = gmc->down_store_h;
+ if (!(gmc->policy & E_GADMAN_POLICY_FIXED_ZONE))
+ {
+ E_Zone *nz;
+
+ nz = e_container_zone_at_point_get(gmc->zone->container, x, y);
+ if (nz != gmc->zone)
+ {
+ gmc->zone = nz;
+ new_zone = 1;
+ }
+ }
if (gmc->x < gmc->zone->x)
gmc->x = gmc->zone->x;
else if ((gmc->x + gmc->w) > (gmc->zone->x + gmc->zone->w))
@@ -680,7 +708,7 @@
_e_gadman_client_geometry_to_align(gmc);
if (new_zone)
{
- /* FIXME: callback for edge change */
+ /* FIXME: callback for zone change */
}
if (new_edge)
{
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs