Ecore_Evas_Wayland: Add code to handle the ecore_evas_screen_dpi_get
function recently added. NB: This only gets the xdpi currently from ecore_wayland. SVN revision: 73352
This commit is contained in:
parent
1625fc9b91
commit
7ca653e1d8
|
@ -72,7 +72,7 @@ static void _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha);
|
||||||
static void _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent);
|
static void _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent);
|
||||||
static int _ecore_evas_wl_render(Ecore_Evas *ee);
|
static int _ecore_evas_wl_render(Ecore_Evas *ee);
|
||||||
static void _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h);
|
static void _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h);
|
||||||
|
static void _ecore_evas_wl_screen_dpi_get(const Ecore_Evas *ee __UNUSED__, int *xdpi, int *ydpi);
|
||||||
static Eina_Bool _ecore_evas_wl_cb_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event);
|
static Eina_Bool _ecore_evas_wl_cb_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event);
|
||||||
static Eina_Bool _ecore_evas_wl_cb_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event);
|
static Eina_Bool _ecore_evas_wl_cb_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event);
|
||||||
static Eina_Bool _ecore_evas_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event);
|
static Eina_Bool _ecore_evas_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event);
|
||||||
|
@ -831,6 +831,21 @@ _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int
|
||||||
ecore_wl_screen_size_get(w, h);
|
ecore_wl_screen_size_get(w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_ecore_evas_wl_screen_dpi_get(const Ecore_Evas *ee __UNUSED__, int *xdpi, int *ydpi)
|
||||||
|
{
|
||||||
|
int dpi = 0;
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
if (xdpi) *xdpi = 0;
|
||||||
|
if (ydpi) *ydpi = 0;
|
||||||
|
/* FIXME: Ideally this needs to get the DPI from a specific screen */
|
||||||
|
dpi = ecore_wl_dpi_get();
|
||||||
|
if (xdpi) *xdpi = dpi;
|
||||||
|
if (ydpi) *ydpi = dpi;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location)
|
_ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location)
|
||||||
{
|
{
|
||||||
|
@ -946,8 +961,8 @@ _ecore_evas_wl_cb_window_configure(void *data __UNUSED__, int type __UNUSED__, v
|
||||||
if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
|
if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
|
||||||
if ((ee->x != ev->x) || (ee->y != ev->y))
|
if ((ee->x != ev->x) || (ee->y != ev->y))
|
||||||
{
|
{
|
||||||
ee->x = ev->x;
|
/* ee->x = ev->x; */
|
||||||
ee->y = ev->y;
|
/* ee->y = ev->y; */
|
||||||
ee->req.x = ee->x;
|
ee->req.x = ee->x;
|
||||||
ee->req.y = ee->y;
|
ee->req.y = ee->y;
|
||||||
if (ee->func.fn_move) ee->func.fn_move(ee);
|
if (ee->func.fn_move) ee->func.fn_move(ee);
|
||||||
|
|
|
@ -73,6 +73,7 @@ static void _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha);
|
||||||
static void _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent);
|
static void _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent);
|
||||||
static int _ecore_evas_wl_render(Ecore_Evas *ee);
|
static int _ecore_evas_wl_render(Ecore_Evas *ee);
|
||||||
static void _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h);
|
static void _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h);
|
||||||
|
static void _ecore_evas_wl_screen_dpi_get(const Ecore_Evas *ee __UNUSED__, int *xdpi, int *ydpi);
|
||||||
static void _ecore_evas_wl_ensure_pool_size(Ecore_Evas *ee, int w, int h);
|
static void _ecore_evas_wl_ensure_pool_size(Ecore_Evas *ee, int w, int h);
|
||||||
static struct wl_shm_pool *_ecore_evas_wl_shm_pool_create(int size, void **data);
|
static struct wl_shm_pool *_ecore_evas_wl_shm_pool_create(int size, void **data);
|
||||||
|
|
||||||
|
@ -157,7 +158,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
|
||||||
NULL, // focus skip set
|
NULL, // focus skip set
|
||||||
_ecore_evas_wl_render,
|
_ecore_evas_wl_render,
|
||||||
_ecore_evas_wl_screen_geometry_get,
|
_ecore_evas_wl_screen_geometry_get,
|
||||||
NULL // screen_dpi_get
|
_ecore_evas_wl_screen_dpi_get
|
||||||
};
|
};
|
||||||
|
|
||||||
/* external variables */
|
/* external variables */
|
||||||
|
@ -517,9 +518,9 @@ _ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h)
|
||||||
|
|
||||||
if (ee->engine.wl.win)
|
if (ee->engine.wl.win)
|
||||||
{
|
{
|
||||||
|
ecore_wl_window_update_size(ee->engine.wl.win, w, h);
|
||||||
ecore_wl_window_buffer_attach(ee->engine.wl.win,
|
ecore_wl_window_buffer_attach(ee->engine.wl.win,
|
||||||
ee->engine.wl.buffer, 0, 0);
|
ee->engine.wl.buffer, 0, 0);
|
||||||
ecore_wl_window_update_size(ee->engine.wl.win, w, h);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
||||||
|
@ -905,6 +906,21 @@ _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int
|
||||||
ecore_wl_screen_size_get(w, h);
|
ecore_wl_screen_size_get(w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_ecore_evas_wl_screen_dpi_get(const Ecore_Evas *ee __UNUSED__, int *xdpi, int *ydpi)
|
||||||
|
{
|
||||||
|
int dpi = 0;
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
if (xdpi) *xdpi = 0;
|
||||||
|
if (ydpi) *ydpi = 0;
|
||||||
|
/* FIXME: Ideally this needs to get the DPI from a specific screen */
|
||||||
|
dpi = ecore_wl_dpi_get();
|
||||||
|
if (xdpi) *xdpi = dpi;
|
||||||
|
if (ydpi) *ydpi = dpi;
|
||||||
|
}
|
||||||
|
|
||||||
static struct wl_shm_pool *
|
static struct wl_shm_pool *
|
||||||
_ecore_evas_wl_shm_pool_create(int size, void **data)
|
_ecore_evas_wl_shm_pool_create(int size, void **data)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue