diff --git a/sys/winnt/win10.c b/sys/winnt/win10.c index d1332260c..abf76d9eb 100644 --- a/sys/winnt/win10.c +++ b/sys/winnt/win10.c @@ -9,6 +9,21 @@ #include "hack.h" +typedef DPI_AWARENESS_CONTEXT(WINAPI *GetThreadDpiAwarenessContextProc)(VOID); +typedef BOOL(WINAPI *AreDpiAwarenessContextsEqualProc)( + DPI_AWARENESS_CONTEXT dpiContextA, DPI_AWARENESS_CONTEXT dpiContextB); +typedef UINT(WINAPI *GetDpiForWindowProc)(HWND hwnd); +typedef LONG (WINAPI *GetCurrentPackageFullNameProc)(UINT32 *packageFullNameLength, + PWSTR packageFullName); + +typedef struct { + BOOL Valid; + GetThreadDpiAwarenessContextProc GetThreadDpiAwarenessContext; + AreDpiAwarenessContextsEqualProc AreDpiAwarenessContextsEqual; + GetDpiForWindowProc GetDpiForWindow; + GetCurrentPackageFullNameProc GetCurrentPackageFullName; +} Win10; + Win10 gWin10 = { 0 }; void win10_init() diff --git a/sys/winnt/win10.h b/sys/winnt/win10.h index 4ba834995..bbb0ca9a3 100644 --- a/sys/winnt/win10.h +++ b/sys/winnt/win10.h @@ -7,21 +7,6 @@ #include "win32api.h" -typedef DPI_AWARENESS_CONTEXT(WINAPI *GetThreadDpiAwarenessContextProc)(VOID); -typedef BOOL(WINAPI *AreDpiAwarenessContextsEqualProc)( - DPI_AWARENESS_CONTEXT dpiContextA, DPI_AWARENESS_CONTEXT dpiContextB); -typedef UINT(WINAPI *GetDpiForWindowProc)(HWND hwnd); -typedef LONG (WINAPI *GetCurrentPackageFullNameProc)(UINT32 *packageFullNameLength, - PWSTR packageFullName); - -typedef struct { - BOOL Valid; - GetThreadDpiAwarenessContextProc GetThreadDpiAwarenessContext; - AreDpiAwarenessContextsEqualProc AreDpiAwarenessContextsEqual; - GetDpiForWindowProc GetDpiForWindow; - GetCurrentPackageFullNameProc GetCurrentPackageFullName; -} Win10; - typedef struct { double scale; // dpi of monitor / 96 int width; // in pixels @@ -30,12 +15,9 @@ typedef struct { int left; // in desktop coordinate pixel space } MonitorInfo; -extern Win10 gWin10; - void win10_init(); int win10_monitor_dpi(HWND hWnd); double win10_monitor_scale(HWND hWnd); -void win10_monitor_size(HWND hWnd, int * width, int * height); void win10_monitor_info(HWND hWnd, MonitorInfo * monitorInfo); BOOL win10_is_desktop_bridge_application(void);