xartigas pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=400e139efab1586f148d7883da5729cd97ba7f28
commit 400e139efab1586f148d7883da5729cd97ba7f28 Author: Mike Blumenkrantz <zm...@samsung.com> Date: Tue Oct 29 18:42:07 2019 +0100 interfaces: replace doubles with Efl.Gfx.Align where appropriate Summary: this makes the types more explicit Depends on D10554 Reviewers: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10555 --- src/lib/efl/interfaces/efl_gfx_arrangement.eo | 13 ++++++------- src/lib/efl/interfaces/efl_gfx_hint.eo | 16 ++++------------ src/lib/elementary/efl_ui_relative_layout.eo | 17 +++++++++-------- 3 files changed, 19 insertions(+), 27 deletions(-) diff --git a/src/lib/efl/interfaces/efl_gfx_arrangement.eo b/src/lib/efl/interfaces/efl_gfx_arrangement.eo index 9a3cc4a444..bfd5ad7247 100644 --- a/src/lib/efl/interfaces/efl_gfx_arrangement.eo +++ b/src/lib/efl/interfaces/efl_gfx_arrangement.eo @@ -1,3 +1,4 @@ +import efl_gfx_types; interface @beta Efl.Gfx.Arrangement { [[ @@ -13,19 +14,17 @@ interface @beta Efl.Gfx.Arrangement unused space. It is different than the @Efl.Gfx.Hint.hint_align property in that it affects the position - of all the contents within the container. For example, if a box widget has extra space - on the horizontal axis, this property can be used to align the box's contents to the - left or the right side. + of all the contents within the container instead of the container itself. + For example, if a box widget has extra space on the horizontal axis, + this property can be used to align the box's contents to the left or the right side. See also @Efl.Gfx.Hint.hint_align. ]] set {} get {} values { - align_horiz: double(0.5); [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the horizontal - axis and 1.0 is at the end.]] - align_vert: double(0.5); [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the vertical - axis and 1.0 is at the end.]] + align_horiz: Efl.Gfx.Align(0.5); [[Controls the horizontal alignment.]] + align_vert: Efl.Gfx.Align(0.5); [[Controls the vertical alignment.]] } } @property content_padding @beta { diff --git a/src/lib/efl/interfaces/efl_gfx_hint.eo b/src/lib/efl/interfaces/efl_gfx_hint.eo index c44994f9fa..676c5ba1ec 100644 --- a/src/lib/efl/interfaces/efl_gfx_hint.eo +++ b/src/lib/efl/interfaces/efl_gfx_hint.eo @@ -239,26 +239,18 @@ interface Efl.Gfx.Hint @property hint_align { [[Hints for an object's alignment. - These are hints on how to align an object inside the - boundaries of a container/manager. Accepted values are in - the 0.0 to 1.0 range. - - For the horizontal component, 0.0 means the start of the axis - in the direction that the current language reads, 1.0 means the end of the axis. - - For the vertical component, 0.0 to the top, 1.0 means to the bottom. + These are hints on how to align this object inside the + boundaries of its container/manager. This is not a size enforcement in any way, it's just a hint that should be used whenever appropriate. - - Note: Default alignment hint values are 0.5, for both axes. ]] /* @image html alignment-hints.png */ values { - x: double; [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the horizontal axis and 1.0 is at the end.]] - y: double; [[Double, ranging from 0.0 to 1.0, where 0.0 is at the start of the vertical axis and 1.0 is at the end.]] + x: Efl.Gfx.Align(0.5); [[Controls the horizontal alignment.]] + y: Efl.Gfx.Align(0.5); [[Controls the vertical alignment.]] } } @property hint_fill { diff --git a/src/lib/elementary/efl_ui_relative_layout.eo b/src/lib/elementary/efl_ui_relative_layout.eo index 13ac340158..2979a9c1d3 100644 --- a/src/lib/elementary/efl_ui_relative_layout.eo +++ b/src/lib/elementary/efl_ui_relative_layout.eo @@ -1,3 +1,4 @@ +import efl_gfx_types; class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Layout, Efl.Pack { [[The relative layout class. @@ -13,8 +14,8 @@ class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Lay } values { target: Efl.Gfx.Entity; [[The relative target.]] - relative: double; [[The ratio between left and right of the target, - ranging from 0.0 to 1.0.]] + relative: Efl.Gfx.Align; [[The ratio between left and right of the target, + ranging from 0.0 to 1.0.]] } } @property relation_right { @@ -25,8 +26,8 @@ class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Lay } values { target: Efl.Gfx.Entity; [[The relative target.]] - relative: double; [[The ratio between left and right of the target, - ranging from 0.0 to 1.0.]] + relative: Efl.Gfx.Align; [[The ratio between left and right of the target, + ranging from 0.0 to 1.0.]] } } @property relation_top { @@ -37,8 +38,8 @@ class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Lay } values { target: Efl.Gfx.Entity; [[The relative target.]] - relative: double; [[The ratio between top and bottom of the target, - ranging from 0.0 to 1.0.]] + relative: Efl.Gfx.Align; [[The ratio between top and bottom of the target, + ranging from 0.0 to 1.0.]] } } @property relation_bottom { @@ -49,8 +50,8 @@ class @beta Efl.Ui.Relative_Layout extends Efl.Ui.Widget implements Efl.Pack_Lay } values { target: Efl.Gfx.Entity; [[The relative target.]] - relative: double; [[The ratio between top and bottom of the target, - ranging from 0.0 to 1.0.]] + relative: Efl.Gfx.Align; [[The ratio between top and bottom of the target, + ranging from 0.0 to 1.0.]] } } } --