evas/elm: Remove function group_resize

This is an override of efl_gfx_size_set. Same as before, the
order of operations matter so it is possible that a corner
case will break. In particular, legacy code was:
 - intercept
 - smart resize (do stuff), super, super, super
 - evas object resize

The new code is more like:
 - intercept
 - super, super, super, evas object resize
 - do stuff

But unfortunately this broke elm_widget (read: all widgets) as
the internal resize was done before the object resize. So,
inside the resize event cb, the resize_obj size would not match
the smart object size. >_<
This commit is contained in:
Jean-Philippe Andre 2016-10-11 16:54:31 +09:00
parent 11b7cf6b72
commit 8a9f0bd603
57 changed files with 216 additions and 136 deletions

View File

@ -2068,6 +2068,7 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part)
implements {
Efl.Gfx.visible.set;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Object.constructor;
Efl.Object.destructor;
Efl.Object.dbg_info_get;
@ -2075,7 +2076,6 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part)
Efl.Canvas.Object.paragraph_direction.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_resize;
Efl.Canvas.Group.group_calculate;
Efl.File.file.set;
Efl.File.file.get;

View File

@ -254,9 +254,12 @@ _edje_limit_get(Edje *ed, Edje_Limit **limits, unsigned int length, Evas_Coord s
}
EOLIAN static void
_edje_object_efl_canvas_group_group_resize(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord w, Evas_Coord h)
_edje_object_efl_gfx_size_set(Eo *obj, Edje *ed, Evas_Coord w, Evas_Coord h)
{
if ((w == ed->w) && (h == ed->h)) return;
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
if ((w == ed->w) && (h == ed->h)) goto super;
if (ed->collection)
{
_edje_limit_get(ed, ed->collection->limits.horizontal, ed->collection->limits.horizontal_count, ed->w, w);
@ -279,12 +282,15 @@ _edje_object_efl_canvas_group_group_resize(Eo *obj EINA_UNUSED, Edje *ed, Evas_C
if (_edje_lua_script_only(ed))
{
_edje_lua_script_only_resize(ed);
return;
goto super;
}
// evas_object_resize(ed->clipper, ed->w, ed->h);
ed->dirty = EINA_TRUE;
_edje_recalc_do(ed);
_edje_emit(ed, "resize", NULL);
super:
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
}
static void

View File

@ -577,17 +577,21 @@ _efl_ui_image_efl_gfx_position_set(Eo *obj, Efl_Ui_Image_Data *sd, Evas_Coord x,
}
EOLIAN static void
_efl_ui_image_efl_canvas_group_group_resize(Eo *obj, Efl_Ui_Image_Data *sd, Evas_Coord w, Evas_Coord h)
_efl_ui_image_efl_gfx_size_set(Eo *obj, Efl_Ui_Image_Data *sd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
if ((sd->img_w == w) && (sd->img_h == h)) return;
if ((sd->img_w == w) && (sd->img_h == h)) goto super;
sd->img_w = w;
sd->img_h = h;
/* takes care of resizing */
_efl_ui_image_internal_sizing_eval(obj, sd);
super:
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
}
static void

View File

@ -125,6 +125,7 @@ class Efl.Ui.Image (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable,
Efl.Gfx.color.set;
Efl.Gfx.visible.set;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Gfx.View.view_size.get;
Efl.Image.Load.load_size.set;
Efl.Image.Load.load_size.get;
@ -146,7 +147,6 @@ class Efl.Ui.Image (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable,
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_member_add;
Efl.Canvas.Group.group_resize;
Efl.Ui.Draggable.drag_target.set;
Efl.Ui.Draggable.drag_target.get;
Elm.Widget.theme_apply;

View File

@ -3483,12 +3483,15 @@ _efl_ui_text_efl_gfx_position_set(Eo *obj, Efl_Ui_Text_Data *sd, Evas_Coord x, E
}
EOLIAN static void
_efl_ui_text_efl_canvas_group_group_resize(Eo *obj, Efl_Ui_Text_Data *sd, Evas_Coord w, Evas_Coord h)
_efl_ui_text_efl_gfx_size_set(Eo *obj, Efl_Ui_Text_Data *sd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
evas_object_resize(sd->hit_rect, w, h);
_update_selection_handler(obj);
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
}
EOLIAN static void

View File

@ -418,9 +418,9 @@ class Efl.Ui.Text (Elm.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
Efl.Object.destructor;
Efl.Gfx.visible.set;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_member_add;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_resize;
Efl.Canvas.Group.group_del;
Elm.Widget.activate;
Elm.Widget.focus_direction_manager_is;

View File

@ -2821,11 +2821,13 @@ super_skip:
}
EOLIAN static void
_efl_ui_win_efl_canvas_group_group_resize(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Coord w, Evas_Coord h)
_efl_ui_win_efl_gfx_size_set(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Coord w, Evas_Coord h)
{
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
if (sd->img_obj)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (sd->constrain)
{
int sw, sh;
@ -2841,6 +2843,8 @@ _efl_ui_win_efl_canvas_group_group_resize(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Coo
}
if (!sd->response) TRAP(sd, resize, w, h);
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
}
static void

View File

@ -811,9 +811,9 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window,
Efl.Object.finalize;
Efl.Gfx.visible.set;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_resize;
Elm.Widget.focus_direction;
Elm.Widget.focus_next_manager_is;
Elm.Widget.focus_direction_manager_is;

View File

@ -529,10 +529,12 @@ _elm_combobox_elm_widget_part_text_get(Eo *obj EINA_UNUSED, Elm_Combobox_Data *p
}
EOLIAN static void
_elm_combobox_efl_canvas_group_group_resize(Eo *obj, Elm_Combobox_Data *pd,
Evas_Coord w, Evas_Coord h)
_elm_combobox_efl_gfx_size_set(Eo *obj, Elm_Combobox_Data *pd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
if (pd->count > 0) _table_resize(obj);
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
}
#include "elm_combobox.eo.c"

View File

@ -37,9 +37,9 @@ class Elm.Combobox (Elm.Button, Efl.Ui.Selectable,
class.constructor;
Efl.Object.constructor;
Efl.Gfx.visible.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_resize;
Elm.Widget.part_text.set;
Elm.Widget.part_text.get;
Elm.Widget.theme_apply;

View File

@ -1432,11 +1432,14 @@ _elm_diskselector_efl_gfx_position_set(Eo *obj, Elm_Diskselector_Data *sd, Evas_
}
EOLIAN static void
_elm_diskselector_efl_canvas_group_group_resize(Eo *obj, Elm_Diskselector_Data *sd, Evas_Coord w, Evas_Coord h)
_elm_diskselector_efl_gfx_size_set(Eo *obj, Elm_Diskselector_Data *sd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
evas_object_resize(sd->hit_rect, w, h);
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
}
EOLIAN static void

View File

@ -198,10 +198,10 @@ class Elm.Diskselector (Elm.Widget, Elm.Interface_Scrollable,
class.constructor;
Efl.Object.constructor;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_member_add;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_resize;
Elm.Widget.focus_next_manager_is;
Elm.Widget.access;
Elm.Widget.focus_next;

View File

@ -3929,13 +3929,16 @@ _elm_entry_efl_gfx_position_set(Eo *obj, Elm_Entry_Data *sd, Evas_Coord x, Evas_
}
EOLIAN static void
_elm_entry_efl_canvas_group_group_resize(Eo *obj, Elm_Entry_Data *sd, Evas_Coord w, Evas_Coord h)
_elm_entry_efl_gfx_size_set(Eo *obj, Elm_Entry_Data *sd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
evas_object_resize(sd->hit_rect, w, h);
if (sd->have_selection)
_update_selection_handler(obj);
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
}
EOLIAN static void

View File

@ -941,9 +941,9 @@ class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
Efl.Object.constructor;
Efl.Gfx.visible.set;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_member_add;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_resize;
Efl.Canvas.Group.group_del;
Elm.Widget.activate;
Elm.Widget.focus_direction_manager_is;

View File

@ -490,12 +490,13 @@ _elm_gengrid_pan_efl_gfx_position_set(Eo *obj, Elm_Gengrid_Pan_Data *psd, Evas_C
}
EOLIAN static void
_elm_gengrid_pan_efl_canvas_group_group_resize(Eo *obj, Elm_Gengrid_Pan_Data *psd, Evas_Coord w, Evas_Coord h)
_elm_gengrid_pan_efl_gfx_size_set(Eo *obj, Elm_Gengrid_Pan_Data *psd, Evas_Coord w, Evas_Coord h)
{
Evas_Coord ow, oh;
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
if ((ow == w) && (oh == h)) return;
ecore_job_del(psd->wsd->calc_job);
psd->wsd->calc_job = ecore_job_add(_calc_job, psd->wobj);
}
@ -4347,11 +4348,13 @@ _elm_gengrid_efl_gfx_position_set(Eo *obj, Elm_Gengrid_Data *sd, Evas_Coord x, E
}
EOLIAN static void
_elm_gengrid_efl_canvas_group_group_resize(Eo *obj, Elm_Gengrid_Data *sd, Evas_Coord w, Evas_Coord h)
_elm_gengrid_efl_gfx_size_set(Eo *obj, Elm_Gengrid_Data *sd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
evas_object_resize(sd->hit_rect, w, h);
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
}
EOLIAN static void

View File

@ -541,10 +541,10 @@ class Elm.Gengrid (Elm.Layout, Elm.Interface_Scrollable,
class.constructor;
Efl.Object.constructor;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_member_add;
Efl.Canvas.Group.group_resize;
Elm.Widget.theme_apply;
Elm.Widget.focus_next_manager_is;
Elm.Widget.focus_direction_manager_is;

View File

@ -7,8 +7,8 @@ class Elm.Gengrid.Pan (Elm.Pan)
class.constructor;
Efl.Object.destructor;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_calculate;
Efl.Canvas.Group.group_resize;
Elm.Pan.content_size.get;
Elm.Pan.pos;
Elm.Pan.pos_min.get;

View File

@ -290,14 +290,16 @@ _elm_genlist_pan_smart_resize_job(void *data)
}
EOLIAN static void
_elm_genlist_pan_efl_canvas_group_group_resize(Eo *obj, Elm_Genlist_Pan_Data *psd, Evas_Coord w, Evas_Coord h)
_elm_genlist_pan_efl_gfx_size_set(Eo *obj, Elm_Genlist_Pan_Data *psd, Evas_Coord w, Evas_Coord h)
{
Elm_Genlist_Data *sd = psd->wsd;
Evas_Coord ow, oh;
Elm_Genlist_Data *sd = psd->wsd;
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
if ((ow == w) && (oh == h)) return;
efl_gfx_size_get(obj, &ow, &oh);
if ((ow == w) && (oh == h)) goto super; // should already be intercepted above
if ((sd->mode == ELM_LIST_COMPRESS) && (ow != w))
{
/* fix me later */
@ -315,6 +317,9 @@ _elm_genlist_pan_efl_canvas_group_group_resize(Eo *obj, Elm_Genlist_Pan_Data *ps
sd->calc_job = ecore_job_add(_calc_job, psd->wobj);
else
sd->calc_job = NULL;
super:
efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), w, h);
}
static void
@ -5674,13 +5679,16 @@ _elm_genlist_efl_gfx_position_set(Eo *obj, Elm_Genlist_Data *sd, Evas_Coord x, E
}
EOLIAN static void
_elm_genlist_efl_canvas_group_group_resize(Eo *obj, Elm_Genlist_Data *sd, Evas_Coord w, Evas_Coord h)
_elm_genlist_efl_gfx_size_set(Eo *obj, Elm_Genlist_Data *sd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
evas_object_resize(sd->hit_rect, w, h);
if ((sd->queue) && (!sd->queue_idle_enterer) && (w > 0))
_requeue_idle_enterer(sd);
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
}
EOLIAN static void

View File

@ -529,10 +529,10 @@ class Elm.Genlist (Elm.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
class.constructor;
Efl.Object.constructor;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_member_add;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_resize;
Elm.Widget.theme_apply;
Elm.Widget.focus_next_manager_is;
Elm.Widget.sub_object_add;

View File

@ -7,9 +7,9 @@ class Elm.Genlist.Pan (Elm.Pan)
class.constructor;
Efl.Object.destructor;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_calculate;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_resize;
Elm.Pan.content_size.get;
Elm.Pan.pos;
Elm.Pan.pos_min.get;

View File

@ -86,9 +86,12 @@ _glview_update_surface(Evas_Object *obj)
}
EOLIAN static void
_elm_glview_efl_canvas_group_group_resize(Eo *obj, Elm_Glview_Data *sd, Evas_Coord w, Evas_Coord h)
_elm_glview_efl_gfx_size_set(Eo *obj, Elm_Glview_Data *sd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
sd->resized = EINA_TRUE;
@ -100,8 +103,6 @@ _elm_glview_efl_canvas_group_group_resize(Eo *obj, Elm_Glview_Data *sd, Evas_Coo
h = 64;
}
if ((sd->w == w) && (sd->h == h)) return;
sd->w = w;
sd->h = h;

View File

@ -188,9 +188,9 @@ class Elm.Glview (Elm.Widget, Efl.Gfx.View)
implements {
class.constructor;
Efl.Object.finalize;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_resize;
Elm.Widget.on_focus;
Efl.Gfx.View.view_size.get;
Efl.Gfx.View.view_size.set;

View File

@ -627,9 +627,12 @@ _elm_hover_efl_gfx_position_set(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED, Evas_C
}
EOLIAN static void
_elm_hover_efl_canvas_group_group_resize(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED, Evas_Coord w, Evas_Coord h)
_elm_hover_efl_gfx_size_set(Eo *obj, Elm_Hover_Data *_pd EINA_UNUSED, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
elm_layout_sizing_eval(obj);
}

View File

@ -62,9 +62,9 @@ class Elm.Hover (Elm.Layout, Efl.Ui.Clickable, Elm.Interface.Atspi_Widget_Action
Efl.Object.constructor;
Efl.Gfx.visible.set;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_resize;
Elm.Widget.theme_apply;
Elm.Widget.sub_object_add;
Elm.Widget.widget_parent;

View File

@ -116,8 +116,13 @@ _elm_pan_efl_gfx_position_set(Eo *obj, Elm_Pan_Smart_Data *psd, Evas_Coord x, Ev
}
EOLIAN static void
_elm_pan_efl_canvas_group_group_resize(Eo *obj EINA_UNUSED, Elm_Pan_Smart_Data *psd, Evas_Coord w, Evas_Coord h)
_elm_pan_efl_gfx_size_set(Eo *obj EINA_UNUSED, Elm_Pan_Smart_Data *psd, Evas_Coord w, Evas_Coord h)
{
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), w, h);
psd->w = w;
psd->h = h;

View File

@ -2520,9 +2520,12 @@ _elm_list_efl_gfx_position_set(Eo *obj, Elm_List_Data *sd, Evas_Coord x, Evas_Co
}
EOLIAN static void
_elm_list_efl_canvas_group_group_resize(Eo *obj, Elm_List_Data *sd, Evas_Coord w, Evas_Coord h)
_elm_list_efl_gfx_size_set(Eo *obj, Elm_List_Data *sd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
evas_object_resize(sd->hit_rect, w, h);
}

View File

@ -430,10 +430,10 @@ class Elm.List (Elm.Layout, Elm.Interface_Scrollable,
class.constructor;
Efl.Object.constructor;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_member_add;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_resize;
Elm.Widget.theme_apply;
Elm.Widget.focus_next_manager_is;
Elm.Widget.focus_direction_manager_is;

View File

@ -3864,8 +3864,13 @@ _elm_map_pan_elm_pan_content_size_get(Eo *obj EINA_UNUSED, Elm_Map_Pan_Data *psd
}
EOLIAN static void
_elm_map_pan_efl_canvas_group_group_resize(Eo *obj, Elm_Map_Pan_Data *psd, Evas_Coord w EINA_UNUSED, Evas_Coord h EINA_UNUSED)
_elm_map_pan_efl_gfx_size_set(Eo *obj, Elm_Map_Pan_Data *psd, Evas_Coord w, Evas_Coord h)
{
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), w, h);
_sizing_eval(psd->wsd->obj);
elm_map_zoom_mode_set(psd->wobj, psd->wsd->mode);
evas_object_smart_changed(obj);
@ -4219,9 +4224,12 @@ _elm_map_efl_gfx_position_set(Eo *obj, Elm_Map_Data *sd, Evas_Coord x, Evas_Coor
}
EOLIAN static void
_elm_map_efl_canvas_group_group_resize(Eo *obj, Elm_Map_Data *sd, Evas_Coord w, Evas_Coord h)
_elm_map_efl_gfx_size_set(Eo *obj, Elm_Map_Data *sd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
evas_object_resize(sd->hit_rect, w, h);
}

View File

@ -627,10 +627,10 @@ class Elm.Map (Elm.Widget, Elm.Interface_Scrollable,
class.constructor;
Efl.Object.constructor;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_member_add;
Efl.Canvas.Group.group_resize;
Elm.Widget.theme_apply;
Elm.Widget.on_focus;
Elm.Widget.event;

View File

@ -7,8 +7,8 @@ class Elm.Map.Pan (Elm.Pan)
class.constructor;
Efl.Object.destructor;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_calculate;
Efl.Canvas.Group.group_resize;
Elm.Pan.content_size.get;
Elm.Pan.pos;
Elm.Pan.pos_min.get;

View File

@ -169,9 +169,12 @@ _elm_mapbuf_efl_gfx_position_set(Eo *obj, Elm_Mapbuf_Data *sd, Evas_Coord x, Eva
}
EOLIAN static void
_elm_mapbuf_efl_canvas_group_group_resize(Eo *obj, Elm_Mapbuf_Data *sd, Evas_Coord w, Evas_Coord h)
_elm_mapbuf_efl_gfx_size_set(Eo *obj, Elm_Mapbuf_Data *sd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
if (sd->content) evas_object_resize(sd->content, w, h);
_mapbuf_auto_eval(obj, sd);

View File

@ -131,9 +131,9 @@ class Elm.Mapbuf (Elm.Widget, Efl.Container, Efl.Part)
Efl.Object.constructor;
Efl.Gfx.visible.set;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_resize;
Elm.Widget.theme_apply;
Elm.Widget.sub_object_del;
Efl.Container.content.get;

View File

@ -226,15 +226,18 @@ _block_area_clicked_cb(void *data,
}
EOLIAN static void
_elm_notify_efl_canvas_group_group_resize(Eo *obj, Elm_Notify_Data *sd, Evas_Coord w, Evas_Coord h)
_elm_notify_efl_gfx_size_set(Eo *obj, Elm_Notify_Data *sd, Evas_Coord w, Evas_Coord h)
{
Evas_Coord x, y;
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
if (!sd->parent && sd->content)
{
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
Evas_Coord x, y;
efl_gfx_position_get(obj, &x, &y);
_notify_move_to_orientation(obj, x, y, w, h);
}
}

View File

@ -81,9 +81,9 @@ class Elm.Notify (Elm.Widget, Efl.Container, Efl.Part)
Efl.Object.constructor;
Efl.Gfx.visible.set;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_resize;
Elm.Widget.focus_direction;
Elm.Widget.widget_parent;
Elm.Widget.theme_apply;

View File

@ -45,9 +45,9 @@ class Elm.Pan (Efl.Canvas.Group.Clipped)
class.constructor;
Efl.Gfx.visible.set;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_resize;
}
events {
changed;

View File

@ -1108,9 +1108,12 @@ _elm_panel_efl_gfx_position_set(Eo *obj, Elm_Panel_Data *sd, Evas_Coord x, Evas_
}
EOLIAN static void
_elm_panel_efl_canvas_group_group_resize(Eo *obj, Elm_Panel_Data *sd, Evas_Coord w, Evas_Coord h)
_elm_panel_efl_gfx_size_set(Eo *obj, Elm_Panel_Data *sd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
if (!sd->scrollable) return;

View File

@ -70,10 +70,10 @@ class Elm.Panel (Elm.Layout, Elm.Interface_Scrollable,
class.constructor;
Efl.Object.constructor;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_member_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_resize;
Elm.Widget.theme_apply;
Elm.Widget.focus_next_manager_is;
Elm.Widget.focus_next;

View File

@ -157,12 +157,12 @@ _elm_photocam_pan_efl_gfx_position_set(Eo *obj, Elm_Photocam_Pan_Data *psd, Evas
}
EOLIAN static void
_elm_photocam_pan_efl_canvas_group_group_resize(Eo *obj, Elm_Photocam_Pan_Data *psd, Evas_Coord w, Evas_Coord h)
_elm_photocam_pan_efl_gfx_size_set(Eo *obj, Elm_Photocam_Pan_Data *psd, Evas_Coord w, Evas_Coord h)
{
Evas_Coord ow, oh;
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
if ((ow == w) && (oh == h)) return;
efl_gfx_size_set(efl_super(obj, MY_PAN_CLASS), w, h);
psd->wsd->resized = EINA_TRUE;
ecore_job_del(psd->wsd->calc_job);
@ -1491,9 +1491,12 @@ _elm_photocam_efl_gfx_position_set(Eo *obj, Elm_Photocam_Data *sd, Evas_Coord x,
}
EOLIAN static void
_elm_photocam_efl_canvas_group_group_resize(Eo *obj, Elm_Photocam_Data *sd, Evas_Coord w, Evas_Coord h)
_elm_photocam_efl_gfx_size_set(Eo *obj, Elm_Photocam_Data *sd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
evas_object_resize(sd->hit_rect, w, h);
}

View File

@ -190,10 +190,10 @@ class Elm.Photocam (Elm.Widget, Elm.Interface_Scrollable,
class.constructor;
Efl.Object.constructor;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_member_add;
Efl.Canvas.Group.group_resize;
Elm.Widget.theme_apply;
Elm.Widget.on_focus;
Elm.Widget.event;

View File

@ -7,8 +7,8 @@ class Elm.Photocam.Pan (Elm.Pan)
class.constructor;
Efl.Object.destructor;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_calculate;
Efl.Canvas.Group.group_resize;
Elm.Pan.content_size.get;
Elm.Pan.pos;
Elm.Pan.pos_min.get;

View File

@ -930,9 +930,12 @@ _elm_scroller_efl_gfx_position_set(Eo *obj, Elm_Scroller_Data *sd, Evas_Coord x,
}
EOLIAN static void
_elm_scroller_efl_canvas_group_group_resize(Eo *obj, Elm_Scroller_Data *sd, Evas_Coord w, Evas_Coord h)
_elm_scroller_efl_gfx_size_set(Eo *obj, Elm_Scroller_Data *sd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
evas_object_resize(sd->hit_rect, w, h);
}

View File

@ -61,9 +61,9 @@ class Elm.Scroller (Elm.Layout, Elm.Interface_Scrollable,
class.constructor;
Efl.Object.constructor;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_member_add;
Efl.Canvas.Group.group_resize;
Elm.Widget.theme_apply;
Elm.Widget.activate;
Elm.Widget.focus_next_manager_is;

View File

@ -2946,9 +2946,12 @@ _elm_toolbar_efl_gfx_position_set(Eo *obj, Elm_Toolbar_Data *sd, Evas_Coord x, E
}
EOLIAN static void
_elm_toolbar_efl_canvas_group_group_resize(Eo *obj, Elm_Toolbar_Data *sd, Evas_Coord w, Evas_Coord h)
_elm_toolbar_efl_gfx_size_set(Eo *obj, Elm_Toolbar_Data *sd, Evas_Coord w, Evas_Coord h)
{
efl_canvas_group_resize(efl_super(obj, MY_CLASS), w, h);
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
evas_object_resize(sd->hit_rect, w, h);
}

View File

@ -346,11 +346,11 @@ class Elm.Toolbar (Elm.Widget, Elm.Interface_Scrollable, Efl.Orientation,
class.constructor;
Efl.Object.constructor;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_calculate;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_member_add;
Efl.Canvas.Group.group_resize;
Elm.Widget.focus_next_manager_is;
Elm.Widget.access;
Elm.Widget.focus_next;

View File

@ -506,21 +506,24 @@ _elm_widget_efl_gfx_position_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd,
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
return;
efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
sd->x = x;
sd->y = y;
_smart_reconfigure(sd);
efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
}
EOLIAN static void
_elm_widget_efl_canvas_group_group_resize(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Evas_Coord w, Evas_Coord h)
_elm_widget_efl_gfx_size_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, Evas_Coord w, Evas_Coord h)
{
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
sd->w = w;
sd->h = h;
_smart_reconfigure(sd);
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
}
EOLIAN static void

View File

@ -850,6 +850,7 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, Elm.Inter
Efl.Gfx.color.set;
Efl.Gfx.visible.set;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Object.clip.set;
Efl.Canvas.Object.no_render.set;
Efl.Canvas.Group.group_calculate;
@ -857,7 +858,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, Elm.Inter
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_member_add;
Efl.Canvas.Group.group_resize;
Elm.Interface.Atspi_Accessible.name.get;
Elm.Interface.Atspi_Accessible.state_set.get;
Elm.Interface.Atspi_Accessible.children.get;

View File

@ -54,10 +54,10 @@ class Efl.Canvas.Video (Efl.Canvas.Group, Efl.File, Efl.Player, Efl.Image, Efl.I
Efl.Gfx.color.set;
Efl.Gfx.visible.set;
Efl.Gfx.position.set;
Efl.Gfx.size.set;
Efl.Canvas.Object.clip.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_resize;
Efl.File.file.set;
Efl.File.file.get;
Efl.Player.play.set;

View File

@ -1944,8 +1944,13 @@ _efl_canvas_video_efl_gfx_position_set(Evas_Object *obj, Efl_Canvas_Video_Data *
}
EOLIAN static void
_efl_canvas_video_efl_canvas_group_group_resize(Evas_Object *obj, Efl_Canvas_Video_Data *sd, Evas_Coord w, Evas_Coord h)
_efl_canvas_video_efl_gfx_size_set(Evas_Object *obj, Efl_Canvas_Video_Data *sd, Evas_Coord w, Evas_Coord h)
{
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
_efl_canvas_video_aspect_border_apply(obj, sd, w, h);
evas_object_resize(sd->bg, w, h);
}

View File

@ -92,14 +92,6 @@ class Efl.Canvas.Group (Efl.Canvas.Object)
}
legacy: null;
}
group_resize {
[[No description supplied by the EAPI.]]
legacy: null;
params {
@in w: Evas.Coord;
@in h: Evas.Coord;
}
}
group_member_del {
[[Removes a member object from a given smart object.

View File

@ -657,10 +657,10 @@ class Evas.Box (Efl.Canvas.Group.Clipped)
implements {
class.constructor;
Efl.Object.constructor;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_calculate;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_resize;
}
events {
child,added;

View File

@ -424,11 +424,12 @@ _evas_box_efl_canvas_group_group_del(Eo *o, Evas_Object_Box_Data *priv)
}
EOLIAN static void
_evas_box_efl_canvas_group_group_resize(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, Evas_Coord w, Evas_Coord h)
_evas_box_efl_gfx_size_set(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, Evas_Coord w, Evas_Coord h)
{
Evas_Coord ow, oh;
evas_object_geometry_get(o, NULL, NULL, &ow, &oh);
if ((ow == w) && (oh == h)) return;
if (_evas_object_intercept_call(o, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(o, MY_CLASS), w, h);
evas_object_smart_changed(o);
}

View File

@ -126,10 +126,15 @@ _evas_object_intercept_call(Evas_Object *eo_obj, Evas_Object_Intercept_Cb_Type c
break;
case EVAS_OBJECT_INTERCEPT_CB_RESIZE:
if (!obj->interceptors) return 0;
va_start(args, internal);
i = va_arg(args, int);
j = va_arg(args, int);
if (!internal)
{
if (_efl_canvas_object_efl_gfx_size_set_block(eo_obj, obj, i, j))
goto end_block;
}
if (!obj->interceptors) goto end_noblock;
blocked = evas_object_intercept_call_resize(eo_obj, obj, i, j);
break;

View File

@ -865,6 +865,26 @@ evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
efl_gfx_size_set((Evas_Object *)obj, w, h);
}
Eina_Bool
_efl_canvas_object_efl_gfx_size_set_block(Eo *eo_obj, Evas_Object_Protected_Data *obj,
Evas_Coord w, Evas_Coord h)
{
if (obj->doing.in_resize > 0)
{
WRN("evas_object_resize() called on object %p (%s) when in the middle "
"of resizing the same object", eo_obj, efl_class_name_get(eo_obj));
return EINA_TRUE;
}
if (w < 0) w = 0;
if (h < 0) h = 0;
if ((obj->cur->geometry.w == w) && (obj->cur->geometry.h == h))
return EINA_TRUE;
return EINA_FALSE;
}
EOLIAN static void
_efl_canvas_object_efl_gfx_size_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
Evas_Coord w, Evas_Coord h)
@ -873,21 +893,11 @@ _efl_canvas_object_efl_gfx_size_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE;
Eina_Bool source_invisible = EINA_FALSE;
if (obj->delete_me) return;
if (!obj->layer) return;
if (w < 0) w = 0;
if (h < 0) h = 0;
evas_object_async_block(obj);
if (_evas_object_intercept_call(eo_obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 1, w, h)) return;
if (obj->doing.in_resize > 0)
{
WRN("evas_object_resize() called on object %p when in the middle of resizing the same object", obj);
return;
}
if ((obj->cur->geometry.w == w) && (obj->cur->geometry.h == h)) return;
if (_evas_object_intercept_call(eo_obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 1, w, h))
return;
if (!(obj->layer->evas->is_frozen))
{
@ -901,10 +911,8 @@ _efl_canvas_object_efl_gfx_size_set(Eo *eo_obj, Evas_Object_Protected_Data *obj,
}
obj->doing.in_resize++;
if (obj->is_smart)
{
efl_canvas_group_resize(eo_obj, w, h);
}
if (obj->is_smart && obj->smart.smart && obj->smart.smart->smart_class->resize)
obj->smart.smart->smart_class->resize(eo_obj, w, h);
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{

View File

@ -631,16 +631,6 @@ _efl_canvas_group_group_del(Eo *eo_obj EINA_UNUSED, Evas_Smart_Data *o EINA_UNUS
{
}
EOLIAN static void
_efl_canvas_group_group_resize(Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSED, Evas_Coord w, Evas_Coord h)
{
// If this function is reached, so we do nothing except trying to call
// the function of the legacy smart class.
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
Evas_Smart *s = obj->smart.smart;
if (s && s->smart_class->resize) s->smart_class->resize(eo_obj, w, h);
}
EOLIAN static void
_efl_canvas_group_efl_canvas_object_no_render_set(Eo *eo_obj, Evas_Smart_Data *o EINA_UNUSED, Eina_Bool enable)
{

View File

@ -930,11 +930,12 @@ _evas_table_efl_canvas_group_group_del(Eo *obj, Evas_Table_Data *priv)
}
EOLIAN static void
_evas_table_efl_canvas_group_group_resize(Eo *obj, Evas_Table_Data *_pd EINA_UNUSED, Evas_Coord w, Evas_Coord h)
_evas_table_efl_gfx_size_set(Eo *obj, Evas_Table_Data *_pd EINA_UNUSED, Evas_Coord w, Evas_Coord h)
{
Evas_Coord ow, oh;
evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
if ((ow == w) && (oh == h)) return;
if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, w, h))
return;
efl_gfx_size_set(efl_super(obj, MY_CLASS), w, h);
evas_object_smart_changed(obj);
}

View File

@ -216,9 +216,9 @@ class Evas.Table (Efl.Canvas.Group.Clipped)
implements {
class.constructor;
Efl.Object.constructor;
Efl.Gfx.size.set;
Efl.Canvas.Group.group_add;
Efl.Canvas.Group.group_del;
Efl.Canvas.Group.group_calculate;
Efl.Canvas.Group.group_resize;
}
}

View File

@ -1654,6 +1654,7 @@ void _efl_canvas_object_clip_prev_reset(Evas_Object_Protected_Data *obj, Eina_Bo
Eina_Bool _efl_canvas_object_clip_set_block(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Object *eo_clip, Evas_Object_Protected_Data *clip);
Eina_Bool _efl_canvas_object_clip_unset_block(Eo *eo_obj, Evas_Object_Protected_Data *obj);
Eina_Bool _efl_canvas_object_efl_gfx_size_set_block(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord w, Evas_Coord h);
void _canvas_event_default_flags_set(Eo *e, void *_pd, va_list *list);
void _canvas_event_default_flags_get(Eo *e, void *_pd, va_list *list);