efl_ui_win: move base and step size hints here

these hints are not relevant to anything but window objects, so put them
onto the window object

ref T5719

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7729
This commit is contained in:
Mike Blumenkrantz 2019-01-23 09:39:39 -05:00 committed by Marcel Hollerbach
parent bb673d3f70
commit 09a83d2161
3 changed files with 38 additions and 40 deletions

View File

@ -9,36 +9,6 @@ interface Efl.Gfx.Size_Hint
[[Efl graphics size hint interface]]
event_prefix: efl_gfx_entity;
methods {
@property hint_base {
[[Base size for objects with sizing restrictions.
This is not a size enforcement in any way, it's just a hint
that should be used whenever appropriate.
@.hint_base + N x @.hint_step is what is calculated for object
sizing restrictions.
See also @.hint_step.
]]
values {
sz: Eina.Size2D; [[Base size (hint) in pixels.]]
}
}
@property hint_step {
[[Step size for objects with sizing restrictions.
This is not a size enforcement in any way, it's just a hint
that should be used whenever appropriate.
Set this to for an object to scale up by steps and not continuously.
@.hint_base + N x @.hint_step is what is calculated for object
sizing restrictions.
]]
values {
sz: Eina.Size2D; [[Step size (hint) in pixels.]]
}
}
@property hint_aspect {
[[Defines the aspect ratio to respect when scaling this object.

View File

@ -6427,7 +6427,7 @@ _efl_ui_win_efl_gfx_size_hint_hint_weight_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Da
}
EOLIAN static void
_efl_ui_win_efl_gfx_size_hint_hint_base_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Size2D sz)
_efl_ui_win_hint_base_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Size2D sz)
{
sd->size_base_w = sz.w;
sd->size_base_h = sz.h;
@ -6438,13 +6438,13 @@ _efl_ui_win_efl_gfx_size_hint_hint_base_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data
}
EOLIAN static Eina_Size2D
_efl_ui_win_efl_gfx_size_hint_hint_base_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
_efl_ui_win_hint_base_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
{
return EINA_SIZE2D(sd->size_base_w, sd->size_base_h);
}
EOLIAN static void
_efl_ui_win_efl_gfx_size_hint_hint_step_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Size2D sz)
_efl_ui_win_hint_step_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Size2D sz)
{
sd->size_step_w = sz.w;
sd->size_step_h = sz.h;
@ -6472,7 +6472,7 @@ _efl_ui_win_efl_gfx_size_hint_hint_max_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Si
}
EOLIAN static Eina_Size2D
_efl_ui_win_efl_gfx_size_hint_hint_step_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
_efl_ui_win_hint_step_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
{
return EINA_SIZE2D(sd->size_step_w, sd->size_step_h);
}
@ -8372,14 +8372,14 @@ elm_win_title_get(const Evas_Object *obj)
EAPI void
elm_win_size_base_set(Evas_Object *obj, int w, int h)
{
efl_gfx_size_hint_base_set(obj, EINA_SIZE2D(w, h));
efl_ui_win_hint_base_set(obj, EINA_SIZE2D(w, h));
}
EAPI void
elm_win_size_base_get(const Evas_Object *obj, int *w, int *h)
{
Eina_Size2D sz;
sz = efl_gfx_size_hint_base_get(obj);
sz = efl_ui_win_hint_base_get(obj);
if (w) *w = sz.w;
if (h) *h = sz.h;
}
@ -8387,14 +8387,14 @@ elm_win_size_base_get(const Evas_Object *obj, int *w, int *h)
EAPI void
elm_win_size_step_set(Evas_Object *obj, int w, int h)
{
efl_gfx_size_hint_step_set(obj, EINA_SIZE2D(w, h));
efl_ui_win_hint_step_set(obj, EINA_SIZE2D(w, h));
}
EAPI void
elm_win_size_step_get(const Evas_Object *obj, int *w, int *h)
{
Eina_Size2D sz;
sz = efl_gfx_size_hint_step_get(obj);
sz = efl_ui_win_hint_step_get(obj);
if (w) *w = sz.w;
if (h) *h = sz.h;
}

View File

@ -766,6 +766,36 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
resize mode.]]
}
}
@property hint_base {
[[Base size for objects with sizing restrictions.
This is not a size enforcement in any way, it's just a hint
that should be used whenever appropriate.
@.hint_base + N x @.hint_step is what is calculated for object
sizing restrictions.
See also @.hint_step.
]]
values {
sz: Eina.Size2D; [[Base size (hint) in pixels.]]
}
}
@property hint_step {
[[Step size for objects with sizing restrictions.
This is not a size enforcement in any way, it's just a hint
that should be used whenever appropriate.
Set this to for an object to scale up by steps and not continuously.
@.hint_base + N x @.hint_step is what is calculated for object
sizing restrictions.
]]
values {
sz: Eina.Size2D; [[Step size (hint) in pixels.]]
}
}
}
implements {
class.constructor;
@ -797,8 +827,6 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
Efl.Screen.screen_dpi { get; }
Efl.Screen.screen_rotation { get; }
Efl.Screen.screen_size { get; }
Efl.Gfx.Size_Hint.hint_base { get; set; }
Efl.Gfx.Size_Hint.hint_step { get; set; }
Efl.Gfx.Size_Hint.hint_aspect { set; }
Efl.Gfx.Size_Hint.hint_weight { set; }
Efl.Gfx.Size_Hint.hint_max { set; }