Make type Win10 and gWin10 local to win10.c module.

This commit is contained in:
Bart House
2019-11-02 12:10:13 -07:00
parent 0bbedb2933
commit 3a315a7c76
2 changed files with 15 additions and 18 deletions

View File

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

View File

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