2 * ExplorerBrowser Control implementation.
4 * Copyright 2010 David Hedberg
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.
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.
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
24 #define NONAMELESSUNION
25 #define NONAMELESSSTRUCT
31 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(shell);
36 typedef struct _ExplorerBrowserImpl {
37 const IExplorerBrowserVtbl *lpVtbl;
40 } ExplorerBrowserImpl;
42 /**************************************************************************
43 * IExplorerBrowser Implementation
45 static HRESULT WINAPI IExplorerBrowser_fnQueryInterface(IExplorerBrowser *iface,
46 REFIID riid, void **ppvObject)
48 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
49 TRACE("%p (%s, %p)\n", This, shdebugstr_guid(riid), ppvObject);
52 if(IsEqualIID(riid, &IID_IExplorerBrowser) ||
53 IsEqualIID(riid, &IID_IUnknown))
60 IUnknown_AddRef((IUnknown*)*ppvObject);
67 static ULONG WINAPI IExplorerBrowser_fnAddRef(IExplorerBrowser *iface)
69 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
70 LONG ref = InterlockedIncrement(&This->ref);
71 TRACE("%p - ref %d\n", This, ref);
76 static ULONG WINAPI IExplorerBrowser_fnRelease(IExplorerBrowser *iface)
78 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
79 LONG ref = InterlockedDecrement(&This->ref);
80 TRACE("%p - ref %d\n", This, ref);
87 IExplorerBrowser_Destroy(iface);
89 HeapFree(GetProcessHeap(), 0, This);
96 static HRESULT WINAPI IExplorerBrowser_fnInitialize(IExplorerBrowser *iface,
97 HWND hwndParent, const RECT *prc,
98 const FOLDERSETTINGS *pfs)
100 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
101 TRACE("%p (%p, %p, %p)\n", This, hwndParent, prc, pfs);
106 static HRESULT WINAPI IExplorerBrowser_fnDestroy(IExplorerBrowser *iface)
108 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
111 This->destroyed = TRUE;
116 static HRESULT WINAPI IExplorerBrowser_fnSetRect(IExplorerBrowser *iface,
117 HDWP *phdwp, RECT rcBrowser)
119 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
120 FIXME("stub, %p (%p, %s)\n", This, phdwp, wine_dbgstr_rect(&rcBrowser));
125 static HRESULT WINAPI IExplorerBrowser_fnSetPropertyBag(IExplorerBrowser *iface,
126 LPCWSTR pszPropertyBag)
128 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
129 FIXME("stub, %p (%s)\n", This, debugstr_w(pszPropertyBag));
134 static HRESULT WINAPI IExplorerBrowser_fnSetEmptyText(IExplorerBrowser *iface,
135 LPCWSTR pszEmptyText)
137 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
138 FIXME("stub, %p (%s)\n", This, debugstr_w(pszEmptyText));
143 static HRESULT WINAPI IExplorerBrowser_fnSetFolderSettings(IExplorerBrowser *iface,
144 const FOLDERSETTINGS *pfs)
146 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
147 FIXME("stub, %p (%p)\n", This, pfs);
152 static HRESULT WINAPI IExplorerBrowser_fnAdvise(IExplorerBrowser *iface,
153 IExplorerBrowserEvents *psbe,
156 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
157 FIXME("stub, %p (%p, %p)\n", This, psbe, pdwCookie);
162 static HRESULT WINAPI IExplorerBrowser_fnUnadvise(IExplorerBrowser *iface,
165 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
166 FIXME("stub, %p (0x%x)\n", This, dwCookie);
171 static HRESULT WINAPI IExplorerBrowser_fnSetOptions(IExplorerBrowser *iface,
172 EXPLORER_BROWSER_OPTIONS dwFlag)
174 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
175 FIXME("stub, %p (0x%x)\n", This, dwFlag);
180 static HRESULT WINAPI IExplorerBrowser_fnGetOptions(IExplorerBrowser *iface,
181 EXPLORER_BROWSER_OPTIONS *pdwFlag)
183 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
184 FIXME("stub, %p (%p)\n", This, pdwFlag);
189 static HRESULT WINAPI IExplorerBrowser_fnBrowseToIDList(IExplorerBrowser *iface,
190 PCUIDLIST_RELATIVE pidl,
193 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
194 FIXME("stub, %p (%p, 0x%x)\n", This, pidl, uFlags);
199 static HRESULT WINAPI IExplorerBrowser_fnBrowseToObject(IExplorerBrowser *iface,
200 IUnknown *punk, UINT uFlags)
202 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
203 FIXME("stub, %p (%p, 0x%x)\n", This, punk, uFlags);
208 static HRESULT WINAPI IExplorerBrowser_fnFillFromObject(IExplorerBrowser *iface,
210 EXPLORER_BROWSER_FILL_FLAGS dwFlags)
212 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
213 FIXME("stub, %p (%p, 0x%x)\n", This, punk, dwFlags);
218 static HRESULT WINAPI IExplorerBrowser_fnRemoveAll(IExplorerBrowser *iface)
220 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
221 FIXME("stub, %p\n", This);
226 static HRESULT WINAPI IExplorerBrowser_fnGetCurrentView(IExplorerBrowser *iface,
227 REFIID riid, void **ppv)
229 ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface;
230 FIXME("stub, %p (%s, %p)\n", This, shdebugstr_guid(riid), ppv);
236 static const IExplorerBrowserVtbl vt_IExplorerBrowser =
238 IExplorerBrowser_fnQueryInterface,
239 IExplorerBrowser_fnAddRef,
240 IExplorerBrowser_fnRelease,
241 IExplorerBrowser_fnInitialize,
242 IExplorerBrowser_fnDestroy,
243 IExplorerBrowser_fnSetRect,
244 IExplorerBrowser_fnSetPropertyBag,
245 IExplorerBrowser_fnSetEmptyText,
246 IExplorerBrowser_fnSetFolderSettings,
247 IExplorerBrowser_fnAdvise,
248 IExplorerBrowser_fnUnadvise,
249 IExplorerBrowser_fnSetOptions,
250 IExplorerBrowser_fnGetOptions,
251 IExplorerBrowser_fnBrowseToIDList,
252 IExplorerBrowser_fnBrowseToObject,
253 IExplorerBrowser_fnFillFromObject,
254 IExplorerBrowser_fnRemoveAll,
255 IExplorerBrowser_fnGetCurrentView
258 HRESULT WINAPI ExplorerBrowser_Constructor(IUnknown *pUnkOuter, REFIID riid, void **ppv)
260 ExplorerBrowserImpl *eb;
263 TRACE("%p %s %p\n", pUnkOuter, shdebugstr_guid (riid), ppv);
268 return CLASS_E_NOAGGREGATION;
270 eb = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ExplorerBrowserImpl));
272 eb->lpVtbl = &vt_IExplorerBrowser;
274 ret = IExplorerBrowser_QueryInterface((IExplorerBrowser*)eb, riid, ppv);
275 IExplorerBrowser_Release((IExplorerBrowser*)eb);
277 TRACE("--(%p)\n", ppv);