forked from enlightenment/enlightenment
all comp wins now have zoomaps, zooming effect lovers rejoice
This commit is contained in:
parent
b0260e98cb
commit
ed7b29d50f
|
@ -481,6 +481,7 @@ _e_comp_win_geometry_update(E_Comp_Win *cw)
|
|||
w = cw->bd->w, h = cw->bd->h;
|
||||
else
|
||||
w = cw->pw, h = cw->ph;
|
||||
e_zoomap_child_resize(cw->zoomobj, w, h);
|
||||
if (cw->not_in_layout)
|
||||
{
|
||||
evas_object_resize(cw->effect_obj, w, h);
|
||||
|
@ -1824,7 +1825,7 @@ _e_comp_win_shadow_setup(E_Comp_Win *cw)
|
|||
if (reshadow)
|
||||
{
|
||||
if (!cw->bd) return;
|
||||
if (cw->bd->bg_object && (edje_object_part_swallow_get(cw->shobj, "e.swallow.content") == cw->bd->bg_object))
|
||||
if (cw->bd->bg_object && (e_zoomap_child_get(cw->zoomobj) == cw->bd->bg_object))
|
||||
return;
|
||||
}
|
||||
if (_e_comp_win_do_shadow(cw) && (!no_shadow))
|
||||
|
@ -1848,17 +1849,19 @@ _e_comp_win_shadow_setup(E_Comp_Win *cw)
|
|||
else
|
||||
edje_object_signal_emit(cw->shobj, "e,state,visible,off", "e");
|
||||
|
||||
e_zoomap_child_set(cw->zoomobj, NULL);
|
||||
if (cw->bd && cw->bd->bg_object)
|
||||
{
|
||||
edje_object_part_swallow(cw->bd->bg_object, "e.swallow.client", cw->obj);
|
||||
edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->bd->bg_object);
|
||||
e_zoomap_child_set(cw->zoomobj, cw->bd->bg_object);
|
||||
no_shadow = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->obj);
|
||||
if (cw->bd) no_shadow = 1;
|
||||
e_zoomap_child_set(cw->zoomobj, cw->obj);
|
||||
}
|
||||
edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->zoomobj);
|
||||
|
||||
if (!cw->visible) return;
|
||||
|
||||
|
@ -2008,6 +2011,7 @@ _e_comp_win_dummy_add(E_Comp *c, Evas_Object *obj, E_Object *eobj, Eina_Bool nol
|
|||
cw->effect_obj = edje_object_add(c->evas);
|
||||
e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", "e/comp/effects/none");
|
||||
cw->shobj = edje_object_add(c->evas);
|
||||
cw->zoomobj = e_zoomap_add(c->evas);
|
||||
_e_comp_win_shadow_setup(cw);
|
||||
edje_object_part_swallow(cw->effect_obj, "e.swallow.content", cw->shobj);
|
||||
|
||||
|
@ -2022,6 +2026,7 @@ _e_comp_win_dummy_add(E_Comp *c, Evas_Object *obj, E_Object *eobj, Eina_Bool nol
|
|||
{
|
||||
evas_object_data_set(cw->shobj, "popup", cw->pop);
|
||||
evas_object_data_set(cw->effect_obj, "popup", cw->pop);
|
||||
evas_object_name_set(cw->zoomobj, "cw->zoomobj::POPUP");
|
||||
evas_object_name_set(cw->shobj, "cw->shobj::POPUP");
|
||||
evas_object_name_set(cw->effect_obj, "cw->effect_obj::POPUP");
|
||||
}
|
||||
|
@ -2029,6 +2034,7 @@ _e_comp_win_dummy_add(E_Comp *c, Evas_Object *obj, E_Object *eobj, Eina_Bool nol
|
|||
{
|
||||
evas_object_data_set(cw->shobj, "menu", cw->menu);
|
||||
evas_object_data_set(cw->effect_obj, "menu", cw->menu);
|
||||
evas_object_name_set(cw->zoomobj, "cw->zoomobj::MENU");
|
||||
evas_object_name_set(cw->shobj, "cw->shobj::MENU");
|
||||
evas_object_name_set(cw->effect_obj, "cw->effect_obj::MENU");
|
||||
}
|
||||
|
@ -2163,6 +2169,7 @@ _e_comp_win_add(E_Comp *c, Ecore_X_Window win, E_Border *bd)
|
|||
cw->effect_obj = edje_object_add(c->evas);
|
||||
e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", "e/comp/effects/none");
|
||||
cw->shobj = edje_object_add(c->evas);
|
||||
cw->zoomobj = e_zoomap_add(c->evas);
|
||||
cw->obj = evas_object_image_filled_add(c->evas);
|
||||
evas_object_image_colorspace_set(cw->obj, EVAS_COLORSPACE_ARGB8888);
|
||||
if (cw->argb) evas_object_image_alpha_set(cw->obj, 1);
|
||||
|
@ -2197,11 +2204,13 @@ _e_comp_win_add(E_Comp *c, Ecore_X_Window win, E_Border *bd)
|
|||
{
|
||||
evas_object_data_set(cw->shobj, "border", cw->bd);
|
||||
evas_object_data_set(cw->effect_obj, "border", cw->bd);
|
||||
evas_object_name_set(cw->zoomobj, "cw->zoomobj::BORDER");
|
||||
evas_object_name_set(cw->shobj, "cw->shobj::BORDER");
|
||||
evas_object_name_set(cw->effect_obj, "cw->effect_obj::BORDER");
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_object_name_set(cw->zoomobj, "cw->zoomobj::WINDOW");
|
||||
evas_object_name_set(cw->shobj, "cw->shobj::WINDOW");
|
||||
evas_object_name_set(cw->effect_obj, "cw->effect_obj::WINDOW");
|
||||
}
|
||||
|
@ -2367,6 +2376,7 @@ _e_comp_win_del(E_Comp_Win *cw)
|
|||
evas_object_event_callback_del_full(cw->obj, EVAS_CALLBACK_FOCUS_OUT, _e_comp_injected_win_focus_out_cb, cw);
|
||||
}
|
||||
E_FREE_FUNC(cw->obj, evas_object_del);
|
||||
E_FREE_FUNC(cw->zoomobj, evas_object_del);
|
||||
E_FREE_FUNC(cw->shobj, evas_object_del);
|
||||
E_FREE_FUNC(cw->effect_obj, evas_object_del);
|
||||
|
||||
|
@ -3339,6 +3349,7 @@ _e_comp_bd_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
|||
_e_comp_win_bd_setup(cw, ev->border);
|
||||
evas_object_data_set(cw->shobj, "border", cw->bd);
|
||||
evas_object_data_set(cw->effect_obj, "border", cw->bd);
|
||||
evas_object_name_set(cw->zoomobj, "cw->zoomobj::BORDER");
|
||||
evas_object_name_set(cw->shobj, "cw->shobj::BORDER");
|
||||
evas_object_name_set(cw->effect_obj, "cw->effect_obj::BORDER");
|
||||
e_comp_win_reshadow(cw);
|
||||
|
@ -3512,7 +3523,7 @@ _e_comp_bd_fullscreen(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
|||
if (!cw) return ECORE_CALLBACK_PASS_ON;
|
||||
e_comp_win_reshadow(cw);
|
||||
/* bd->bg_object deletion pending */
|
||||
edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->obj);
|
||||
e_zoomap_child_set(cw->zoomobj, cw->obj);
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
||||
|
@ -5431,13 +5442,6 @@ e_comp_win_effect_set(E_Comp_Win *cw, const char *effect)
|
|||
if (!e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", buf))
|
||||
if (!e_theme_edje_object_set(cw->effect_obj, "base/theme/comp", "e/comp/effects/none")) return;
|
||||
}
|
||||
if (cw->bd && cw->bd->bg_object)
|
||||
{
|
||||
edje_object_part_swallow(cw->bd->bg_object, "e.swallow.client", cw->obj);
|
||||
edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->bd->bg_object);
|
||||
}
|
||||
else
|
||||
edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->obj);
|
||||
edje_object_part_swallow(cw->effect_obj, "e.swallow.content", cw->shobj);
|
||||
if (cw->effect_clip)
|
||||
{
|
||||
|
|
|
@ -125,6 +125,7 @@ struct _E_Comp_Win
|
|||
Ecore_X_Colormap cmap; // colormap of window
|
||||
int depth; // window depth
|
||||
Evas_Object *obj; // composite object
|
||||
Evas_Object *zoomobj; // zoomap
|
||||
Evas_Object *shobj; // shadow object
|
||||
Evas_Object *effect_obj; // effects object
|
||||
E_Object *eobj; // internal e object
|
||||
|
|
|
@ -245,7 +245,7 @@ e_shelf_zone_new(E_Zone *zone, const char *name, const char *style, int popup, E
|
|||
{
|
||||
evas_object_move(es->o_base, es->zone->x + es->x, es->zone->y + es->y);
|
||||
evas_object_show(es->o_base);
|
||||
E_LAYER_SET(es->o_base, layer);
|
||||
es->cw = E_LAYER_SET(es->o_base, layer);
|
||||
}
|
||||
|
||||
es->gadcon =
|
||||
|
@ -495,7 +495,7 @@ e_shelf_move(E_Shelf *es, int x, int y)
|
|||
if (es->popup)
|
||||
e_popup_move(es->popup, es->x, es->y);
|
||||
else
|
||||
evas_object_move(es->o_base, es->zone->x + es->x, es->zone->y + es->y);
|
||||
e_comp_win_move(es->cw, es->zone->x + es->x, es->zone->y + es->y);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -508,7 +508,7 @@ e_shelf_resize(E_Shelf *es, int w, int h)
|
|||
if (es->popup)
|
||||
e_popup_resize(es->popup, es->w, es->h);
|
||||
else
|
||||
evas_object_resize(es->o_base, es->w, es->h);
|
||||
e_comp_win_resize(es->cw, es->w, es->h);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
@ -523,10 +523,7 @@ e_shelf_move_resize(E_Shelf *es, int x, int y, int w, int h)
|
|||
if (es->popup)
|
||||
e_popup_move_resize(es->popup, es->x, es->y, es->w, es->h);
|
||||
else
|
||||
{
|
||||
evas_object_move(es->o_base, es->zone->x + es->x, es->zone->y + es->y);
|
||||
evas_object_resize(es->o_base, es->w, es->h);
|
||||
}
|
||||
e_comp_win_moveresize(es->cw, es->zone->x + es->x, es->zone->y + es->y, es->w, es->h);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -17,6 +17,7 @@ struct _E_Shelf
|
|||
E_Layer layer;
|
||||
E_Popup *popup; /* NULL if its within an existing canvas */
|
||||
E_Zone *zone;
|
||||
E_Comp_Win *cw;
|
||||
Evas_Object *o_base;
|
||||
Ecore_Evas *ee;
|
||||
Evas *evas;
|
||||
|
|
|
@ -488,9 +488,8 @@ e_fwin_zone_new(E_Zone *zone, void *p)
|
|||
e_zone_useful_geometry_get(zone, &x, &y, &w, &h);
|
||||
evas_object_move(o, x, y);
|
||||
evas_object_resize(o, w, h);
|
||||
E_LAYER_SET_UNDER(o, E_COMP_CANVAS_LAYER_DESKTOP);
|
||||
evas_object_hide(o);
|
||||
evas_object_show(o);
|
||||
E_LAYER_SET_UNDER(o, E_COMP_CANVAS_LAYER_DESKTOP);
|
||||
page->scrollframe_obj = page->scr = o;
|
||||
|
||||
e_fm2_window_object_set(page->fm_obj, E_OBJECT(fwin->zone));
|
||||
|
@ -1618,7 +1617,7 @@ _e_fwin_cb_resize(E_Win *win)
|
|||
}
|
||||
_e_fwin_toolbar_resize(fwin->cur_page);
|
||||
if (fwin->zone)
|
||||
evas_object_resize(fwin->cur_page->scrollframe_obj, fwin->zone->w, fwin->zone->h);
|
||||
e_comp_win_resize(evas_object_data_get(fwin->cur_page->scrollframe_obj, "comp_win"), fwin->zone->w, fwin->zone->h);
|
||||
/* _e_fwin_geom_save(fwin); */
|
||||
}
|
||||
|
||||
|
@ -1927,6 +1926,7 @@ _e_fwin_zone_move_resize(void *data, int type __UNUSED__, void *event)
|
|||
{
|
||||
E_Event_Zone_Move_Resize *ev = event;
|
||||
E_Fwin *fwin = data;
|
||||
E_Comp_Win *cw;
|
||||
int x, y, w, h, sx, sy, sw, sh;
|
||||
|
||||
if (!fwin) return ECORE_CALLBACK_PASS_ON;
|
||||
|
@ -1936,8 +1936,8 @@ _e_fwin_zone_move_resize(void *data, int type __UNUSED__, void *event)
|
|||
evas_object_geometry_get(fwin->cur_page->scrollframe_obj, &sx, &sy, &sw, &sh);
|
||||
/* if same, do nothing */
|
||||
if ((sx == x) && (sy == y) && (sw == w) && (sh == h)) return ECORE_CALLBACK_RENEW;
|
||||
evas_object_move(fwin->cur_page->scrollframe_obj, x, y);
|
||||
evas_object_resize(fwin->cur_page->scrollframe_obj, w, h);
|
||||
cw = evas_object_data_get(fwin->cur_page->scrollframe_obj, "comp_win");
|
||||
e_comp_win_moveresize(cw, x, y, w, h);
|
||||
e_fm2_refresh(fwin->cur_page->fm_obj);
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue