dwmapi.h (9303B) - Raw
1 /** 2 * This file is part of the mingw-w64 runtime package. 3 * No warranty is given; refer to the file DISCLAIMER within this package. 4 */ 5 #include <winapifamily.h> 6 7 #ifndef _DWMAPI_H_ 8 #define _DWMAPI_H_ 9 10 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 11 #ifndef DWMAPI 12 #define DWMAPI EXTERN_C DECLSPEC_IMPORT HRESULT WINAPI 13 #define DWMAPI_(type) EXTERN_C DECLSPEC_IMPORT type WINAPI 14 #endif 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 20 #include <wtypes.h> 21 #include <uxtheme.h> 22 23 #include <pshpack1.h> 24 25 typedef ULONGLONG DWM_FRAME_COUNT; 26 typedef ULONGLONG QPC_TIME; 27 28 typedef HANDLE HTHUMBNAIL; 29 typedef HTHUMBNAIL *PHTHUMBNAIL; 30 31 enum DWMWINDOWATTRIBUTE { 32 DWMWA_NCRENDERING_ENABLED = 1, 33 DWMWA_NCRENDERING_POLICY, 34 DWMWA_TRANSITIONS_FORCEDISABLED, 35 DWMWA_ALLOW_NCPAINT, 36 DWMWA_CAPTION_BUTTON_BOUNDS, 37 DWMWA_NONCLIENT_RTL_LAYOUT, 38 DWMWA_FORCE_ICONIC_REPRESENTATION, 39 DWMWA_FLIP3D_POLICY, 40 DWMWA_EXTENDED_FRAME_BOUNDS, 41 DWMWA_HAS_ICONIC_BITMAP, 42 DWMWA_DISALLOW_PEEK, 43 DWMWA_EXCLUDED_FROM_PEEK, 44 DWMWA_CLOAK, 45 DWMWA_CLOAKED, 46 DWMWA_FREEZE_REPRESENTATION, 47 DWMWA_PASSIVE_UPDATE_MODE, 48 DWMWA_USE_HOSTBACKDROPBRUSH, 49 DWMWA_USE_IMMERSIVE_DARK_MODE = 20, 50 DWMWA_WINDOW_CORNER_PREFERENCE = 33, 51 DWMWA_BORDER_COLOR, 52 DWMWA_CAPTION_COLOR, 53 DWMWA_TEXT_COLOR, 54 DWMWA_VISIBLE_FRAME_BORDER_THICKNESS, 55 DWMWA_SYSTEMBACKDROP_TYPE, 56 DWMWA_LAST 57 }; 58 59 typedef enum { 60 DWMWCP_DEFAULT = 0, 61 DWMWCP_DONOTROUND = 1, 62 DWMWCP_ROUND = 2, 63 DWMWCP_ROUNDSMALL = 3 64 } DWM_WINDOW_CORNER_PREFERENCE; 65 66 #define DWMWA_COLOR_DEFAULT 0xFFFFFFFF 67 #define DWMWA_COLOR_NONE 0xFFFFFFFE 68 69 enum DWM_SYSTEMBACKDROP_TYPE { 70 DWMSBT_AUTO, 71 DWMSBT_NONE, 72 DWMSBT_MAINWINDOW, 73 DWMSBT_TRANSIENTWINDOW, 74 DWMSBT_TABBEDWINDOW 75 }; 76 77 enum DWMFLIP3DWINDOWPOLICY { 78 DWMFLIP3D_DEFAULT, 79 DWMFLIP3D_EXCLUDEBELOW, 80 DWMFLIP3D_EXCLUDEABOVE, 81 DWMFLIP3D_LAST 82 }; 83 84 enum DWMNCRENDERINGPOLICY { 85 DWMNCRP_USEWINDOWSTYLE, 86 DWMNCRP_DISABLED, 87 DWMNCRP_ENABLED, 88 DWMNCRP_LAST 89 }; 90 91 #if NTDDI_VERSION >= NTDDI_WIN8 92 enum GESTURE_TYPE { 93 GT_PEN_TAP = 0, 94 GT_PEN_DOUBLETAP = 1, 95 GT_PEN_RIGHTTAP = 2, 96 GT_PEN_PRESSANDHOLD = 3, 97 GT_PEN_PRESSANDHOLDABORT = 4, 98 GT_TOUCH_TAP = 5, 99 GT_TOUCH_DOUBLETAP = 6, 100 GT_TOUCH_RIGHTTAP = 7, 101 GT_TOUCH_PRESSANDHOLD = 8, 102 GT_TOUCH_PRESSANDHOLDABORT = 9, 103 GT_TOUCH_PRESSANDTAP = 10 104 }; 105 106 enum DWM_SHOWCONTACT { 107 DWMSC_DOWN = 0x1, 108 DWMSC_UP = 0x2, 109 DWMSC_DRAG = 0x4, 110 DWMSC_HOLD = 0x8, 111 DWMSC_PENBARREL = 0x10, 112 DWMSC_NONE = 0x0, 113 DWMSC_ALL = 0xffffffff 114 }; 115 116 DEFINE_ENUM_FLAG_OPERATORS (DWM_SHOWCONTACT); 117 #endif 118 119 #if NTDDI_VERSION >= NTDDI_WIN10_RS4 120 enum DWM_TAB_WINDOW_REQUIREMENTS { 121 DWMTWR_NONE = 0x0000, 122 DWMTWR_IMPLEMENTED_BY_SYSTEM = 0x0001, 123 DWMTWR_WINDOW_RELATIONSHIP = 0x0002, 124 DWMTWR_WINDOW_STYLES = 0x0004, 125 DWMTWR_WINDOW_REGION = 0x0008, 126 DWMTWR_WINDOW_DWM_ATTRIBUTES = 0x0010, 127 DWMTWR_WINDOW_MARGINS = 0x0020, 128 DWMTWR_TABBING_ENABLED = 0x0040, 129 DWMTWR_USER_POLICY = 0x0080, 130 DWMTWR_GROUP_POLICY = 0x0100, 131 DWMTWR_APP_COMPAT = 0x0200 132 }; 133 134 DEFINE_ENUM_FLAG_OPERATORS(DWM_TAB_WINDOW_REQUIREMENTS); 135 #endif 136 137 typedef enum { 138 DWM_SOURCE_FRAME_SAMPLING_POINT, 139 DWM_SOURCE_FRAME_SAMPLING_COVERAGE, 140 DWM_SOURCE_FRAME_SAMPLING_LAST 141 } DWM_SOURCE_FRAME_SAMPLING; 142 143 enum DWMTRANSITION_OWNEDWINDOW_TARGET { 144 DWMTRANSITION_OWNEDWINDOW_NULL = -1, 145 DWMTRANSITION_OWNEDWINDOW_REPOSITION = 0 146 }; 147 148 typedef struct _DWM_BLURBEHIND { 149 DWORD dwFlags; 150 WINBOOL fEnable; 151 HRGN hRgnBlur; 152 WINBOOL fTransitionOnMaximized; 153 } DWM_BLURBEHIND, *PDWM_BLURBEHIND; 154 155 typedef struct _DWM_THUMBNAIL_PROPERTIES { 156 DWORD dwFlags; 157 RECT rcDestination; 158 RECT rcSource; 159 BYTE opacity; 160 WINBOOL fVisible; 161 WINBOOL fSourceClientAreaOnly; 162 } DWM_THUMBNAIL_PROPERTIES, *PDWM_THUMBNAIL_PROPERTIES; 163 164 typedef struct _UNSIGNED_RATIO { 165 UINT32 uiNumerator; 166 UINT32 uiDenominator; 167 } UNSIGNED_RATIO; 168 169 typedef struct _DWM_TIMING_INFO { 170 UINT32 cbSize; 171 UNSIGNED_RATIO rateRefresh; 172 QPC_TIME qpcRefreshPeriod; 173 UNSIGNED_RATIO rateCompose; 174 QPC_TIME qpcVBlank; 175 DWM_FRAME_COUNT cRefresh; 176 UINT cDXRefresh; 177 QPC_TIME qpcCompose; 178 DWM_FRAME_COUNT cFrame; 179 UINT cDXPresent; 180 DWM_FRAME_COUNT cRefreshFrame; 181 DWM_FRAME_COUNT cFrameSubmitted; 182 UINT cDXPresentSubmitted; 183 DWM_FRAME_COUNT cFrameConfirmed; 184 UINT cDXPresentConfirmed; 185 DWM_FRAME_COUNT cRefreshConfirmed; 186 UINT cDXRefreshConfirmed; 187 DWM_FRAME_COUNT cFramesLate; 188 UINT cFramesOutstanding; 189 DWM_FRAME_COUNT cFrameDisplayed; 190 QPC_TIME qpcFrameDisplayed; 191 DWM_FRAME_COUNT cRefreshFrameDisplayed; 192 DWM_FRAME_COUNT cFrameComplete; 193 QPC_TIME qpcFrameComplete; 194 DWM_FRAME_COUNT cFramePending; 195 QPC_TIME qpcFramePending; 196 DWM_FRAME_COUNT cFramesDisplayed; 197 DWM_FRAME_COUNT cFramesComplete; 198 DWM_FRAME_COUNT cFramesPending; 199 DWM_FRAME_COUNT cFramesAvailable; 200 DWM_FRAME_COUNT cFramesDropped; 201 DWM_FRAME_COUNT cFramesMissed; 202 DWM_FRAME_COUNT cRefreshNextDisplayed; 203 DWM_FRAME_COUNT cRefreshNextPresented; 204 DWM_FRAME_COUNT cRefreshesDisplayed; 205 DWM_FRAME_COUNT cRefreshesPresented; 206 DWM_FRAME_COUNT cRefreshStarted; 207 ULONGLONG cPixelsReceived; 208 ULONGLONG cPixelsDrawn; 209 DWM_FRAME_COUNT cBuffersEmpty; 210 } DWM_TIMING_INFO; 211 212 typedef struct _DWM_PRESENT_PARAMETERS { 213 UINT32 cbSize; 214 WINBOOL fQueue; 215 DWM_FRAME_COUNT cRefreshStart; 216 UINT cBuffer; 217 WINBOOL fUseSourceRate; 218 UNSIGNED_RATIO rateSource; 219 UINT cRefreshesPerFrame; 220 DWM_SOURCE_FRAME_SAMPLING eSampling; 221 } DWM_PRESENT_PARAMETERS; 222 223 #ifndef _MIL_MATRIX3X2D_DEFINED 224 #define _MIL_MATRIX3X2D_DEFINED 225 226 typedef struct _MilMatrix3x2D { 227 DOUBLE S_11; 228 DOUBLE S_12; 229 DOUBLE S_21; 230 DOUBLE S_22; 231 DOUBLE DX; 232 DOUBLE DY; 233 } MilMatrix3x2D; 234 #endif 235 236 #ifndef MILCORE_MIL_MATRIX3X2D_COMPAT_TYPEDEF 237 #define MILCORE_MIL_MATRIX3X2D_COMPAT_TYPEDEF 238 typedef MilMatrix3x2D MIL_MATRIX3X2D; 239 #endif 240 241 #include <poppack.h> 242 243 #define DWM_BB_ENABLE 0x1 244 #define DWM_BB_BLURREGION 0x2 245 #define DWM_BB_TRANSITIONONMAXIMIZED 0x4 246 247 #define DWM_CLOAKED_APP 0x1 248 #define DWM_CLOAKED_SHELL 0x2 249 #define DWM_CLOAKED_INHERITED 0x4 250 251 #define DWM_TNP_RECTDESTINATION 0x1 252 #define DWM_TNP_RECTSOURCE 0x2 253 #define DWM_TNP_OPACITY 0x4 254 #define DWM_TNP_VISIBLE 0x8 255 #define DWM_TNP_SOURCECLIENTAREAONLY 0x10 256 257 #define DWM_FRAME_DURATION_DEFAULT -1 258 259 #define c_DwmMaxQueuedBuffers 8 260 #define c_DwmMaxMonitors 16 261 #define c_DwmMaxAdapters 16 262 263 #define DWM_EC_DISABLECOMPOSITION 0 264 #define DWM_EC_ENABLECOMPOSITION 1 265 266 #if _WIN32_WINNT >= 0x0601 267 #define DWM_SIT_DISPLAYFRAME 0x1 268 #endif 269 270 DWMAPI_(WINBOOL) DwmDefWindowProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *plResult); 271 DWMAPI DwmEnableBlurBehindWindow (HWND hWnd, const DWM_BLURBEHIND *pBlurBehind); 272 DWMAPI DwmEnableComposition (UINT uCompositionAction); 273 DWMAPI DwmEnableMMCSS (WINBOOL fEnableMMCSS); 274 DWMAPI DwmExtendFrameIntoClientArea (HWND hWnd, const MARGINS *pMarInset); 275 DWMAPI DwmGetColorizationColor (DWORD *pcrColorization, WINBOOL *pfOpaqueBlend); 276 DWMAPI DwmGetCompositionTimingInfo (HWND hwnd, DWM_TIMING_INFO *pTimingInfo); 277 DWMAPI DwmGetWindowAttribute (HWND hwnd, DWORD dwAttribute, PVOID pvAttribute, DWORD cbAttribute); 278 DWMAPI DwmIsCompositionEnabled (WINBOOL *pfEnabled); 279 DWMAPI DwmModifyPreviousDxFrameDuration (HWND hwnd, INT cRefreshes, WINBOOL fRelative); 280 DWMAPI DwmQueryThumbnailSourceSize (HTHUMBNAIL hThumbnail, PSIZE pSize); 281 DWMAPI DwmRegisterThumbnail (HWND hwndDestination, HWND hwndSource, PHTHUMBNAIL phThumbnailId); 282 DWMAPI DwmSetDxFrameDuration (HWND hwnd, INT cRefreshes); 283 DWMAPI DwmSetPresentParameters (HWND hwnd, DWM_PRESENT_PARAMETERS *pPresentParams); 284 DWMAPI DwmSetWindowAttribute (HWND hwnd, DWORD dwAttribute, LPCVOID pvAttribute, DWORD cbAttribute); 285 DWMAPI DwmUnregisterThumbnail (HTHUMBNAIL hThumbnailId); 286 DWMAPI DwmUpdateThumbnailProperties (HTHUMBNAIL hThumbnailId, const DWM_THUMBNAIL_PROPERTIES *ptnProperties); 287 DWMAPI DwmAttachMilContent (HWND hwnd); 288 DWMAPI DwmDetachMilContent (HWND hwnd); 289 DWMAPI DwmFlush (void); 290 DWMAPI DwmGetGraphicsStreamTransformHint (UINT uIndex, MilMatrix3x2D *pTransform); 291 DWMAPI DwmGetGraphicsStreamClient (UINT uIndex, UUID *pClientUuid); 292 DWMAPI DwmGetTransportAttributes (WINBOOL *pfIsRemoting, WINBOOL *pfIsConnected, DWORD *pDwGeneration); 293 DWMAPI DwmTransitionOwnedWindow (HWND hwnd, enum DWMTRANSITION_OWNEDWINDOW_TARGET target); 294 #if _WIN32_WINNT >= 0x0601 295 DWMAPI DwmSetIconicThumbnail (HWND hwnd, HBITMAP hbmp, DWORD dwSITFlags); 296 DWMAPI DwmSetIconicLivePreviewBitmap (HWND hwnd, HBITMAP hbmp, POINT *pptClient, DWORD dwSITFlags); 297 DWMAPI DwmInvalidateIconicBitmaps (HWND hwnd); 298 #endif 299 #if NTDDI_VERSION >= NTDDI_WIN8 300 DWMAPI DwmRenderGesture (enum GESTURE_TYPE gt, UINT cContacts, const DWORD *pdwPointerID, const POINT *pPoints); 301 DWMAPI DwmTetherContact (DWORD dwPointerID, WINBOOL fEnable, POINT ptTether); 302 DWMAPI DwmShowContact (DWORD dwPointerID, enum DWM_SHOWCONTACT eShowContact); 303 #endif 304 #if NTDDI_VERSION >= NTDDI_WIN10_RS4 305 DWMAPI DwmGetUnmetTabRequirements (HWND appWindow, enum DWM_TAB_WINDOW_REQUIREMENTS *value); 306 #endif 307 308 #ifdef __cplusplus 309 } 310 #endif 311 #endif 312 #endif