2002-05-05 21:40:57 +02:00
|
|
|
/*
|
|
|
|
* Implementation of IWebBrowser interface for IE Web Browser control
|
|
|
|
*
|
|
|
|
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "wine/debug.h"
|
|
|
|
#include "shdocvw.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* Implement the IWebBrowser interface
|
|
|
|
*/
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_QueryInterface(IWebBrowser *iface, REFIID riid, LPVOID *ppobj)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IWebBrowserImpl *This = (IWebBrowserImpl *)iface;
|
2002-05-05 21:40:57 +02:00
|
|
|
|
|
|
|
FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static ULONG WINAPI WB_AddRef(IWebBrowser *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IWebBrowserImpl *This = (IWebBrowserImpl *)iface;
|
2005-01-14 17:02:20 +01:00
|
|
|
ULONG refCount = InterlockedIncrement(&This->ref);
|
2002-05-05 21:40:57 +02:00
|
|
|
|
2005-01-14 17:02:20 +01:00
|
|
|
TRACE("(%p)->(ref before=%lu)\n", This, refCount - 1);
|
|
|
|
|
|
|
|
return refCount;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static ULONG WINAPI WB_Release(IWebBrowser *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2004-09-06 22:34:29 +02:00
|
|
|
IWebBrowserImpl *This = (IWebBrowserImpl *)iface;
|
2005-01-14 17:02:20 +01:00
|
|
|
ULONG refCount = InterlockedDecrement(&This->ref);
|
2002-05-05 21:40:57 +02:00
|
|
|
|
|
|
|
/* static class, won't be freed */
|
2005-01-14 17:02:20 +01:00
|
|
|
TRACE("(%p)->(ref before=%lu)\n", This, refCount + 1);
|
|
|
|
|
|
|
|
return refCount;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* IDispatch methods */
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_GetTypeInfoCount(IWebBrowser *iface, UINT *pctinfo)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_GetTypeInfo(IWebBrowser *iface, UINT iTInfo, LCID lcid,
|
2002-05-05 21:40:57 +02:00
|
|
|
LPTYPEINFO *ppTInfo)
|
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_GetIDsOfNames(IWebBrowser *iface, REFIID riid,
|
2002-05-05 21:40:57 +02:00
|
|
|
LPOLESTR *rgszNames, UINT cNames,
|
|
|
|
LCID lcid, DISPID *rgDispId)
|
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_Invoke(IWebBrowser *iface, DISPID dispIdMember,
|
2002-05-05 21:40:57 +02:00
|
|
|
REFIID riid, LCID lcid, WORD wFlags,
|
|
|
|
DISPPARAMS *pDispParams, VARIANT *pVarResult,
|
|
|
|
EXCEPINFO *pExepInfo, UINT *puArgErr)
|
|
|
|
{
|
|
|
|
FIXME("stub dispIdMember = %d, IID = %s\n", (int)dispIdMember, debugstr_guid(riid));
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* IWebBrowser methods */
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_GoBack(IWebBrowser *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_GoForward(IWebBrowser *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_GoHome(IWebBrowser *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_GoSearch(IWebBrowser *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_Navigate(IWebBrowser *iface, BSTR URL,
|
2002-05-05 21:40:57 +02:00
|
|
|
VARIANT *Flags, VARIANT *TargetFrameName,
|
|
|
|
VARIANT *PostData, VARIANT *Headers)
|
|
|
|
{
|
|
|
|
FIXME("stub: URL = %p (%p, %p, %p, %p)\n", URL, Flags, TargetFrameName,
|
|
|
|
PostData, Headers);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_Refresh(IWebBrowser *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_Refresh2(IWebBrowser *iface, VARIANT *Level)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub: %p\n", Level);
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_Stop(IWebBrowser *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_get_Application(IWebBrowser *iface, IDispatch **ppDisp)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_get_Parent(IWebBrowser *iface, IDispatch **ppDisp)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_get_Container(IWebBrowser *iface, IDispatch **ppDisp)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_get_Document(IWebBrowser *iface, IDispatch **ppDisp)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_get_TopLevelContainer(IWebBrowser *iface, VARIANT_BOOL *pBool)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_get_Type(IWebBrowser *iface, BSTR *Type)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_get_Left(IWebBrowser *iface, long *pl)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_put_Left(IWebBrowser *iface, long Left)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_get_Top(IWebBrowser *iface, long *pl)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_put_Top(IWebBrowser *iface, long Top)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_get_Width(IWebBrowser *iface, long *pl)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_put_Width(IWebBrowser *iface, long Width)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_get_Height(IWebBrowser *iface, long *pl)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_put_Height(IWebBrowser *iface, long Height)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_get_LocationName(IWebBrowser *iface, BSTR *LocationName)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_get_LocationURL(IWebBrowser *iface, BSTR *LocationURL)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2003-09-04 04:00:46 +02:00
|
|
|
static HRESULT WINAPI WB_get_Busy(IWebBrowser *iface, VARIANT_BOOL *pBool)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
FIXME("stub \n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* IWebBrowser virtual function table for IE Web Browser component
|
|
|
|
*/
|
|
|
|
|
2004-08-13 01:00:51 +02:00
|
|
|
static IWebBrowserVtbl WB_Vtbl =
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
|
|
|
WB_QueryInterface,
|
|
|
|
WB_AddRef,
|
|
|
|
WB_Release,
|
|
|
|
WB_GetTypeInfoCount,
|
|
|
|
WB_GetTypeInfo,
|
|
|
|
WB_GetIDsOfNames,
|
|
|
|
WB_Invoke,
|
|
|
|
WB_GoBack,
|
|
|
|
WB_GoForward,
|
|
|
|
WB_GoHome,
|
|
|
|
WB_GoSearch,
|
|
|
|
WB_Navigate,
|
|
|
|
WB_Refresh,
|
|
|
|
WB_Refresh2,
|
|
|
|
WB_Stop,
|
|
|
|
WB_get_Application,
|
|
|
|
WB_get_Parent,
|
|
|
|
WB_get_Container,
|
|
|
|
WB_get_Document,
|
|
|
|
WB_get_TopLevelContainer,
|
|
|
|
WB_get_Type,
|
|
|
|
WB_get_Left,
|
|
|
|
WB_put_Left,
|
|
|
|
WB_get_Top,
|
|
|
|
WB_put_Top,
|
|
|
|
WB_get_Width,
|
|
|
|
WB_put_Width,
|
|
|
|
WB_get_Height,
|
|
|
|
WB_put_Height,
|
|
|
|
WB_get_LocationName,
|
|
|
|
WB_get_LocationURL,
|
|
|
|
WB_get_Busy
|
|
|
|
};
|
|
|
|
|
|
|
|
IWebBrowserImpl SHDOCVW_WebBrowser = { &WB_Vtbl, 1 };
|