summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-10-19 16:14:48 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-10-19 16:32:54 -0700
commit33d860f60d9246fc91de702844490dee3d9aa41f (patch)
tree4cfcfc461287b6dab8668678531a6f36c2c9e699 /src/lib/evas
parent8bcd960e7007826263138d626189cc780b4768c8 (diff)
evas: propagate object data to evas_object_inform_call_changed_size_hints instead of fetching it again.
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/canvas/evas_object_inform.c3
-rw-r--r--src/lib/evas/canvas/evas_object_main.c18
-rw-r--r--src/lib/evas/include/evas_private.h2
3 files changed, 11 insertions, 12 deletions
diff --git a/src/lib/evas/canvas/evas_object_inform.c b/src/lib/evas/canvas/evas_object_inform.c
index e458d4f61d..1057cb92e6 100644
--- a/src/lib/evas/canvas/evas_object_inform.c
+++ b/src/lib/evas/canvas/evas_object_inform.c
@@ -50,9 +50,8 @@ evas_object_inform_call_restack(Evas_Object *eo_obj, Evas_Object_Protected_Data
50} 50}
51 51
52void 52void
53evas_object_inform_call_changed_size_hints(Evas_Object *eo_obj) 53evas_object_inform_call_changed_size_hints(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
54{ 54{
55 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
56 int event_id = _evas_object_event_new(); 55 int event_id = _evas_object_event_new();
57 56
58 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL, event_id, EFL_GFX_EVENT_CHANGE_SIZE_HINTS); 57 evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL, event_id, EFL_GFX_EVENT_CHANGE_SIZE_HINTS);
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index acc8de92d9..65b1817b4a 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -1617,7 +1617,7 @@ evas_object_size_hint_display_mode_set(Eo *eo_obj, Evas_Display_Mode dispmode)
1617 if (obj->size_hints->dispmode == dispmode) return; 1617 if (obj->size_hints->dispmode == dispmode) return;
1618 obj->size_hints->dispmode = dispmode; 1618 obj->size_hints->dispmode = dispmode;
1619 1619
1620 evas_object_inform_call_changed_size_hints(eo_obj); 1620 evas_object_inform_call_changed_size_hints(eo_obj, obj);
1621} 1621}
1622 1622
1623EOLIAN static Eina_Size2D 1623EOLIAN static Eina_Size2D
@@ -1643,7 +1643,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_restricted_min_set(Eo *eo_obj, Evas_Ob
1643 if ((obj->size_hints->min.w == sz.w) && (obj->size_hints->min.h == sz.h)) return; 1643 if ((obj->size_hints->min.w == sz.w) && (obj->size_hints->min.h == sz.h)) return;
1644 obj->size_hints->min = sz; 1644 obj->size_hints->min = sz;
1645 1645
1646 evas_object_inform_call_changed_size_hints(eo_obj); 1646 evas_object_inform_call_changed_size_hints(eo_obj, obj);
1647} 1647}
1648 1648
1649EOLIAN static Eina_Size2D 1649EOLIAN static Eina_Size2D
@@ -1684,7 +1684,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_max_set(Eo *eo_obj, Evas_Object_Protec
1684 obj->size_hints->max.w = sz.w; 1684 obj->size_hints->max.w = sz.w;
1685 obj->size_hints->max.h = sz.h; 1685 obj->size_hints->max.h = sz.h;
1686 1686
1687 evas_object_inform_call_changed_size_hints(eo_obj); 1687 evas_object_inform_call_changed_size_hints(eo_obj, obj);
1688} 1688}
1689 1689
1690EAPI void 1690EAPI void
@@ -1719,7 +1719,7 @@ evas_object_size_hint_request_set(Eo *eo_obj, Evas_Coord w, Evas_Coord h)
1719 obj->size_hints->request.w = w; 1719 obj->size_hints->request.w = w;
1720 obj->size_hints->request.h = h; 1720 obj->size_hints->request.h = h;
1721 1721
1722 evas_object_inform_call_changed_size_hints(eo_obj); 1722 evas_object_inform_call_changed_size_hints(eo_obj, obj);
1723} 1723}
1724 1724
1725EOLIAN static Eina_Size2D 1725EOLIAN static Eina_Size2D
@@ -1746,7 +1746,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_min_set(Eo *eo_obj, Evas_Object_Protec
1746 if ((obj->size_hints->user_min.w == sz.w) && (obj->size_hints->user_min.h == sz.h)) return; 1746 if ((obj->size_hints->user_min.w == sz.w) && (obj->size_hints->user_min.h == sz.h)) return;
1747 obj->size_hints->user_min = sz; 1747 obj->size_hints->user_min = sz;
1748 1748
1749 evas_object_inform_call_changed_size_hints(eo_obj); 1749 evas_object_inform_call_changed_size_hints(eo_obj, obj);
1750} 1750}
1751 1751
1752EOLIAN static void 1752EOLIAN static void
@@ -1784,7 +1784,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_aspect_set(Eo *eo_obj, Evas_Object_Pro
1784 obj->size_hints->aspect.mode = aspect; 1784 obj->size_hints->aspect.mode = aspect;
1785 obj->size_hints->aspect.size = sz; 1785 obj->size_hints->aspect.size = sz;
1786 1786
1787 evas_object_inform_call_changed_size_hints(eo_obj); 1787 evas_object_inform_call_changed_size_hints(eo_obj, obj);
1788} 1788}
1789 1789
1790EOLIAN static void 1790EOLIAN static void
@@ -1818,7 +1818,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_align_set(Eo *eo_obj, Evas_Object_Prot
1818 obj->size_hints->align.x = x; 1818 obj->size_hints->align.x = x;
1819 obj->size_hints->align.y = y; 1819 obj->size_hints->align.y = y;
1820 1820
1821 evas_object_inform_call_changed_size_hints(eo_obj); 1821 evas_object_inform_call_changed_size_hints(eo_obj, obj);
1822} 1822}
1823 1823
1824EOLIAN static void 1824EOLIAN static void
@@ -1852,7 +1852,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_weight_set(Eo *eo_obj, Evas_Object_Pro
1852 obj->size_hints->weight.x = x; 1852 obj->size_hints->weight.x = x;
1853 obj->size_hints->weight.y = y; 1853 obj->size_hints->weight.y = y;
1854 1854
1855 evas_object_inform_call_changed_size_hints(eo_obj); 1855 evas_object_inform_call_changed_size_hints(eo_obj, obj);
1856} 1856}
1857 1857
1858EOLIAN static void 1858EOLIAN static void
@@ -1889,7 +1889,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_margin_set(Eo *eo_obj, Evas_Object_Pro
1889 obj->size_hints->padding.t = t; 1889 obj->size_hints->padding.t = t;
1890 obj->size_hints->padding.b = b; 1890 obj->size_hints->padding.b = b;
1891 1891
1892 evas_object_inform_call_changed_size_hints(eo_obj); 1892 evas_object_inform_call_changed_size_hints(eo_obj, obj);
1893} 1893}
1894 1894
1895EAPI void 1895EAPI void
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 07358fcc26..bc7c1f9aba 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1745,7 +1745,7 @@ void evas_object_inform_call_hide(Evas_Object *obj, Evas_Object_Protected_Data *
1745void evas_object_inform_call_move(Evas_Object *obj, Evas_Object_Protected_Data *pd); 1745void evas_object_inform_call_move(Evas_Object *obj, Evas_Object_Protected_Data *pd);
1746void evas_object_inform_call_resize(Evas_Object *obj, Evas_Object_Protected_Data *pd); 1746void evas_object_inform_call_resize(Evas_Object *obj, Evas_Object_Protected_Data *pd);
1747void evas_object_inform_call_restack(Evas_Object *obj, Evas_Object_Protected_Data *pd); 1747void evas_object_inform_call_restack(Evas_Object *obj, Evas_Object_Protected_Data *pd);
1748void evas_object_inform_call_changed_size_hints(Evas_Object *obj); 1748void evas_object_inform_call_changed_size_hints(Evas_Object *obj, Evas_Object_Protected_Data *pd);
1749void evas_object_inform_call_image_preloaded(Evas_Object *obj); 1749void evas_object_inform_call_image_preloaded(Evas_Object *obj);
1750void evas_object_inform_call_image_unloaded(Evas_Object *obj); 1750void evas_object_inform_call_image_unloaded(Evas_Object *obj);
1751void evas_object_inform_call_image_resize(Evas_Object *obj); 1751void evas_object_inform_call_image_resize(Evas_Object *obj);