forked from enlightenment/efl
efl_ui/layout: move 'frozen' struct member to be a bool bitflag
this is already handled by edje, all we really want here is a flag to avoid more eo lookups internally when calling canvas_group_change Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10079
This commit is contained in:
parent
03da60997e
commit
74cfe457c3
|
@ -1834,26 +1834,25 @@ EOLIAN static int
|
|||
_efl_ui_layout_base_efl_layout_calc_calc_freeze(Eo *obj, Efl_Ui_Layout_Data *sd)
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, 0);
|
||||
|
||||
if ((sd->frozen)++ != 0) return sd->frozen;
|
||||
|
||||
edje_object_freeze(wd->resize_obj);
|
||||
|
||||
return 1;
|
||||
sd->frozen = EINA_TRUE;
|
||||
return edje_object_freeze(wd->resize_obj);
|
||||
}
|
||||
|
||||
EOLIAN static int
|
||||
_efl_ui_layout_base_efl_layout_calc_calc_thaw(Eo *obj, Efl_Ui_Layout_Data *sd)
|
||||
{
|
||||
int ret;
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, 0);
|
||||
|
||||
if (--(sd->frozen) != 0) return sd->frozen;
|
||||
ret = edje_object_thaw(wd->resize_obj);
|
||||
|
||||
edje_object_thaw(wd->resize_obj);
|
||||
if (!ret)
|
||||
{
|
||||
sd->frozen = EINA_FALSE;
|
||||
efl_canvas_group_change(obj);
|
||||
}
|
||||
|
||||
efl_canvas_group_change(obj);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
EOLIAN void
|
||||
|
|
|
@ -62,10 +62,9 @@ typedef struct _Efl_Ui_Layout_Data
|
|||
Eina_Bool updating : 1;
|
||||
} connect;
|
||||
|
||||
int frozen; /**< Layout freeze counter */
|
||||
|
||||
unsigned int finger_size_multiplier_x, finger_size_multiplier_y; /**< multipliers for finger_size during group_calc */
|
||||
|
||||
Eina_Bool frozen; /**< Layout freeze state */
|
||||
Eina_Bool can_access : 1; /**< This is true when all text(including textblock) parts can be accessible by accessibility. */
|
||||
Eina_Bool destructed_is : 1; /**< This flag indicates if Efl.Ui.Layout destructor was called. This is needed to avoid unnecessary calculation of subobject deletion during layout object's deletion. */
|
||||
Eina_Bool file_set : 1; /**< This flag indicates if Efl.Ui.Layout source is set from a file*/
|
||||
|
|
Loading…
Reference in New Issue