* Sync up to trunk HEAD (r62975).
[reactos.git] / dll / win32 / dwmapi / dwmapi_main.c
1 /*
2 * Dwmapi
3 *
4 * Copyright 2007 Andras Kovacs
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 *
20 */
21
22 #define WIN32_NO_STATUS
23 #define _INC_WINDOWS
24 #define COM_NO_WINDOWS_H
25
26 #include <config.h>
27 #include <stdarg.h>
28
29 #define NONAMELESSUNION
30 #define NONAMELESSSTRUCT
31 #define COBJMACROS
32 #include <windef.h>
33 #include <winbase.h>
34 #include <wingdi.h>
35 #include <winuser.h>
36 #include <dwmapi.h>
37 #include <wine/debug.h>
38
39 WINE_DEFAULT_DEBUG_CHANNEL(dwmapi);
40
41
42 /* At process attach */
43 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
44 {
45 switch(fdwReason)
46 {
47 case DLL_WINE_PREATTACH:
48 return FALSE; /* prefer native version */
49 case DLL_PROCESS_ATTACH:
50 DisableThreadLibraryCalls( hInstDLL );
51 break;
52 }
53 return TRUE;
54 }
55
56 /**********************************************************************
57 * DwmIsCompositionEnabled (DWMAPI.@)
58 */
59 HRESULT WINAPI DwmIsCompositionEnabled(BOOL *enabled)
60 {
61 static int once;
62 if (!once)
63 {
64 FIXME("%p\n", enabled);
65 once = 1;
66 }
67 else
68 TRACE("%p\n", enabled);
69
70 *enabled = FALSE;
71 return S_OK;
72 }
73
74 /**********************************************************************
75 * DwmEnableComposition (DWMAPI.102)
76 */
77 HRESULT WINAPI DwmEnableComposition(UINT uCompositionAction)
78 {
79 FIXME("(%d) stub\n", uCompositionAction);
80
81 return S_OK;
82 }
83
84 /**********************************************************************
85 * DwmExtendFrameIntoClientArea (DWMAPI.@)
86 */
87 HRESULT WINAPI DwmExtendFrameIntoClientArea(HWND hwnd, const MARGINS* margins)
88 {
89 FIXME("(%p, %p) stub\n", hwnd, margins);
90
91 return E_NOTIMPL;
92 }
93
94 /**********************************************************************
95 * DwmGetColorizationColor (DWMAPI.@)
96 */
97 HRESULT WINAPI DwmGetColorizationColor(DWORD *colorization, BOOL opaque_blend)
98 {
99 FIXME("(%p, %d) stub\n", colorization, opaque_blend);
100
101 return E_NOTIMPL;
102 }
103
104 /**********************************************************************
105 * DwmFlush (DWMAPI.@)
106 */
107 HRESULT WINAPI DwmFlush(void)
108 {
109 FIXME("() stub\n");
110
111 return E_NOTIMPL;
112 }
113
114 /**********************************************************************
115 * DwmSetWindowAttribute (DWMAPI.@)
116 */
117 HRESULT WINAPI DwmSetWindowAttribute(HWND hwnd, DWORD attributenum, LPCVOID attribute, DWORD size)
118 {
119 static BOOL once;
120
121 if (!once++) FIXME("(%p, %x, %p, %x) stub\n", hwnd, attributenum, attribute, size);
122
123 return E_NOTIMPL;
124 }
125
126 /**********************************************************************
127 * DwmGetGraphicsStreamClient (DWMAPI.@)
128 */
129 HRESULT WINAPI DwmGetGraphicsStreamClient(UINT uIndex, UUID *pClientUuid)
130 {
131 FIXME("(%d, %p) stub\n", uIndex, pClientUuid);
132
133 return E_NOTIMPL;
134 }
135
136 /**********************************************************************
137 * DwmGetTransportAttributes (DWMAPI.@)
138 */
139 HRESULT WINAPI DwmGetTransportAttributes(BOOL *pfIsRemoting, BOOL *pfIsConnected, DWORD *pDwGeneration)
140 {
141 FIXME("(%p, %p, %p) stub\n", pfIsRemoting, pfIsConnected, pDwGeneration);
142
143 return E_NOTIMPL;
144 }
145
146 /**********************************************************************
147 * DwmUnregisterThumbnail (DWMAPI.@)
148 */
149 HRESULT WINAPI DwmUnregisterThumbnail(HTHUMBNAIL thumbnail)
150 {
151 FIXME("(%p) stub\n", thumbnail);
152
153 return E_NOTIMPL;
154 }
155
156 /**********************************************************************
157 * DwmEnableMMCSS (DWMAPI.@)
158 */
159 HRESULT WINAPI DwmEnableMMCSS(BOOL enableMMCSS)
160 {
161 FIXME("(%d) stub\n", enableMMCSS);
162
163 return S_OK;
164 }
165
166 /**********************************************************************
167 * DwmGetGraphicsStreamTransformHint (DWMAPI.@)
168 */
169 HRESULT WINAPI DwmGetGraphicsStreamTransformHint(UINT uIndex, MilMatrix3x2D *pTransform)
170 {
171 FIXME("(%d, %p) stub\n", uIndex, pTransform);
172
173 return E_NOTIMPL;
174 }
175
176 /**********************************************************************
177 * DwmEnableBlurBehindWindow (DWMAPI.@)
178 */
179 HRESULT WINAPI DwmEnableBlurBehindWindow(HWND hWnd, const DWM_BLURBEHIND *pBlurBuf)
180 {
181 FIXME("%p %p\n", hWnd, pBlurBuf);
182
183 return E_NOTIMPL;
184 }
185
186 /**********************************************************************
187 * DwmDefWindowProc (DWMAPI.@)
188 */
189 BOOL WINAPI DwmDefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT *plResult)
190 {
191 static int i;
192
193 if (!i++) FIXME("stub\n");
194
195 return FALSE;
196 }
197
198 /**********************************************************************
199 * DwmGetWindowAttribute (DWMAPI.@)
200 */
201 HRESULT WINAPI DwmGetWindowAttribute(HWND hwnd, DWORD attribute, PVOID pv_attribute, DWORD size)
202 {
203 FIXME("(%p %d %p %d) stub\n", hwnd, attribute, pv_attribute, size);
204
205 return E_NOTIMPL;
206 }
207
208 /**********************************************************************
209 * DwmRegisterThumbnail (DWMAPI.@)
210 */
211 HRESULT WINAPI DwmRegisterThumbnail(HWND dest, HWND src, PHTHUMBNAIL thumbnail_id)
212 {
213 FIXME("(%p %p %p) stub\n", dest, src, thumbnail_id);
214
215 return E_NOTIMPL;
216 }
217
218 /**********************************************************************
219 * DwmGetCompositionTimingInfo (DWMAPI.@)
220 */
221 HRESULT WINAPI DwmGetCompositionTimingInfo(HWND hwnd, DWM_TIMING_INFO *info)
222 {
223 static int i;
224
225 if(!i++) FIXME("(%p %p)\n", hwnd, info);
226
227 return E_NOTIMPL;
228 }