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
|
|
|
{
|
2005-01-27 11:43:53 +01:00
|
|
|
FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid));
|
2002-05-05 21:40:57 +02:00
|
|
|
|
2005-01-27 11:43:53 +01:00
|
|
|
if (ppobj == NULL) return E_POINTER;
|
|
|
|
|
2002-05-05 21:40:57 +02:00
|
|
|
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
|
|
|
{
|
2005-01-27 11:43:53 +01:00
|
|
|
SHDOCVW_LockModule();
|
2002-05-05 21:40:57 +02:00
|
|
|
|
2005-01-27 11:43:53 +01:00
|
|
|
return 2; /* non-heap based object */
|
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
|
|
|
{
|
2005-01-27 11:43:53 +01:00
|
|
|
SHDOCVW_UnlockModule();
|
2005-01-14 17:02:20 +01:00
|
|
|
|
2005-01-27 11:43:53 +01:00
|
|
|
return 1; /* non-heap based object */
|
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
|
|
|
|
*/
|
|
|
|
|
2005-06-06 21:50:35 +02:00
|
|
|
static const 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
|
|
|
|
};
|
|
|
|
|
2005-01-27 11:43:53 +01:00
|
|
|
IWebBrowserImpl SHDOCVW_WebBrowser = {&WB_Vtbl};
|