2005-11-15 13:03:25 +01:00
|
|
|
/*
|
|
|
|
* Copyright 2005 Jacek Caban 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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2005-11-15 13:03:25 +01:00
|
|
|
*/
|
|
|
|
|
2007-03-09 16:49:21 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2011-07-27 14:46:48 +02:00
|
|
|
#include "ieframe.h"
|
|
|
|
|
2007-03-09 16:49:21 +01:00
|
|
|
#include "mshtmdid.h"
|
|
|
|
#include "idispids.h"
|
2005-11-15 13:03:25 +01:00
|
|
|
|
2011-07-27 14:46:48 +02:00
|
|
|
#include "wine/debug.h"
|
|
|
|
|
2011-07-29 12:18:33 +02:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(ieframe);
|
2005-11-15 13:03:25 +01:00
|
|
|
|
2010-11-13 17:47:58 +01:00
|
|
|
static inline DocHost *impl_from_IOleClientSite(IOleClientSite *iface)
|
|
|
|
{
|
2010-11-24 14:06:38 +01:00
|
|
|
return CONTAINING_RECORD(iface, DocHost, IOleClientSite_iface);
|
2010-11-13 17:47:58 +01:00
|
|
|
}
|
2005-11-15 13:03:25 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
2010-11-13 17:47:58 +01:00
|
|
|
DocHost *This = impl_from_IOleClientSite(iface);
|
2005-11-15 13:03:25 +01:00
|
|
|
|
|
|
|
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
2010-11-13 17:47:58 +01:00
|
|
|
*ppv = &This->IOleClientSite_iface;
|
2005-11-15 13:03:25 +01:00
|
|
|
}else if(IsEqualGUID(&IID_IOleClientSite, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IOleClientSite %p)\n", This, ppv);
|
2010-11-13 17:47:58 +01:00
|
|
|
*ppv = &This->IOleClientSite_iface;
|
2005-11-16 12:21:00 +01:00
|
|
|
}else if(IsEqualGUID(&IID_IOleWindow, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IOleWindow %p)\n", This, ppv);
|
2011-06-06 00:02:02 +02:00
|
|
|
*ppv = &This->IOleInPlaceSiteEx_iface;
|
2005-11-16 12:21:00 +01:00
|
|
|
}else if(IsEqualGUID(&IID_IOleInPlaceSite, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IOleInPlaceSite %p)\n", This, ppv);
|
2011-06-06 00:02:02 +02:00
|
|
|
*ppv = &This->IOleInPlaceSiteEx_iface;
|
|
|
|
}else if(IsEqualGUID(&IID_IOleInPlaceSiteEx, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IOleInPlaceSiteEx %p)\n", This, ppv);
|
|
|
|
*ppv = &This->IOleInPlaceSiteEx_iface;
|
2005-11-17 12:03:53 +01:00
|
|
|
}else if(IsEqualGUID(&IID_IDocHostUIHandler, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IDocHostUIHandler %p)\n", This, ppv);
|
2010-11-13 17:48:09 +01:00
|
|
|
*ppv = &This->IDocHostUIHandler2_iface;
|
2005-11-17 12:03:53 +01:00
|
|
|
}else if(IsEqualGUID(&IID_IDocHostUIHandler2, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IDocHostUIHandler2 %p)\n", This, ppv);
|
2010-11-13 17:48:09 +01:00
|
|
|
*ppv = &This->IDocHostUIHandler2_iface;
|
2005-12-01 11:11:14 +01:00
|
|
|
}else if(IsEqualGUID(&IID_IOleDocumentSite, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IOleDocumentSite %p)\n", This, ppv);
|
2010-11-13 17:48:09 +01:00
|
|
|
*ppv = &This->IOleDocumentSite_iface;
|
2010-11-17 13:12:20 +01:00
|
|
|
}else if(IsEqualGUID(&IID_IOleControlSite, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IOleControlSite %p)\n", This, ppv);
|
|
|
|
*ppv = &This->IOleControlSite_iface;
|
2006-04-18 00:24:59 +02:00
|
|
|
}else if(IsEqualGUID(&IID_IOleCommandTarget, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IOleCommandTarget %p)\n", This, ppv);
|
2010-11-13 17:48:09 +01:00
|
|
|
*ppv = &This->IOleCommandTarget_iface;
|
2006-01-26 13:30:04 +01:00
|
|
|
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
|
2010-11-13 17:48:09 +01:00
|
|
|
*ppv = &This->IDispatch_iface;
|
2009-08-30 01:00:06 +02:00
|
|
|
}else if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IPropertyNotifySink %p)\n", This, ppv);
|
2010-11-13 17:48:09 +01:00
|
|
|
*ppv = &This->IPropertyNotifySink_iface;
|
2006-02-15 11:53:31 +01:00
|
|
|
}else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
|
|
|
|
TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv);
|
2010-11-13 17:48:09 +01:00
|
|
|
*ppv = &This->IServiceProvider_iface;
|
2010-11-13 17:47:58 +01:00
|
|
|
}else {
|
|
|
|
*ppv = NULL;
|
|
|
|
WARN("Unsupported interface %s\n", debugstr_guid(riid));
|
|
|
|
return E_NOINTERFACE;
|
2005-11-15 13:03:25 +01:00
|
|
|
}
|
|
|
|
|
2012-07-27 11:00:34 +02:00
|
|
|
IUnknown_AddRef((IUnknown*)*ppv);
|
2010-11-13 17:47:58 +01:00
|
|
|
return S_OK;
|
2005-11-15 13:03:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI ClientSite_AddRef(IOleClientSite *iface)
|
|
|
|
{
|
2010-11-13 17:47:58 +01:00
|
|
|
DocHost *This = impl_from_IOleClientSite(iface);
|
2011-01-07 19:03:23 +01:00
|
|
|
return This->container_vtbl->addref(This);
|
2005-11-15 13:03:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI ClientSite_Release(IOleClientSite *iface)
|
|
|
|
{
|
2010-11-13 17:47:58 +01:00
|
|
|
DocHost *This = impl_from_IOleClientSite(iface);
|
2011-01-07 19:03:23 +01:00
|
|
|
return This->container_vtbl->release(This);
|
2005-11-15 13:03:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ClientSite_SaveObject(IOleClientSite *iface)
|
|
|
|
{
|
2010-11-13 17:47:58 +01:00
|
|
|
DocHost *This = impl_from_IOleClientSite(iface);
|
2005-11-15 13:03:25 +01:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAssign,
|
|
|
|
DWORD dwWhichMoniker, IMoniker **ppmk)
|
|
|
|
{
|
2010-11-13 17:47:58 +01:00
|
|
|
DocHost *This = impl_from_IOleClientSite(iface);
|
2006-10-05 23:49:39 +02:00
|
|
|
FIXME("(%p)->(%d %d %p)\n", This, dwAssign, dwWhichMoniker, ppmk);
|
2005-11-15 13:03:25 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ClientSite_GetContainer(IOleClientSite *iface, IOleContainer **ppContainer)
|
|
|
|
{
|
2010-11-13 17:47:58 +01:00
|
|
|
DocHost *This = impl_from_IOleClientSite(iface);
|
2005-11-15 13:03:25 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, ppContainer);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ClientSite_ShowObject(IOleClientSite *iface)
|
|
|
|
{
|
2010-11-13 17:47:58 +01:00
|
|
|
DocHost *This = impl_from_IOleClientSite(iface);
|
2005-11-15 13:03:25 +01:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ClientSite_OnShowWindow(IOleClientSite *iface, BOOL fShow)
|
|
|
|
{
|
2010-11-13 17:47:58 +01:00
|
|
|
DocHost *This = impl_from_IOleClientSite(iface);
|
2005-11-15 13:03:25 +01:00
|
|
|
FIXME("(%p)->(%x)\n", This, fShow);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ClientSite_RequestNewObjectLayout(IOleClientSite *iface)
|
|
|
|
{
|
2010-11-13 17:47:58 +01:00
|
|
|
DocHost *This = impl_from_IOleClientSite(iface);
|
2005-11-15 13:03:25 +01:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IOleClientSiteVtbl OleClientSiteVtbl = {
|
|
|
|
ClientSite_QueryInterface,
|
|
|
|
ClientSite_AddRef,
|
|
|
|
ClientSite_Release,
|
|
|
|
ClientSite_SaveObject,
|
|
|
|
ClientSite_GetMoniker,
|
|
|
|
ClientSite_GetContainer,
|
|
|
|
ClientSite_ShowObject,
|
|
|
|
ClientSite_OnShowWindow,
|
|
|
|
ClientSite_RequestNewObjectLayout
|
|
|
|
};
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static inline DocHost *impl_from_IOleInPlaceSiteEx(IOleInPlaceSiteEx *iface)
|
2010-11-13 17:48:09 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
return CONTAINING_RECORD(iface, DocHost, IOleInPlaceSiteEx_iface);
|
2010-11-13 17:48:09 +01:00
|
|
|
}
|
2005-11-16 12:21:00 +01:00
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static HRESULT WINAPI InPlaceSite_QueryInterface(IOleInPlaceSiteEx *iface, REFIID riid, void **ppv)
|
2005-11-16 12:21:00 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2010-11-13 17:47:58 +01:00
|
|
|
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
|
2005-11-16 12:21:00 +01:00
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static ULONG WINAPI InPlaceSite_AddRef(IOleInPlaceSiteEx *iface)
|
2005-11-16 12:21:00 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2010-11-13 17:47:58 +01:00
|
|
|
return IOleClientSite_AddRef(&This->IOleClientSite_iface);
|
2005-11-16 12:21:00 +01:00
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static ULONG WINAPI InPlaceSite_Release(IOleInPlaceSiteEx *iface)
|
2005-11-16 12:21:00 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2010-11-13 17:47:58 +01:00
|
|
|
return IOleClientSite_Release(&This->IOleClientSite_iface);
|
2005-11-16 12:21:00 +01:00
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static HRESULT WINAPI InPlaceSite_GetWindow(IOleInPlaceSiteEx *iface, HWND *phwnd)
|
2005-11-16 12:21:00 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2005-11-22 12:59:57 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, phwnd);
|
|
|
|
|
2006-04-18 00:26:47 +02:00
|
|
|
*phwnd = This->hwnd;
|
2005-11-22 12:59:57 +01:00
|
|
|
return S_OK;
|
2005-11-16 12:21:00 +01:00
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static HRESULT WINAPI InPlaceSite_ContextSensitiveHelp(IOleInPlaceSiteEx *iface, BOOL fEnterMode)
|
2005-11-16 12:21:00 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2005-11-16 12:21:00 +01:00
|
|
|
FIXME("(%p)->(%x)\n", This, fEnterMode);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static HRESULT WINAPI InPlaceSite_CanInPlaceActivate(IOleInPlaceSiteEx *iface)
|
2005-11-16 12:21:00 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2005-12-01 11:11:14 +01:00
|
|
|
|
|
|
|
TRACE("(%p)\n", This);
|
|
|
|
|
|
|
|
/* Nothing to do here */
|
|
|
|
return S_OK;
|
2005-11-16 12:21:00 +01:00
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static HRESULT WINAPI InPlaceSite_OnInPlaceActivate(IOleInPlaceSiteEx *iface)
|
2005-11-16 12:21:00 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2005-12-01 11:11:14 +01:00
|
|
|
|
|
|
|
TRACE("(%p)\n", This);
|
|
|
|
|
|
|
|
/* Nothing to do here */
|
|
|
|
return S_OK;
|
2005-11-16 12:21:00 +01:00
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static HRESULT WINAPI InPlaceSite_OnUIActivate(IOleInPlaceSiteEx *iface)
|
2005-11-16 12:21:00 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2005-11-16 12:21:00 +01:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSiteEx *iface,
|
2005-11-16 12:21:00 +01:00
|
|
|
IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect,
|
|
|
|
LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
|
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2005-11-28 11:01:17 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p %p %p %p %p)\n", This, ppFrame, ppDoc, lprcPosRect,
|
2005-11-16 12:21:00 +01:00
|
|
|
lprcClipRect, lpFrameInfo);
|
2005-11-28 11:01:17 +01:00
|
|
|
|
2010-11-13 17:48:34 +01:00
|
|
|
IOleInPlaceFrame_AddRef(&This->IOleInPlaceFrame_iface);
|
|
|
|
*ppFrame = &This->IOleInPlaceFrame_iface;
|
2005-11-28 11:01:17 +01:00
|
|
|
*ppDoc = NULL;
|
2005-12-01 11:11:14 +01:00
|
|
|
|
2006-04-18 00:26:47 +02:00
|
|
|
GetClientRect(This->hwnd, lprcPosRect);
|
2008-03-17 22:36:56 +01:00
|
|
|
*lprcClipRect = *lprcPosRect;
|
2005-11-28 11:01:17 +01:00
|
|
|
|
|
|
|
lpFrameInfo->fMDIApp = FALSE;
|
2006-04-18 00:26:47 +02:00
|
|
|
lpFrameInfo->hwndFrame = This->frame_hwnd;
|
2005-11-28 11:01:17 +01:00
|
|
|
lpFrameInfo->haccel = NULL;
|
|
|
|
lpFrameInfo->cAccelEntries = 0; /* FIXME: should be 5 */
|
|
|
|
|
|
|
|
return S_OK;
|
2005-11-16 12:21:00 +01:00
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static HRESULT WINAPI InPlaceSite_Scroll(IOleInPlaceSiteEx *iface, SIZE scrollExtent)
|
2005-11-16 12:21:00 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2006-10-05 23:49:39 +02:00
|
|
|
FIXME("(%p)->({%d %d})\n", This, scrollExtent.cx, scrollExtent.cy);
|
2005-11-16 12:21:00 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static HRESULT WINAPI InPlaceSite_OnUIDeactivate(IOleInPlaceSiteEx *iface, BOOL fUndoable)
|
2005-11-16 12:21:00 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2005-11-16 12:21:00 +01:00
|
|
|
FIXME("(%p)->(%x)\n", This, fUndoable);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate(IOleInPlaceSiteEx *iface)
|
2005-11-16 12:21:00 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2006-05-18 22:43:01 +02:00
|
|
|
|
|
|
|
TRACE("(%p)\n", This);
|
|
|
|
|
|
|
|
/* Nothing to do here */
|
|
|
|
return S_OK;
|
2005-11-16 12:21:00 +01:00
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static HRESULT WINAPI InPlaceSite_DiscardUndoState(IOleInPlaceSiteEx *iface)
|
2005-11-16 12:21:00 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2005-11-16 12:21:00 +01:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static HRESULT WINAPI InPlaceSite_DeactivateAndUndo(IOleInPlaceSiteEx *iface)
|
2005-11-16 12:21:00 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2005-11-16 12:21:00 +01:00
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static HRESULT WINAPI InPlaceSite_OnPosRectChange(IOleInPlaceSiteEx *iface,
|
2005-11-16 12:21:00 +01:00
|
|
|
LPCRECT lprcPosRect)
|
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
2005-11-16 12:21:00 +01:00
|
|
|
FIXME("(%p)->(%p)\n", This, lprcPosRect);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2011-06-06 00:02:02 +02:00
|
|
|
static HRESULT WINAPI InPlaceSite_OnInPlaceActivateEx(IOleInPlaceSiteEx *iface,
|
|
|
|
BOOL *pfNoRedraw, DWORD dwFlags)
|
|
|
|
{
|
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p, %x)\n", This, pfNoRedraw, dwFlags);
|
|
|
|
|
|
|
|
/* FIXME: Avoid redraw, when possible */
|
2014-10-06 10:58:14 +02:00
|
|
|
*pfNoRedraw = FALSE;
|
2011-06-06 00:02:02 +02:00
|
|
|
|
|
|
|
if (dwFlags) {
|
|
|
|
FIXME("dwFlags not supported (%x)\n", dwFlags);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Nothing to do here */
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivateEx(IOleInPlaceSiteEx *iface, BOOL fNoRedraw)
|
|
|
|
{
|
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
|
|
|
|
|
|
|
TRACE("(%p)->(%x)\n", This, fNoRedraw);
|
|
|
|
|
|
|
|
if (fNoRedraw) {
|
|
|
|
FIXME("fNoRedraw (%x) ignored\n", fNoRedraw);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Nothing to do here */
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI InPlaceSite_RequestUIActivate(IOleInPlaceSiteEx *iface)
|
|
|
|
{
|
|
|
|
DocHost *This = impl_from_IOleInPlaceSiteEx(iface);
|
|
|
|
TRACE("(%p)\n", This);
|
|
|
|
|
|
|
|
/* OnUIActivate is always possible */
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IOleInPlaceSiteExVtbl OleInPlaceSiteExVtbl = {
|
2005-11-16 12:21:00 +01:00
|
|
|
InPlaceSite_QueryInterface,
|
|
|
|
InPlaceSite_AddRef,
|
|
|
|
InPlaceSite_Release,
|
|
|
|
InPlaceSite_GetWindow,
|
|
|
|
InPlaceSite_ContextSensitiveHelp,
|
|
|
|
InPlaceSite_CanInPlaceActivate,
|
|
|
|
InPlaceSite_OnInPlaceActivate,
|
|
|
|
InPlaceSite_OnUIActivate,
|
|
|
|
InPlaceSite_GetWindowContext,
|
|
|
|
InPlaceSite_Scroll,
|
|
|
|
InPlaceSite_OnUIDeactivate,
|
|
|
|
InPlaceSite_OnInPlaceDeactivate,
|
|
|
|
InPlaceSite_DiscardUndoState,
|
|
|
|
InPlaceSite_DeactivateAndUndo,
|
2011-06-06 00:02:02 +02:00
|
|
|
InPlaceSite_OnPosRectChange,
|
|
|
|
/* OleInPlaceSiteEx */
|
|
|
|
InPlaceSite_OnInPlaceActivateEx,
|
|
|
|
InPlaceSite_OnInPlaceDeactivateEx,
|
|
|
|
InPlaceSite_RequestUIActivate
|
2005-11-16 12:21:00 +01:00
|
|
|
};
|
|
|
|
|
2010-11-13 17:48:09 +01:00
|
|
|
static inline DocHost *impl_from_IOleDocumentSite(IOleDocumentSite *iface)
|
|
|
|
{
|
2010-11-24 14:06:38 +01:00
|
|
|
return CONTAINING_RECORD(iface, DocHost, IOleDocumentSite_iface);
|
2010-11-13 17:48:09 +01:00
|
|
|
}
|
2005-11-28 11:24:49 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI OleDocumentSite_QueryInterface(IOleDocumentSite *iface,
|
|
|
|
REFIID riid, void **ppv)
|
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IOleDocumentSite(iface);
|
2010-11-13 17:47:58 +01:00
|
|
|
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
|
2005-11-28 11:24:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI OleDocumentSite_AddRef(IOleDocumentSite *iface)
|
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IOleDocumentSite(iface);
|
2010-11-13 17:47:58 +01:00
|
|
|
return IOleClientSite_AddRef(&This->IOleClientSite_iface);
|
2005-11-28 11:24:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI OleDocumentSite_Release(IOleDocumentSite *iface)
|
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IOleDocumentSite(iface);
|
2010-11-13 17:47:58 +01:00
|
|
|
return IOleClientSite_Release(&This->IOleClientSite_iface);
|
2005-11-28 11:24:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI OleDocumentSite_ActivateMe(IOleDocumentSite *iface,
|
|
|
|
IOleDocumentView *pViewToActivate)
|
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IOleDocumentSite(iface);
|
2005-11-28 11:24:49 +01:00
|
|
|
IOleDocument *oledoc;
|
|
|
|
RECT rect;
|
|
|
|
HRESULT hres;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, pViewToActivate);
|
|
|
|
|
|
|
|
hres = IUnknown_QueryInterface(This->document, &IID_IOleDocument, (void**)&oledoc);
|
|
|
|
if(FAILED(hres))
|
|
|
|
return hres;
|
|
|
|
|
2016-03-08 14:07:46 +01:00
|
|
|
hres = IOleDocument_CreateView(oledoc, (IOleInPlaceSite*) &This->IOleInPlaceSiteEx_iface, NULL, 0, &This->view);
|
2005-11-28 11:24:49 +01:00
|
|
|
IOleDocument_Release(oledoc);
|
2016-03-08 14:07:46 +01:00
|
|
|
if(FAILED(hres))
|
|
|
|
return hres;
|
2005-11-28 11:24:49 +01:00
|
|
|
|
2006-04-18 00:31:22 +02:00
|
|
|
GetClientRect(This->hwnd, &rect);
|
2005-11-28 11:24:49 +01:00
|
|
|
IOleDocumentView_SetRect(This->view, &rect);
|
|
|
|
|
|
|
|
hres = IOleDocumentView_Show(This->view, TRUE);
|
|
|
|
|
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IOleDocumentSiteVtbl OleDocumentSiteVtbl = {
|
|
|
|
OleDocumentSite_QueryInterface,
|
|
|
|
OleDocumentSite_AddRef,
|
|
|
|
OleDocumentSite_Release,
|
|
|
|
OleDocumentSite_ActivateMe
|
|
|
|
};
|
|
|
|
|
2010-11-17 13:12:20 +01:00
|
|
|
static inline DocHost *impl_from_IOleControlSite(IOleControlSite *iface)
|
|
|
|
{
|
2010-11-24 14:06:38 +01:00
|
|
|
return CONTAINING_RECORD(iface, DocHost, IOleControlSite_iface);
|
2010-11-17 13:12:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ControlSite_QueryInterface(IOleControlSite *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
|
|
|
DocHost *This = impl_from_IOleControlSite(iface);
|
|
|
|
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI ControlSite_AddRef(IOleControlSite *iface)
|
|
|
|
{
|
|
|
|
DocHost *This = impl_from_IOleControlSite(iface);
|
|
|
|
return IOleClientSite_AddRef(&This->IOleClientSite_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI ControlSite_Release(IOleControlSite *iface)
|
|
|
|
{
|
|
|
|
DocHost *This = impl_from_IOleControlSite(iface);
|
|
|
|
return IOleClientSite_Release(&This->IOleClientSite_iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ControlSite_OnControlInfoChanged(IOleControlSite *iface)
|
|
|
|
{
|
|
|
|
DocHost *This = impl_from_IOleControlSite(iface);
|
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ControlSite_LockInPlaceActive(IOleControlSite *iface, BOOL fLock)
|
|
|
|
{
|
|
|
|
DocHost *This = impl_from_IOleControlSite(iface);
|
|
|
|
FIXME("(%p)->(%d)\n", This, fLock);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ControlSite_GetExtendedControl(IOleControlSite *iface, IDispatch **ppDisp)
|
|
|
|
{
|
|
|
|
DocHost *This = impl_from_IOleControlSite(iface);
|
|
|
|
FIXME("(%p)->(%p)\n", This, ppDisp);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ControlSite_TransformCoords(IOleControlSite *iface, POINTL *pPtlHimetric,
|
|
|
|
POINTF *pPtfContainer, DWORD dwFlags)
|
|
|
|
{
|
|
|
|
DocHost *This = impl_from_IOleControlSite(iface);
|
|
|
|
FIXME("(%p)->(%p, %p, %08x)\n", This, pPtlHimetric, pPtfContainer, dwFlags);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ControlSite_TranslateAccelerator(IOleControlSite *iface, MSG *pMsg,
|
|
|
|
DWORD grfModifiers)
|
|
|
|
{
|
|
|
|
DocHost *This = impl_from_IOleControlSite(iface);
|
2010-11-17 13:12:21 +01:00
|
|
|
IOleObject *wb_obj;
|
|
|
|
IOleClientSite *clientsite;
|
|
|
|
IOleControlSite *controlsite;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
TRACE("(%p)->(%p, %08x)\n", This, pMsg, grfModifiers);
|
|
|
|
|
2012-01-09 17:56:05 +01:00
|
|
|
hr = IWebBrowser2_QueryInterface(This->wb, &IID_IOleObject, (void**)&wb_obj);
|
2010-11-17 13:12:21 +01:00
|
|
|
if(SUCCEEDED(hr)) {
|
|
|
|
hr = IOleObject_GetClientSite(wb_obj, &clientsite);
|
|
|
|
if(SUCCEEDED(hr)) {
|
|
|
|
hr = IOleClientSite_QueryInterface(clientsite, &IID_IOleControlSite, (void**)&controlsite);
|
|
|
|
if(SUCCEEDED(hr)) {
|
|
|
|
hr = IOleControlSite_TranslateAccelerator(controlsite, pMsg, grfModifiers);
|
|
|
|
IOleControlSite_Release(controlsite);
|
|
|
|
}
|
|
|
|
IOleClientSite_Release(clientsite);
|
|
|
|
}
|
|
|
|
IOleObject_Release(wb_obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(FAILED(hr))
|
|
|
|
return S_FALSE;
|
|
|
|
else
|
|
|
|
return hr;
|
2010-11-17 13:12:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ControlSite_OnFocus(IOleControlSite *iface, BOOL fGotFocus)
|
|
|
|
{
|
|
|
|
DocHost *This = impl_from_IOleControlSite(iface);
|
|
|
|
FIXME("(%p)->(%d)\n", This, fGotFocus);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ControlSite_ShowPropertyFrame(IOleControlSite *iface)
|
|
|
|
{
|
|
|
|
DocHost *This = impl_from_IOleControlSite(iface);
|
|
|
|
FIXME("(%p)\n", This);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static IOleControlSiteVtbl OleControlSiteVtbl = {
|
|
|
|
ControlSite_QueryInterface,
|
|
|
|
ControlSite_AddRef,
|
|
|
|
ControlSite_Release,
|
|
|
|
ControlSite_OnControlInfoChanged,
|
|
|
|
ControlSite_LockInPlaceActive,
|
|
|
|
ControlSite_GetExtendedControl,
|
|
|
|
ControlSite_TransformCoords,
|
|
|
|
ControlSite_TranslateAccelerator,
|
|
|
|
ControlSite_OnFocus,
|
|
|
|
ControlSite_ShowPropertyFrame
|
|
|
|
};
|
|
|
|
|
2010-11-13 17:48:09 +01:00
|
|
|
static inline DocHost *impl_from_IDispatch(IDispatch *iface)
|
|
|
|
{
|
2010-11-24 14:06:38 +01:00
|
|
|
return CONTAINING_RECORD(iface, DocHost, IDispatch_iface);
|
2010-11-13 17:48:09 +01:00
|
|
|
}
|
2006-01-26 13:30:04 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI ClDispatch_QueryInterface(IDispatch *iface, REFIID riid, void **ppv)
|
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IDispatch(iface);
|
2010-11-13 17:47:58 +01:00
|
|
|
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
|
2006-01-26 13:30:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI ClDispatch_AddRef(IDispatch *iface)
|
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IDispatch(iface);
|
2010-11-13 17:47:58 +01:00
|
|
|
return IOleClientSite_AddRef(&This->IOleClientSite_iface);
|
2006-01-26 13:30:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI ClDispatch_Release(IDispatch *iface)
|
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IDispatch(iface);
|
2010-11-13 17:47:58 +01:00
|
|
|
return IOleClientSite_Release(&This->IOleClientSite_iface);
|
2006-01-26 13:30:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ClDispatch_GetTypeInfoCount(IDispatch *iface, UINT *pctinfo)
|
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IDispatch(iface);
|
2006-02-20 11:13:51 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%p)\n", This, pctinfo);
|
|
|
|
|
2006-01-26 13:30:04 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ClDispatch_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid,
|
2006-02-15 11:53:31 +01:00
|
|
|
ITypeInfo **ppTInfo)
|
2006-01-26 13:30:04 +01:00
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IDispatch(iface);
|
2006-02-20 11:13:51 +01:00
|
|
|
|
2006-10-05 23:49:39 +02:00
|
|
|
TRACE("(%p)->(%u %d %p)\n", This, iTInfo, lcid, ppTInfo);
|
2006-02-20 11:13:51 +01:00
|
|
|
|
2006-01-26 13:30:04 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ClDispatch_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames,
|
2006-02-15 11:53:31 +01:00
|
|
|
UINT cNames, LCID lcid, DISPID *rgDispId)
|
2006-01-26 13:30:04 +01:00
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IDispatch(iface);
|
2006-02-20 11:13:51 +01:00
|
|
|
|
2006-10-05 23:49:39 +02:00
|
|
|
TRACE("(%p)->(%s %p %u %d %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
|
2006-01-26 13:30:04 +01:00
|
|
|
lcid, rgDispId);
|
2006-02-20 11:13:51 +01:00
|
|
|
|
2006-01-26 13:30:04 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2007-03-09 16:49:21 +01:00
|
|
|
static const char *debugstr_dispid(DISPID dispid)
|
|
|
|
{
|
|
|
|
static char buf[16];
|
|
|
|
|
|
|
|
#define CASE_DISPID(did) case did: return #did
|
|
|
|
switch(dispid) {
|
|
|
|
CASE_DISPID(DISPID_AMBIENT_USERMODE);
|
|
|
|
CASE_DISPID(DISPID_AMBIENT_DLCONTROL);
|
|
|
|
CASE_DISPID(DISPID_AMBIENT_USERAGENT);
|
|
|
|
CASE_DISPID(DISPID_AMBIENT_PALETTE);
|
|
|
|
CASE_DISPID(DISPID_AMBIENT_OFFLINEIFNOTCONNECTED);
|
|
|
|
CASE_DISPID(DISPID_AMBIENT_SILENT);
|
|
|
|
}
|
|
|
|
#undef CASE_DISPID
|
|
|
|
|
|
|
|
sprintf(buf, "%d", dispid);
|
|
|
|
return buf;
|
|
|
|
}
|
|
|
|
|
2006-01-26 13:30:04 +01:00
|
|
|
static HRESULT WINAPI ClDispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid,
|
2006-02-15 11:53:31 +01:00
|
|
|
LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
|
|
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
2006-01-26 13:30:04 +01:00
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IDispatch(iface);
|
2007-03-09 16:49:21 +01:00
|
|
|
|
|
|
|
TRACE("(%p)->(%s %s %d %04x %p %p %p %p)\n", This, debugstr_dispid(dispIdMember),
|
|
|
|
debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
|
|
|
|
|
|
|
switch(dispIdMember) {
|
2007-03-09 16:50:01 +01:00
|
|
|
case DISPID_AMBIENT_USERMODE:
|
|
|
|
case DISPID_AMBIENT_DLCONTROL:
|
|
|
|
case DISPID_AMBIENT_USERAGENT:
|
|
|
|
case DISPID_AMBIENT_PALETTE:
|
|
|
|
if(!This->client_disp)
|
|
|
|
return E_FAIL;
|
|
|
|
return IDispatch_Invoke(This->client_disp, dispIdMember, riid, lcid, wFlags,
|
|
|
|
pDispParams, pVarResult, pExcepInfo, puArgErr);
|
2007-03-09 16:49:21 +01:00
|
|
|
case DISPID_AMBIENT_OFFLINEIFNOTCONNECTED:
|
|
|
|
V_VT(pVarResult) = VT_BOOL;
|
|
|
|
V_BOOL(pVarResult) = This->offline;
|
|
|
|
return S_OK;
|
|
|
|
case DISPID_AMBIENT_SILENT:
|
|
|
|
V_VT(pVarResult) = VT_BOOL;
|
|
|
|
V_BOOL(pVarResult) = This->offline;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
FIXME("unhandled dispid %d\n", dispIdMember);
|
2006-01-26 13:30:04 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IDispatchVtbl DispatchVtbl = {
|
|
|
|
ClDispatch_QueryInterface,
|
|
|
|
ClDispatch_AddRef,
|
|
|
|
ClDispatch_Release,
|
|
|
|
ClDispatch_GetTypeInfoCount,
|
|
|
|
ClDispatch_GetTypeInfo,
|
|
|
|
ClDispatch_GetIDsOfNames,
|
|
|
|
ClDispatch_Invoke
|
|
|
|
};
|
|
|
|
|
2010-11-13 17:48:09 +01:00
|
|
|
static inline DocHost *impl_from_IServiceProvider(IServiceProvider *iface)
|
|
|
|
{
|
2010-11-24 14:06:38 +01:00
|
|
|
return CONTAINING_RECORD(iface, DocHost, IServiceProvider_iface);
|
2010-11-13 17:48:09 +01:00
|
|
|
}
|
2006-02-15 11:53:31 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI ClServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid,
|
|
|
|
void **ppv)
|
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IServiceProvider(iface);
|
2010-11-13 17:47:58 +01:00
|
|
|
return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
|
2006-02-15 11:53:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI ClServiceProvider_AddRef(IServiceProvider *iface)
|
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IServiceProvider(iface);
|
2010-11-13 17:47:58 +01:00
|
|
|
return IOleClientSite_AddRef(&This->IOleClientSite_iface);
|
2006-02-15 11:53:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI ClServiceProvider_Release(IServiceProvider *iface)
|
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IServiceProvider(iface);
|
2010-11-13 17:47:58 +01:00
|
|
|
return IOleClientSite_Release(&This->IOleClientSite_iface);
|
2006-02-15 11:53:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI ClServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService,
|
|
|
|
REFIID riid, void **ppv)
|
|
|
|
{
|
2010-11-13 17:48:09 +01:00
|
|
|
DocHost *This = impl_from_IServiceProvider(iface);
|
2006-02-15 11:53:31 +01:00
|
|
|
|
|
|
|
if(IsEqualGUID(&IID_IHlinkFrame, guidService)) {
|
|
|
|
TRACE("(%p)->(IID_IHlinkFrame %s %p)\n", This, debugstr_guid(riid), ppv);
|
2012-01-09 17:56:05 +01:00
|
|
|
return IWebBrowser2_QueryInterface(This->wb, riid, ppv);
|
2006-02-15 11:53:31 +01:00
|
|
|
}
|
|
|
|
|
2016-03-30 11:31:08 +02:00
|
|
|
if(IsEqualGUID(&IID_ITargetFrame, guidService)) {
|
|
|
|
TRACE("(%p)->(IID_ITargetFrame %s %p)\n", This, debugstr_guid(riid), ppv);
|
|
|
|
return IWebBrowser2_QueryInterface(This->wb, riid, ppv);
|
|
|
|
}
|
|
|
|
|
2010-12-17 03:28:34 +01:00
|
|
|
if(IsEqualGUID(&IID_IWebBrowserApp, guidService)) {
|
|
|
|
TRACE("IWebBrowserApp service\n");
|
2012-01-09 17:56:05 +01:00
|
|
|
return IWebBrowser2_QueryInterface(This->wb, riid, ppv);
|
2010-12-17 03:28:34 +01:00
|
|
|
}
|
|
|
|
|
2011-03-14 17:49:37 +01:00
|
|
|
if(IsEqualGUID(&IID_IShellBrowser, guidService)) {
|
|
|
|
TRACE("(%p)->(IID_IShellBrowser %s %p)\n", This, debugstr_guid(riid), ppv);
|
|
|
|
|
2011-11-15 13:28:15 +01:00
|
|
|
if(!This->browser_service) {
|
|
|
|
HRESULT hres;
|
2011-03-14 17:49:37 +01:00
|
|
|
|
2011-11-15 13:28:15 +01:00
|
|
|
hres = create_browser_service(This, &This->browser_service);
|
|
|
|
if(FAILED(hres))
|
|
|
|
return hres;
|
|
|
|
}
|
|
|
|
|
|
|
|
return IShellBrowser_QueryInterface(&This->browser_service->IShellBrowser_iface, riid, ppv);
|
2011-03-14 17:49:37 +01:00
|
|
|
}
|
|
|
|
|
2012-01-06 13:00:22 +01:00
|
|
|
if(IsEqualGUID(&SID_SNewWindowManager, guidService)) {
|
|
|
|
TRACE("SID_SNewWindowManager service\n");
|
|
|
|
return INewWindowManager_QueryInterface(&This->nwm.INewWindowManager_iface, riid, ppv);
|
|
|
|
}
|
|
|
|
|
2006-02-15 11:53:31 +01:00
|
|
|
FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
|
|
|
|
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IServiceProviderVtbl ServiceProviderVtbl = {
|
|
|
|
ClServiceProvider_QueryInterface,
|
|
|
|
ClServiceProvider_AddRef,
|
|
|
|
ClServiceProvider_Release,
|
|
|
|
ClServiceProvider_QueryService
|
|
|
|
};
|
|
|
|
|
2006-04-18 00:38:06 +02:00
|
|
|
void DocHost_ClientSite_Init(DocHost *This)
|
2005-11-15 13:03:25 +01:00
|
|
|
{
|
2011-06-06 00:02:02 +02:00
|
|
|
This->IOleClientSite_iface.lpVtbl = &OleClientSiteVtbl;
|
|
|
|
This->IOleInPlaceSiteEx_iface.lpVtbl = &OleInPlaceSiteExVtbl;
|
|
|
|
This->IOleDocumentSite_iface.lpVtbl = &OleDocumentSiteVtbl;
|
|
|
|
This->IOleControlSite_iface.lpVtbl = &OleControlSiteVtbl;
|
|
|
|
This->IDispatch_iface.lpVtbl = &DispatchVtbl;
|
|
|
|
This->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl;
|
2005-11-28 11:24:49 +01:00
|
|
|
}
|
|
|
|
|
2006-04-18 00:41:43 +02:00
|
|
|
void DocHost_ClientSite_Release(DocHost *This)
|
2005-11-28 11:24:49 +01:00
|
|
|
{
|
2011-11-15 13:28:15 +01:00
|
|
|
if(This->browser_service)
|
|
|
|
detach_browser_service(This->browser_service);
|
2006-04-18 00:41:43 +02:00
|
|
|
if(This->view)
|
|
|
|
IOleDocumentView_Release(This->view);
|
2005-11-15 13:03:25 +01:00
|
|
|
}
|