From 8a9f0bd603aaaf3abd3ca9aa87675c9199fe9d09 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 11 Oct 2016 16:54:31 +0900 Subject: [PATCH] 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. >_< --- src/lib/edje/edje_object.eo | 2 +- src/lib/edje/edje_smart.c | 12 ++++++-- src/lib/elementary/efl_ui_image.c | 10 +++++-- src/lib/elementary/efl_ui_image.eo | 2 +- src/lib/elementary/efl_ui_text.c | 7 +++-- src/lib/elementary/efl_ui_text.eo | 2 +- src/lib/elementary/efl_ui_win.c | 8 ++++-- src/lib/elementary/efl_ui_win.eo | 2 +- src/lib/elementary/elc_combobox.c | 8 ++++-- src/lib/elementary/elm_combobox.eo | 2 +- src/lib/elementary/elm_diskselector.c | 7 +++-- src/lib/elementary/elm_diskselector.eo | 2 +- src/lib/elementary/elm_entry.c | 7 +++-- src/lib/elementary/elm_entry.eo | 2 +- src/lib/elementary/elm_gengrid.c | 15 ++++++---- src/lib/elementary/elm_gengrid.eo | 2 +- src/lib/elementary/elm_gengrid_pan.eo | 2 +- src/lib/elementary/elm_genlist.c | 20 ++++++++++---- src/lib/elementary/elm_genlist.eo | 2 +- src/lib/elementary/elm_genlist_pan.eo | 2 +- src/lib/elementary/elm_glview.c | 9 +++--- src/lib/elementary/elm_glview.eo | 2 +- src/lib/elementary/elm_hover.c | 7 +++-- src/lib/elementary/elm_hover.eo | 2 +- src/lib/elementary/elm_interface_scrollable.c | 7 ++++- src/lib/elementary/elm_list.c | 7 +++-- src/lib/elementary/elm_list.eo | 2 +- src/lib/elementary/elm_map.c | 14 ++++++++-- src/lib/elementary/elm_map.eo | 2 +- src/lib/elementary/elm_map_pan.eo | 2 +- src/lib/elementary/elm_mapbuf.c | 7 +++-- src/lib/elementary/elm_mapbuf.eo | 2 +- src/lib/elementary/elm_notify.c | 11 +++++--- src/lib/elementary/elm_notify.eo | 2 +- src/lib/elementary/elm_pan.eo | 2 +- src/lib/elementary/elm_panel.c | 7 +++-- src/lib/elementary/elm_panel.eo | 2 +- src/lib/elementary/elm_photocam.c | 15 ++++++---- src/lib/elementary/elm_photocam.eo | 2 +- src/lib/elementary/elm_photocam_pan.eo | 2 +- src/lib/elementary/elm_scroller.c | 7 +++-- src/lib/elementary/elm_scroller.eo | 2 +- src/lib/elementary/elm_toolbar.c | 7 +++-- src/lib/elementary/elm_toolbar.eo | 2 +- src/lib/elementary/elm_widget.c | 13 +++++---- src/lib/elementary/elm_widget.eo | 2 +- src/lib/emotion/efl_canvas_video.eo | 2 +- src/lib/emotion/emotion_smart.c | 7 ++++- src/lib/evas/canvas/efl_canvas_group.eo | 8 ------ src/lib/evas/canvas/evas_box.eo | 2 +- src/lib/evas/canvas/evas_object_box.c | 9 +++--- src/lib/evas/canvas/evas_object_intercept.c | 7 ++++- src/lib/evas/canvas/evas_object_main.c | 40 ++++++++++++++++----------- src/lib/evas/canvas/evas_object_smart.c | 10 ------- src/lib/evas/canvas/evas_object_table.c | 9 +++--- src/lib/evas/canvas/evas_table.eo | 2 +- src/lib/evas/include/evas_private.h | 1 + 57 files changed, 216 insertions(+), 136 deletions(-) diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo index b6ec2c6..0ad4b2d 100644 --- a/src/lib/edje/edje_object.eo +++ b/src/lib/edje/edje_object.eo @@ -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; diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c index d0800a2..0a69d5e 100644 --- a/src/lib/edje/edje_smart.c +++ b/src/lib/edje/edje_smart.c @@ -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 diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index 80b2b33..2e75cbe 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -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 diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo index c69cb3f..8bdf134 100644 --- a/src/lib/elementary/efl_ui_image.eo +++ b/src/lib/elementary/efl_ui_image.eo @@ -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; diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c index 5d6ecb3..52ebe11 100644 --- a/src/lib/elementary/efl_ui_text.c +++ b/src/lib/elementary/efl_ui_text.c @@ -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 diff --git a/src/lib/elementary/efl_ui_text.eo b/src/lib/elementary/efl_ui_text.eo index d506a45..8fe5833 100644 --- a/src/lib/elementary/efl_ui_text.eo +++ b/src/lib/elementary/efl_ui_text.eo @@ -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; diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 5dca56f..5678230 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -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 diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index b8c9ab4..0b52550 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -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; diff --git a/src/lib/elementary/elc_combobox.c b/src/lib/elementary/elc_combobox.c index 2af16e2..6026ce9 100644 --- a/src/lib/elementary/elc_combobox.c +++ b/src/lib/elementary/elc_combobox.c @@ -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" diff --git a/src/lib/elementary/elm_combobox.eo b/src/lib/elementary/elm_combobox.eo index 66f60a6..9302421 100644 --- a/src/lib/elementary/elm_combobox.eo +++ b/src/lib/elementary/elm_combobox.eo @@ -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; diff --git a/src/lib/elementary/elm_diskselector.c b/src/lib/elementary/elm_diskselector.c index 8d4da07..8d8f29c 100644 --- a/src/lib/elementary/elm_diskselector.c +++ b/src/lib/elementary/elm_diskselector.c @@ -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 diff --git a/src/lib/elementary/elm_diskselector.eo b/src/lib/elementary/elm_diskselector.eo index 0b20ec6..54cf422 100644 --- a/src/lib/elementary/elm_diskselector.eo +++ b/src/lib/elementary/elm_diskselector.eo @@ -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; diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index 85c039d..2f5e353 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -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 diff --git a/src/lib/elementary/elm_entry.eo b/src/lib/elementary/elm_entry.eo index 2bd3b1f..3a0aaa2 100644 --- a/src/lib/elementary/elm_entry.eo +++ b/src/lib/elementary/elm_entry.eo @@ -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; diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 27e06ce..90fc7fa 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -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 diff --git a/src/lib/elementary/elm_gengrid.eo b/src/lib/elementary/elm_gengrid.eo index 63baf6f..fc7231e 100644 --- a/src/lib/elementary/elm_gengrid.eo +++ b/src/lib/elementary/elm_gengrid.eo @@ -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; diff --git a/src/lib/elementary/elm_gengrid_pan.eo b/src/lib/elementary/elm_gengrid_pan.eo index 94ca804..72a5ade 100644 --- a/src/lib/elementary/elm_gengrid_pan.eo +++ b/src/lib/elementary/elm_gengrid_pan.eo @@ -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; diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index f75b263..b0e8da8 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -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 diff --git a/src/lib/elementary/elm_genlist.eo b/src/lib/elementary/elm_genlist.eo index cbdb180..97c7dd9 100644 --- a/src/lib/elementary/elm_genlist.eo +++ b/src/lib/elementary/elm_genlist.eo @@ -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; diff --git a/src/lib/elementary/elm_genlist_pan.eo b/src/lib/elementary/elm_genlist_pan.eo index f773328..bc9a9b4 100644 --- a/src/lib/elementary/elm_genlist_pan.eo +++ b/src/lib/elementary/elm_genlist_pan.eo @@ -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; diff --git a/src/lib/elementary/elm_glview.c b/src/lib/elementary/elm_glview.c index ff98a27..966295e 100644 --- a/src/lib/elementary/elm_glview.c +++ b/src/lib/elementary/elm_glview.c @@ -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; diff --git a/src/lib/elementary/elm_glview.eo b/src/lib/elementary/elm_glview.eo index 54d8143..d50a8ae 100644 --- a/src/lib/elementary/elm_glview.eo +++ b/src/lib/elementary/elm_glview.eo @@ -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; diff --git a/src/lib/elementary/elm_hover.c b/src/lib/elementary/elm_hover.c index 0c8fa72..eacfb14 100644 --- a/src/lib/elementary/elm_hover.c +++ b/src/lib/elementary/elm_hover.c @@ -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); } diff --git a/src/lib/elementary/elm_hover.eo b/src/lib/elementary/elm_hover.eo index 47caaab..a01ea22 100644 --- a/src/lib/elementary/elm_hover.eo +++ b/src/lib/elementary/elm_hover.eo @@ -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; diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c index f6b1623..8d22b54 100644 --- a/src/lib/elementary/elm_interface_scrollable.c +++ b/src/lib/elementary/elm_interface_scrollable.c @@ -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; diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c index dc8e9b7..8f2ca84 100644 --- a/src/lib/elementary/elm_list.c +++ b/src/lib/elementary/elm_list.c @@ -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); } diff --git a/src/lib/elementary/elm_list.eo b/src/lib/elementary/elm_list.eo index 273ca41..3c55a83 100644 --- a/src/lib/elementary/elm_list.eo +++ b/src/lib/elementary/elm_list.eo @@ -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; diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c index e600a21..1d57f5f 100644 --- a/src/lib/elementary/elm_map.c +++ b/src/lib/elementary/elm_map.c @@ -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); } diff --git a/src/lib/elementary/elm_map.eo b/src/lib/elementary/elm_map.eo index 9267b35..d47e046 100644 --- a/src/lib/elementary/elm_map.eo +++ b/src/lib/elementary/elm_map.eo @@ -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; diff --git a/src/lib/elementary/elm_map_pan.eo b/src/lib/elementary/elm_map_pan.eo index a073aaf..cbae0a0 100644 --- a/src/lib/elementary/elm_map_pan.eo +++ b/src/lib/elementary/elm_map_pan.eo @@ -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; diff --git a/src/lib/elementary/elm_mapbuf.c b/src/lib/elementary/elm_mapbuf.c index 2034e20..371c634 100644 --- a/src/lib/elementary/elm_mapbuf.c +++ b/src/lib/elementary/elm_mapbuf.c @@ -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); diff --git a/src/lib/elementary/elm_mapbuf.eo b/src/lib/elementary/elm_mapbuf.eo index 2444510..62a4740 100644 --- a/src/lib/elementary/elm_mapbuf.eo +++ b/src/lib/elementary/elm_mapbuf.eo @@ -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; diff --git a/src/lib/elementary/elm_notify.c b/src/lib/elementary/elm_notify.c index 80ad35e..26aec38 100644 --- a/src/lib/elementary/elm_notify.c +++ b/src/lib/elementary/elm_notify.c @@ -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); } } diff --git a/src/lib/elementary/elm_notify.eo b/src/lib/elementary/elm_notify.eo index 9314884..2deaa59 100644 --- a/src/lib/elementary/elm_notify.eo +++ b/src/lib/elementary/elm_notify.eo @@ -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; diff --git a/src/lib/elementary/elm_pan.eo b/src/lib/elementary/elm_pan.eo index d89fedf..8628914 100644 --- a/src/lib/elementary/elm_pan.eo +++ b/src/lib/elementary/elm_pan.eo @@ -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; diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c index 8eb079c..a8979ae 100644 --- a/src/lib/elementary/elm_panel.c +++ b/src/lib/elementary/elm_panel.c @@ -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; diff --git a/src/lib/elementary/elm_panel.eo b/src/lib/elementary/elm_panel.eo index 41fab5d..3ec2285 100644 --- a/src/lib/elementary/elm_panel.eo +++ b/src/lib/elementary/elm_panel.eo @@ -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; diff --git a/src/lib/elementary/elm_photocam.c b/src/lib/elementary/elm_photocam.c index e5e9871..840f083 100644 --- a/src/lib/elementary/elm_photocam.c +++ b/src/lib/elementary/elm_photocam.c @@ -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); } diff --git a/src/lib/elementary/elm_photocam.eo b/src/lib/elementary/elm_photocam.eo index c04bc2a..ebf0e13 100644 --- a/src/lib/elementary/elm_photocam.eo +++ b/src/lib/elementary/elm_photocam.eo @@ -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; diff --git a/src/lib/elementary/elm_photocam_pan.eo b/src/lib/elementary/elm_photocam_pan.eo index c3fcda1..57d1d45 100644 --- a/src/lib/elementary/elm_photocam_pan.eo +++ b/src/lib/elementary/elm_photocam_pan.eo @@ -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; diff --git a/src/lib/elementary/elm_scroller.c b/src/lib/elementary/elm_scroller.c index 371d893..6e64b28 100644 --- a/src/lib/elementary/elm_scroller.c +++ b/src/lib/elementary/elm_scroller.c @@ -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); } diff --git a/src/lib/elementary/elm_scroller.eo b/src/lib/elementary/elm_scroller.eo index b8d2ee7..8b9fe46 100644 --- a/src/lib/elementary/elm_scroller.eo +++ b/src/lib/elementary/elm_scroller.eo @@ -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; diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index 0b96c5c..cbeaddc 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -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); } diff --git a/src/lib/elementary/elm_toolbar.eo b/src/lib/elementary/elm_toolbar.eo index 1c961fc..783899b 100644 --- a/src/lib/elementary/elm_toolbar.eo +++ b/src/lib/elementary/elm_toolbar.eo @@ -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; diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 292fc3e..172d014 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -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 diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo index bab0e4f..fc296d4 100644 --- a/src/lib/elementary/elm_widget.eo +++ b/src/lib/elementary/elm_widget.eo @@ -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; diff --git a/src/lib/emotion/efl_canvas_video.eo b/src/lib/emotion/efl_canvas_video.eo index fb9b96d..9715347 100644 --- a/src/lib/emotion/efl_canvas_video.eo +++ b/src/lib/emotion/efl_canvas_video.eo @@ -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; diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c index 2664739..9b0338d 100644 --- a/src/lib/emotion/emotion_smart.c +++ b/src/lib/emotion/emotion_smart.c @@ -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); } diff --git a/src/lib/evas/canvas/efl_canvas_group.eo b/src/lib/evas/canvas/efl_canvas_group.eo index 1649fa1..a55d83f 100644 --- a/src/lib/evas/canvas/efl_canvas_group.eo +++ b/src/lib/evas/canvas/efl_canvas_group.eo @@ -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. diff --git a/src/lib/evas/canvas/evas_box.eo b/src/lib/evas/canvas/evas_box.eo index 26b04c3..66fdb40 100644 --- a/src/lib/evas/canvas/evas_box.eo +++ b/src/lib/evas/canvas/evas_box.eo @@ -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; diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c index 051c5e5..f2b2f9b 100644 --- a/src/lib/evas/canvas/evas_object_box.c +++ b/src/lib/evas/canvas/evas_object_box.c @@ -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); } diff --git a/src/lib/evas/canvas/evas_object_intercept.c b/src/lib/evas/canvas/evas_object_intercept.c index f653f02..13b9a96 100644 --- a/src/lib/evas/canvas/evas_object_intercept.c +++ b/src/lib/evas/canvas/evas_object_intercept.c @@ -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; diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index 4a3c2d2..20b7798 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -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) { diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 359de50..af9472d 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -632,16 +632,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) { Evas_Object_Protected_Data *obj2; diff --git a/src/lib/evas/canvas/evas_object_table.c b/src/lib/evas/canvas/evas_object_table.c index d294ba5..e8b1351 100644 --- a/src/lib/evas/canvas/evas_object_table.c +++ b/src/lib/evas/canvas/evas_object_table.c @@ -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); } diff --git a/src/lib/evas/canvas/evas_table.eo b/src/lib/evas/canvas/evas_table.eo index 6fd473f..7932ec7 100644 --- a/src/lib/evas/canvas/evas_table.eo +++ b/src/lib/evas/canvas/evas_table.eo @@ -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; } } diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 91602d9..775b05a 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -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); -- 2.7.4