forked from enlightenment/efl
Ecore_Evas: dpi_get() for Windows (XP and CE)
SVN revision: 73537
This commit is contained in:
parent
3c0a939785
commit
229b07a3b9
|
@ -1023,6 +1023,24 @@ _ecore_evas_win32_alpha_set(Ecore_Evas *ee, int alpha)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_win32_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi)
|
||||
{
|
||||
HDC dc;
|
||||
|
||||
dc = GetDC(NULL);
|
||||
if (!dc)
|
||||
{
|
||||
if (xdpi) *xdpi = 0;
|
||||
if (ydpi) *ydpi = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (xdpi) *xdpi = GetDeviceCaps(dc, LOGPIXELSX);
|
||||
if (ydpi) *ydpi = GetDeviceCaps(dc, LOGPIXELSY);
|
||||
|
||||
ReleaseDC(NULL, dc);
|
||||
}
|
||||
|
||||
static Ecore_Evas_Engine_Func _ecore_win32_engine_func =
|
||||
{
|
||||
|
@ -1083,7 +1101,7 @@ static Ecore_Evas_Engine_Func _ecore_win32_engine_func =
|
|||
|
||||
NULL, // render
|
||||
NULL, // screen_geometry_get
|
||||
NULL // screen_dpi_get
|
||||
_ecore_evas_win32_screen_dpi_get
|
||||
};
|
||||
|
||||
#endif /* BUILD_ECORE_EVAS_WIN32 */
|
||||
|
|
|
@ -724,6 +724,25 @@ _ecore_evas_wince_fullscreen_set(Ecore_Evas *ee, int on)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_wince_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi)
|
||||
{
|
||||
HDC dc;
|
||||
|
||||
dc = GetDC(NULL);
|
||||
if (!dc)
|
||||
{
|
||||
if (xdpi) *xdpi = 0;
|
||||
if (ydpi) *ydpi = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (xdpi) *xdpi = GetDeviceCaps(dc, LOGPIXELSX);
|
||||
if (ydpi) *ydpi = GetDeviceCaps(dc, LOGPIXELSY);
|
||||
|
||||
ReleaseDC(NULL, dc);
|
||||
}
|
||||
|
||||
static Ecore_Evas_Engine_Func _ecore_wince_engine_func =
|
||||
{
|
||||
_ecore_evas_wince_free,
|
||||
|
@ -783,7 +802,7 @@ static Ecore_Evas_Engine_Func _ecore_wince_engine_func =
|
|||
|
||||
NULL, // render
|
||||
NULL, // screen_geometry_get
|
||||
NULL // screen_dpi_get
|
||||
_ecore_evas_wince_screen_dpi_get
|
||||
};
|
||||
|
||||
/* API */
|
||||
|
|
Loading…
Reference in New Issue