include: Add IFACEMETHOD macros.
[wine.git] / include / dwmapi.h
blobfb39aeeba1077a75354ab4103b4df0240c8f5b6e
1 /*
2 * This library is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU Lesser General Public
4 * License as published by the Free Software Foundation; either
5 * version 2.1 of the License, or (at your option) any later version.
7 * This library is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Lesser General Public License for more details.
12 * You should have received a copy of the GNU Lesser General Public
13 * License along with this library; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 #ifndef __WINE_DWMAPI_H
18 #define __WINE_DWMAPI_H
20 #include "wtypes.h"
21 #include "uxtheme.h"
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
27 #ifndef DWMAPI
28 # define DWMAPI STDAPI
29 # define DWMAPI_(type) STDAPI_(type)
30 #endif
32 DECLARE_HANDLE(HTHUMBNAIL);
33 typedef HTHUMBNAIL *PHTHUMBNAIL;
35 #include <pshpack1.h>
37 static const UINT c_DwmMaxQueuedBuffers = 8;
38 static const UINT c_DwmMaxMonitors = 16;
39 static const UINT c_DwmMaxAdapters = 16;
41 typedef ULONGLONG DWM_FRAME_COUNT;
42 typedef ULONGLONG QPC_TIME;
44 enum DWMWINDOWATTRIBUTE {
45 DWMWA_NCRENDERING_ENABLED = 1,
46 DWMWA_NCRENDERING_POLICY,
47 DWMWA_TRANSITIONS_FORCEDISABLED,
48 DWMWA_ALLOW_NCPAINT,
49 DWMWA_CAPTION_BUTTON_BOUNDS,
50 DWMWA_NONCLIENT_RTL_LAYOUT,
51 DWMWA_FORCE_ICONIC_REPRESENTATION,
52 DWMWA_FLIP3D_POLICY,
53 DWMWA_EXTENDED_FRAME_BOUNDS,
54 DWMWA_HAS_ICONIC_BITMAP,
55 DWMWA_DISALLOW_PEEK,
56 DWMWA_EXCLUDED_FROM_PEEK,
57 DWMWA_CLOAK,
58 DWMWA_CLOAKED,
59 DWMWA_FREEZE_REPRESENTATION,
60 DWMWA_PASSIVE_UPDATE_MODE,
61 DWMWA_USE_HOSTBACKDROPBRUSH,
62 DWMWA_USE_IMMERSIVE_DARK_MODE = 20,
63 DWMWA_WINDOW_CORNER_PREFERENCE = 33,
64 DWMWA_BORDER_COLOR,
65 DWMWA_CAPTION_COLOR,
66 DWMWA_TEXT_COLOR,
67 DWMWA_VISIBLE_FRAME_BORDER_THICKNESS,
68 DWMWA_SYSTEMBACKDROP_TYPE,
69 DWMWA_LAST
72 enum DWMNCRENDERINGPOLICY {
73 DWMNCRP_USEWINDOWSTYLE,
74 DWMNCRP_DISABLED,
75 DWMNCRP_ENABLED,
76 DWMNCRP_LAST
79 enum DWMFLIP3DWINDOWPOLICY {
80 DWMFLIP3D_DEFAULT,
81 DWMFLIP3D_EXCLUDEBELOW,
82 DWMFLIP3D_EXCLUDEABOVE,
83 DWMFLIP3D_LAST
86 typedef enum _DWM_SOURCE_FRAME_SAMPLING {
87 DWM_SOURCE_FRAME_SAMPLING_POINT,
88 DWM_SOURCE_FRAME_SAMPLING_COVERAGE,
89 DWM_SOURCE_FRAME_SAMPLING_LAST
90 } DWM_SOURCE_FRAME_SAMPLING;
92 typedef struct _UNSIGNED_RATIO {
93 UINT32 uiNumerator;
94 UINT32 uiDenominator;
95 } UNSIGNED_RATIO;
97 typedef struct _DWM_TIMING_INFO {
98 UINT32 cbSize;
99 UNSIGNED_RATIO rateRefresh;
100 QPC_TIME qpcRefreshPeriod;
101 UNSIGNED_RATIO rateCompose;
102 QPC_TIME qpcVBlank;
103 DWM_FRAME_COUNT cRefresh;
104 UINT cDXRefresh;
105 QPC_TIME qpcCompose;
106 DWM_FRAME_COUNT cFrame;
107 UINT cDXPresent;
108 DWM_FRAME_COUNT cRefreshFrame;
109 DWM_FRAME_COUNT cFrameSubmitted;
110 UINT cDXPresentSubmitted;
111 DWM_FRAME_COUNT cFrameConfirmed;
112 UINT cDXPresentConfirmed;
113 DWM_FRAME_COUNT cRefreshConfirmed;
114 UINT cDXRefreshConfirmed;
115 DWM_FRAME_COUNT cFramesLate;
116 UINT cFramesOutstanding;
117 DWM_FRAME_COUNT cFrameDisplayed;
118 QPC_TIME qpcFrameDisplayed;
119 DWM_FRAME_COUNT cRefreshFrameDisplayed;
120 DWM_FRAME_COUNT cFrameComplete;
121 QPC_TIME qpcFrameComplete;
122 DWM_FRAME_COUNT cFramePending;
123 QPC_TIME qpcFramePending;
124 DWM_FRAME_COUNT cFramesDisplayed;
125 DWM_FRAME_COUNT cFramesComplete;
126 DWM_FRAME_COUNT cFramesPending;
127 DWM_FRAME_COUNT cFramesAvailable;
128 DWM_FRAME_COUNT cFramesDropped;
129 DWM_FRAME_COUNT cFramesMissed;
130 DWM_FRAME_COUNT cRefreshNextDisplayed;
131 DWM_FRAME_COUNT cRefreshNextPresented;
132 DWM_FRAME_COUNT cRefreshesDisplayed;
133 DWM_FRAME_COUNT cRefreshesPresented;
134 DWM_FRAME_COUNT cRefreshStarted;
135 ULONGLONG cPixelsReceived;
136 ULONGLONG cPixelsDrawn;
137 DWM_FRAME_COUNT cBuffersEmpty;
138 } DWM_TIMING_INFO;
140 typedef struct _MilMatrix3x2D
142 DOUBLE S_11;
143 DOUBLE S_12;
144 DOUBLE S_21;
145 DOUBLE S_22;
146 DOUBLE DX;
147 DOUBLE DY;
148 } MilMatrix3x2D;
150 #define DWM_FRAME_DURATION_DEFAULT -1
152 #define DWM_EC_DISABLECOMPOSITION 0
153 #define DWM_EC_ENABLECOMPOSITION 1
155 #define DWM_BB_ENABLE 0x00000001
156 #define DWM_BB_BLURREGION 0x00000002
157 #define DWM_BB_TRANSITIONONMAXIMIZED 0x00000004
159 typedef struct _DWM_BLURBEHIND
161 DWORD dwFlags;
162 BOOL fEnable;
163 HRGN hRgnBlur;
164 BOOL fTransitionOnMaximized;
165 } DWM_BLURBEHIND, *PDWM_BLURBEHIND;
167 #define DWM_SIT_DISPLAYFRAME 0x00000001
169 #define DWM_CLOAKED_APP 0x00000001
170 #define DWM_CLOAKED_SHELL 0x00000002
171 #define DWM_CLOAKED_INHERITED 0x00000004
173 #define DWM_TNP_RECTDESTINATION 0x00000001
174 #define DWM_TNP_RECTSOURCE 0x00000002
175 #define DWM_TNP_OPACITY 0x00000004
176 #define DWM_TNP_VISIBLE 0x00000008
177 #define DWM_TNP_SOURCECLIENTAREAONLY 0x00000010
179 typedef struct _DWM_THUMBNAIL_PROPERTIES
181 DWORD dwFlags;
182 RECT rcDestination;
183 RECT rcSource;
184 BYTE opacity;
185 BOOL fVisible;
186 BOOL fSourceClientAreaOnly;
187 } DWM_THUMBNAIL_PROPERTIES, *PDWM_THUMBNAIL_PROPERTIES;
189 typedef struct _DWM_PRESENT_PARAMETERS {
190 UINT32 cbSize;
191 BOOL fQueue;
192 DWM_FRAME_COUNT cRefreshStart;
193 UINT cBuffer;
194 BOOL fUseSourceRate;
195 UNSIGNED_RATIO rateSource;
196 UINT cRefreshesPerFrame;
197 DWM_SOURCE_FRAME_SAMPLING eSampling;
198 } DWM_PRESENT_PARAMETERS;
200 #include <poppack.h>
202 DWMAPI DwmAttachMilContent(HWND);
203 DWMAPI_(BOOL) DwmDefWindowProc(HWND, UINT, WPARAM, LPARAM, LRESULT*);
204 DWMAPI DwmDetachMilContent(HWND);
205 DWMAPI DwmEnableBlurBehindWindow(HWND, const DWM_BLURBEHIND *);
206 DWMAPI DwmEnableComposition(UINT);
207 DWMAPI DwmEnableMMCSS(BOOL);
208 DWMAPI DwmExtendFrameIntoClientArea(HWND,const MARGINS*);
209 DWMAPI DwmFlush(void);
210 DWMAPI DwmGetColorizationColor(DWORD *, BOOL *);
211 DWMAPI DwmGetCompositionTimingInfo(HWND,DWM_TIMING_INFO*);
212 DWMAPI DwmGetGraphicsStreamClient(UINT, UUID *);
213 DWMAPI DwmGetGraphicsStreamTransformHint(UINT, MilMatrix3x2D *);
214 DWMAPI DwmGetTransportAttributes(BOOL*, BOOL*, DWORD*);
215 DWMAPI DwmGetWindowAttribute(HWND, DWORD, PVOID, DWORD);
216 DWMAPI DwmInvalidateIconicBitmaps(HWND);
217 DWMAPI DwmIsCompositionEnabled(BOOL*);
218 DWMAPI DwmRegisterThumbnail(HWND, HWND, PHTHUMBNAIL);
219 DWMAPI DwmSetIconicLivePreviewBitmap(HWND, HBITMAP, POINT*, DWORD);
220 DWMAPI DwmSetIconicThumbnail(HWND, HBITMAP, DWORD);
221 DWMAPI DwmSetPresentParameters(HWND, DWM_PRESENT_PARAMETERS *);
222 DWMAPI DwmSetWindowAttribute(HWND, DWORD, LPCVOID, DWORD);
223 DWMAPI DwmUnregisterThumbnail(HTHUMBNAIL);
224 DWMAPI DwmUpdateThumbnailProperties(HTHUMBNAIL, const DWM_THUMBNAIL_PROPERTIES *);
226 #ifdef __cplusplus
228 #endif
230 #endif /* __WINE_DWMAPI_H */