2 * Implementation of IWebBrowser interface for IE Web Browser control
4 * Copyright 2001 John R. Sheets (for CodeWeavers)
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include "wine/debug.h"
24 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw
);
26 /**********************************************************************
27 * Implement the IWebBrowser interface
30 static HRESULT WINAPI
WB_QueryInterface(IWebBrowser
*iface
, REFIID riid
, LPVOID
*ppobj
)
32 FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid
));
34 if (ppobj
== NULL
) return E_POINTER
;
39 static ULONG WINAPI
WB_AddRef(IWebBrowser
*iface
)
43 return 2; /* non-heap based object */
46 static ULONG WINAPI
WB_Release(IWebBrowser
*iface
)
48 SHDOCVW_UnlockModule();
50 return 1; /* non-heap based object */
53 /* IDispatch methods */
54 static HRESULT WINAPI
WB_GetTypeInfoCount(IWebBrowser
*iface
, UINT
*pctinfo
)
60 static HRESULT WINAPI
WB_GetTypeInfo(IWebBrowser
*iface
, UINT iTInfo
, LCID lcid
,
67 static HRESULT WINAPI
WB_GetIDsOfNames(IWebBrowser
*iface
, REFIID riid
,
68 LPOLESTR
*rgszNames
, UINT cNames
,
69 LCID lcid
, DISPID
*rgDispId
)
75 static HRESULT WINAPI
WB_Invoke(IWebBrowser
*iface
, DISPID dispIdMember
,
76 REFIID riid
, LCID lcid
, WORD wFlags
,
77 DISPPARAMS
*pDispParams
, VARIANT
*pVarResult
,
78 EXCEPINFO
*pExepInfo
, UINT
*puArgErr
)
80 FIXME("stub dispIdMember = %d, IID = %s\n", (int)dispIdMember
, debugstr_guid(riid
));
84 /* IWebBrowser methods */
85 static HRESULT WINAPI
WB_GoBack(IWebBrowser
*iface
)
91 static HRESULT WINAPI
WB_GoForward(IWebBrowser
*iface
)
97 static HRESULT WINAPI
WB_GoHome(IWebBrowser
*iface
)
103 static HRESULT WINAPI
WB_GoSearch(IWebBrowser
*iface
)
109 static HRESULT WINAPI
WB_Navigate(IWebBrowser
*iface
, BSTR URL
,
110 VARIANT
*Flags
, VARIANT
*TargetFrameName
,
111 VARIANT
*PostData
, VARIANT
*Headers
)
113 FIXME("stub: URL = %p (%p, %p, %p, %p)\n", URL
, Flags
, TargetFrameName
,
118 static HRESULT WINAPI
WB_Refresh(IWebBrowser
*iface
)
124 static HRESULT WINAPI
WB_Refresh2(IWebBrowser
*iface
, VARIANT
*Level
)
126 FIXME("stub: %p\n", Level
);
130 static HRESULT WINAPI
WB_Stop(IWebBrowser
*iface
)
136 static HRESULT WINAPI
WB_get_Application(IWebBrowser
*iface
, IDispatch
**ppDisp
)
142 static HRESULT WINAPI
WB_get_Parent(IWebBrowser
*iface
, IDispatch
**ppDisp
)
148 static HRESULT WINAPI
WB_get_Container(IWebBrowser
*iface
, IDispatch
**ppDisp
)
154 static HRESULT WINAPI
WB_get_Document(IWebBrowser
*iface
, IDispatch
**ppDisp
)
160 static HRESULT WINAPI
WB_get_TopLevelContainer(IWebBrowser
*iface
, VARIANT_BOOL
*pBool
)
166 static HRESULT WINAPI
WB_get_Type(IWebBrowser
*iface
, BSTR
*Type
)
172 static HRESULT WINAPI
WB_get_Left(IWebBrowser
*iface
, long *pl
)
178 static HRESULT WINAPI
WB_put_Left(IWebBrowser
*iface
, long Left
)
184 static HRESULT WINAPI
WB_get_Top(IWebBrowser
*iface
, long *pl
)
190 static HRESULT WINAPI
WB_put_Top(IWebBrowser
*iface
, long Top
)
196 static HRESULT WINAPI
WB_get_Width(IWebBrowser
*iface
, long *pl
)
202 static HRESULT WINAPI
WB_put_Width(IWebBrowser
*iface
, long Width
)
208 static HRESULT WINAPI
WB_get_Height(IWebBrowser
*iface
, long *pl
)
214 static HRESULT WINAPI
WB_put_Height(IWebBrowser
*iface
, long Height
)
220 static HRESULT WINAPI
WB_get_LocationName(IWebBrowser
*iface
, BSTR
*LocationName
)
226 static HRESULT WINAPI
WB_get_LocationURL(IWebBrowser
*iface
, BSTR
*LocationURL
)
232 static HRESULT WINAPI
WB_get_Busy(IWebBrowser
*iface
, VARIANT_BOOL
*pBool
)
238 /**********************************************************************
239 * IWebBrowser virtual function table for IE Web Browser component
242 static IWebBrowserVtbl WB_Vtbl
=
263 WB_get_TopLevelContainer
,
278 IWebBrowserImpl SHDOCVW_WebBrowser
= {&WB_Vtbl
};