2002-05-05 21:40:57 +02:00
|
|
|
/*
|
2005-09-06 13:41:14 +02:00
|
|
|
* Implementation of IOleObject interfaces for WebBrowser control
|
2002-05-05 21:40:57 +02:00
|
|
|
*
|
|
|
|
* - IOleObject
|
|
|
|
* - IOleInPlaceObject
|
|
|
|
* - IOleControl
|
|
|
|
*
|
|
|
|
* Copyright 2001 John R. Sheets (for CodeWeavers)
|
2005-09-06 13:41:14 +02:00
|
|
|
* Copyright 2005 Jacek Caban
|
2002-05-05 21:40:57 +02:00
|
|
|
*
|
|
|
|
* 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 <string.h>
|
|
|
|
#include "wine/debug.h"
|
|
|
|
#include "shdocvw.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
|
|
|
|
|
2005-06-12 12:42:03 +02:00
|
|
|
/**********************************************************************
|
2005-09-06 13:41:14 +02:00
|
|
|
* Implement the IOleObject interface for the WebBrowser control
|
2005-06-12 12:42:03 +02:00
|
|
|
*/
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
#define OLEOBJ_THIS(iface) DEFINE_THIS(WebBrowser, OleObject, iface)
|
2005-06-12 12:42:03 +02:00
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, void **ppv)
|
2005-06-12 12:42:03 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
return IWebBrowser_QueryInterface(WEBBROWSER(This), riid, ppv);
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static ULONG WINAPI OleObject_AddRef(IOleObject *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
return IWebBrowser_AddRef(WEBBROWSER(This));
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static ULONG WINAPI OleObject_Release(IOleObject *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
return IWebBrowser_Release(WEBBROWSER(This));
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_SetClientSite(IOleObject *iface, LPOLECLIENTSITE pClientSite)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
2005-09-16 20:44:37 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, pClientSite);
|
|
|
|
|
|
|
|
if(This->client == pClientSite)
|
|
|
|
return S_OK;
|
|
|
|
|
|
|
|
if(This->client)
|
|
|
|
IOleClientSite_Release(This->client);
|
|
|
|
|
|
|
|
if(pClientSite)
|
|
|
|
IOleClientSite_AddRef(pClientSite);
|
|
|
|
|
|
|
|
This->client = pClientSite;
|
|
|
|
return S_OK;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_GetClientSite(IOleObject *iface, LPOLECLIENTSITE *ppClientSite)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
2005-09-16 20:44:37 +02:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, ppClientSite);
|
|
|
|
|
|
|
|
if(!ppClientSite)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
if(This->client)
|
|
|
|
IOleClientSite_AddRef(This->client);
|
|
|
|
*ppClientSite = This->client;
|
|
|
|
|
|
|
|
return S_OK;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_SetHostNames(IOleObject *iface, LPCOLESTR szContainerApp,
|
|
|
|
LPCOLESTR szContainerObj)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%s, %s)\n", This, debugstr_w(szContainerApp), debugstr_w(szContainerObj));
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%ld)\n", This, dwSaveOption);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_SetMoniker(IOleObject *iface, DWORD dwWhichMoniker, IMoniker* pmk)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%ld, %p)\n", This, dwWhichMoniker, pmk);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_GetMoniker(IOleObject *iface, DWORD dwAssign,
|
|
|
|
DWORD dwWhichMoniker, LPMONIKER *ppmk)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%ld, %ld, %p)\n", This, dwAssign, dwWhichMoniker, ppmk);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_InitFromData(IOleObject *iface, LPDATAOBJECT pDataObject,
|
|
|
|
BOOL fCreation, DWORD dwReserved)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p, %d, %ld)\n", This, pDataObject, fCreation, dwReserved);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_GetClipboardData(IOleObject *iface, DWORD dwReserved,
|
|
|
|
LPDATAOBJECT *ppDataObject)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%ld, %p)\n", This, dwReserved, ppDataObject);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_DoVerb(IOleObject *iface, LONG iVerb, struct tagMSG* lpmsg,
|
|
|
|
LPOLECLIENTSITE pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%ld %p %p %ld %p %p)\n", This, iVerb, lpmsg, pActiveSite, lindex, hwndParent,
|
|
|
|
lprcPosRect);
|
2002-05-05 21:40:57 +02:00
|
|
|
switch (iVerb)
|
|
|
|
{
|
|
|
|
case OLEIVERB_INPLACEACTIVATE:
|
|
|
|
FIXME ("stub for OLEIVERB_INPLACEACTIVATE\n");
|
|
|
|
break;
|
|
|
|
case OLEIVERB_HIDE:
|
|
|
|
FIXME ("stub for OLEIVERB_HIDE\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_EnumVerbs(IOleObject *iface, IEnumOLEVERB **ppEnumOleVerb)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
TRACE("(%p)->(%p)\n", This, ppEnumOleVerb);
|
2002-05-05 21:40:57 +02:00
|
|
|
return OleRegEnumVerbs(&CLSID_WebBrowser, ppEnumOleVerb);
|
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_Update(IOleObject *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)\n", This);
|
2002-05-05 21:40:57 +02:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_IsUpToDate(IOleObject *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_GetUserClassID(IOleObject *iface, CLSID* pClsid)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, pClsid);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_GetUserType(IOleObject *iface, DWORD dwFormOfType,
|
|
|
|
LPOLESTR* pszUserType)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
TRACE("(%p, %ld, %p)\n", This, dwFormOfType, pszUserType);
|
2002-05-05 21:40:57 +02:00
|
|
|
return OleRegGetUserType(&CLSID_WebBrowser, dwFormOfType, pszUserType);
|
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_SetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%lx %p)\n", This, dwDrawAspect, psizel);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_GetExtent(IOleObject *iface, DWORD dwDrawAspect, SIZEL *psizel)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%lx, %p)\n", This, dwDrawAspect, psizel);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_Advise(IOleObject *iface, IAdviseSink *pAdvSink,
|
|
|
|
DWORD* pdwConnection)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p, %p)\n", This, pAdvSink, pdwConnection);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_Unadvise(IOleObject *iface, DWORD dwConnection)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%ld)\n", This, dwConnection);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_EnumAdvise(IOleObject *iface, IEnumSTATDATA **ppenumAdvise)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, ppenumAdvise);
|
2002-05-05 21:40:57 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_GetMiscStatus(IOleObject *iface, DWORD dwAspect, DWORD *pdwStatus)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
2002-05-05 21:40:57 +02:00
|
|
|
HRESULT hres;
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
TRACE("(%p)->(%lx, %p)\n", This, dwAspect, pdwStatus);
|
2002-05-05 21:40:57 +02:00
|
|
|
|
|
|
|
hres = OleRegGetMiscStatus(&CLSID_WebBrowser, dwAspect, pdwStatus);
|
|
|
|
|
|
|
|
if (FAILED(hres))
|
|
|
|
*pdwStatus = 0;
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
static HRESULT WINAPI OleObject_SetColorScheme(IOleObject *iface, LOGPALETTE* pLogpal)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-06 13:41:14 +02:00
|
|
|
WebBrowser *This = OLEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, pLogpal);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
#undef OLEOBJ_THIS
|
|
|
|
|
|
|
|
static const IOleObjectVtbl OleObjectVtbl =
|
|
|
|
{
|
|
|
|
OleObject_QueryInterface,
|
|
|
|
OleObject_AddRef,
|
|
|
|
OleObject_Release,
|
|
|
|
OleObject_SetClientSite,
|
|
|
|
OleObject_GetClientSite,
|
|
|
|
OleObject_SetHostNames,
|
|
|
|
OleObject_Close,
|
|
|
|
OleObject_SetMoniker,
|
|
|
|
OleObject_GetMoniker,
|
|
|
|
OleObject_InitFromData,
|
|
|
|
OleObject_GetClipboardData,
|
|
|
|
OleObject_DoVerb,
|
|
|
|
OleObject_EnumVerbs,
|
|
|
|
OleObject_Update,
|
|
|
|
OleObject_IsUpToDate,
|
|
|
|
OleObject_GetUserClassID,
|
|
|
|
OleObject_GetUserType,
|
|
|
|
OleObject_SetExtent,
|
|
|
|
OleObject_GetExtent,
|
|
|
|
OleObject_Advise,
|
|
|
|
OleObject_Unadvise,
|
|
|
|
OleObject_EnumAdvise,
|
|
|
|
OleObject_GetMiscStatus,
|
|
|
|
OleObject_SetColorScheme
|
2002-05-05 21:40:57 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* Implement the IOleInPlaceObject interface
|
|
|
|
*/
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
#define INPLACEOBJ_THIS(iface) DEFINE_THIS(WebBrowser, OleInPlaceObject, iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static HRESULT WINAPI OleInPlaceObject_QueryInterface(IOleInPlaceObject *iface,
|
|
|
|
REFIID riid, LPVOID *ppobj)
|
|
|
|
{
|
|
|
|
WebBrowser *This = INPLACEOBJ_THIS(iface);
|
|
|
|
return IWebBrowser_QueryInterface(WEBBROWSER(This), riid, ppobj);
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static ULONG WINAPI OleInPlaceObject_AddRef(IOleInPlaceObject *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
WebBrowser *This = INPLACEOBJ_THIS(iface);
|
|
|
|
return IWebBrowser_AddRef(WEBBROWSER(This));
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static ULONG WINAPI OleInPlaceObject_Release(IOleInPlaceObject *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
WebBrowser *This = INPLACEOBJ_THIS(iface);
|
|
|
|
return IWebBrowser_Release(WEBBROWSER(This));
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static HRESULT WINAPI OleInPlaceObject_GetWindow(IOleInPlaceObject *iface, HWND* phwnd)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
WebBrowser *This = INPLACEOBJ_THIS(iface);
|
|
|
|
|
|
|
|
FIXME("(%p)->(%p)\n", This, phwnd);
|
|
|
|
|
2002-05-05 21:40:57 +02:00
|
|
|
#if 0
|
|
|
|
/* Create a fake window to fool MFC into believing that we actually
|
|
|
|
* have an implemented browser control. Avoids the assertion.
|
|
|
|
*/
|
|
|
|
HWND hwnd;
|
|
|
|
hwnd = CreateWindowA("BUTTON", "Web Control",
|
|
|
|
WS_HSCROLL | WS_VSCROLL | WS_OVERLAPPEDWINDOW,
|
|
|
|
CW_USEDEFAULT, CW_USEDEFAULT, 600,
|
|
|
|
400, NULL, NULL, NULL, NULL);
|
|
|
|
|
|
|
|
*phwnd = hwnd;
|
|
|
|
TRACE ("Returning hwnd = %d\n", hwnd);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static HRESULT WINAPI OleInPlaceObject_ContextSensitiveHelp(IOleInPlaceObject *iface,
|
|
|
|
BOOL fEnterMode)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
WebBrowser *This = INPLACEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%x)\n", This, fEnterMode);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static HRESULT WINAPI OleInPlaceObject_InPlaceDeactivate(IOleInPlaceObject *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
WebBrowser *This = INPLACEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static HRESULT WINAPI OleInPlaceObject_UIDeactivate(IOleInPlaceObject *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
WebBrowser *This = INPLACEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static HRESULT WINAPI OleInPlaceObject_SetObjectRects(IOleInPlaceObject *iface,
|
|
|
|
LPCRECT lprcPosRect, LPCRECT lprcClipRect)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
WebBrowser *This = INPLACEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p %p)\n", This, lprcPosRect, lprcClipRect);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static HRESULT WINAPI OleInPlaceObject_ReactivateAndUndo(IOleInPlaceObject *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
WebBrowser *This = INPLACEOBJ_THIS(iface);
|
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
#undef INPLACEOBJ_THIS
|
2002-05-05 21:40:57 +02:00
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static const IOleInPlaceObjectVtbl OleInPlaceObjectVtbl =
|
|
|
|
{
|
|
|
|
OleInPlaceObject_QueryInterface,
|
|
|
|
OleInPlaceObject_AddRef,
|
|
|
|
OleInPlaceObject_Release,
|
|
|
|
OleInPlaceObject_GetWindow,
|
|
|
|
OleInPlaceObject_ContextSensitiveHelp,
|
|
|
|
OleInPlaceObject_InPlaceDeactivate,
|
|
|
|
OleInPlaceObject_UIDeactivate,
|
|
|
|
OleInPlaceObject_SetObjectRects,
|
|
|
|
OleInPlaceObject_ReactivateAndUndo
|
2002-05-05 21:40:57 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* Implement the IOleControl interface
|
|
|
|
*/
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
#define CONTROL_THIS(iface) DEFINE_THIS(WebBrowser, OleControl, iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static HRESULT WINAPI OleControl_QueryInterface(IOleControl *iface,
|
|
|
|
REFIID riid, LPVOID *ppobj)
|
|
|
|
{
|
|
|
|
WebBrowser *This = CONTROL_THIS(iface);
|
|
|
|
return IWebBrowser_QueryInterface(WEBBROWSER(This), riid, ppobj);
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static ULONG WINAPI OleControl_AddRef(IOleControl *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
WebBrowser *This = CONTROL_THIS(iface);
|
|
|
|
return IWebBrowser_AddRef(WEBBROWSER(This));
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static ULONG WINAPI OleControl_Release(IOleControl *iface)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
WebBrowser *This = CONTROL_THIS(iface);
|
|
|
|
return IWebBrowser_Release(WEBBROWSER(This));
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static HRESULT WINAPI OleControl_GetControlInfo(IOleControl *iface, LPCONTROLINFO pCI)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
WebBrowser *This = CONTROL_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, pCI);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static HRESULT WINAPI OleControl_OnMnemonic(IOleControl *iface, struct tagMSG *pMsg)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
WebBrowser *This = CONTROL_THIS(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, pMsg);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static HRESULT WINAPI OleControl_OnAmbientPropertyChange(IOleControl *iface, DISPID dispID)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
WebBrowser *This = CONTROL_THIS(iface);
|
|
|
|
FIXME("(%p)->(%ld)\n", This, dispID);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static HRESULT WINAPI OleControl_FreezeEvents(IOleControl *iface, BOOL bFreeze)
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
WebBrowser *This = CONTROL_THIS(iface);
|
|
|
|
FIXME("(%p)->(%x)\n", This, bFreeze);
|
|
|
|
return E_NOTIMPL;
|
2002-05-05 21:40:57 +02:00
|
|
|
}
|
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
#undef CONTROL_THIS
|
2002-05-05 21:40:57 +02:00
|
|
|
|
2005-09-07 11:23:47 +02:00
|
|
|
static const IOleControlVtbl OleControlVtbl =
|
2002-05-05 21:40:57 +02:00
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
OleControl_QueryInterface,
|
|
|
|
OleControl_AddRef,
|
|
|
|
OleControl_Release,
|
|
|
|
OleControl_GetControlInfo,
|
|
|
|
OleControl_OnMnemonic,
|
|
|
|
OleControl_OnAmbientPropertyChange,
|
|
|
|
OleControl_FreezeEvents
|
2002-05-05 21:40:57 +02:00
|
|
|
};
|
|
|
|
|
2005-09-06 13:41:14 +02:00
|
|
|
void WebBrowser_OleObject_Init(WebBrowser *This)
|
|
|
|
{
|
2005-09-07 11:23:47 +02:00
|
|
|
This->lpOleObjectVtbl = &OleObjectVtbl;
|
|
|
|
This->lpOleInPlaceObjectVtbl = &OleInPlaceObjectVtbl;
|
|
|
|
This->lpOleControlVtbl = &OleControlVtbl;
|
2005-09-16 20:44:37 +02:00
|
|
|
|
|
|
|
This->client = NULL;
|
2005-09-06 13:41:14 +02:00
|
|
|
}
|