forked from enlightenment/efl
efl: Use Eina.Size2D for screen size
This API isn't so great when considering Wayland...
This commit is contained in:
parent
8bf06f95fe
commit
e4517b28d6
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue