efl_ui_win: move base and step size hints here
authorMike Blumenkrantz <zmike@samsung.com>
Wed, 23 Jan 2019 14:39:39 +0000 (09:39 -0500)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 24 Jan 2019 05:20:19 +0000 (14:20 +0900)
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

src/lib/efl/interfaces/efl_gfx_size_hint.eo
src/lib/elementary/efl_ui_win.c
src/lib/elementary/efl_ui_win.eo

index 711ff6e..676cc04 100644 (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.
 
index c0b6b44..c343ea3 100644 (file)
@@ -7447,7 +7447,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;
@@ -7458,13 +7458,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;
@@ -7492,7 +7492,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);
 }
@@ -9478,14 +9478,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;
 }
@@ -9493,14 +9493,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;
 }
index 5f0b84f..2f59bcb 100644 (file)
@@ -799,6 +799,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;
@@ -830,8 +860,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; }