efl: Use Eina.Size2D for screen size

This API isn't so great when considering Wayland...
This commit is contained in:
Jean-Philippe Andre 2017-09-18 21:08:28 +09:00
parent 8bf06f95fe
commit e4517b28d6
2 changed files with 11 additions and 6 deletions

View File

@ -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 {

View File

@ -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