From 95bb03f0be09c560ef6b873a3da7bd15cd016718 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 5 Jul 2012 12:59:06 +0000 Subject: [PATCH] add dpi get func in elm. SVN revision: 73342 --- legacy/elementary/ChangeLog | 2 +- legacy/elementary/src/lib/elm_win.c | 11 +++++++++++ legacy/elementary/src/lib/elm_win.h | 17 ++++++++++++++--- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog index ac8aa406bb..e5ee4bd1a4 100644 --- a/legacy/elementary/ChangeLog +++ b/legacy/elementary/ChangeLog @@ -277,5 +277,5 @@ explicitly set to non-x11 * No mouse cursor displayed in fb when needed, so add a softcursor mode defaulting to auto. - + * Add elm_win_screen_dpi_get() diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c index 0d2f5855db..36f1a3fd57 100644 --- a/legacy/elementary/src/lib/elm_win.c +++ b/legacy/elementary/src/lib/elm_win.c @@ -3237,6 +3237,17 @@ elm_win_screen_size_get(const Evas_Object *obj, ecore_evas_screen_geometry_get(sd->ee, x, y, w, h); } +EAPI void +elm_win_screen_dpi_get(const Evas_Object *obj, + int *xdpi, + int *ydpi) +{ + ELM_WIN_CHECK(obj); + ELM_WIN_DATA_GET_OR_RETURN(obj, sd); + + ecore_evas_screen_dpi_get(sd->ee, xdpi, ydpi); +} + EAPI void elm_win_conformant_set(Evas_Object *obj, Eina_Bool conformant) diff --git a/legacy/elementary/src/lib/elm_win.h b/legacy/elementary/src/lib/elm_win.h index 741e9ee02b..c5e3053713 100644 --- a/legacy/elementary/src/lib/elm_win.h +++ b/legacy/elementary/src/lib/elm_win.h @@ -1140,14 +1140,25 @@ EAPI Eina_Bool elm_win_screen_constrain_get(Evas_Object *obj); * Get screen geometry details for the screen that a window is on * @param obj The window to query * @param x where to return the horizontal offset value. May be NULL. - * @param y where to return the vertical offset value. May be NULL. - * @param w where to return the width value. May be NULL. - * @param h where to return the height value. May be NULL. + * @param y where to return the vertical offset value. May be NULL. + * @param w where to return the width value. May be NULL. + * @param h where to return the height value. May be NULL. * * @ingroup Win */ EAPI void elm_win_screen_size_get(const Evas_Object *obj, int *x, int *y, int *w, int *h); +/** + * Get screen dpi for the screen that a window is on + * @param obj The window to query + * @param xdpi Pointer to value to store return horizontal dpi. May be NULL. + * @param ydpi Pointer to value to store return vertical dpi. May be NULL. + * + * @ingroup Win + * @since 1.1 + */ +EAPI void elm_win_screen_dpi_get(const Evas_Object *obj, int *xdpi, int *ydpi); + /** * Set the enabled status for the focus highlight in a window *