summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-18 16:44:42 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-18 16:50:58 +0900
commitd8eea084fb86514843e64390479c9a6b17bd2e57 (patch)
tree0e81a693af1edf7c64522752b3f85fd36cb31873 /src/lib/elementary/efl_ui_win.c
parent6b5d155918452df206a9b8142842cbc6af94ae1a (diff)
efl: Use Eina.Size2D for size hint aspect
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_win.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 258755fb74..46c97b5fc3 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -5951,14 +5951,14 @@ _win_aspect_get(Efl_Ui_Win_Data *sd)
5951 5951
5952EOLIAN static void 5952EOLIAN static void
5953_efl_ui_win_efl_gfx_size_hint_hint_aspect_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd, 5953_efl_ui_win_efl_gfx_size_hint_hint_aspect_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *pd,
5954 Efl_Gfx_Size_Hint_Aspect mode, int w, int h) 5954 Efl_Gfx_Size_Hint_Aspect mode, Eina_Size2D sz)
5955{ 5955{
5956 if (h) _win_aspect_set(pd, (double) w / (double) h); 5956 if (sz.h) _win_aspect_set(pd, (double) sz.w / (double) sz.h);
5957 else _win_aspect_set(pd, 0.0); 5957 else _win_aspect_set(pd, 0.0);
5958 efl_gfx_size_hint_aspect_set(efl_super(obj, MY_CLASS), mode, w, h); 5958 efl_gfx_size_hint_aspect_set(efl_super(obj, MY_CLASS), mode, sz);
5959#ifdef HAVE_ELEMENTARY_WL2 5959#ifdef HAVE_ELEMENTARY_WL2
5960 if (pd->wl.win) 5960 if (pd->wl.win)
5961 ecore_wl2_window_aspect_set(pd->wl.win, w, h, mode); 5961 ecore_wl2_window_aspect_set(pd->wl.win, sz.w, sz.h, mode);
5962#endif 5962#endif
5963} 5963}
5964 5964
@@ -7957,10 +7957,12 @@ end:
7957EAPI void 7957EAPI void
7958elm_win_aspect_set(Eo *obj, double aspect) 7958elm_win_aspect_set(Eo *obj, double aspect)
7959{ 7959{
7960 Eina_Size2D sz = { 0, 0 };
7961
7960 if (aspect > DBL_EPSILON) 7962 if (aspect > DBL_EPSILON)
7961 efl_gfx_size_hint_aspect_set(obj, EFL_GFX_SIZE_HINT_ASPECT_NONE, 1000 * aspect, 1000); 7963 sz = EINA_SIZE2D(1000 * aspect, 1000);
7962 else 7964
7963 efl_gfx_size_hint_aspect_set(obj, EFL_GFX_SIZE_HINT_ASPECT_NONE, 0, 0); 7965 efl_gfx_size_hint_aspect_set(obj, EFL_GFX_SIZE_HINT_ASPECT_NONE, sz);
7964} 7966}
7965 7967
7966EAPI double 7968EAPI double