Modified: trunk/reactos/include/wine/debug.h
Modified: trunk/reactos/lib/shdocvw/Ko.rc
Modified: trunk/reactos/lib/shdocvw/client.c
Added: trunk/reactos/lib/shdocvw/dochost.c
Modified: trunk/reactos/lib/shdocvw/events.c
Modified: trunk/reactos/lib/shdocvw/oleobject.c
Modified: trunk/reactos/lib/shdocvw/persist.c
Modified: trunk/reactos/lib/shdocvw/shdocvw.h
Modified: trunk/reactos/lib/shdocvw/shdocvw.xml
Modified: trunk/reactos/lib/shdocvw/webbrowser.c
Modified: trunk/reactos/lib/uuid/uuid.c
Added: trunk/reactos/w32api/include/mshtmhst.h
--- trunk/reactos/include/wine/debug.h 2005-11-26 08:21:42 UTC (rev 19616)
+++ trunk/reactos/include/wine/debug.h 2005-11-26 09:40:12 UTC (rev 19617)
@@ -3,8 +3,8 @@
#include "../roscfg.h"
#include <stdarg.h>
-#include <windows.h>
-#include <wchar.h>
+#include <windef.h>
+#include <winnt.h>
/* Add ROS Master debug functions if not added yet */
#ifndef __INTERNAL_DEBUG
--- trunk/reactos/lib/shdocvw/Ko.rc 2005-11-26 08:21:42 UTC (rev 19616)
+++ trunk/reactos/lib/shdocvw/Ko.rc 2005-11-26 09:40:12 UTC (rev 19617)
@@ -30,7 +30,7 @@
STRINGTABLE
BEGIN
- 1001 "This application is requesting an ActiveX browser object\n" \
- "but the Mozilla Active X control is currently not installed." \
- "Do you wish to download and install it?"
+ 1001 "?? ë?Ω??? ¥Îã??Û?ó¢? ?Û¾?ý?· ????©ª ?õ?©Ãi?¤??.\n" \
+ "?ÎÀ»?¬ ©?·Â¾ ¥Îã??Û ?ó¢? ??ã«ÀÐ?? Ã÷?þ ???íÁÃ¥¯?Í?÷ ¥?¢??¤??." \
+ "?þ¢??? ???¯À?ÁÕÃÏ?¡ ???íä??¢??¤?¯?"
END
--- trunk/reactos/lib/shdocvw/client.c 2005-11-26 08:21:42 UTC (rev 19616)
+++ trunk/reactos/lib/shdocvw/client.c 2005-11-26 09:40:12 UTC (rev 19617)
@@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define COBJMACROS
#include "wine/debug.h"
#include "shdocvw.h"
@@ -42,6 +41,12 @@
}else if(IsEqualGUID(&IID_IOleInPlaceSite, riid)) {
TRACE("(%p)->(IID_IOleInPlaceSite %p)\n", This, ppv);
*ppv = INPLACESITE(This);
+ }else if(IsEqualGUID(&IID_IDocHostUIHandler, riid)) {
+ TRACE("(%p)->(IID_IDocHostUIHandler %p)\n", This, ppv);
+ *ppv = DOCHOSTUI(This);
+ }else if(IsEqualGUID(&IID_IDocHostUIHandler2, riid)) {
+ TRACE("(%p)->(IID_IDocHostUIHandler2 %p)\n", This, ppv);
+ *ppv = DOCHOSTUI2(This);
}
if(*ppv) {
@@ -146,8 +151,11 @@
static HRESULT WINAPI InPlaceSite_GetWindow(IOleInPlaceSite *iface, HWND *phwnd)
{
WebBrowser *This = INPLACESITE_THIS(iface);
- FIXME("(%p)->(%p)\n", This, phwnd);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, phwnd);
+
+ *phwnd = This->doc_view_hwnd;
+ return S_OK;
}
static HRESULT WINAPI InPlaceSite_ContextSensitiveHelp(IOleInPlaceSite *iface, BOOL fEnterMode)
Property changes on: trunk/reactos/lib/shdocvw/dochost.c
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
--- trunk/reactos/lib/shdocvw/events.c 2005-11-26 08:21:42 UTC (rev 19616)
+++ trunk/reactos/lib/shdocvw/events.c 2005-11-26 09:40:12 UTC (rev 19617)
@@ -27,11 +27,16 @@
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
-static IConnectionPointImpl SHDOCVW_ConnectionPoint;
+typedef struct {
+ const IConnectionPointVtbl *lpConnectionPointVtbl;
-static const GUID IID_INotifyDBEvents =
- { 0xdb526cc0, 0xd188, 0x11cd, { 0xad, 0x48, 0x00, 0xaa, 0x00, 0x3c, 0x9c, 0xb6 } };
+ WebBrowser *webbrowser;
+ IID iid;
+} ConnectionPoint;
+
+#define CONPOINT(x) ((IConnectionPoint*) &(x)->lpConnectionPointVtbl)
+
/**********************************************************************
* Implement the IConnectionPointContainer interface
*/
@@ -70,27 +75,31 @@
{
WebBrowser *This = CONPTCONT_THIS(iface);
- FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppCP);
+ if(!ppCP) {
+ WARN("ppCP == NULL\n");
+ return E_POINTER;
+ }
- /* For now, return the same IConnectionPoint object for both
- * event interface requests.
- */
- if (IsEqualGUID (&IID_INotifyDBEvents, riid))
- {
- TRACE("Returning connection point %p for IID_INotifyDBEvents\n",
- &SHDOCVW_ConnectionPoint);
- *ppCP = (LPCONNECTIONPOINT)&SHDOCVW_ConnectionPoint;
- return S_OK;
+ *ppCP = NULL;
+
+ if(IsEqualGUID(&DIID_DWebBrowserEvents2, riid)) {
+ TRACE("(%p)->(DIID_DWebBrowserEvents2 %p)\n", This, ppCP);
+ *ppCP = This->cp_wbe2;
+ }else if(IsEqualGUID(&DIID_DWebBrowserEvents, riid)) {
+ TRACE("(%p)->(DIID_DWebBrowserEvents %p)\n", This, ppCP);
+ *ppCP = This->cp_wbe;
+ }else if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) {
+ TRACE("(%p)->(IID_IPropertyNotifySink %p)\n", This, ppCP);
+ *ppCP = This->cp_pns;
}
- else if (IsEqualGUID (&IID_IPropertyNotifySink, riid))
- {
- TRACE("Returning connection point %p for IID_IPropertyNotifySink\n",
- &SHDOCVW_ConnectionPoint);
- *ppCP = (LPCONNECTIONPOINT)&SHDOCVW_ConnectionPoint;
+
+ if(*ppCP) {
+ IConnectionPoint_AddRef(*ppCP);
return S_OK;
}
- return E_FAIL;
+ WARN("Unsupported IID %s\n", debugstr_guid(riid));
+ return E_NOINTERFACE;
}
#undef CONPTCONT_THIS
@@ -109,97 +118,125 @@
* Implement the IConnectionPoint interface
*/
-static HRESULT WINAPI WBCP_QueryInterface(LPCONNECTIONPOINT iface,
- REFIID riid, LPVOID *ppobj)
+#define CONPOINT_THIS(iface) DEFINE_THIS(ConnectionPoint, ConnectionPoint, iface)
+
+static HRESULT WINAPI ConnectionPoint_QueryInterface(IConnectionPoint *iface,
+ REFIID riid, LPVOID *ppv)
{
- FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid));
+ ConnectionPoint *This = CONPOINT_THIS(iface);
- if (ppobj == NULL) return E_POINTER;
-
+ *ppv = NULL;
+
+ if(IsEqualGUID(&IID_IUnknown, riid)) {
+ TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
+ *ppv = CONPOINT(This);
+ }else if(IsEqualGUID(&IID_IConnectionPoint, riid)) {
+ TRACE("(%p)->(IID_IConnectionPoint %p)\n", This, ppv);
+ *ppv = CONPOINT(This);
+ }
+
+ if(*ppv) {
+ IWebBrowser2_AddRef(WEBBROWSER(This->webbrowser));
+ return S_OK;
+ }
+
+ WARN("Unsupported interface %s\n", debugstr_guid(riid));
return E_NOINTERFACE;
}
-static ULONG WINAPI WBCP_AddRef(LPCONNECTIONPOINT iface)
+static ULONG WINAPI ConnectionPoint_AddRef(IConnectionPoint *iface)
{
- SHDOCVW_LockModule();
-
- return 2; /* non-heap based object */
+ ConnectionPoint *This = CONPOINT_THIS(iface);
+ return IWebBrowser2_AddRef(WEBBROWSER(This->webbrowser));
}
-static ULONG WINAPI WBCP_Release(LPCONNECTIONPOINT iface)
+static ULONG WINAPI ConnectionPoint_Release(IConnectionPoint *iface)
{
- SHDOCVW_UnlockModule();
-
- return 1; /* non-heap based object */
+ ConnectionPoint *This = CONPOINT_THIS(iface);
+ return IWebBrowser2_Release(WEBBROWSER(This->webbrowser));
}
-static HRESULT WINAPI WBCP_GetConnectionInterface(LPCONNECTIONPOINT iface, IID* pIId)
+static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *iface, IID *pIID)
{
- FIXME("stub: %s\n", debugstr_guid(pIId));
- return S_OK;
-}
+ ConnectionPoint *This = CONPOINT_THIS(iface);
-/* Get this connection point's owning container */
-static HRESULT WINAPI
-WBCP_GetConnectionPointContainer(LPCONNECTIONPOINT iface,
- LPCONNECTIONPOINTCONTAINER *ppCPC)
-{
- FIXME("stub: IConnectionPointContainer = %p\n", *ppCPC);
+ TRACE("(%p)->(%p)\n", This, pIID);
+
+ memcpy(pIID, &This->iid, sizeof(IID));
return S_OK;
}
-/* Connect the pUnkSink event-handling implementation (in the control site)
- * to this connection point. Return a handle to this connection in
- * pdwCookie (for later use in Unadvise()).
- */
-static HRESULT WINAPI WBCP_Advise(LPCONNECTIONPOINT iface,
- LPUNKNOWN pUnkSink, DWORD *pdwCookie)
+static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer(IConnectionPoint *iface,
+ IConnectionPointContainer **ppCPC)
{
- static int new_cookie;
+ ConnectionPoint *This = CONPOINT_THIS(iface);
- FIXME("stub: IUnknown = %p, connection cookie = %ld\n", pUnkSink, *pdwCookie);
+ TRACE("(%p)->(%p)\n", This, ppCPC);
- *pdwCookie = ++new_cookie;
- TRACE ("Returning cookie = %ld\n", *pdwCookie);
-
+ *ppCPC = CONPTCONT(This->webbrowser);
return S_OK;
}
-/* Disconnect this implementation from the connection point. */
-static HRESULT WINAPI WBCP_Unadvise(LPCONNECTIONPOINT iface,
- DWORD dwCookie)
+static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *pUnkSink,
+ DWORD *pdwCookie)
{
- FIXME("stub: cookie to disconnect = %lx\n", dwCookie);
- return S_OK;
+ ConnectionPoint *This = CONPOINT_THIS(iface);
+ FIXME("(%p)->(%p %p)\n", This, pUnkSink, pdwCookie);
+ return E_NOTIMPL;
}
-/* Get a list of connections in this connection point. */
-static HRESULT WINAPI WBCP_EnumConnections(LPCONNECTIONPOINT iface,
- LPENUMCONNECTIONS *ppEnum)
+static HRESULT WINAPI ConnectionPoint_Unadvise(IConnectionPoint *iface, DWORD dwCookie)
{
- FIXME("stub: IEnumConnections = %p\n", *ppEnum);
- return S_OK;
+ ConnectionPoint *This = CONPOINT_THIS(iface);
+ FIXME("(%p)->(%ld)\n", This, dwCookie);
+ return E_NOTIMPL;
}
-/**********************************************************************
- * IConnectionPoint virtual function table for IE Web Browser component
- */
+static HRESULT WINAPI ConnectionPoint_EnumConnections(IConnectionPoint *iface,
+ IEnumConnections **ppEnum)
+{
+ ConnectionPoint *This = CONPOINT_THIS(iface);
+ FIXME("(%p)->(%p)\n", This, ppEnum);
+ return E_NOTIMPL;
+}
-static const IConnectionPointVtbl WBCP_Vtbl =
+#undef CONPOINT_THIS
+
+static const IConnectionPointVtbl ConnectionPointVtbl =
{
- WBCP_QueryInterface,
- WBCP_AddRef,
- WBCP_Release,
- WBCP_GetConnectionInterface,
- WBCP_GetConnectionPointContainer,
- WBCP_Advise,
- WBCP_Unadvise,
- WBCP_EnumConnections
+ ConnectionPoint_QueryInterface,
+ ConnectionPoint_AddRef,
+ ConnectionPoint_Release,
+ ConnectionPoint_GetConnectionInterface,
+ ConnectionPoint_GetConnectionPointContainer,
+ ConnectionPoint_Advise,
+ ConnectionPoint_Unadvise,
+ ConnectionPoint_EnumConnections
};
-static IConnectionPointImpl SHDOCVW_ConnectionPoint = {&WBCP_Vtbl};
+static void ConnectionPoint_Create(WebBrowser *wb, REFIID riid, IConnectionPoint **cp)
+{
+ ConnectionPoint *ret = HeapAlloc(GetProcessHeap(), 0, sizeof(ConnectionPoint));
+ ret->lpConnectionPointVtbl = &ConnectionPointVtbl;
+ ret->webbrowser = wb;
+ memcpy(&ret->iid, riid, sizeof(IID));
+
+ *cp = CONPOINT(ret);
+}
+
void WebBrowser_Events_Init(WebBrowser *This)
{
This->lpConnectionPointContainerVtbl = &ConnectionPointContainerVtbl;
+
+ ConnectionPoint_Create(This, &DIID_DWebBrowserEvents2, &This->cp_wbe2);
+ ConnectionPoint_Create(This, &DIID_DWebBrowserEvents, &This->cp_wbe);
+ ConnectionPoint_Create(This, &IID_IPropertyNotifySink, &This->cp_pns);
}
+
+void WebBrowser_Events_Destroy(WebBrowser *This)
+{
+ HeapFree(GetProcessHeap(), 0, This->cp_wbe2);
+ HeapFree(GetProcessHeap(), 0, This->cp_wbe);
+ HeapFree(GetProcessHeap(), 0, This->cp_pns);
+}
--- trunk/reactos/lib/shdocvw/oleobject.c 2005-11-26 08:21:42 UTC (rev 19616)
+++ trunk/reactos/lib/shdocvw/oleobject.c 2005-11-26 09:40:12 UTC (rev 19617)
@@ -23,13 +23,90 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define COBJMACROS
#include <string.h>
#include "wine/debug.h"
#include "shdocvw.h"
WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
+static ATOM doc_view_atom = 0;
+static ATOM shell_embedding_atom = 0;
+
+static LRESULT WINAPI doc_view_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ return DefWindowProcA(hwnd, msg, wParam, lParam);
+}
+
+static LRESULT WINAPI shell_embedding_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ return DefWindowProcA(hwnd, msg, wParam, lParam);
+}
+
+static void create_doc_view_hwnd(WebBrowser *This)
+{
+ static const WCHAR wszShell_DocObject_View[] =
+ {'S','h','e','l','l',' ','D','o','c','O','b','j','e','c','t',' ','V','i','e','w',0};
+
+ if(!doc_view_atom) {
+ static WNDCLASSEXW wndclass = {
+ sizeof(wndclass),
+ CS_PARENTDC,
+ doc_view_proc,
+ 0, 0 /* native uses 4*/, NULL, NULL, NULL,
+ (HBRUSH)COLOR_WINDOWFRAME, NULL,
+ wszShell_DocObject_View,
+ NULL
+ };
+
+ wndclass.hInstance = shdocvw_hinstance;
+
+ doc_view_atom = RegisterClassExW(&wndclass);
+ }
+
+ This->doc_view_hwnd = CreateWindowExW(0, wszShell_DocObject_View, NULL,
+ WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP | WS_MAXIMIZEBOX,
+ 0, 0, 0, 0, This->shell_embedding_hwnd,
+ NULL, shdocvw_hinstance, This);
+}
+
+static void create_shell_embedding_hwnd(WebBrowser *This)
+{
+ IOleInPlaceSite *inplace;
+ HWND parent = NULL;
+ HRESULT hres;
+
+ static const WCHAR wszShellEmbedding[] =
+ {'S','h','e','l','l',' ','E','m','b','e','d','d','i','n','g',0};
+
+ if(!shell_embedding_atom) {
+ static WNDCLASSEXW wndclass = {
+ sizeof(wndclass),
+ CS_DBLCLKS,
+ shell_embedding_proc,
+ 0, 0 /* native uses 8 */, NULL, NULL, NULL,
+ (HBRUSH)COLOR_WINDOWFRAME, NULL,
+ wszShellEmbedding,
+ NULL
+ };
+ wndclass.hInstance = shdocvw_hinstance;
+
+ RegisterClassExW(&wndclass);
+ }
+
+ hres = IOleClientSite_QueryInterface(This->client, &IID_IOleInPlaceSite, (void**)&inplace);
+ if(SUCCEEDED(hres)) {
+ IOleInPlaceSite_GetWindow(inplace, &parent);
+ IOleInPlaceSite_Release(inplace);
+ }
+
+ This->shell_embedding_hwnd = CreateWindowExW(0, wszShellEmbedding, NULL,
+ WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP | WS_MAXIMIZEBOX,
+ 0, 0, 0, 0, parent,
+ NULL, shdocvw_hinstance, This);
+
+ create_doc_view_hwnd(This);
+}
+
/**********************************************************************
* Implement the IOleObject interface for the WebBrowser control
*/
@@ -63,13 +140,22 @@
if(This->client == pClientSite)
return S_OK;
+ if(This->doc_view_hwnd)
+ DestroyWindow(This->doc_view_hwnd);
+ if(This->shell_embedding_hwnd)
+ DestroyWindow(This->shell_embedding_hwnd);
+
if(This->client)
IOleClientSite_Release(This->client);
- if(pClientSite)
- IOleClientSite_AddRef(pClientSite);
+ This->client = pClientSite;
+ if(!pClientSite)
+ return S_OK;
+
+ IOleClientSite_AddRef(pClientSite);
- This->client = pClientSite;
+ create_shell_embedding_hwnd(This);
+
return S_OK;
}
@@ -177,6 +263,7 @@
&This->pos_rect, &This->clip_rect,
&This->frameinfo);
+
IOleInPlaceSite_Release(inplace);
if(This->client) {
@@ -508,7 +595,7 @@
void WebBrowser_OleObject_Destroy(WebBrowser *This)
{
if(This->client)
- IOleClientSite_Release(This->client);
+ IOleObject_SetClientSite(OLEOBJ(This), NULL);
if(This->container)
IOleContainer_Release(This->container);
if(This->frame)
--- trunk/reactos/lib/shdocvw/persist.c 2005-11-26 08:21:42 UTC (rev 19616)
+++ trunk/reactos/lib/shdocvw/persist.c 2005-11-26 09:40:12 UTC (rev 19617)
@@ -19,7 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define COBJMACROS
#include "wine/debug.h"
#include "shdocvw.h"
--- trunk/reactos/lib/shdocvw/shdocvw.h 2005-11-26 08:21:42 UTC (rev 19616)
+++ trunk/reactos/lib/shdocvw/shdocvw.h 2005-11-26 09:40:12 UTC (rev 19617)
@@ -35,6 +35,7 @@
#include "olectl.h"
#include "shlobj.h"
#include "exdisp.h"
+#include "mshtmhst.h"
/**********************************************************************
* IClassFactory declaration for SHDOCVW.DLL
@@ -75,6 +76,7 @@
const IOleClientSiteVtbl *lpOleClientSiteVtbl;
const IOleInPlaceSiteVtbl *lpOleInPlaceSiteVtbl;
+ const IDocHostUIHandler2Vtbl *lpDocHostUIHandlerVtbl;
LONG ref;
@@ -92,6 +94,15 @@
RECT pos_rect;
RECT clip_rect;
OLEINPLACEFRAMEINFO frameinfo;
+
+ HWND doc_view_hwnd;
+ HWND shell_embedding_hwnd;
+
+ /* Connection points */
+
+ IConnectionPoint *cp_wbe2;
+ IConnectionPoint *cp_wbe;
+ IConnectionPoint *cp_pns;
} WebBrowser;
#define WEBBROWSER(x) ((IWebBrowser*) &(x)->lpWebBrowser2Vtbl)
@@ -109,6 +120,8 @@
#define CLIENTSITE(x) ((IOleClientSite*) &(x)->lpOleClientSiteVtbl)
#define INPLACESITE(x) ((IOleInPlaceSite*) &(x)->lpOleInPlaceSiteVtbl)
+#define DOCHOSTUI(x) ((IDocHostUIHandler*) &(x)->lpDocHostUIHandlerVtbl)
+#define DOCHOSTUI2(x) ((IDocHostUIHandler2*) &(x)->lpDocHostUIHandlerVtbl)
void WebBrowser_OleObject_Init(WebBrowser*);
void WebBrowser_ViewObject_Init(WebBrowser*);
@@ -118,21 +131,13 @@
void WebBrowser_Events_Init(WebBrowser*);
void WebBrowser_ClientSite_Init(WebBrowser*);
+void WebBrowser_DocHost_Init(WebBrowser*);
void WebBrowser_OleObject_Destroy(WebBrowser*);
+void WebBrowser_Events_Destroy(WebBrowser*);
HRESULT WebBrowser_Create(IUnknown*,REFIID,void**);
-/**********************************************************************
- * IConnectionPoint declaration for SHDOCVW.DLL
- */
-typedef struct
-{
- /* IUnknown fields */
- const IConnectionPointVtbl *lpVtbl;
- LONG ref;
-} IConnectionPointImpl;
-
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
/**********************************************************************
@@ -142,4 +147,6 @@
static inline void SHDOCVW_LockModule(void) { InterlockedIncrement( &SHDOCVW_refCount ); }
static inline void SHDOCVW_UnlockModule(void) { InterlockedDecrement( &SHDOCVW_refCount ); }
+extern HINSTANCE shdocvw_hinstance;
+
#endif /* __WINE_SHDOCVW_H */
--- trunk/reactos/lib/shdocvw/shdocvw.xml 2005-11-26 08:21:42 UTC (rev 19616)
+++ trunk/reactos/lib/shdocvw/shdocvw.xml 2005-11-26 09:40:12 UTC (rev 19617)
@@ -19,6 +19,7 @@
<library>urlmon</library>
<file>classinfo.c</file>
<file>client.c</file>
+ <file>dochost.c</file>
<file>events.c</file>
<file>factory.c</file>
<file>misc.c</file>
--- trunk/reactos/lib/shdocvw/webbrowser.c 2005-11-26 08:21:42 UTC (rev 19616)
+++ trunk/reactos/lib/shdocvw/webbrowser.c 2005-11-26 09:40:12 UTC (rev 19617)
@@ -19,7 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#define COBJMACROS
#include "wine/debug.h"
#include "shdocvw.h"
#include "mshtml.h"
@@ -126,6 +125,7 @@
IUnknown_Release(This->document);
WebBrowser_OleObject_Destroy(This);
+ WebBrowser_Events_Destroy(This);
HeapFree(GetProcessHeap(), 0, This);
SHDOCVW_UnlockModule();
@@ -783,6 +783,7 @@
WebBrowser_Misc_Init(ret);
WebBrowser_Events_Init(ret);
WebBrowser_ClientSite_Init(ret);
+ WebBrowser_DocHost_Init(ret);
hres = IWebBrowser_QueryInterface(WEBBROWSER(ret), riid, ppv);
if(SUCCEEDED(hres)) {
--- trunk/reactos/lib/uuid/uuid.c 2005-11-26 08:21:42 UTC (rev 19616)
+++ trunk/reactos/lib/uuid/uuid.c 2005-11-26 09:40:12 UTC (rev 19617)
@@ -43,6 +43,7 @@
#include "ocidl.h"
+#include "mshtmhst.h"
#include "docobj.h"
#include "exdisp.h"
--- trunk/reactos/w32api/include/mshtmhst.h 2005-11-26 08:21:42 UTC (rev 19616)
+++ trunk/reactos/w32api/include/mshtmhst.h 2005-11-26 09:40:12 UTC (rev 19617)
@@ -0,0 +1,977 @@
+/*** Autogenerated by WIDL 0.9.2 from mshtmhst.idl - Do not edit ***/
+#include <rpc.h>
+#include <rpcndr.h>
+
+#ifndef __WIDL_MSHTMHST_H
+#define __WIDL_MSHTMHST_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include <ocidl.h>
+#include <objidl.h>
+#include <oleidl.h>
+#include <oaidl.h>
+#include <docobj.h>
+#define CONTEXT_MENU_DEFAULT 0
+#define CONTEXT_MENU_IMAGE 1
+#define CONTEXT_MENU_CONTROL 2
+#define CONTEXT_MENU_TABLE 3
+#define CONTEXT_MENU_TEXTSELECT 4
+#define CONTEXT_MENU_ANCHOR 5
+#define CONTEXT_MENU_UNKNOWN 6
+#define CONTEXT_MENU_IMGDYNSRC 7
+#define CONTEXT_MENU_IMGART 8
+#define CONTEXT_MENU_DEBUG 9
+#define CONTEXT_MENU_VSCROLL 10
+#define CONTEXT_MENU_HSCROLL 11
+#define MENUEXT_SHOWDIALOG 1
+#define DOCHOSTUIFLAG_BROWSER (DOCHOSTUIFLAG_DISABLE_HELP_MENU|DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE)
+#define HTMLDLG_NOUI 0x0010
+#define HTMLDLG_MODAL 0x0020
+#define HTMLDLG_MODELESS 0x0040
+#define HTMLDLG_PRINT_TEMPLATE 0x0080
+#define HTMLDLG_VERIFY 0x0100
+#define PRINT_DONTBOTHERUSER 0x0001
+#define PRINT_WAITFORCOMPLETION 0x0002
+#ifndef __IHTMLWindow2_FWD_DEFINED__
+#define __IHTMLWindow2_FWD_DEFINED__
+typedef interface IHTMLWindow2 IHTMLWindow2;
+#endif
+#ifndef __IHostDialogHelper_FWD_DEFINED__
+#define __IHostDialogHelper_FWD_DEFINED__
+typedef struct IHostDialogHelper IHostDialogHelper;
+#endif
+
+/*****************************************************************************
+ * IHostDialogHelper interface
+ */
+#ifndef __IHostDialogHelper_INTERFACE_DEFINED__
+#define __IHostDialogHelper_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IHostDialogHelper, 0x53dec138, 0xa51e, 0x11d2, 0x86,0x1e, 0x00,0xc0,0x4f,0xa3,0x5c,0x89);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+struct IHostDialogHelper : public IUnknown
+{
+ virtual HRESULT STDMETHODCALLTYPE ShowHTMLDialog(
+ HWND hwndParent,
+ IMoniker* pMk,
+ VARIANT* pvarArgIn,
+ WCHAR* pchOptions,
+ VARIANT* pvarArgOut,
+ IUnknown* punkHost) = 0;
+
+};
+#else
+typedef struct IHostDialogHelperVtbl IHostDialogHelperVtbl;
+struct IHostDialogHelper {
+ const IHostDialogHelperVtbl* lpVtbl;
+};
+struct IHostDialogHelperVtbl {
+ BEGIN_INTERFACE
+
+ /*** IUnknown methods ***/
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+ IHostDialogHelper* This,
+ REFIID riid,
+ void** ppvObject);
+
+ ULONG (STDMETHODCALLTYPE *AddRef)(
+ IHostDialogHelper* This);
+
+ ULONG (STDMETHODCALLTYPE *Release)(
+ IHostDialogHelper* This);
+
+ /*** IHostDialogHelper methods ***/
+ HRESULT (STDMETHODCALLTYPE *ShowHTMLDialog)(
+ IHostDialogHelper* This,
+ HWND hwndParent,
+ IMoniker* pMk,
+ VARIANT* pvarArgIn,
+ WCHAR* pchOptions,
+ VARIANT* pvarArgOut,
+ IUnknown* punkHost);
+
+ END_INTERFACE
+};
+
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define IHostDialogHelper_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IHostDialogHelper_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IHostDialogHelper_Release(p) (p)->lpVtbl->Release(p)
+/*** IHostDialogHelper methods ***/
+#define IHostDialogHelper_ShowHTMLDialog(p,a,b,c,d,e,f) (p)->lpVtbl->ShowHTMLDialog(p,a,b,c,d,e,f)
+#endif
+
+#endif
+
+HRESULT CALLBACK IHostDialogHelper_ShowHTMLDialog_Proxy(
+ IHostDialogHelper* This,
+ HWND hwndParent,
+ IMoniker* pMk,
+ VARIANT* pvarArgIn,
+ WCHAR* pchOptions,
+ VARIANT* pvarArgOut,
+ IUnknown* punkHost);
+void __RPC_STUB IHostDialogHelper_ShowHTMLDialog_Stub(
+ struct IRpcStubBuffer* This,
+ struct IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+
+#endif /* __IHostDialogHelper_INTERFACE_DEFINED__ */
+
+/*****************************************************************************
+ * HostDialogHelper coclass
+ */
+
+DEFINE_GUID(CLSID_HostDialogHelper, 0x429af92c, 0xa51f, 0x11d2, 0x86,0x1e, 0x00,0xc0,0x4f,0xa3,0x5c,0x89);
+
+typedef enum tagDOCHOSTUIDBLCLK {
+ DOCHOSTUIDBLCLK_DEFAULT = 0,
+ DOCHOSTUIDBLCLK_SHOWPROPERTIES = 1,
+ DOCHOSTUIDBLCLK_SHOWCODE = 2
+} DOCHOSTUIDBLCLK;
+typedef enum tagDOCHOSTUIFLAG {
+ DOCHOSTUIFLAG_DIALOG = 0x1,
+ DOCHOSTUIFLAG_DISABLE_HELP_MENU = 0x2,
+ DOCHOSTUIFLAG_NO3DBORDER = 0x4,
+ DOCHOSTUIFLAG_SCROLL_NO = 0x8,
+ DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE = 0x10,
+ DOCHOSTUIFLAG_OPENNEWWIN = 0x20,
+ DOCHOSTUIFLAG_DISABLE_OFFSCREEN = 0x40,
+ DOCHOSTUIFLAG_FLAT_SCROLLBAR = 0x80,
+ DOCHOSTUIFLAG_DIV_BLOCKDEFAULT = 0x100,
+ DOCHOSTUIFLAG_ACTIVATE_CLIENTHIT_ONLY = 0x200,
+ DOCHOSTUIFLAG_OVERRIDEBEHAVIORFACTORY = 0x400,
+ DOCHOSTUIFLAG_CODEPAGELINKEDFONTS = 0x800,
+ DOCHOSTUIFLAG_URL_ENCODING_DISABLE_UTF8 = 0x1000,
+ DOCHOSTUIFLAG_URL_ENCODING_ENABLE_UTF8 = 0x2000,
+ DOCHOSTUIFLAG_ENABLE_FORMS_AUTOCOMPLETE = 0x4000,
+ DOCHOSTUIFLAG_ENABLE_INPLACE_NAVIGATION = 0x10000,
+ DOCHOSTUIFLAG_IME_ENABLE_RECONVERSION = 0x20000,
+ DOCHOSTUIFLAG_THEME = 0x40000,
+ DOCHOSTUIFLAG_NOTHEME = 0x80000,
+ DOCHOSTUIFLAG_NOPICS = 0x100000,
+ DOCHOSTUIFLAG_NO3DOUTERBORDER = 0x200000,
+ DOCHOSTUIFLAG_DISABLE_EDIT_NS_FIXUP = 0x400000,
+ DOCHOSTUIFLAG_LOCAL_MACHINE_ACCESS_CHECK = 0x800000,
+ DOCHOSTUIFLAG_DISABLE_UNTRUSTEDPROTOCOL = 0x1000000
+} DOCHOSTUIFLAG;
+#ifndef __IDocHostUIHandler_FWD_DEFINED__
+#define __IDocHostUIHandler_FWD_DEFINED__
+typedef struct IDocHostUIHandler IDocHostUIHandler;
+#endif
+
+typedef struct _DOCHOSTUIINFO {
+ ULONG cbSize;
+ DWORD dwFlags;
+ DWORD dwDoubleClick;
+ OLECHAR *pchHostCss;
+ OLECHAR *pchHostNS;
+} DOCHOSTUIINFO;
+/*****************************************************************************
+ * IDocHostUIHandler interface
+ */
+#ifndef __IDocHostUIHandler_INTERFACE_DEFINED__
+#define __IDocHostUIHandler_INTERFACE_DEFINED__
+
+DEFINE_GUID(IID_IDocHostUIHandler, 0xbd3f23c0, 0xd43e, 0x11cf, 0x89,0x3b, 0x00,0xaa,0x00,0xbd,0xce,0x1a);
+#if defined(__cplusplus) && !defined(CINTERFACE)
+struct IDocHostUIHandler : public IUnknown
+{
+ virtual HRESULT STDMETHODCALLTYPE ShowContextMenu(
+ DWORD dwID,
+ POINT* ppt,
+ IUnknown* pcmdtReserved,
+ IDispatch* pdispReserved) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetHostInfo(
+ DOCHOSTUIINFO* pInfo) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ShowUI(
+ DWORD dwID,
+ IOleInPlaceActiveObject* pActiveObject,
+ IOleCommandTarget* pCommandTarget,
+ IOleInPlaceFrame* pFrame,
+ IOleInPlaceUIWindow* pDoc) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE HideUI(
+ ) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE UpdateUI(
+ ) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE EnableModeless(
+ BOOL fEnable) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE OnDocWindowActivate(
+ BOOL fActivate) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE OnFrameWindowActivate(
+ BOOL fActivate) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE ResizeBorder(
+ LPCRECT prcBorder,
+ IOleInPlaceUIWindow* pUIWindow,
+ BOOL fRameWindow) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE TranslateAccelerator(
+ LPMSG lpMsg,
+ const GUID* pguidCmdGroup,
+ DWORD nCmdID) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetOptionKeyPath(
+ LPOLESTR* pchKey,
+ DWORD dw) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetDropTarget(
+ IDropTarget* pDropTarget,
+ IDropTarget** ppDropTarget) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetExternal(
+ IDispatch** ppDispatch) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE TranslateUrl(
+ DWORD dwTranslate,
+ OLECHAR* pchURLIn,
+ OLECHAR** ppchURLOut) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE FilterDataObject(
+ IDataObject* pDO,
+ IDataObject** ppDORet) = 0;
+
+};
+#else
+typedef struct IDocHostUIHandlerVtbl IDocHostUIHandlerVtbl;
+struct IDocHostUIHandler {
+ const IDocHostUIHandlerVtbl* lpVtbl;
+};
+struct IDocHostUIHandlerVtbl {
+ BEGIN_INTERFACE
+
+ /*** IUnknown methods ***/
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)(
+ IDocHostUIHandler* This,
+ REFIID riid,
+ void** ppvObject);
+
+ ULONG (STDMETHODCALLTYPE *AddRef)(
+ IDocHostUIHandler* This);
+
+ ULONG (STDMETHODCALLTYPE *Release)(
+ IDocHostUIHandler* This);
+
+ /*** IDocHostUIHandler methods ***/
+ HRESULT (STDMETHODCALLTYPE *ShowContextMenu)(
+ IDocHostUIHandler* This,
+ DWORD dwID,
+ POINT* ppt,
+ IUnknown* pcmdtReserved,
+ IDispatch* pdispReserved);
+
+ HRESULT (STDMETHODCALLTYPE *GetHostInfo)(
+ IDocHostUIHandler* This,
+ DOCHOSTUIINFO* pInfo);
+
+ HRESULT (STDMETHODCALLTYPE *ShowUI)(
+ IDocHostUIHandler* This,
+ DWORD dwID,
+ IOleInPlaceActiveObject* pActiveObject,
+ IOleCommandTarget* pCommandTarget,
+ IOleInPlaceFrame* pFrame,
+ IOleInPlaceUIWindow* pDoc);
+
+ HRESULT (STDMETHODCALLTYPE *HideUI)(
+ IDocHostUIHandler* This);
+
+ HRESULT (STDMETHODCALLTYPE *UpdateUI)(
+ IDocHostUIHandler* This);
+
+ HRESULT (STDMETHODCALLTYPE *EnableModeless)(
+ IDocHostUIHandler* This,
+ BOOL fEnable);
+
+ HRESULT (STDMETHODCALLTYPE *OnDocWindowActivate)(
+ IDocHostUIHandler* This,
+ BOOL fActivate);
+
+ HRESULT (STDMETHODCALLTYPE *OnFrameWindowActivate)(
+ IDocHostUIHandler* This,
+ BOOL fActivate);
+
+ HRESULT (STDMETHODCALLTYPE *ResizeBorder)(
+ IDocHostUIHandler* This,
+ LPCRECT prcBorder,
+ IOleInPlaceUIWindow* pUIWindow,
+ BOOL fRameWindow);
+
+ HRESULT (STDMETHODCALLTYPE *TranslateAccelerator)(
+ IDocHostUIHandler* This,
+ LPMSG lpMsg,
+ const GUID* pguidCmdGroup,
+ DWORD nCmdID);
+
+ HRESULT (STDMETHODCALLTYPE *GetOptionKeyPath)(
+ IDocHostUIHandler* This,
+ LPOLESTR* pchKey,
+ DWORD dw);
+
+ HRESULT (STDMETHODCALLTYPE *GetDropTarget)(
+ IDocHostUIHandler* This,
+ IDropTarget* pDropTarget,
+ IDropTarget** ppDropTarget);
+
+ HRESULT (STDMETHODCALLTYPE *GetExternal)(
+ IDocHostUIHandler* This,
+ IDispatch** ppDispatch);
+
+ HRESULT (STDMETHODCALLTYPE *TranslateUrl)(
+ IDocHostUIHandler* This,
+ DWORD dwTranslate,
+ OLECHAR* pchURLIn,
+ OLECHAR** ppchURLOut);
+
+ HRESULT (STDMETHODCALLTYPE *FilterDataObject)(
+ IDocHostUIHandler* This,
+ IDataObject* pDO,
+ IDataObject** ppDORet);
+
+ END_INTERFACE
+};
+
+#ifdef COBJMACROS
+/*** IUnknown methods ***/
+#define IDocHostUIHandler_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
+#define IDocHostUIHandler_AddRef(p) (p)->lpVtbl->AddRef(p)
+#define IDocHostUIHandler_Release(p) (p)->lpVtbl->Release(p)
+/*** IDocHostUIHandler methods ***/
+#define IDocHostUIHandler_ShowContextMenu(p,a,b,c,d) (p)->lpVtbl->ShowContextMenu(p,a,b,c,d)
+#define IDocHostUIHandler_GetHostInfo(p,a) (p)->lpVtbl->GetHostInfo(p,a)
+#define IDocHostUIHandler_ShowUI(p,a,b,c,d,e) (p)->lpVtbl->ShowUI(p,a,b,c,d,e)
+#define IDocHostUIHandler_HideUI(p) (p)->lpVtbl->HideUI(p)
+#define IDocHostUIHandler_UpdateUI(p) (p)->lpVtbl->UpdateUI(p)
+#define IDocHostUIHandler_EnableModeless(p,a) (p)->lpVtbl->EnableModeless(p,a)
+#define IDocHostUIHandler_OnDocWindowActivate(p,a) (p)->lpVtbl->OnDocWindowActivate(p,a)
+#define IDocHostUIHandler_OnFrameWindowActivate(p,a) (p)->lpVtbl->OnFrameWindowActivate(p,a)
+#define IDocHostUIHandler_ResizeBorder(p,a,b,c) (p)->lpVtbl->ResizeBorder(p,a,b,c)
+#define IDocHostUIHandler_TranslateAccelerator(p,a,b,c) (p)->lpVtbl->TranslateAccelerator(p,a,b,c)
+#define IDocHostUIHandler_GetOptionKeyPath(p,a,b) (p)->lpVtbl->GetOptionKeyPath(p,a,b)
+#define IDocHostUIHandler_GetDropTarget(p,a,b) (p)->lpVtbl->GetDropTarget(p,a,b)
+#define IDocHostUIHandler_GetExternal(p,a) (p)->lpVtbl->GetExternal(p,a)
+#define IDocHostUIHandler_TranslateUrl(p,a,b,c) (p)->lpVtbl->TranslateUrl(p,a,b,c)
+#define IDocHostUIHandler_FilterDataObject(p,a,b) (p)->lpVtbl->FilterDataObject(p,a,b)
+#endif
+
+#endif
+
+HRESULT CALLBACK IDocHostUIHandler_ShowContextMenu_Proxy(
+ IDocHostUIHandler* This,
+ DWORD dwID,
+ POINT* ppt,
+ IUnknown* pcmdtReserved,
+ IDispatch* pdispReserved);
+void __RPC_STUB IDocHostUIHandler_ShowContextMenu_Stub(
+ struct IRpcStubBuffer* This,
+ struct IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+HRESULT CALLBACK IDocHostUIHandler_GetHostInfo_Proxy(
+ IDocHostUIHandler* This,
+ DOCHOSTUIINFO* pInfo);
+void __RPC_STUB IDocHostUIHandler_GetHostInfo_Stub(
+ struct IRpcStubBuffer* This,
+ struct IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
[truncated at 1000 lines; 598 more skipped]