summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-10-14 09:30:10 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-10-14 09:30:10 -0400
commit7ad8acc290f078aa9d2bfd32ec15a4e5677ab01f (patch)
tree973d8c0d536d6ace7fd7f190b5bf717464a4a8c1 /src/lib/elementary
parent8c6b26af015ac12da60c7fc52b68a2e0401b4ea3 (diff)
efl_ui/layout: selectively inhibit theme,changed event
Summary: this is called a ton. ref T8321 Depends on D10359 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8321 Differential Revision: https://phab.enlightenment.org/D10360
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_layout.c30
-rw-r--r--src/lib/elementary/elm_widget_layout.h1
2 files changed, 30 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 5719d23..25a09a1 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -537,7 +537,10 @@ _efl_ui_layout_theme_internal(Eo *obj, Efl_Ui_Layout_Data *sd, Elm_Widget_Smart_
537 } 537 }
538 538
539 if (ret != EFL_UI_THEME_APPLY_ERROR_GENERIC) 539 if (ret != EFL_UI_THEME_APPLY_ERROR_GENERIC)
540 efl_event_callback_legacy_call(obj, EFL_UI_LAYOUT_EVENT_THEME_CHANGED, NULL); 540 {
541 if (sd->cb_theme_changed)
542 efl_event_callback_legacy_call(obj, EFL_UI_LAYOUT_EVENT_THEME_CHANGED, NULL);
543 }
541 544
542 if (!_visuals_refresh(obj, sd)) 545 if (!_visuals_refresh(obj, sd))
543 ret = EFL_UI_THEME_APPLY_ERROR_GENERIC; 546 ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
@@ -2955,6 +2958,29 @@ _efl_ui_layout_base_theme_rotation_apply(Eo *obj, Efl_Ui_Layout_Data *pd EINA_UN
2955 2958
2956 2959
2957/* Internal EO APIs and hidden overrides */ 2960/* Internal EO APIs and hidden overrides */
2961EOLIAN static Eina_Bool
2962_efl_ui_layout_base_efl_object_event_callback_priority_add(Eo *obj, Efl_Ui_Layout_Data *pd, const Efl_Event_Description *desc, Efl_Callback_Priority priority, Efl_Event_Cb func, const void *user_data)
2963{
2964 if (desc == EFL_CANVAS_GROUP_EVENT_MEMBER_ADDED)
2965 {
2966 pd->cb_theme_changed = EINA_TRUE;
2967 }
2968
2969 return efl_event_callback_priority_add(efl_super(obj, MY_CLASS), desc, priority, func, user_data);
2970}
2971
2972EOLIAN static Eina_Bool
2973_efl_ui_layout_base_efl_object_event_callback_array_priority_add(Eo *obj, Efl_Ui_Layout_Data *pd, const Efl_Callback_Array_Item *array, Efl_Callback_Priority priority, const void *user_data)
2974{
2975 for (int i = 0; array[i].desc; ++i)
2976 {
2977 if (array[i].desc == EFL_CANVAS_GROUP_EVENT_MEMBER_ADDED)
2978 {
2979 pd->cb_theme_changed = EINA_TRUE;
2980 }
2981 }
2982 return efl_event_callback_array_priority_add(efl_super(obj, MY_CLASS), array, priority, user_data);
2983}
2958 2984
2959EFL_FUNC_BODY_CONST(efl_ui_layout_text_aliases_get, const Elm_Layout_Part_Alias_Description *, NULL) 2985EFL_FUNC_BODY_CONST(efl_ui_layout_text_aliases_get, const Elm_Layout_Part_Alias_Description *, NULL)
2960EFL_FUNC_BODY_CONST(efl_ui_layout_content_aliases_get, const Elm_Layout_Part_Alias_Description *, NULL) 2986EFL_FUNC_BODY_CONST(efl_ui_layout_content_aliases_get, const Elm_Layout_Part_Alias_Description *, NULL)
@@ -2968,6 +2994,8 @@ EFL_UI_LAYOUT_TEXT_ALIASES_IMPLEMENT(MY_CLASS_PFX)
2968 ELM_PART_TEXT_DEFAULT_OPS(efl_ui_layout_base), \ 2994 ELM_PART_TEXT_DEFAULT_OPS(efl_ui_layout_base), \
2969 EFL_UI_LAYOUT_CONTENT_ALIASES_OPS(MY_CLASS_PFX), \ 2995 EFL_UI_LAYOUT_CONTENT_ALIASES_OPS(MY_CLASS_PFX), \
2970 EFL_UI_LAYOUT_TEXT_ALIASES_OPS(MY_CLASS_PFX), \ 2996 EFL_UI_LAYOUT_TEXT_ALIASES_OPS(MY_CLASS_PFX), \
2997 EFL_OBJECT_OP_FUNC(efl_event_callback_priority_add, _efl_ui_layout_base_efl_object_event_callback_priority_add), \
2998 EFL_OBJECT_OP_FUNC(efl_event_callback_array_priority_add, _efl_ui_layout_base_efl_object_event_callback_array_priority_add), \
2971 EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _efl_ui_layout_base_efl_object_dbg_info_get) 2999 EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _efl_ui_layout_base_efl_object_dbg_info_get)
2972 3000
2973 3001
diff --git a/src/lib/elementary/elm_widget_layout.h b/src/lib/elementary/elm_widget_layout.h
index 299fdc1..19e3b44 100644
--- a/src/lib/elementary/elm_widget_layout.h
+++ b/src/lib/elementary/elm_widget_layout.h
@@ -74,6 +74,7 @@ typedef struct _Efl_Ui_Layout_Data
74 Eina_Bool model_bound : 1; /**< Set to true once we are watching over a model*/ 74 Eina_Bool model_bound : 1; /**< Set to true once we are watching over a model*/
75 Eina_Bool model_watch : 1; /**< Set to true once we do watch for model change*/ 75 Eina_Bool model_watch : 1; /**< Set to true once we do watch for model change*/
76 Eina_Bool calc_subobjs : 1; /**< Set to true if group_calc should also handle subobjs during manual calc */ 76 Eina_Bool calc_subobjs : 1; /**< Set to true if group_calc should also handle subobjs during manual calc */
77 Eina_Bool cb_theme_changed : 1; /**< if theme,changed event subscriber has been added */
77} Efl_Ui_Layout_Data; 78} Efl_Ui_Layout_Data;
78 79
79typedef struct _Elm_Layout_Data 80typedef struct _Elm_Layout_Data