Commit fd382909 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

user32: Remove no longer used DPI functions.

parent d6dce27e
...@@ -672,29 +672,16 @@ BOOL WINAPI EnumDisplaySettingsExW( const WCHAR *device, DWORD mode, ...@@ -672,29 +672,16 @@ BOOL WINAPI EnumDisplaySettingsExW( const WCHAR *device, DWORD mode,
/********************************************************************** /**********************************************************************
* get_win_monitor_dpi * get_win_monitor_dpi
*/ */
UINT get_win_monitor_dpi( HWND hwnd ) static UINT get_win_monitor_dpi( HWND hwnd )
{ {
/* FIXME: use the monitor DPI instead */ /* FIXME: use the monitor DPI instead */
return system_dpi; return system_dpi;
} }
/********************************************************************** /**********************************************************************
* get_thread_dpi
*/
UINT get_thread_dpi(void)
{
switch (GetAwarenessFromDpiAwarenessContext( GetThreadDpiAwarenessContext() ))
{
case DPI_AWARENESS_UNAWARE: return USER_DEFAULT_SCREEN_DPI;
case DPI_AWARENESS_SYSTEM_AWARE: return system_dpi;
default: return 0; /* no scaling */
}
}
/**********************************************************************
* map_dpi_point * map_dpi_point
*/ */
POINT map_dpi_point( POINT pt, UINT dpi_from, UINT dpi_to ) static POINT map_dpi_point( POINT pt, UINT dpi_from, UINT dpi_to )
{ {
if (dpi_from && dpi_to && dpi_from != dpi_to) if (dpi_from && dpi_to && dpi_from != dpi_to)
{ {
...@@ -707,7 +694,7 @@ POINT map_dpi_point( POINT pt, UINT dpi_from, UINT dpi_to ) ...@@ -707,7 +694,7 @@ POINT map_dpi_point( POINT pt, UINT dpi_from, UINT dpi_to )
/********************************************************************** /**********************************************************************
* point_win_to_phys_dpi * point_win_to_phys_dpi
*/ */
POINT point_win_to_phys_dpi( HWND hwnd, POINT pt ) static POINT point_win_to_phys_dpi( HWND hwnd, POINT pt )
{ {
return map_dpi_point( pt, GetDpiForWindow( hwnd ), get_win_monitor_dpi( hwnd ) ); return map_dpi_point( pt, GetDpiForWindow( hwnd ), get_win_monitor_dpi( hwnd ) );
} }
...@@ -721,31 +708,6 @@ static POINT point_phys_to_win_dpi( HWND hwnd, POINT pt ) ...@@ -721,31 +708,6 @@ static POINT point_phys_to_win_dpi( HWND hwnd, POINT pt )
} }
/********************************************************************** /**********************************************************************
* map_dpi_rect
*/
RECT map_dpi_rect( RECT rect, UINT dpi_from, UINT dpi_to )
{
if (dpi_from && dpi_to && dpi_from != dpi_to)
{
rect.left = MulDiv( rect.left, dpi_to, dpi_from );
rect.top = MulDiv( rect.top, dpi_to, dpi_from );
rect.right = MulDiv( rect.right, dpi_to, dpi_from );
rect.bottom = MulDiv( rect.bottom, dpi_to, dpi_from );
}
return rect;
}
/**********************************************************************
* rect_win_to_thread_dpi
*/
RECT rect_win_to_thread_dpi( HWND hwnd, RECT rect )
{
UINT dpi = get_thread_dpi();
if (!dpi) dpi = get_win_monitor_dpi( hwnd );
return map_dpi_rect( rect, GetDpiForWindow( hwnd ), dpi );
}
/**********************************************************************
* SetProcessDpiAwarenessContext (USER32.@) * SetProcessDpiAwarenessContext (USER32.@)
*/ */
BOOL WINAPI SetProcessDpiAwarenessContext( DPI_AWARENESS_CONTEXT context ) BOOL WINAPI SetProcessDpiAwarenessContext( DPI_AWARENESS_CONTEXT context )
......
...@@ -37,13 +37,6 @@ extern HDESK open_winstation_desktop( HWINSTA hwinsta, LPCWSTR name, DWORD flags ...@@ -37,13 +37,6 @@ extern HDESK open_winstation_desktop( HWINSTA hwinsta, LPCWSTR name, DWORD flags
extern void WINPOS_ActivateOtherWindow( HWND hwnd ) DECLSPEC_HIDDEN; extern void WINPOS_ActivateOtherWindow( HWND hwnd ) DECLSPEC_HIDDEN;
extern UINT get_win_monitor_dpi( HWND hwnd ) DECLSPEC_HIDDEN;
extern UINT get_thread_dpi(void) DECLSPEC_HIDDEN;
extern POINT map_dpi_point( POINT pt, UINT dpi_from, UINT dpi_to ) DECLSPEC_HIDDEN;
extern POINT point_win_to_phys_dpi( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
extern RECT map_dpi_rect( RECT rect, UINT dpi_from, UINT dpi_to ) DECLSPEC_HIDDEN;
extern RECT rect_win_to_thread_dpi( HWND hwnd, RECT rect ) DECLSPEC_HIDDEN;
static inline void mirror_rect( const RECT *window_rect, RECT *rect ) static inline void mirror_rect( const RECT *window_rect, RECT *rect )
{ {
int width = window_rect->right - window_rect->left; int width = window_rect->right - window_rect->left;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment