From 6df17b2ed00bb8cfc3ec414d452253d39d22b075 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 1 Aug 2017 18:15:34 +0900 Subject: [PATCH] edje: Split off calc APIs to an interface (EO) Those APIs can then be used by Elm.Layout, hopefully simplifying the API. I wonder if the APIs should be prefixed "calc_" (as is) or "layout_calc_". The extra "layout_" prefix would make it common with other layout APIs (eg. signals, data, size min/max, ...). Ref T5315 --- src/Makefile_Edje.am | 1 + src/lib/edje/Edje_Eo.h | 1 + src/lib/edje/Edje_Legacy.h | 149 +++++++++++++++++++++++++++++++++ src/lib/edje/edje_legacy.c | 50 +++++++++++ src/lib/edje/edje_object.eo | 136 ++---------------------------- src/lib/edje/edje_private.h | 1 + src/lib/edje/edje_smart.c | 1 + src/lib/edje/edje_util.c | 16 ++-- src/lib/edje/efl_canvas_layout_calc.eo | 131 +++++++++++++++++++++++++++++ src/lib/elementary/efl_ui_image.c | 5 +- src/lib/elementary/efl_ui_image.eo | 6 +- 11 files changed, 356 insertions(+), 141 deletions(-) create mode 100644 src/lib/edje/efl_canvas_layout_calc.eo diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am index 4ca20e5..bf1a7f9 100644 --- a/src/Makefile_Edje.am +++ b/src/Makefile_Edje.am @@ -2,6 +2,7 @@ ### Library edje_eolian_files = \ + lib/edje/efl_canvas_layout_calc.eo \ lib/edje/edje_object.eo \ lib/edje/efl_canvas_layout_internal.eo \ lib/edje/efl_canvas_layout_internal_box.eo \ diff --git a/src/lib/edje/Edje_Eo.h b/src/lib/edje/Edje_Eo.h index 23d8366..44dd896 100644 --- a/src/lib/edje/Edje_Eo.h +++ b/src/lib/edje/Edje_Eo.h @@ -1,5 +1,6 @@ #include +#include "efl_canvas_layout_calc.eo.h" #include "edje_object.eo.h" #include "edje_edit.eo.h" diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h index c37c906..2adee59 100644 --- a/src/lib/edje/Edje_Legacy.h +++ b/src/lib/edje/Edje_Legacy.h @@ -214,6 +214,155 @@ EAPI const char *edje_object_part_state_get(const Edje_Object *obj, const char * EAPI const Efl_Canvas_Object *edje_object_part_object_get(const Edje_Object *obj, const char * part); /** + * @brief Whether this object updates its size hints automatically. + * + * By default edje doesn't set size hints on itself. If this property is set to + * @c true, size hints will be updated after recalculation. Be careful, as + * recalculation may happen often, enabling this property may have a + * considerable performance impact as other widgets will be notified of the + * size hints changes. + * + * A layout recalculation can be triggered by @ref edje_object_size_min_calc(), + * @ref edje_object_size_min_restricted_calc(), + * @ref edje_object_parts_extends_calc() or even any other internal event. + * + * Enable or disable auto-update of size hints. + * + * @param[in] update Whether or not update the size hints. + * + * @ingroup Edje_Object + */ +EAPI void edje_object_update_hints_set(Edje_Object *obj, Eina_Bool update); + +/** + * @brief Whether this object updates its size hints automatically. + * + * By default edje doesn't set size hints on itself. If this property is set to + * @c true, size hints will be updated after recalculation. Be careful, as + * recalculation may happen often, enabling this property may have a + * considerable performance impact as other widgets will be notified of the + * size hints changes. + * + * A layout recalculation can be triggered by @ref edje_object_size_min_calc(), + * @ref edje_object_size_min_restricted_calc(), + * @ref edje_object_parts_extends_calc() or even any other internal event. + * + * Whether this object updates its size hints automatically. + * + * @return Whether or not update the size hints. + * + * @ingroup Edje_Object + */ +EAPI Eina_Bool edje_object_update_hints_get(const Edje_Object *obj); + +/** + * @brief Calculates the minimum required size for a given Edje object. + * + * This call works exactly as edje_object_size_min_restricted_calc(), with the + * last two arguments set to 0. Please refer to its documentation, then. + * + * @param[out] minw The minimum required width (return value) + * @param[out] minh The minimum required height (return value) + * + * @ingroup Edje_Object + */ +EAPI void edje_object_size_min_calc(Edje_Object *obj, int *minw, int *minh); + +/** + * @brief Calculates the minimum required size for a given Edje object. + * + * This call will trigger an internal recalculation of all parts of the object, + * in order to return its minimum required dimensions for width and height. The + * user might choose to impose those minimum sizes, making the resulting + * calculation to get to values equal or larger than @c restrictedw and + * @c restrictedh, for width and height, respectively. + * + * @note At the end of this call, the object won't be automatically resized to + * the new dimensions, but just return the calculated sizes. The caller is the + * one up to change its geometry or not. + * + * @warning Be advised that invisible parts in the object will be taken into + * account in this calculation. + * + * @param[out] minw The minimum required width (return value) + * @param[out] minh The minimum required height (return value) + * @param[in] restrictedw The minimum width constraint as input, @c minw can + * not be lower than this + * @param[in] restrictedh The minimum height constraint as input, @c minh can + * not be lower than this + * + * @ingroup Edje_Object + */ +EAPI void edje_object_size_min_restricted_calc(Edje_Object *obj, int *minw, int *minh, int restrictedw, int restrictedh); + +/** + * @brief Calculates the geometry of the region, relative to a given Edje + * object's area, occupied by all parts in the object. + * + * This function gets the geometry of the rectangle equal to the area required + * to group all parts in obj's group/collection. The x and y coordinates are + * relative to the top left corner of the whole obj object's area. Parts placed + * out of the group's boundaries will also be taken in account, so that x and y + * may be negative. + * + * @note On failure, this function will make all non-$null geometry pointers' + * pointed variables be set to zero. + * + * @param[out] x The parts region's X coordinate + * @param[out] y The parts region's Y coordinate + * @param[out] w The parts region's width + * @param[out] h The parts region's height + * + * @return @c true on success, @c false otherwise + * + * @ingroup Edje_Object + */ +EAPI Eina_Bool edje_object_parts_extends_calc(Edje_Object *obj, int *x, int *y, int *w, int *h); + +/** + * @brief Forces a Size/Geometry calculation. + * + * Forces the object to recalculate its layout regardless of freeze/thaw. + * + * See also @ref edje_object_freeze and @ref edje_object_thaw. + * + * @ingroup Edje_Object + */ +EAPI void edje_object_calc_force(Edje_Object *obj); + +/** + * @brief Freezes the Edje object. + * + * This function puts all changes on hold. Successive freezes will nest, + * requiring an equal number of thaws. + * + * See also @ref edje_object_thaw() + * + * @return The frozen state or 0 on error + * + * @ingroup Edje_Object + */ +EAPI int edje_object_freeze(Edje_Object *obj); + +/** + * @brief Thaws the Edje object. + * + * This function thaws the given Edje object. + * + * @note If sucessive freezes were done, an equal number of thaws will be + * required. + * + * See also @ref edje_object_freeze() + * + * @return The frozen state or 0 if the object is not frozen or on error. + * + * @ingroup Edje_Object + */ +EAPI int edje_object_thaw(Edje_Object *obj); + + + +/** * @ingroup Edje_Object_Communication_Interface_Message * * @{ diff --git a/src/lib/edje/edje_legacy.c b/src/lib/edje/edje_legacy.c index 256f468..f41f2f6 100644 --- a/src/lib/edje/edje_legacy.c +++ b/src/lib/edje/edje_legacy.c @@ -1009,3 +1009,53 @@ edje_object_part_text_insert(Eo *obj, const char *part, const char *text) if (ed->text_change.func) ed->text_change.func(ed->text_change.data, obj, part); } + +/* Calc interface APIs */ + +EAPI void +edje_object_update_hints_set(Edje_Object *obj, Eina_Bool update) +{ + efl_canvas_layout_calc_auto_update_hints_set(obj, update); +} + +EAPI Eina_Bool +edje_object_update_hints_get(const Edje_Object *obj) +{ + return efl_canvas_layout_calc_auto_update_hints_get(obj); +} + +EAPI void +edje_object_size_min_calc(Edje_Object *obj, int *minw, int *minh) +{ + efl_canvas_layout_calc_size_min(obj, minw, minh); +} + +EAPI void +edje_object_size_min_restricted_calc(Edje_Object *obj, int *minw, int *minh, int restrictedw, int restrictedh) +{ + efl_canvas_layout_calc_size_min_restricted(obj, minw, minh, restrictedw, restrictedh); +} + +EAPI Eina_Bool +edje_object_parts_extends_calc(Edje_Object *obj, int *x, int *y, int *w, int *h) +{ + return efl_canvas_layout_calc_parts_extends(obj, x, y, w, h); +} + +EAPI int +edje_object_freeze(Edje_Object *obj) +{ + return efl_canvas_layout_calc_freeze(obj); +} + +EAPI int +edje_object_thaw(Edje_Object *obj) +{ + return efl_canvas_layout_calc_thaw(obj); +} + +EAPI void +edje_object_calc_force(Edje_Object *obj) +{ + efl_canvas_layout_calc_force(obj); +} diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo index be6d2e2..5aacfa1 100644 --- a/src/lib/edje/edje_object.eo +++ b/src/lib/edje/edje_object.eo @@ -3,7 +3,7 @@ import edje_types; // FIXME: This EO doc needs a direct link to the "edcref" doc class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part, - Efl.Observer, Efl.Ui.Base) + Efl.Observer, Efl.Ui.Base, Efl.Canvas.Layout_Calc) { [[Edje object class]] legacy_prefix: edje_object; @@ -140,133 +140,6 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part, } } - /* EDJE CALC APIS BEGIN ---------------------------------------------- */ - @property calc_update_hints { - [[Whether this object updates its size hints automatically. - - By default edje doesn't set size hints on itself. If this property - is set to $true, size hints will be updated after recalculation. - Be careful, as recalculation may happen often, enabling this - property may have a considerable performance impact as other widgets - will be notified of the size hints changes. - - A layout recalculation can be triggered by @.size_min_calc(), - @.size_min_restricted_calc(), @.parts_extends_calc() or even any - other internal event. - ]] - set { - [[Enable or disable auto-update of size hints.]] - legacy: edje_object_update_hints_set; - } - get { - [[Whether this object updates its size hints automatically.]] - legacy: edje_object_update_hints_get; - } - values { - update: bool(false); [[Whether or not update the size hints.]] - } - } - // FIXME: Prefix with calc_ ? - size_min_calc { - [[Calculates the minimum required size for a given Edje object. - - This call works exactly as edje_object_size_min_restricted_calc(), - with the last two arguments set to 0. Please refer to its - documentation, then. - ]] - // FIXME: Return a 2D size type (no @out values) - params { - @out minw: int; [[The minimum required width (return value)]] - @out minh: int; [[The minimum required height (return value)]] - } - } - // FIXME: Prefix with calc_ ? - size_min_restricted_calc { - [[Calculates the minimum required size for a given Edje object. - - This call will trigger an internal recalculation of all parts of - the object, in order to return its minimum required dimensions for - width and height. The user might choose to impose those minimum - sizes, making the resulting calculation to get to values equal or - larger than $restrictedw and $restrictedh, for width and height, - respectively. - - Note: At the end of this call, the object won't be automatically - resized to the new dimensions, but just return the calculated sizes. - The caller is the one up to change its geometry or not. - - Warning: Be advised that invisible parts in the object will be taken - into account in this calculation. - ]] - // FIXME: Return a 2D size type (no @out values) - params { - @out minw: int; [[The minimum required width (return value)]] - @out minh: int; [[The minimum required height (return value)]] - @in restrictedw: int; [[The minimum width constraint as input, - $minw can not be lower than this]] - @in restrictedh: int; [[The minimum height constraint as input, - $minh can not be lower than this]] - } - } - // FIXME: Prefix with calc_ ? - parts_extends_calc { - [[Calculates the geometry of the region, relative to a given Edje - object's area, occupied by all parts in the object. - - This function gets the geometry of the rectangle equal to the area - required to group all parts in obj's group/collection. The x - and y coordinates are relative to the top left corner of the - whole obj object's area. Parts placed out of the group's - boundaries will also be taken in account, so that x and y - may be negative. - - Note: On failure, this function will make all non-$null geometry - pointers' pointed variables be set to zero. - ]] - return: bool; [[$true on success, $false otherwise]] - /* FIXME: Return a 2D size type (no @out values) */ - params { - @out x: int; [[The parts region's X coordinate]] - @out y: int; [[The parts region's Y coordinate]] - @out w: int; [[The parts region's width]] - @out h: int; [[The parts region's height]] - } - } - calc_force { - [[Forces a Size/Geometry calculation. - - Forces the object to recalculate its layout regardless of - freeze/thaw. - - See also @.calc_freeze and @.calc_thaw. - ]] - } - calc_freeze { - [[Freezes the Edje object. - - This function puts all changes on hold. Successive freezes will - nest, requiring an equal number of thaws. - - See also @.calc_thaw() - ]] - return: int; [[The frozen state or 0 on error]] - legacy: edje_object_freeze; - } - calc_thaw { - [[Thaws the Edje object. - - This function thaws the given Edje object. - - Note: If sucessive freezes were done, an equal number of thaws will - be required. - - See also @.calc_freeze() - ]] - return: int; [[The frozen state or 0 if the object is not frozen or on error.]] - legacy: edje_object_thaw; - } - /* EDJE CALC APIS END ------------------------------------------------ */ - /* EDJE GROUP DATA APIS BEGIN ---------------------------------------- */ @property group_size_min { get { @@ -1180,6 +1053,13 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part, Efl.Canvas.Object.no_render { set; } Efl.Canvas.Object.paragraph_direction { set; } Efl.Canvas.Group.group_calculate; + Efl.Canvas.Layout_Calc.calc_auto_update_hints { get; set; } + Efl.Canvas.Layout_Calc.calc_size_min; + Efl.Canvas.Layout_Calc.calc_size_min_restricted; + Efl.Canvas.Layout_Calc.calc_parts_extends; + Efl.Canvas.Layout_Calc.calc_freeze; + Efl.Canvas.Layout_Calc.calc_thaw; + Efl.Canvas.Layout_Calc.calc_force; Efl.Ui.Base.mirrored { set; get; } Efl.Ui.Base.language { set; get; } Efl.Ui.Base.scale { set; get; } diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index af70752..26b85ee 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -40,6 +40,7 @@ #endif #define EFL_CANVAS_OBJECT_PROTECTED +#define EFL_CANVAS_LAYOUT_CALC_PROTECTED #include #include diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c index 070efff..4a6a76b 100644 --- a/src/lib/edje/edje_smart.c +++ b/src/lib/edje/edje_smart.c @@ -561,3 +561,4 @@ _edje_object_efl_observer_update(Eo *obj EINA_UNUSED, Edje *ed, Efl_Object *obs, EFL_OBJECT_OP_FUNC(efl_dbg_info_get, _edje_object_efl_object_dbg_info_get) #include "edje_object.eo.c" +#include "efl_canvas_layout_calc.eo.c" diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index 0829a80..8b75432 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c @@ -463,7 +463,7 @@ _edje_object_group_data_get(Eo *obj EINA_UNUSED, Edje *ed, const char *key) } EOLIAN int -_edje_object_calc_freeze(Eo *obj EINA_UNUSED, Edje *ed) +_edje_object_efl_canvas_layout_calc_calc_freeze(Eo *obj EINA_UNUSED, Edje *ed) { unsigned short i; @@ -481,7 +481,7 @@ _edje_object_calc_freeze(Eo *obj EINA_UNUSED, Edje *ed) } EOLIAN int -_edje_object_calc_thaw(Eo *obj EINA_UNUSED, Edje *ed) +_edje_object_efl_canvas_layout_calc_calc_thaw(Eo *obj EINA_UNUSED, Edje *ed) { unsigned short i; @@ -3143,7 +3143,7 @@ _edje_object_group_size_max_get(Eo *obj EINA_UNUSED, Edje *ed EINA_UNUSED, Evas_ } EOLIAN void -_edje_object_calc_force(Eo *obj EINA_UNUSED, Edje *ed) +_edje_object_efl_canvas_layout_calc_calc_force(Eo *obj EINA_UNUSED, Edje *ed) { int pf, pf2; @@ -3166,13 +3166,13 @@ _edje_object_calc_force(Eo *obj EINA_UNUSED, Edje *ed) } EOLIAN void -_edje_object_size_min_calc(Eo *obj, Edje *_pd EINA_UNUSED, Evas_Coord *minw, Evas_Coord *minh) +_edje_object_efl_canvas_layout_calc_calc_size_min(Eo *obj, Edje *_pd EINA_UNUSED, Evas_Coord *minw, Evas_Coord *minh) { edje_object_size_min_restricted_calc(obj, minw, minh, 0, 0); } EOLIAN Eina_Bool -_edje_object_parts_extends_calc(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) +_edje_object_efl_canvas_layout_calc_calc_parts_extends(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { Evas_Coord xx1 = INT_MAX, yy1 = INT_MAX; Evas_Coord xx2 = 0, yy2 = 0; @@ -3223,7 +3223,7 @@ _edje_object_parts_extends_calc(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord *x, Ev } EOLIAN void -_edje_object_size_min_restricted_calc(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh) +_edje_object_efl_canvas_layout_calc_calc_size_min_restricted(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh) { const int CALC_COUNT_LIMIT = 255; @@ -4854,7 +4854,7 @@ _edje_object_preload(Eo *obj, Edje *ed, Eina_Bool cancel) } EOLIAN void -_edje_object_calc_update_hints_set(Eo *obj EINA_UNUSED, Edje *ed, Eina_Bool update) +_edje_object_efl_canvas_layout_calc_calc_auto_update_hints_set(Eo *obj EINA_UNUSED, Edje *ed, Eina_Bool update) { if (!ed) return; if (ed->update_hints == !!update) return; @@ -4868,7 +4868,7 @@ _edje_object_calc_update_hints_set(Eo *obj EINA_UNUSED, Edje *ed, Eina_Bool upda } EOLIAN Eina_Bool -_edje_object_calc_update_hints_get(Eo *obj EINA_UNUSED, Edje *ed) +_edje_object_efl_canvas_layout_calc_calc_auto_update_hints_get(Eo *obj EINA_UNUSED, Edje *ed) { return ed->update_hints; } diff --git a/src/lib/edje/efl_canvas_layout_calc.eo b/src/lib/edje/efl_canvas_layout_calc.eo new file mode 100644 index 0000000..17cb5c1 --- /dev/null +++ b/src/lib/edje/efl_canvas_layout_calc.eo @@ -0,0 +1,131 @@ +interface Efl.Canvas.Layout_Calc +{ + [[This interface defines a common set of APIs used to trigger calculations + with layout objects. + + This defines all the APIs supported by legacy "Edje" object, known in EO + API as Efl.Canvas.Layout. + + @since 1.21 + ]] + methods { + @property calc_auto_update_hints { + [[Whether this object updates its size hints automatically. + + By default edje doesn't set size hints on itself. If this property + is set to $true, size hints will be updated after recalculation. + Be careful, as recalculation may happen often, enabling this + property may have a considerable performance impact as other widgets + will be notified of the size hints changes. + + A layout recalculation can be triggered by @.calc_size_min(), + @.calc_size_min_restricted(), @.calc_parts_extends() or even any + other internal event. + ]] + set { + [[Enable or disable auto-update of size hints.]] + } + get { + [[Whether this object updates its size hints automatically.]] + } + values { + update: bool(false); [[Whether or not update the size hints.]] + } + } + calc_size_min { + [[Calculates the minimum required size for a given Edje object. + + This call works exactly as edje_object_size_min_restricted_calc(), + with the last two arguments set to 0. Please refer to its + documentation, then. + ]] + // FIXME: Return a 2D size type (no @out values) + params { + @out minw: int; [[The minimum required width (return value)]] + @out minh: int; [[The minimum required height (return value)]] + } + } + calc_size_min_restricted { + [[Calculates the minimum required size for a given layout object. + + This call will trigger an internal recalculation of all parts of + the object, in order to return its minimum required dimensions for + width and height. The user might choose to impose those minimum + sizes, making the resulting calculation to get to values equal or + larger than $restrictedw and $restrictedh, for width and height, + respectively. + + Note: At the end of this call, the object won't be automatically + resized to the new dimensions, but just return the calculated sizes. + The caller is the one up to change its geometry or not. + + Warning: Be advised that invisible parts in the object will be taken + into account in this calculation. + ]] + // FIXME: Return a 2D size type (no @out values) + params { + @out minw: int; [[The minimum required width (return value)]] + @out minh: int; [[The minimum required height (return value)]] + @in restrictedw: int @optional; [[The minimum width constraint as + input, $minw can not be lower than this]] + @in restrictedh: int @optional; [[The minimum height constraint as + input, $minh can not be lower than this]] + } + } + calc_parts_extends { + [[Calculates the geometry of the region, relative to a given layout + object's area, occupied by all parts in the object. + + This function gets the geometry of the rectangle equal to the area + required to group all parts in obj's group/collection. The x + and y coordinates are relative to the top left corner of the + whole obj object's area. Parts placed out of the group's + boundaries will also be taken in account, so that x and y + may be negative. + + Note: On failure, this function will make all non-$null geometry + pointers' pointed variables be set to zero. + ]] + return: bool; [[$true on success, $false otherwise]] + /* FIXME: Return a 2D size type (no @out values) */ + params { + @out x: int; [[The parts region's X coordinate]] + @out y: int; [[The parts region's Y coordinate]] + @out w: int; [[The parts region's width]] + @out h: int; [[The parts region's height]] + } + } + calc_freeze { + [[Freezes the layout object. + + This function puts all changes on hold. Successive freezes will + nest, requiring an equal number of thaws. + + See also @.calc_thaw. + ]] + return: int; [[The frozen state or 0 on error]] + } + calc_thaw { + [[Thaws the layout object. + + This function thaws (in other words "unfreezes") the given layout + object. + + Note: If sucessive freezes were done, an equal number of thaws will + be required. + + See also @.calc_freeze. + ]] + return: int; [[The frozen state or 0 if the object is not frozen or on error.]] + } + calc_force @protected { + [[Forces a Size/Geometry calculation. + + Forces the object to recalculate its layout regardless of + freeze/thaw. This API should be used carefully. + + See also @.calc_freeze and @.calc_thaw. + ]] + } + } +} diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index 4057f1d..ef433b0 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -5,6 +5,7 @@ #define ELM_INTERFACE_ATSPI_IMAGE_PROTECTED #define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED #define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED +#define EFL_CANVAS_LAYOUT_CALC_PROTECTED #include @@ -1192,14 +1193,14 @@ _efl_ui_image_edje_object_group_size_max_get(Eo *obj EINA_UNUSED, Efl_Ui_Image_D } EOLIAN static void -_efl_ui_image_edje_object_calc_force(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd) +_efl_ui_image_efl_canvas_layout_calc_calc_force(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd) { if (sd->edje) edje_object_calc_force(sd->img); } EOLIAN static void -_efl_ui_image_edje_object_size_min_calc(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, int *w, int *h) +_efl_ui_image_efl_canvas_layout_calc_calc_size_min(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, int *w, int *h) { if (sd->edje) edje_object_size_min_calc(sd->img, w, h); diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo index ef4c1fd..62747be 100644 --- a/src/lib/elementary/efl_ui_image.eo +++ b/src/lib/elementary/efl_ui_image.eo @@ -46,7 +46,7 @@ class Efl.Ui.Image (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable, Efl.File, Efl.Image, Efl.Image.Load, Efl.Player, Efl.Gfx.View, Elm.Interface.Atspi_Image, Elm.Interface.Atspi_Widget_Action, Edje.Object, Efl.Orientation, Efl.Flipable, - Efl.Ui.View, Efl.Ui.Model.Connect) + Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Canvas.Layout_Calc) { [[ Efl UI image class]] event_prefix: efl_ui_image; @@ -138,8 +138,8 @@ class Efl.Ui.Image (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable, Edje.Object.signal_emit; Edje.Object.group_size_min { get; } Edje.Object.group_size_max { get; } - Edje.Object.size_min_calc; - Edje.Object.calc_force; + Efl.Canvas.Layout_Calc.calc_size_min; + Efl.Canvas.Layout_Calc.calc_force; Efl.Canvas.Object.clip { set; } Efl.Canvas.Group.group_member_add; Efl.Ui.Draggable.drag_target { get; set; } -- 2.7.4