forked from enlightenment/enlightenment
parent
c74b5c5d1f
commit
4985a2f3a5
|
@ -190,10 +190,27 @@ e_container_lower(E_Container *con)
|
|||
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 @@ e_container_shape_rects_get(E_Container_Shape *es)
|
|||
|
||||
|
||||
|
||||
|
||||
/* local subsystem functions */
|
||||
static void
|
||||
_e_container_free(E_Container *con)
|
||||
|
|
|
@ -79,7 +79,8 @@ EAPI void e_container_raise(E_Container *con);
|
|||
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);
|
||||
|
|
|
@ -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 @@ _e_gadman_cb_signal_move_start(void *data, Evas_Object *obj, const char *emissio
|
|||
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_cb_signal_move_go(void *data, Evas_Object *obj, const char *emission,
|
|||
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 @@ _e_gadman_cb_signal_move_go(void *data, Evas_Object *obj, const char *emission,
|
|||
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_cb_signal_move_go(void *data, Evas_Object *obj, const char *emission,
|
|||
_e_gadman_client_geometry_to_align(gmc);
|
||||
if (new_zone)
|
||||
{
|
||||
/* FIXME: callback for edge change */
|
||||
/* FIXME: callback for zone change */
|
||||
}
|
||||
if (new_edge)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue