summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-09-18 21:08:28 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-09-19 10:51:48 +0900
commite4517b28d635e5daafc73a811477d83003ee698c (patch)
tree0bc7defe5ab9536f4c8981d3a5cb462d19be8ecb /src/lib
parent8bf06f95fe015c382d694deada7daf82df8b972a (diff)
efl: Use Eina.Size2D for screen size
This API isn't so great when considering Wayland...
Diffstat (limited to '')
-rw-r--r--src/lib/efl/interfaces/efl_screen.eo9
-rw-r--r--src/lib/elementary/efl_ui_win.c8
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
6 methods { 6 methods {
7 @property screen_size { 7 @property screen_size {
8 get { 8 get {
9 [[Get screen geometry details for the screen that a window is on.]] 9 [[Get screen geometry details for the screen that a window is on.
10
11 Note that on some display systems this information is not
12 available (this could be the case Wayland for instance).
13 ]]
10 } 14 }
11 values { 15 values {
12 w: int; [[Where to return the width value. May be $null.]] 16 size: Eina.Size2D; [[The screen size.]]
13 h: int; [[Where to return the height value. May be $null.]]
14 } 17 }
15 } 18 }
16 @property screen_rotation { 19 @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)
6230 return sd->constrain; 6230 return sd->constrain;
6231} 6231}
6232 6232
6233EOLIAN static void 6233EOLIAN static Eina_Size2D
6234_efl_ui_win_efl_screen_screen_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, int *w, int *h) 6234_efl_ui_win_efl_screen_screen_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
6235{ 6235{
6236 ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, w, h); 6236 Eina_Size2D sz;
6237 ecore_evas_screen_geometry_get(sd->ee, NULL, NULL, &sz.w, &sz.h);
6238 return sz;
6237} 6239}
6238 6240
6239EOLIAN static void 6241EOLIAN static void