diff options
Diffstat (limited to 'src/dutil/inc/dpiutil.h')
-rw-r--r-- | src/dutil/inc/dpiutil.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/dutil/inc/dpiutil.h b/src/dutil/inc/dpiutil.h index 4ea689c5..216d3dc6 100644 --- a/src/dutil/inc/dpiutil.h +++ b/src/dutil/inc/dpiutil.h | |||
@@ -14,6 +14,15 @@ extern "C" { | |||
14 | #define USER_DEFAULT_SCREEN_DPI 96 | 14 | #define USER_DEFAULT_SCREEN_DPI 96 |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | typedef enum DPIU_AWARENESS | ||
18 | { | ||
19 | DPIU_AWARENESS_NONE = 0x0, | ||
20 | DPIU_AWARENESS_SYSTEM = 0x1, | ||
21 | DPIU_AWARENESS_PERMONITOR = 0x2, | ||
22 | DPIU_AWARENESS_PERMONITORV2 = 0x4, | ||
23 | DPIU_AWARENESS_GDISCALED = 0x8, | ||
24 | } DPIU_PROCESS_AWARENESS; | ||
25 | |||
17 | typedef struct _DPIU_MONITOR_CONTEXT | 26 | typedef struct _DPIU_MONITOR_CONTEXT |
18 | { | 27 | { |
19 | UINT nDpi; | 28 | UINT nDpi; |
@@ -41,6 +50,13 @@ typedef HRESULT (APIENTRY *PFN_GETDPIFORMONITOR)( | |||
41 | typedef UINT (APIENTRY *PFN_GETDPIFORWINDOW)( | 50 | typedef UINT (APIENTRY *PFN_GETDPIFORWINDOW)( |
42 | __in HWND hwnd | 51 | __in HWND hwnd |
43 | ); | 52 | ); |
53 | typedef BOOL (APIENTRY* PFN_SETPROCESSDPIAWARE)(); | ||
54 | typedef HRESULT (APIENTRY* PFN_SETPROCESSDPIAWARENESS)( | ||
55 | __in PROCESS_DPI_AWARENESS value | ||
56 | ); | ||
57 | typedef BOOL (APIENTRY* PFN_SETPROCESSDPIAWARENESSCONTEXT)( | ||
58 | __in DPI_AWARENESS_CONTEXT value | ||
59 | ); | ||
44 | 60 | ||
45 | void DAPI DpiuInitialize(); | 61 | void DAPI DpiuInitialize(); |
46 | void DAPI DpiuUninitialize(); | 62 | void DAPI DpiuUninitialize(); |
@@ -86,6 +102,16 @@ int DAPI DpiuScaleValue( | |||
86 | __in UINT nTargetDpi | 102 | __in UINT nTargetDpi |
87 | ); | 103 | ); |
88 | 104 | ||
105 | /******************************************************************** | ||
106 | DpiuSetProcessDpiAwareness - set the process DPI awareness. The ranking is | ||
107 | PERMONITORV2 > PERMONITOR > SYSTEM > GDISCALED > NONE. | ||
108 | |||
109 | *******************************************************************/ | ||
110 | HRESULT DAPI DpiuSetProcessDpiAwareness( | ||
111 | __in DPIU_AWARENESS supportedAwareness, | ||
112 | __in_opt DPIU_AWARENESS* pSelectedAwareness | ||
113 | ); | ||
114 | |||
89 | #ifdef __cplusplus | 115 | #ifdef __cplusplus |
90 | } | 116 | } |
91 | #endif | 117 | #endif |