Modified: trunk/reactos/include/wine/objidl.h
Added: trunk/reactos/lib/shdocvw/Ko.rc
Deleted: trunk/reactos/lib/shdocvw/Makefile.in
Added: trunk/reactos/lib/shdocvw/client.c
Modified: trunk/reactos/lib/shdocvw/oleobject.c
Modified: trunk/reactos/lib/shdocvw/shdocvw.h
Modified: trunk/reactos/lib/shdocvw/shdocvw.rc
Modified: trunk/reactos/lib/shdocvw/shdocvw.xml
Modified: trunk/reactos/lib/shdocvw/shdocvw_main.c
Added: trunk/reactos/lib/shdocvw/shlinstobj.c
Added: trunk/reactos/lib/shdocvw/view.c
Modified: trunk/reactos/lib/shdocvw/webbrowser.c
Modified: trunk/reactos/lib/uuid/uuid.c
Modified: trunk/reactos/w32api/include/mshtml.h
Modified: trunk/reactos/w32api/include/oleidl.h
--- trunk/reactos/include/wine/objidl.h 2005-11-20 13:45:15 UTC (rev 19362)
+++ trunk/reactos/include/wine/objidl.h 2005-11-20 14:26:47 UTC (rev 19363)
@@ -643,6 +643,36 @@
};
#undef INTERFACE
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define IMoniker_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IMoniker_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IMoniker_Release(p) (p)->lpVtbl->Release(p)
+/*** IPersist methods ***/
+#define IMoniker_GetClassID(p,a) (p)->lpVtbl->GetClassID(p,a)
+/*** IPersistStream methods ***/
+#define IMoniker_IsDirty(p) (p)->lpVtbl->IsDirty(p)
+#define IMoniker_Load(p,a) (p)->lpVtbl->Load(p,a)
+#define IMoniker_Save(p,a,b) (p)->lpVtbl->Save(p,a,b)
+#define IMoniker_GetSizeMax(p,a) (p)->lpVtbl->GetSizeMax(p,a)
+/*** IMoniker methods ***/
+#define IMoniker_BindToObject(p,a,b,c,d) (p)->lpVtbl->BindToObject(p,a,b,c,d)
+#define IMoniker_BindToStorage(p,a,b,c,d) (p)->lpVtbl->BindToStorage(p,a,b,c,d)
+#define IMoniker_Reduce(p,a,b,c,d) (p)->lpVtbl->Reduce(p,a,b,c,d)
+#define IMoniker_ComposeWith(p,a,b,c) (p)->lpVtbl->ComposeWith(p,a,b,c)
+#define IMoniker_Enum(p,a,b) (p)->lpVtbl->Enum(p,a,b)
+#define IMoniker_IsEqual(p,a) (p)->lpVtbl->IsEqual(p,a)
+#define IMoniker_Hash(p,a) (p)->lpVtbl->Hash(p,a)
+#define IMoniker_IsRunning(p,a,b,c) (p)->lpVtbl->IsRunning(p,a,b,c)
+#define IMoniker_GetTimeOfLastChange(p,a,b,c) (p)->lpVtbl->GetTimeOfLastChange(p,a,b,c)
+#define IMoniker_Inverse(p,a) (p)->lpVtbl->Inverse(p,a)
+#define IMoniker_CommonPrefixWith(p,a,b) (p)->lpVtbl->CommonPrefixWith(p,a,b)
+#define IMoniker_RelativePathTo(p,a,b) (p)->lpVtbl->RelativePathTo(p,a,b)
+#define IMoniker_GetDisplayName(p,a,b,c) (p)->lpVtbl->GetDisplayName(p,a,b,c)
+#define IMoniker_ParseDisplayName(p,a,b,c,d,e) (p)->lpVtbl->ParseDisplayName(p,a,b,c,d,e)
+#define IMoniker_IsSystemMoniker(p,a) (p)->lpVtbl->IsSystemMoniker(p,a)
+#endif
+
EXTERN_C const IID IID_IPersistStorage;
#define INTERFACE IPersistStorage
DECLARE_INTERFACE_(IPersistStorage,IPersist)
Property changes on: trunk/reactos/lib/shdocvw/Ko.rc
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
--- trunk/reactos/lib/shdocvw/Makefile.in 2005-11-20 13:45:15 UTC (rev 19362)
+++ trunk/reactos/lib/shdocvw/Makefile.in 2005-11-20 14:26:47 UTC (rev 19363)
@@ -1,26 +0,0 @@
-EXTRADEFS = -D_SHDOCVW_
-TOPSRCDIR = @top_srcdir@
-TOPOBJDIR = ../..
-SRCDIR = @srcdir@
-VPATH = @srcdir@
-MODULE = shdocvw.dll
-IMPORTLIB = libshdocvw.$(IMPLIBEXT)
-IMPORTS = urlmon ole32 user32 advapi32 kernel32
-EXTRALIBS = -luuid
-
-C_SRCS = \
- classinfo.c \
- events.c \
- factory.c \
- misc.c \
- oleobject.c \
- persist.c \
- regsvr.c \
- shdocvw_main.c \
- webbrowser.c
-
-RC_SRCS = shdocvw.rc
-
-@MAKE_DLL_RULES@
-
-### Dependencies:
--- vendor/wine/dlls/shdocvw/current/client.c 2005-11-20 13:34:15 UTC (rev 19361)
+++ trunk/reactos/lib/shdocvw/client.c 2005-11-20 14:26:47 UTC (rev 19363)
@@ -0,0 +1,258 @@
+/*
+ * 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
+ */
+
+#define COBJMACROS
+#include "wine/debug.h"
+#include "shdocvw.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
+
+#define CLIENTSITE_THIS(iface) DEFINE_THIS(WebBrowser, OleClientSite, iface)
+
+static HRESULT WINAPI ClientSite_QueryInterface(IOleClientSite *iface, REFIID riid, void **ppv)
+{
+ WebBrowser *This = CLIENTSITE_THIS(iface);
+
+ *ppv = NULL;
+
+ if(IsEqualGUID(&IID_IUnknown, riid)) {
+ TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
+ *ppv = CLIENTSITE(This);
+ }else if(IsEqualGUID(&IID_IOleClientSite, riid)) {
+ TRACE("(%p)->(IID_IOleClientSite %p)\n", This, ppv);
+ *ppv = CLIENTSITE(This);
+ }else if(IsEqualGUID(&IID_IOleWindow, riid)) {
+ TRACE("(%p)->(IID_IOleWindow %p)\n", This, ppv);
+ *ppv = INPLACESITE(This);
+ }else if(IsEqualGUID(&IID_IOleInPlaceSite, riid)) {
+ TRACE("(%p)->(IID_IOleInPlaceSite %p)\n", This, ppv);
+ *ppv = INPLACESITE(This);
+ }
+
+ if(*ppv) {
+ IWebBrowser2_AddRef(WEBBROWSER(This));
+ return S_OK;
+ }
+
+ WARN("Unsupported intrface %s\n", debugstr_guid(riid));
+
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI ClientSite_AddRef(IOleClientSite *iface)
+{
+ WebBrowser *This = CLIENTSITE_THIS(iface);
+ return IWebBrowser2_AddRef(WEBBROWSER(This));
+}
+
+static ULONG WINAPI ClientSite_Release(IOleClientSite *iface)
+{
+ WebBrowser *This = CLIENTSITE_THIS(iface);
+ return IWebBrowser2_Release(WEBBROWSER(This));
+}
+
+static HRESULT WINAPI ClientSite_SaveObject(IOleClientSite *iface)
+{
+ WebBrowser *This = CLIENTSITE_THIS(iface);
+ FIXME("(%p)\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAssign,
+ DWORD dwWhichMoniker, IMoniker **ppmk)
+{
+ WebBrowser *This = CLIENTSITE_THIS(iface);
+ FIXME("(%p)->(%ld %ld %p)\n", This, dwAssign, dwWhichMoniker, ppmk);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ClientSite_GetContainer(IOleClientSite *iface, IOleContainer **ppContainer)
+{
+ WebBrowser *This = CLIENTSITE_THIS(iface);
+ FIXME("(%p)->(%p)\n", This, ppContainer);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ClientSite_ShowObject(IOleClientSite *iface)
+{
+ WebBrowser *This = CLIENTSITE_THIS(iface);
+ FIXME("(%p)\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ClientSite_OnShowWindow(IOleClientSite *iface, BOOL fShow)
+{
+ WebBrowser *This = CLIENTSITE_THIS(iface);
+ FIXME("(%p)->(%x)\n", This, fShow);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI ClientSite_RequestNewObjectLayout(IOleClientSite *iface)
+{
+ WebBrowser *This = CLIENTSITE_THIS(iface);
+ FIXME("(%p)\n", This);
+ return E_NOTIMPL;
+}
+
+#undef CLIENTSITE_THIS
+
+static const IOleClientSiteVtbl OleClientSiteVtbl = {
+ ClientSite_QueryInterface,
+ ClientSite_AddRef,
+ ClientSite_Release,
+ ClientSite_SaveObject,
+ ClientSite_GetMoniker,
+ ClientSite_GetContainer,
+ ClientSite_ShowObject,
+ ClientSite_OnShowWindow,
+ ClientSite_RequestNewObjectLayout
+};
+
+#define INPLACESITE_THIS(iface) DEFINE_THIS(WebBrowser, OleInPlaceSite, iface)
+
+static HRESULT WINAPI InPlaceSite_QueryInterface(IOleInPlaceSite *iface, REFIID riid, void **ppv)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ return IOleClientSite_QueryInterface(CLIENTSITE(This), riid, ppv);
+}
+
+static ULONG WINAPI InPlaceSite_AddRef(IOleInPlaceSite *iface)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ return IOleClientSite_AddRef(CLIENTSITE(This));
+}
+
+static ULONG WINAPI InPlaceSite_Release(IOleInPlaceSite *iface)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ return IOleClientSite_Release(CLIENTSITE(This));
+}
+
+static HRESULT WINAPI InPlaceSite_GetWindow(IOleInPlaceSite *iface, HWND *phwnd)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ FIXME("(%p)->(%p)\n", This, phwnd);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI InPlaceSite_ContextSensitiveHelp(IOleInPlaceSite *iface, BOOL fEnterMode)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ FIXME("(%p)->(%x)\n", This, fEnterMode);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI InPlaceSite_CanInPlaceActivate(IOleInPlaceSite *iface)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ FIXME("(%p)\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI InPlaceSite_OnInPlaceActivate(IOleInPlaceSite *iface)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ FIXME("(%p)\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI InPlaceSite_OnUIActivate(IOleInPlaceSite *iface)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ FIXME("(%p)\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI InPlaceSite_GetWindowContext(IOleInPlaceSite *iface,
+ IOleInPlaceFrame **ppFrame, IOleInPlaceUIWindow **ppDoc, LPRECT lprcPosRect,
+ LPRECT lprcClipRect, LPOLEINPLACEFRAMEINFO lpFrameInfo)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ FIXME("(%p)->(%p %p %p %p %p)\n", This, ppFrame, ppDoc, lprcPosRect,
+ lprcClipRect, lpFrameInfo);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI InPlaceSite_Scroll(IOleInPlaceSite *iface, SIZE scrollExtent)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ FIXME("(%p)->({%ld %ld})\n", This, scrollExtent.cx, scrollExtent.cy);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI InPlaceSite_OnUIDeactivate(IOleInPlaceSite *iface, BOOL fUndoable)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ FIXME("(%p)->(%x)\n", This, fUndoable);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI InPlaceSite_OnInPlaceDeactivate(IOleInPlaceSite *iface)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ FIXME("(%p)\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI InPlaceSite_DiscardUndoState(IOleInPlaceSite *iface)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ FIXME("(%p)\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI InPlaceSite_DeactivateAndUndo(IOleInPlaceSite *iface)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ FIXME("(%p)\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI InPlaceSite_OnPosRectChange(IOleInPlaceSite *iface,
+ LPCRECT lprcPosRect)
+{
+ WebBrowser *This = INPLACESITE_THIS(iface);
+ FIXME("(%p)->(%p)\n", This, lprcPosRect);
+ return E_NOTIMPL;
+}
+
+#undef INPLACESITE_THIS
+
+static const IOleInPlaceSiteVtbl OleInPlaceSiteVtbl = {
+ 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,
+ InPlaceSite_OnPosRectChange
+};
+
+void WebBrowser_ClientSite_Init(WebBrowser *This)
+{
+ This->lpOleClientSiteVtbl = &OleClientSiteVtbl;
+ This->lpOleInPlaceSiteVtbl = &OleInPlaceSiteVtbl;
+}
Property changes on: trunk/reactos/lib/shdocvw/client.c
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
--- trunk/reactos/lib/shdocvw/oleobject.c 2005-11-20 13:45:15 UTC (rev 19362)
+++ trunk/reactos/lib/shdocvw/oleobject.c 2005-11-20 14:26:47 UTC (rev 19363)
@@ -139,16 +139,59 @@
LPOLECLIENTSITE pActiveSite, LONG lindex, HWND hwndParent, LPCRECT lprcPosRect)
{
WebBrowser *This = OLEOBJ_THIS(iface);
- FIXME("(%p)->(%ld %p %p %ld %p %p)\n", This, iVerb, lpmsg, pActiveSite, lindex, hwndParent,
+ HRESULT hres;
+
+ TRACE("(%p)->(%ld %p %p %ld %p %p)\n", This, iVerb, lpmsg, pActiveSite, lindex, hwndParent,
lprcPosRect);
+
switch (iVerb)
{
- case OLEIVERB_INPLACEACTIVATE:
- FIXME ("stub for OLEIVERB_INPLACEACTIVATE\n");
+ case OLEIVERB_INPLACEACTIVATE: {
+ IOleInPlaceSite *inplace;
+
+ TRACE("OLEIVERB_INPLACEACTIVATE\n");
+
+ if(!pActiveSite)
+ return E_INVALIDARG;
+
+ hres = IOleClientSite_QueryInterface(pActiveSite, &IID_IOleInPlaceSite, (void**)&inplace);
+ if(FAILED(hres)) {
+ WARN("Could not get IOleInPlaceSite\n");
+ return hres;
+ }
+
+ hres = IOleInPlaceSite_CanInPlaceActivate(inplace);
+ if(hres != S_OK) {
+ WARN("CanInPlaceActivate returned: %08lx\n", hres);
+ IOleInPlaceSite_Release(inplace);
+ return E_FAIL;
+ }
+
+ hres = IOleInPlaceSite_GetWindow(inplace, &This->iphwnd);
+ if(FAILED(hres))
+ This->iphwnd = hwndParent;
+
+ IOleInPlaceSite_OnInPlaceActivate(inplace);
+
+ IOleInPlaceSite_GetWindowContext(inplace, &This->frame, &This->uiwindow,
+ &This->pos_rect, &This->clip_rect,
+ &This->frameinfo);
+
+ IOleInPlaceSite_Release(inplace);
+
+ if(This->client) {
+ IOleClientSite_ShowObject(This->client);
+ IOleClientSite_GetContainer(This->client, &This->container);
+ }
+
+ if(This->frame)
+ IOleInPlaceFrame_GetWindow(This->frame, &This->frame_hwnd);
+
+ return S_OK;
+ }
+ default:
+ FIXME("stub for %ld\n", iVerb);
break;
- case OLEIVERB_HIDE:
- FIXME ("stub for OLEIVERB_HIDE\n");
- break;
}
return E_NOTIMPL;
@@ -451,4 +494,25 @@
This->lpOleControlVtbl = &OleControlVtbl;
This->client = NULL;
+ This->container = NULL;
+ This->iphwnd = NULL;
+ This->frame_hwnd = NULL;
+ This->frame = NULL;
+ This->uiwindow = NULL;
+
+ memset(&This->pos_rect, 0, sizeof(RECT));
+ memset(&This->clip_rect, 0, sizeof(RECT));
+ memset(&This->frameinfo, 0, sizeof(OLEINPLACEFRAMEINFO));
}
+
+void WebBrowser_OleObject_Destroy(WebBrowser *This)
+{
+ if(This->client)
+ IOleClientSite_Release(This->client);
+ if(This->container)
+ IOleContainer_Release(This->container);
+ if(This->frame)
+ IOleInPlaceFrame_Release(This->frame);
+ if(This->uiwindow)
+ IOleInPlaceUIWindow_Release(This->uiwindow);
+}
--- trunk/reactos/lib/shdocvw/shdocvw.h 2005-11-20 13:45:15 UTC (rev 19362)
+++ trunk/reactos/lib/shdocvw/shdocvw.h 2005-11-20 14:26:47 UTC (rev 19363)
@@ -48,11 +48,18 @@
extern IClassFactoryImpl SHDOCVW_ClassFactory;
+/**********************************************************************
+ * Shell Instance Objects
+ */
+extern HRESULT SHDOCVW_GetShellInstanceObjectClassObject(REFCLSID rclsid,
+ REFIID riid, LPVOID *ppvClassObj);
/**********************************************************************
* WebBrowser declaration for SHDOCVW.DLL
*/
typedef struct {
+ /* Interfaces available via WebBrowser object */
+
const IWebBrowser2Vtbl *lpWebBrowser2Vtbl;
const IOleObjectVtbl *lpOleObjectVtbl;
const IOleInPlaceObjectVtbl *lpOleInPlaceObjectVtbl;
@@ -62,10 +69,29 @@
const IProvideClassInfo2Vtbl *lpProvideClassInfoVtbl;
const IQuickActivateVtbl *lpQuickActivateVtbl;
const IConnectionPointContainerVtbl *lpConnectionPointContainerVtbl;
+ const IViewObject2Vtbl *lpViewObjectVtbl;
+ /* Interfaces available for embeded document */
+
+ const IOleClientSiteVtbl *lpOleClientSiteVtbl;
+ const IOleInPlaceSiteVtbl *lpOleInPlaceSiteVtbl;
+
LONG ref;
+ IUnknown *document;
+
IOleClientSite *client;
+ IOleContainer *container;
+
+ /* window context */
+
+ HWND iphwnd;
+ HWND frame_hwnd;
+ IOleInPlaceFrame *frame;
+ IOleInPlaceUIWindow *uiwindow;
+ RECT pos_rect;
+ RECT clip_rect;
+ OLEINPLACEFRAMEINFO frameinfo;
} WebBrowser;
#define WEBBROWSER(x) ((IWebBrowser*) &(x)->lpWebBrowser2Vtbl)
@@ -78,13 +104,23 @@
#define CLASSINFO(x) ((IProvideClassInfo2*) &(x)->lpProvideClassInfoVtbl)
#define QUICKACT(x) ((IQuickActivate*) &(x)->lpQuickActivateVtbl)
#define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl)
+#define VIEWOBJ(x) ((IViewObject*) &(x)->lpViewObjectVtbl);
+#define VIEWOBJ2(x) ((IViewObject2*) &(x)->lpViewObjectVtbl);
+#define CLIENTSITE(x) ((IOleClientSite*) &(x)->lpOleClientSiteVtbl)
+#define INPLACESITE(x) ((IOleInPlaceSite*) &(x)->lpOleInPlaceSiteVtbl)
+
void WebBrowser_OleObject_Init(WebBrowser*);
+void WebBrowser_ViewObject_Init(WebBrowser*);
void WebBrowser_Persist_Init(WebBrowser*);
void WebBrowser_ClassInfo_Init(WebBrowser*);
void WebBrowser_Misc_Init(WebBrowser*);
void WebBrowser_Events_Init(WebBrowser*);
+void WebBrowser_ClientSite_Init(WebBrowser*);
+
+void WebBrowser_OleObject_Destroy(WebBrowser*);
+
HRESULT WebBrowser_Create(IUnknown*,REFIID,void**);
/**********************************************************************
--- trunk/reactos/lib/shdocvw/shdocvw.rc 2005-11-20 13:45:15 UTC (rev 19362)
+++ trunk/reactos/lib/shdocvw/shdocvw.rc 2005-11-20 14:26:47 UTC (rev 19363)
@@ -30,6 +30,7 @@
#include "Fi.rc"
#include "Fr.rc"
#include "Ja.rc"
+#include "Ko.rc"
#include "Nl.rc"
#include "No.rc"
#include "Pl.rc"
--- trunk/reactos/lib/shdocvw/shdocvw.xml 2005-11-20 13:45:15 UTC (rev 19362)
+++ trunk/reactos/lib/shdocvw/shdocvw.xml 2005-11-20 14:26:47 UTC (rev 19363)
@@ -15,8 +15,10 @@
<library>advapi32</library>
<library>user32</library>
<library>ole32</library>
+ <library>oleaut32</library>
<library>urlmon</library>
<file>classinfo.c</file>
+ <file>client.c</file>
<file>events.c</file>
<file>factory.c</file>
<file>misc.c</file>
@@ -24,6 +26,8 @@
<file>persist.c</file>
<file>regsvr.c</file>
<file>shdocvw_main.c</file>
+ <file>shlinstobj.c</file>
+ <file>view.c</file>
<file>webbrowser.c</file>
<file>shdocvw.rc</file>
<file>shdocvw.spec</file>
--- trunk/reactos/lib/shdocvw/shdocvw_main.c 2005-11-20 13:45:15 UTC (rev 19362)
+++ trunk/reactos/lib/shdocvw/shdocvw_main.c 2005-11-20 14:26:47 UTC (rev 19363)
@@ -480,7 +480,8 @@
return r;
}
- if (IsEqualGUID(&IID_IClassFactory, riid))
+ if (IsEqualCLSID(&CLSID_WebBrowser, rclsid) &&
+ IsEqualIID(&IID_IClassFactory, riid))
{
/* Pass back our shdocvw class factory */
*ppv = (LPVOID)&SHDOCVW_ClassFactory;
@@ -489,7 +490,8 @@
return S_OK;
}
- return CLASS_E_CLASSNOTAVAILABLE;
+ /* As a last resort, figure if the CLSID belongs to a 'Shell Instance Object' */
+ return SHDOCVW_GetShellInstanceObjectClassObject(rclsid, riid, ppv);
}
/***********************************************************************
Property changes on: trunk/reactos/lib/shdocvw/shlinstobj.c
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Property changes on: trunk/reactos/lib/shdocvw/view.c
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
--- trunk/reactos/lib/shdocvw/webbrowser.c 2005-11-20 13:45:15 UTC (rev 19362)
+++ trunk/reactos/lib/shdocvw/webbrowser.c 2005-11-20 14:26:47 UTC (rev 19363)
@@ -19,9 +19,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#define COBJMACROS
#include "wine/debug.h"
#include "shdocvw.h"
+#include "mshtml.h"
+
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
/**********************************************************************
@@ -41,7 +44,7 @@
if(IsEqualGUID(&IID_IUnknown, riid)) {
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
*ppv = WEBBROWSER(This);
- }else if(IsEqualGUID (&IID_IDispatch, riid)) {
+ }else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = WEBBROWSER(This);
}else if(IsEqualGUID(&IID_IWebBrowser, riid)) {
@@ -74,18 +77,24 @@
}else if(IsEqualGUID (&IID_IPersistStreamInit, riid)) {
TRACE("(%p)->(IID_IPersistStreamInit %p)\n", This, ppv);
*ppv = PERSTRINIT(This);
- }else if(IsEqualGUID (&IID_IProvideClassInfo, riid)) {
+ }else if(IsEqualGUID(&IID_IProvideClassInfo, riid)) {
TRACE("(%p)->(IID_IProvideClassInfo %p)\n", This, ppv);
*ppv = CLASSINFO(This);
- }else if(IsEqualGUID (&IID_IProvideClassInfo2, riid)) {
+ }else if(IsEqualGUID(&IID_IProvideClassInfo2, riid)) {
TRACE("(%p)->(IID_IProvideClassInfo2 %p)\n", This, ppv);
*ppv = CLASSINFO(This);
- }else if(IsEqualGUID (&IID_IQuickActivate, riid)) {
+ }else if(IsEqualGUID(&IID_IQuickActivate, riid)) {
TRACE("(%p)->(IID_IQuickActivate %p)\n", This, ppv);
*ppv = QUICKACT(This);
- }else if(IsEqualGUID (&IID_IConnectionPointContainer, riid)) {
+ }else if(IsEqualGUID(&IID_IConnectionPointContainer, riid)) {
TRACE("(%p)->(IID_IConnectionPointContainer %p)\n", This, ppv);
*ppv = CONPTCONT(This);
+ }else if(IsEqualGUID(&IID_IViewObject, riid)) {
+ TRACE("(%p)->(IID_IViewObject %p)\n", This, ppv);
+ *ppv = VIEWOBJ(This);
+ }else if(IsEqualGUID(&IID_IViewObject2, riid)) {
+ TRACE("(%p)->(IID_IViewObject2 %p)\n", This, ppv);
+ *ppv = VIEWOBJ2(This);
}
if(*ppv) {
@@ -113,6 +122,11 @@
TRACE("(%p) ref=%ld\n", This, ref);
if(!ref) {
+ if(This->document)
+ IUnknown_Release(This->document);
+
+ WebBrowser_OleObject_Destroy(This);
+
HeapFree(GetProcessHeap(), 0, This);
SHDOCVW_UnlockModule();
}
@@ -480,8 +494,63 @@
VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers)
{
WebBrowser *This = WEBBROWSER_THIS(iface);
- FIXME("(%p)->(%p %p %p %p %p)\n", This, URL, Flags, TargetFrameName, PostData, Headers);
- return E_NOTIMPL;
+ IPersistMoniker *persist;
+ IOleObject *oleobj;
+ IMoniker *mon;
+ HRESULT hres;
+
+ TRACE("(%p)->(%p %p %p %p %p)\n", This, URL, Flags, TargetFrameName, PostData, Headers);
+
+ if(!This->client)
+ return E_FAIL;
+
+ if(V_VT(Flags) != VT_EMPTY || V_VT(TargetFrameName) != VT_EMPTY
+ || V_VT(PostData) != VT_EMPTY || V_VT(Headers) != VT_EMPTY)
+ FIXME("Unsupported arguments\n");
+
+ if(V_VT(URL) != VT_BSTR)
+ FIXME("V_VT(URL) != VT_BSTR\n");
+
+ /*
+ * FIXME:
+ * We should use URLMoniker's BindToObject instead creating HTMLDocument here.
+ * This should be fixed when mshtml.dll and urlmon.dll will be good enough.
+ */
+
+ if(!This->document) {
+ hres = CoCreateInstance(&CLSID_HTMLDocument, NULL,
+ CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
+ &IID_IUnknown, (void**)&This->document);
+ if(FAILED(hres))
+ return hres;
+ }
+
+ hres = IUnknown_QueryInterface(This->document, &IID_IPersistMoniker, (void**)&persist);
+ if(FAILED(hres))
+ return hres;
+
+ hres = CreateURLMoniker(NULL, V_BSTR(URL), &mon);
+ if(FAILED(hres)) {
+ IPersistMoniker_Release(persist);
+ return hres;
+ }
+
+ hres = IPersistMoniker_Load(persist, FALSE, mon, NULL /* FIXME */, 0);
+ IMoniker_Release(mon);
+ IPersistMoniker_Release(persist);
+ if(FAILED(hres)) {
+ WARN("Load failed: %08lx\n", hres);
+ return hres;
+ }
+
+ hres = IUnknown_QueryInterface(This->document, &IID_IOleObject, (void**)&oleobj);
+ if(FAILED(hres))
+ return hres;
+
+ hres = IOleObject_SetClientSite(oleobj, CLIENTSITE(This));
+ IOleObject_Release(oleobj);
+
+ return hres;
}
static HRESULT WINAPI WebBrowser_QueryStatusWB(IWebBrowser2 *iface, OLECMDID cmdID, OLECMDF *pcmdf)
@@ -705,11 +774,15 @@
ret->lpWebBrowser2Vtbl = &WebBrowser2Vtbl;
ret->ref = 0;
+ ret->document = NULL;
+
WebBrowser_OleObject_Init(ret);
+ WebBrowser_ViewObject_Init(ret);
WebBrowser_Persist_Init(ret);
WebBrowser_ClassInfo_Init(ret);
WebBrowser_Misc_Init(ret);
WebBrowser_Events_Init(ret);
+ WebBrowser_ClientSite_Init(ret);
hres = IWebBrowser_QueryInterface(WEBBROWSER(ret), riid, ppv);
if(SUCCEEDED(hres)) {
--- trunk/reactos/lib/uuid/uuid.c 2005-11-20 13:45:15 UTC (rev 19362)
+++ trunk/reactos/lib/uuid/uuid.c 2005-11-20 14:26:47 UTC (rev 19363)
@@ -89,3 +89,5 @@
DEFINE_GUID(CLSID_StdFont,0x0be35203,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
DEFINE_GUID(CLSID_StdPicture,0x0be35204,0x8f91,0x11ce,0x9d,0xe3,0x00,0xaa,0x00,0x4b,0xb8,0x51);
+
+DEFINE_GUID(CLSID_HTMLDocument, 0x25336920, 0x03f9, 0x11cf, 0x8f,0xd0, 0x00,0xaa,0x00,0x68,0x6f,0x13);
--- trunk/reactos/w32api/include/mshtml.h 2005-11-20 13:45:15 UTC (rev 19362)
+++ trunk/reactos/w32api/include/mshtml.h 2005-11-20 14:26:47 UTC (rev 19363)
@@ -156,6 +156,7 @@
STDMETHOD(get_Script)(THIS_ IDispatch**) PURE;
};
#undef INTERFACE
+EXTERN_C const CLSID CLSID_HTMLDocument;
EXTERN_C const IID IID_IHTMLDocument2;
#define INTERFACE IHTMLDocument2
--- trunk/reactos/w32api/include/oleidl.h 2005-11-20 13:45:15 UTC (rev 19362)
+++ trunk/reactos/w32api/include/oleidl.h 2005-11-20 14:26:47 UTC (rev 19363)
@@ -125,6 +125,18 @@
};
#undef INTERFACE
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define IOleContainer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IOleContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IOleContainer_Release(p) (p)->lpVtbl->Release(p)
+/*** IParseDisplayName methods ***/
+#define IOleContainer_ParseDisplayName(p,a,b,c,d) (p)->lpVtbl->ParseDisplayName(p,a,b,c,d)
+/*** IOleContainer methods ***/
+#define IOleContainer_EnumObjects(p,a,b) (p)->lpVtbl->EnumObjects(p,a,b)
+#define IOleContainer_LockContainer(p,a) (p)->lpVtbl->LockContainer(p,a)
+#endif
+
EXTERN_C const IID IID_IOleItemContainer;
#define INTERFACE IOleItemContainer
DECLARE_INTERFACE_(IOleItemContainer,IOleContainer)
@@ -275,6 +287,21 @@
};
#undef INTERFACE
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define IOleInPlaceUIWindow_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IOleInPlaceUIWindow_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IOleInPlaceUIWindow_Release(p) (p)->lpVtbl->Release(p)
+/*** IOleWindow methods ***/
+#define IOleInPlaceUIWindow_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a)
+#define IOleInPlaceUIWindow_ContextSensitiveHelp(p,a) (p)->lpVtbl->ContextSensitiveHelp(p,a)
+/*** IOleInPlaceUIWindow methods ***/
+#define IOleInPlaceUIWindow_GetBorder(p,a) (p)->lpVtbl->GetBorder(p,a)
+#define IOleInPlaceUIWindow_RequestBorderSpace(p,a) (p)->lpVtbl->RequestBorderSpace(p,a)
+#define IOleInPlaceUIWindow_SetBorderSpace(p,a) (p)->lpVtbl->SetBorderSpace(p,a)
+#define IOleInPlaceUIWindow_SetActiveObject(p,a,b) (p)->lpVtbl->SetActiveObject(p,a,b)
+#endif
+
EXTERN_C const IID IID_IOleInPlaceObject;
#define INTERFACE IOleInPlaceObject
DECLARE_INTERFACE_(IOleInPlaceObject,IOleWindow)
@@ -386,6 +413,27 @@
};
#undef INTERFACE
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define IOleInPlaceSite_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IOleInPlaceSite_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IOleInPlaceSite_Release(p) (p)->lpVtbl->Release(p)
+/*** IOleWindow methods ***/
+#define IOleInPlaceSite_GetWindow(p,a) (p)->lpVtbl->GetWindow(p,a)
+#define IOleInPlaceSite_ContextSensitiveHelp(p,a) (p)->lpVtbl->ContextSensitiveHelp(p,a)
+/*** IOleInPlaceSite methods ***/
+#define IOleInPlaceSite_CanInPlaceActivate(p) (p)->lpVtbl->CanInPlaceActivate(p)
+#define IOleInPlaceSite_OnInPlaceActivate(p) (p)->lpVtbl->OnInPlaceActivate(p)
+#define IOleInPlaceSite_OnUIActivate(p) (p)->lpVtbl->OnUIActivate(p)
+#define IOleInPlaceSite_GetWindowContext(p,a,b,c,d,e) (p)->lpVtbl->GetWindowContext(p,a,b,c,d,e)
+#define IOleInPlaceSite_Scroll(p,a) (p)->lpVtbl->Scroll(p,a)
+#define IOleInPlaceSite_OnUIDeactivate(p,a) (p)->lpVtbl->OnUIDeactivate(p,a)
+#define IOleInPlaceSite_OnInPlaceDeactivate(p) (p)->lpVtbl->OnInPlaceDeactivate(p)
+#define IOleInPlaceSite_DiscardUndoState(p) (p)->lpVtbl->DiscardUndoState(p)
+#define IOleInPlaceSite_DeactivateAndUndo(p) (p)->lpVtbl->DeactivateAndUndo(p)
+#define IOleInPlaceSite_OnPosRectChange(p,a) (p)->lpVtbl->OnPosRectChange(p,a)
+#endif
+
EXTERN_C const IID IID_IOleAdviseHolder;
#define INTERFACE IOleAdviseHolder
DECLARE_INTERFACE_(IOleAdviseHolder,IUnknown)