diff options
author | Cedric BAIL <cedric@osg.samsung.com> | 2017-10-19 16:14:48 -0700 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2017-10-19 16:32:54 -0700 |
commit | 33d860f60d9246fc91de702844490dee3d9aa41f (patch) | |
tree | 4cfcfc461287b6dab8668678531a6f36c2c9e699 | |
parent | 8bcd960e7007826263138d626189cc780b4768c8 (diff) |
evas: propagate object data to evas_object_inform_call_changed_size_hints instead of fetching it again.
Diffstat (limited to '')
-rw-r--r-- | src/lib/evas/canvas/evas_object_inform.c | 3 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_main.c | 18 | ||||
-rw-r--r-- | src/lib/evas/include/evas_private.h | 2 |
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 | ||
52 | void | 52 | void |
53 | evas_object_inform_call_changed_size_hints(Evas_Object *eo_obj) | 53 | evas_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 | ||
1623 | EOLIAN static Eina_Size2D | 1623 | EOLIAN 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 | ||
1649 | EOLIAN static Eina_Size2D | 1649 | EOLIAN 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 | ||
1690 | EAPI void | 1690 | EAPI 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 | ||
1725 | EOLIAN static Eina_Size2D | 1725 | EOLIAN 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 | ||
1752 | EOLIAN static void | 1752 | EOLIAN 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 | ||
1790 | EOLIAN static void | 1790 | EOLIAN 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 | ||
1824 | EOLIAN static void | 1824 | EOLIAN 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 | ||
1858 | EOLIAN static void | 1858 | EOLIAN 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 | ||
1895 | EAPI void | 1895 | EAPI 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 * | |||
1745 | void evas_object_inform_call_move(Evas_Object *obj, Evas_Object_Protected_Data *pd); | 1745 | void evas_object_inform_call_move(Evas_Object *obj, Evas_Object_Protected_Data *pd); |
1746 | void evas_object_inform_call_resize(Evas_Object *obj, Evas_Object_Protected_Data *pd); | 1746 | void evas_object_inform_call_resize(Evas_Object *obj, Evas_Object_Protected_Data *pd); |
1747 | void evas_object_inform_call_restack(Evas_Object *obj, Evas_Object_Protected_Data *pd); | 1747 | void evas_object_inform_call_restack(Evas_Object *obj, Evas_Object_Protected_Data *pd); |
1748 | void evas_object_inform_call_changed_size_hints(Evas_Object *obj); | 1748 | void evas_object_inform_call_changed_size_hints(Evas_Object *obj, Evas_Object_Protected_Data *pd); |
1749 | void evas_object_inform_call_image_preloaded(Evas_Object *obj); | 1749 | void evas_object_inform_call_image_preloaded(Evas_Object *obj); |
1750 | void evas_object_inform_call_image_unloaded(Evas_Object *obj); | 1750 | void evas_object_inform_call_image_unloaded(Evas_Object *obj); |
1751 | void evas_object_inform_call_image_resize(Evas_Object *obj); | 1751 | void evas_object_inform_call_image_resize(Evas_Object *obj); |