Make type Win10 and gWin10 local to win10.c module.
This commit is contained in:
@@ -9,6 +9,21 @@
|
|||||||
|
|
||||||
#include "hack.h"
|
#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 };
|
Win10 gWin10 = { 0 };
|
||||||
|
|
||||||
void win10_init()
|
void win10_init()
|
||||||
|
|||||||
@@ -7,21 +7,6 @@
|
|||||||
|
|
||||||
#include "win32api.h"
|
#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 {
|
typedef struct {
|
||||||
double scale; // dpi of monitor / 96
|
double scale; // dpi of monitor / 96
|
||||||
int width; // in pixels
|
int width; // in pixels
|
||||||
@@ -30,12 +15,9 @@ typedef struct {
|
|||||||
int left; // in desktop coordinate pixel space
|
int left; // in desktop coordinate pixel space
|
||||||
} MonitorInfo;
|
} MonitorInfo;
|
||||||
|
|
||||||
extern Win10 gWin10;
|
|
||||||
|
|
||||||
void win10_init();
|
void win10_init();
|
||||||
int win10_monitor_dpi(HWND hWnd);
|
int win10_monitor_dpi(HWND hWnd);
|
||||||
double win10_monitor_scale(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);
|
void win10_monitor_info(HWND hWnd, MonitorInfo * monitorInfo);
|
||||||
BOOL win10_is_desktop_bridge_application(void);
|
BOOL win10_is_desktop_bridge_application(void);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user