From 461a0102c53e0d5704d5a0d949a90f70841cc1fd Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 8 Feb 2006 12:42:23 +0100 Subject: [PATCH] shdocvw: Added IHlinkFrame stub implementation. --- dlls/shdocvw/Makefile.in | 1 + dlls/shdocvw/navigate.c | 104 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/shdocvw/shdocvw.h | 4 ++ dlls/shdocvw/webbrowser.c | 4 ++ 4 files changed, 113 insertions(+) create mode 100644 dlls/shdocvw/navigate.c diff --git a/dlls/shdocvw/Makefile.in b/dlls/shdocvw/Makefile.in index 40c50a69530..74a671ee898 100644 --- a/dlls/shdocvw/Makefile.in +++ b/dlls/shdocvw/Makefile.in @@ -16,6 +16,7 @@ C_SRCS = \ events.c \ factory.c \ frame.c \ + navigate.c \ oleobject.c \ persist.c \ regsvr.c \ diff --git a/dlls/shdocvw/navigate.c b/dlls/shdocvw/navigate.c new file mode 100644 index 00000000000..32e59fae340 --- /dev/null +++ b/dlls/shdocvw/navigate.c @@ -0,0 +1,104 @@ +/* + * 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 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "wine/debug.h" +#include "wine/unicode.h" + +#include "shdocvw.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); + +#define HLINKFRAME_THIS(iface) DEFINE_THIS(WebBrowser, HlinkFrame, iface) + +static HRESULT WINAPI HlinkFrame_QueryInterface(IHlinkFrame *iface, REFIID riid, void **ppv) +{ + WebBrowser *This = HLINKFRAME_THIS(iface); + return IWebBrowser2_QueryInterface(WEBBROWSER2(This), riid, ppv); +} + +static ULONG WINAPI HlinkFrame_AddRef(IHlinkFrame *iface) +{ + WebBrowser *This = HLINKFRAME_THIS(iface); + return IWebBrowser2_AddRef(WEBBROWSER2(This)); +} + +static ULONG WINAPI HlinkFrame_Release(IHlinkFrame *iface) +{ + WebBrowser *This = HLINKFRAME_THIS(iface); + return IWebBrowser2_Release(WEBBROWSER2(This)); +} + +static HRESULT WINAPI HlinkFrame_SetBrowseContext(IHlinkFrame *iface, + IHlinkBrowseContext *pihlbc) +{ + WebBrowser *This = HLINKFRAME_THIS(iface); + FIXME("(%p)->(%p)\n", This, pihlbc); + return E_NOTIMPL; +} + +static HRESULT WINAPI HlinkFrame_GetBrowseContext(IHlinkFrame *iface, + IHlinkBrowseContext **ppihlbc) +{ + WebBrowser *This = HLINKFRAME_THIS(iface); + FIXME("(%p)->(%p)\n", This, ppihlbc); + return E_NOTIMPL; +} + +static HRESULT WINAPI HlinkFrame_Navigate(IHlinkFrame *iface, DWORD grfHLNF, LPBC pbc, + IBindStatusCallback *pibsc, IHlink *pihlNavigate) +{ + WebBrowser *This = HLINKFRAME_THIS(iface); + FIXME("(%p)->(%08lx %p %p %p)\n", This, grfHLNF, pbc, pibsc, pihlNavigate); + return E_NOTIMPL; +} + +static HRESULT WINAPI HlinkFrame_OnNavigate(IHlinkFrame *iface, DWORD grfHLNF, + IMoniker *pimkTarget, LPCWSTR pwzLocation, LPCWSTR pwzFriendlyName, DWORD dwreserved) +{ + WebBrowser *This = HLINKFRAME_THIS(iface); + FIXME("(%p)->(%08lx %p %s %s %ld)\n", This, grfHLNF, pimkTarget, debugstr_w(pwzLocation), + debugstr_w(pwzFriendlyName), dwreserved); + return E_NOTIMPL; +} + +static HRESULT WINAPI HlinkFrame_UpdateHlink(IHlinkFrame *iface, ULONG uHLID, + IMoniker *pimkTarget, LPCWSTR pwzLocation, LPCWSTR pwzFriendlyName) +{ + WebBrowser *This = HLINKFRAME_THIS(iface); + FIXME("(%p)->(%lu %p %s %s)\n", This, uHLID, pimkTarget, debugstr_w(pwzLocation), + debugstr_w(pwzFriendlyName)); + return E_NOTIMPL; +} + +#undef HLINKFRAME_THIS + +static const IHlinkFrameVtbl HlinkFrameVtbl = { + HlinkFrame_QueryInterface, + HlinkFrame_AddRef, + HlinkFrame_Release, + HlinkFrame_SetBrowseContext, + HlinkFrame_GetBrowseContext, + HlinkFrame_Navigate, + HlinkFrame_OnNavigate, + HlinkFrame_UpdateHlink +}; + +void WebBrowser_HlinkFrame_Init(WebBrowser *This) +{ + This->lpHlinkFrameVtbl = &HlinkFrameVtbl; +} diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h index a103615dc5b..ace8fff6bf1 100644 --- a/dlls/shdocvw/shdocvw.h +++ b/dlls/shdocvw/shdocvw.h @@ -37,6 +37,7 @@ #include "shlobj.h" #include "exdisp.h" #include "mshtmhst.h" +#include "hlink.h" /********************************************************************** * IClassFactory declaration for SHDOCVW.DLL @@ -76,6 +77,7 @@ typedef struct { const IViewObject2Vtbl *lpViewObjectVtbl; const IOleInPlaceActiveObjectVtbl *lpOleInPlaceActiveObjectVtbl; const IOleCommandTargetVtbl *lpWBOleCommandTargetVtbl; + const IHlinkFrameVtbl *lpHlinkFrameVtbl; /* Interfaces available for embeded document */ @@ -134,6 +136,7 @@ typedef struct { #define VIEWOBJ2(x) ((IViewObject2*) &(x)->lpViewObjectVtbl); #define ACTIVEOBJ(x) ((IOleInPlaceActiveObject*) &(x)->lpOleInPlaceActiveObjectVtbl) #define WBOLECMD(x) ((IOleCommandTarget*) &(x)->lpWBOleCommandTargetVtbl) +#define HLINKFRAME(x) ((IHlinkFrame*) &(x)->lpHlinkFrameVtbl) #define CLIENTSITE(x) ((IOleClientSite*) &(x)->lpOleClientSiteVtbl) #define INPLACESITE(x) ((IOleInPlaceSite*) &(x)->lpOleInPlaceSiteVtbl) @@ -150,6 +153,7 @@ void WebBrowser_ViewObject_Init(WebBrowser*); void WebBrowser_Persist_Init(WebBrowser*); void WebBrowser_ClassInfo_Init(WebBrowser*); void WebBrowser_Events_Init(WebBrowser*); +void WebBrowser_HlinkFrame_Init(WebBrowser*); void WebBrowser_ClientSite_Init(WebBrowser*); void WebBrowser_DocHost_Init(WebBrowser*); diff --git a/dlls/shdocvw/webbrowser.c b/dlls/shdocvw/webbrowser.c index 836a164af25..081fae1ee9d 100644 --- a/dlls/shdocvw/webbrowser.c +++ b/dlls/shdocvw/webbrowser.c @@ -97,6 +97,9 @@ static HRESULT WINAPI WebBrowser_QueryInterface(IWebBrowser2 *iface, REFIID riid }else if(IsEqualGUID(&IID_IOleCommandTarget, riid)) { TRACE("(%p)->(IID_IOleCommandTarget %p)\n", This, ppv); *ppv = WBOLECMD(This); + }else if(IsEqualGUID(&IID_IHlinkFrame, riid)) { + TRACE("(%p)->(IID_IHlinkFrame %p)\n", This, ppv); + *ppv = HLINKFRAME(This); } if(*ppv) { @@ -807,6 +810,7 @@ HRESULT WebBrowser_Create(IUnknown *pOuter, REFIID riid, void **ppv) WebBrowser_ClientSite_Init(ret); WebBrowser_DocHost_Init(ret); WebBrowser_Frame_Init(ret); + WebBrowser_HlinkFrame_Init(ret); hres = IWebBrowser_QueryInterface(WEBBROWSER(ret), riid, ppv); if(SUCCEEDED(hres)) { -- 2.11.4.GIT