user32: Implement IsValidDpiAwarenessContext().

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2018-03-30 12:33:14 +02:00
parent daf7f3c4ae
commit 4e752086d7
4 changed files with 27 additions and 0 deletions

View File

@ -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.@)
*/

View File

@ -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)

View File

@ -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

View File

@ -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);