forked from enlightenment/efl
ecore_evas/fb: implement screen_geometry_get()
Sometimes it is useful to query screen geometry (more often size) to do some metrics as finding the proper theme in my case. As this call works for X11 and others, let's make it work for framebuffer as well.
This commit is contained in:
parent
dc4bad17dd
commit
ecc5fa3379
|
@ -507,6 +507,19 @@ _ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_screen_geometry_get(const Ecore_Evas *ee EINA_UNUSED, int *x, int *y, int *w, int *h)
|
||||
{
|
||||
int fbw, fbh;
|
||||
|
||||
ecore_fb_size_get(&fbw, &fbh);
|
||||
|
||||
if (x) *x = 0;
|
||||
if (y) *y = 0;
|
||||
if (w) *w = fbw;
|
||||
if (h) *h = fbh;
|
||||
}
|
||||
|
||||
static Ecore_Evas_Engine_Func _ecore_fb_engine_func =
|
||||
{
|
||||
_ecore_evas_fb_free,
|
||||
|
@ -566,7 +579,7 @@ static Ecore_Evas_Engine_Func _ecore_fb_engine_func =
|
|||
NULL,
|
||||
|
||||
NULL, // render
|
||||
NULL, // screen_geometry_get
|
||||
_ecore_evas_screen_geometry_get,
|
||||
NULL, // screen_dpi_get
|
||||
NULL,
|
||||
NULL, // msg_send
|
||||
|
|
Loading…
Reference in New Issue