jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e4517b28d635e5daafc73a811477d83003ee698c

commit e4517b28d635e5daafc73a811477d83003ee698c
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Mon Sep 18 21:08:28 2017 +0900

    efl: Use Eina.Size2D for screen size
    
    This API isn't so great when considering Wayland...
---
 src/lib/efl/interfaces/efl_screen.eo | 9 ++++++---
 src/lib/elementary/efl_ui_win.c      | 8 +++++---
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/lib/efl/interfaces/efl_screen.eo 
b/src/lib/efl/interfaces/efl_screen.eo
index 75e3552970..ee58232781 100644
--- a/src/lib/efl/interfaces/efl_screen.eo
+++ b/src/lib/efl/interfaces/efl_screen.eo
@@ -6,11 +6,14 @@ interface Efl.Screen
    methods {
       @property screen_size {
          get {
-            [[Get screen geometry details for the screen that a window is on.]]
+            [[Get screen geometry details for the screen that a window is on.
+
+              Note that on some display systems this information is not
+              available (this could be the case Wayland for instance).
+            ]]
          }
          values {
-            w: int; [[Where to return the width value. May be $null.]]
-            h: int; [[Where to return the height value. May be $null.]]
+            size: Eina.Size2D; [[The screen size.]]
          }
       }
       @property screen_rotation {
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index a54274e95f..86b04d4de4 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -6230,10 +6230,12 @@ _efl_ui_win_screen_constrain_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *sd)
    return sd->constrain;
 }
 
-EOLIAN static void
-_efl_ui_win_efl_screen_screen_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data 
*sd, int *w, int *h)
+EOLIAN static Eina_Size2D
+_efl_ui_win_efl_screen_screen_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data 
*sd)
 {
-   ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, w, h);
+   Eina_Size2D sz;
+   ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, &sz.w, &sz.h);
+   return sz;
 }
 
 EOLIAN static void

-- 


Reply via email to