From 09a83d216163a893a339002707f4c396997f798d Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 23 Jan 2019 09:39:39 -0500 Subject: [PATCH] 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 Differential Revision: https://phab.enlightenment.org/D7729 --- src/lib/efl/interfaces/efl_gfx_size_hint.eo | 30 ------------------- src/lib/elementary/efl_ui_win.c | 16 +++++------ src/lib/elementary/efl_ui_win.eo | 32 +++++++++++++++++++-- 3 files changed, 38 insertions(+), 40 deletions(-) diff --git a/src/lib/efl/interfaces/efl_gfx_size_hint.eo b/src/lib/efl/interfaces/efl_gfx_size_hint.eo index 711ff6e817..676cc04d37 100644 --- a/src/lib/efl/interfaces/efl_gfx_size_hint.eo +++ b/src/lib/efl/interfaces/efl_gfx_size_hint.eo @@ -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. diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index f78aaad1af..d66db964dd 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -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; } diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index 2dbd882fab..69854cb362 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -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; }