diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 34e0a375143..565838fa5e6 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -2942,6 +2942,17 @@ BOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName, DWORD iModeNum, return USER_Driver->pEnumDisplaySettingsEx(lpszDeviceName, iModeNum, lpDevMode, dwFlags); } +/*********************************************************************** + * IsValidDpiAwarenessContext (USER32.@) + */ +BOOL WINAPI IsValidDpiAwarenessContext( DPI_AWARENESS_CONTEXT context ) +{ + return (context == DPI_AWARENESS_CONTEXT_UNAWARE || + context == DPI_AWARENESS_CONTEXT_SYSTEM_AWARE || + context == DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE || + context == DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2); +} + /*********************************************************************** * SetProcessDPIAware (USER32.@) */ diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index e0fdd3adca3..6ace359540b 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -460,6 +460,7 @@ @ stdcall IsRectEmpty(ptr) # @ stub IsServerSideWindow @ stdcall IsTouchWindow(long ptr) +@ stdcall IsValidDpiAwarenessContext(long) @ stdcall IsWinEventHookInstalled(long) @ stdcall IsWindow(long) @ stdcall IsWindowEnabled(long) diff --git a/include/windef.h b/include/windef.h index df0eb7715b7..40028f3373c 100644 --- a/include/windef.h +++ b/include/windef.h @@ -433,6 +433,20 @@ typedef struct _RECTL typedef const RECTL *LPCRECTL; +/* DPI awareness */ +typedef enum DPI_AWARENESS +{ + DPI_AWARENESS_INVALID = -1, + DPI_AWARENESS_UNAWARE = 0, + DPI_AWARENESS_SYSTEM_AWARE, + DPI_AWARENESS_PER_MONITOR_AWARE +} DPI_AWARENESS; + +#define DPI_AWARENESS_CONTEXT_UNAWARE ((DPI_AWARENESS_CONTEXT)-1) +#define DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ((DPI_AWARENESS_CONTEXT)-2) +#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ((DPI_AWARENESS_CONTEXT)-3) +#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((DPI_AWARENESS_CONTEXT)-4) + #ifdef __cplusplus } #endif diff --git a/include/winuser.h b/include/winuser.h index ece01098da9..90c257d4c47 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -3848,6 +3848,7 @@ WINUSERAPI BOOL WINAPI IsIconic(HWND); WINUSERAPI BOOL WINAPI IsMenu(HMENU); WINUSERAPI BOOL WINAPI IsProcessDPIAware(void); WINUSERAPI BOOL WINAPI IsTouchWindow(HWND,PULONG); +WINUSERAPI BOOL WINAPI IsValidDpiAwarenessContext(DPI_AWARENESS_CONTEXT); WINUSERAPI BOOL WINAPI IsWinEventHookInstalled(DWORD); WINUSERAPI BOOL WINAPI IsWindow(HWND); WINUSERAPI BOOL WINAPI IsWindowEnabled(HWND);