elm_win: do not implement aspect_get()
authorMike Blumenkrantz <zmike@osg.samsung.com>
Fri, 28 Jul 2017 19:44:43 +0000 (15:44 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Fri, 28 Jul 2017 19:40:47 +0000 (15:40 -0400)
this breaks aspect hints.

@fix

src/lib/elementary/efl_ui_win.c
src/lib/elementary/efl_ui_win.eo

index dcc870e..b855857 100644 (file)
@@ -183,7 +183,6 @@ struct _Efl_Ui_Win_Data
    void *trap_data;
 
    double       aspect; /* defined as w/h or 0 */
-   int          aspect_w, aspect_h; /* used for the get API */
    int          size_base_w, size_base_h;
    int          size_step_w, size_step_h;
    int          req_x, req_y, req_w, req_h;
@@ -5899,21 +5898,11 @@ _win_aspect_get(Efl_Ui_Win_Data *sd)
 
 EOLIAN static void
 _efl_ui_win_efl_gfx_size_hint_hint_aspect_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd,
-                                              Efl_Gfx_Size_Hint_Aspect mode EINA_UNUSED, int w, int h)
+                                              Efl_Gfx_Size_Hint_Aspect mode, int w, int h)
 {
-   pd->aspect_w = w;
-   pd->aspect_h = h;
    if (h) _win_aspect_set(pd, (double) w / (double) h);
    else _win_aspect_set(pd, 0.0);
-}
-
-EOLIAN static void
-_efl_ui_win_efl_gfx_size_hint_hint_aspect_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd,
-                                              Efl_Gfx_Size_Hint_Aspect *mode, int *w, int *h)
-{
-   if (mode) *mode = EFL_GFX_SIZE_HINT_ASPECT_NONE;
-   if (w) *w = pd->aspect_w;
-   if (h) *h = pd->aspect_h;
+   efl_gfx_size_hint_aspect_set(efl_super(obj, MY_CLASS), mode, w, h);
 }
 
 EOLIAN static void
index 431f73a..bbc1a7f 100644 (file)
@@ -953,7 +953,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Elm.Interface.Atspi.Window,
       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 { get; set; }
+      Efl.Gfx.Size.Hint.hint_aspect { set; }
       Efl.Gfx.Size.Hint.hint_max { set; }
       Efl.Text.text { get; set; }
       Efl.Input.Interface.pointer_xy { get; }