forked from enlightenment/efl
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:
parent
bb673d3f70
commit
09a83d2161
|
@ -9,36 +9,6 @@ interface Efl.Gfx.Size_Hint
|
||||||
[[Efl graphics size hint interface]]
|
[[Efl graphics size hint interface]]
|
||||||
event_prefix: efl_gfx_entity;
|
event_prefix: efl_gfx_entity;
|
||||||
methods {
|
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 {
|
@property hint_aspect {
|
||||||
[[Defines the aspect ratio to respect when scaling this object.
|
[[Defines the aspect ratio to respect when scaling this object.
|
||||||
|
|
||||||
|
|
|
@ -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
|
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_w = sz.w;
|
||||||
sd->size_base_h = sz.h;
|
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
|
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);
|
return EINA_SIZE2D(sd->size_base_w, sd->size_base_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
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_w = sz.w;
|
||||||
sd->size_step_h = sz.h;
|
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
|
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);
|
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
|
EAPI void
|
||||||
elm_win_size_base_set(Evas_Object *obj, int w, int h)
|
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
|
EAPI void
|
||||||
elm_win_size_base_get(const Evas_Object *obj, int *w, int *h)
|
elm_win_size_base_get(const Evas_Object *obj, int *w, int *h)
|
||||||
{
|
{
|
||||||
Eina_Size2D sz;
|
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 (w) *w = sz.w;
|
||||||
if (h) *h = sz.h;
|
if (h) *h = sz.h;
|
||||||
}
|
}
|
||||||
|
@ -8387,14 +8387,14 @@ elm_win_size_base_get(const Evas_Object *obj, int *w, int *h)
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_win_size_step_set(Evas_Object *obj, int w, int h)
|
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
|
EAPI void
|
||||||
elm_win_size_step_get(const Evas_Object *obj, int *w, int *h)
|
elm_win_size_step_get(const Evas_Object *obj, int *w, int *h)
|
||||||
{
|
{
|
||||||
Eina_Size2D sz;
|
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 (w) *w = sz.w;
|
||||||
if (h) *h = sz.h;
|
if (h) *h = sz.h;
|
||||||
}
|
}
|
||||||
|
|
|
@ -766,6 +766,36 @@ class Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Access.W
|
||||||
resize mode.]]
|
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 {
|
implements {
|
||||||
class.constructor;
|
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_dpi { get; }
|
||||||
Efl.Screen.screen_rotation { get; }
|
Efl.Screen.screen_rotation { get; }
|
||||||
Efl.Screen.screen_size { 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_aspect { set; }
|
||||||
Efl.Gfx.Size_Hint.hint_weight { set; }
|
Efl.Gfx.Size_Hint.hint_weight { set; }
|
||||||
Efl.Gfx.Size_Hint.hint_max { set; }
|
Efl.Gfx.Size_Hint.hint_max { set; }
|
||||||
|
|
Loading…
Reference in New Issue