Module: wine Branch: master Commit: 4e752086d7d9331dba7434b8f1c124572b17ea0f URL: https://source.winehq.org/git/wine.git/?a=commit;h=4e752086d7d9331dba7434b8f...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Mar 30 12:33:14 2018 +0200
user32: Implement IsValidDpiAwarenessContext().
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/user32/sysparams.c | 11 +++++++++++ dlls/user32/user32.spec | 1 + include/windef.h | 14 ++++++++++++++ include/winuser.h | 1 + 4 files changed, 27 insertions(+)
diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 34e0a37..565838f 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -2943,6 +2943,17 @@ BOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName, DWORD iModeNum, }
/*********************************************************************** + * 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.@) */ BOOL WINAPI SetProcessDPIAware(void) diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index e0fdd3a..6ace359 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 df0eb77..40028f3 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 ece0109..90c257d 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);