layout: Implement freeze and thaw from interface
This implements part of the interface Efl.Canvas.Layout_Calc
This commit is contained in:
parent
a4c3929894
commit
7ba0ab5182
|
@ -1703,10 +1703,9 @@ _elm_layout_sizing_restricted_eval(Eo *obj, Elm_Layout_Smart_Data *sd, Eina_Bool
|
|||
}
|
||||
|
||||
EOLIAN static int
|
||||
_elm_layout_freeze(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
|
||||
_elm_layout_efl_canvas_layout_calc_calc_freeze(Eo *obj, Elm_Layout_Smart_Data *sd)
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, 1);
|
||||
ELM_LAYOUT_DATA_GET(obj, sd);
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, 0);
|
||||
|
||||
if ((sd->frozen)++ != 0) return sd->frozen;
|
||||
|
||||
|
@ -1716,10 +1715,9 @@ _elm_layout_freeze(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
|
|||
}
|
||||
|
||||
EOLIAN static int
|
||||
_elm_layout_thaw(Eo *obj, Elm_Layout_Smart_Data *_pd EINA_UNUSED)
|
||||
_elm_layout_efl_canvas_layout_calc_calc_thaw(Eo *obj, Elm_Layout_Smart_Data *sd)
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, 0);
|
||||
ELM_LAYOUT_DATA_GET(obj, sd);
|
||||
|
||||
if (--(sd->frozen) != 0) return sd->frozen;
|
||||
|
||||
|
@ -2390,6 +2388,18 @@ elm_layout_part_cursor_unset(Elm_Layout *obj, const char *part)
|
|||
return efl_ui_cursor_set(efl_part(obj, part), NULL);
|
||||
}
|
||||
|
||||
EAPI int
|
||||
elm_layout_freeze(Evas_Object *obj)
|
||||
{
|
||||
return efl_canvas_layout_calc_freeze(obj);
|
||||
}
|
||||
|
||||
EAPI int
|
||||
elm_layout_thaw(Evas_Object *obj)
|
||||
{
|
||||
return efl_canvas_layout_calc_thaw(obj);
|
||||
}
|
||||
|
||||
/* End of legacy only */
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@ struct Elm.Layout_Part_Alias_Description
|
|||
}
|
||||
|
||||
class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File,
|
||||
Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Ui.Model.Factory.Connect)
|
||||
Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Ui.Model.Factory.Connect,
|
||||
Efl.Canvas.Layout_Calc)
|
||||
{
|
||||
[[Elementary layout class]]
|
||||
legacy_prefix: elm_layout;
|
||||
|
@ -61,16 +62,6 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File,
|
|||
settings loaded \@ref elm_layout_file_set.]]
|
||||
}
|
||||
}
|
||||
freeze {
|
||||
[[Freezes the Elementary layout object.
|
||||
|
||||
This function puts all changes on hold. Successive freezes will
|
||||
nest, requiring an equal number of thaws.
|
||||
|
||||
See also @.thaw.
|
||||
]]
|
||||
return: int; [[The frozen state or 0 on error.]]
|
||||
}
|
||||
theme_enable {
|
||||
[[Enable theme]]
|
||||
legacy: null;
|
||||
|
@ -178,19 +169,6 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File,
|
|||
when the signal was emitted.]]
|
||||
}
|
||||
}
|
||||
thaw {
|
||||
[[Thaws the Elementary object.
|
||||
|
||||
This function thaws the given Edje object and the Elementary
|
||||
sizing calc.
|
||||
|
||||
Note: If sucessives freezes were done, an equal number of
|
||||
thaws will be required.
|
||||
|
||||
See also @.freeze.
|
||||
]]
|
||||
return: int; [[The frozen state or 0 if the object is not frozen or on error.]]
|
||||
}
|
||||
signal_emit {
|
||||
[[Send a (Edje) signal to a given layout widget's underlying Edje
|
||||
object.
|
||||
|
@ -212,6 +190,8 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File,
|
|||
Efl.File.file { get; set; }
|
||||
Efl.File.mmap { get; set; }
|
||||
Efl.Canvas.Group.group_calculate;
|
||||
Efl.Canvas.Layout_Calc.calc_freeze;
|
||||
Efl.Canvas.Layout_Calc.calc_thaw;
|
||||
Elm.Widget.focus_direction;
|
||||
Elm.Widget.sub_object_add;
|
||||
Elm.Widget.theme_apply;
|
||||
|
|
|
@ -127,6 +127,32 @@ EAPI Eina_Bool elm_layout_mmap_set(Eo *obj, const Eina_File *file, const char *g
|
|||
*/
|
||||
EAPI void elm_layout_mmap_get(Eo *obj, const Eina_File **file, const char **group);
|
||||
|
||||
/**
|
||||
* @brief Freezes the Elementary layout object.
|
||||
*
|
||||
* This function puts all changes on hold. Successive freezes will nest,
|
||||
* requiring an equal number of thaws.
|
||||
*
|
||||
* See also @ref elm_layout_thaw.
|
||||
*
|
||||
* @return The frozen state or 0 on error.
|
||||
*/
|
||||
EAPI int elm_layout_freeze(Evas_Object *obj);
|
||||
|
||||
/**
|
||||
* @brief Thaws the Elementary object.
|
||||
*
|
||||
* This function thaws the given Edje object and the Elementary sizing calc.
|
||||
*
|
||||
* @note If sucessives freezes were done, an equal number of thaws will be
|
||||
* required.
|
||||
*
|
||||
* See also @ref elm_layout_freeze.
|
||||
*
|
||||
* @return The frozen state or 0 if the object is not frozen or on error.
|
||||
*/
|
||||
EAPI int elm_layout_thaw(Evas_Object *obj);
|
||||
|
||||
/**
|
||||
* @brief Append child to layout box part.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue