2 * Header includes for shdocvw.dll
4 * Copyright 2001 John R. Sheets (for CodeWeavers)
5 * Copyright 2005-2006 Jacek Caban for CodeWeavers
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #ifndef __WINE_SHDOCVW_H
23 #define __WINE_SHDOCVW_H
25 #define COM_NO_WINDOWS_H
42 /**********************************************************************
43 * Shell Instance Objects
45 extern HRESULT
SHDOCVW_GetShellInstanceObjectClassObject(REFCLSID rclsid
,
46 REFIID riid
, LPVOID
*ppvClassObj
);
48 /**********************************************************************
49 * WebBrowser declaration for SHDOCVW.DLL
52 typedef struct ConnectionPoint ConnectionPoint
;
57 const IOleClientSiteVtbl
*lpOleClientSiteVtbl
;
58 const IOleInPlaceSiteVtbl
*lpOleInPlaceSiteVtbl
;
59 const IDocHostUIHandler2Vtbl
*lpDocHostUIHandlerVtbl
;
60 const IOleDocumentSiteVtbl
*lpOleDocumentSiteVtbl
;
61 const IOleCommandTargetVtbl
*lpOleCommandTargetVtbl
;
62 const IDispatchVtbl
*lpDispatchVtbl
;
63 const IServiceProviderVtbl
*lpServiceProviderVtbl
;
65 /* Interfaces of InPlaceFrame object */
66 const IOleInPlaceFrameVtbl
*lpOleInPlaceFrameVtbl
;
71 IOleDocumentView
*view
;
72 IDocHostUIHandler
*hostui
;
79 /* Connection points */
81 ConnectionPoint
*cp_wbe2
;
82 ConnectionPoint
*cp_wbe
;
83 ConnectionPoint
*cp_pns
;
86 typedef struct WebBrowser
{
87 /* Interfaces available via WebBrowser object */
89 const IWebBrowser2Vtbl
*lpWebBrowser2Vtbl
;
90 const IOleObjectVtbl
*lpOleObjectVtbl
;
91 const IOleInPlaceObjectVtbl
*lpOleInPlaceObjectVtbl
;
92 const IOleControlVtbl
*lpOleControlVtbl
;
93 const IPersistStorageVtbl
*lpPersistStorageVtbl
;
94 const IPersistStreamInitVtbl
*lpPersistStreamInitVtbl
;
95 const IProvideClassInfo2Vtbl
*lpProvideClassInfoVtbl
;
96 const IConnectionPointContainerVtbl
*lpConnectionPointContainerVtbl
;
97 const IViewObject2Vtbl
*lpViewObjectVtbl
;
98 const IOleInPlaceActiveObjectVtbl
*lpOleInPlaceActiveObjectVtbl
;
99 const IOleCommandTargetVtbl
*lpWBOleCommandTargetVtbl
;
100 const IHlinkFrameVtbl
*lpHlinkFrameVtbl
;
104 IOleClientSite
*client
;
105 IOleContainer
*container
;
106 IOleInPlaceSite
*inplace
;
112 IOleInPlaceFrame
*frame
;
113 IOleInPlaceUIWindow
*uiwindow
;
116 OLEINPLACEFRAMEINFO frameinfo
;
118 HWND shell_embedding_hwnd
;
123 #define WEBBROWSER(x) ((IWebBrowser*) &(x)->lpWebBrowser2Vtbl)
124 #define WEBBROWSER2(x) ((IWebBrowser2*) &(x)->lpWebBrowser2Vtbl)
125 #define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl)
126 #define INPLACEOBJ(x) ((IOleInPlaceObject*) &(x)->lpOleInPlaceObjectVtbl)
127 #define CONTROL(x) ((IOleControl*) &(x)->lpOleControlVtbl)
128 #define PERSTORAGE(x) ((IPersistStorage*) &(x)->lpPersistStorageVtbl)
129 #define PERSTRINIT(x) ((IPersistStreamInit*) &(x)->lpPersistStreamInitVtbl)
130 #define CLASSINFO(x) ((IProvideClassInfo2*) &(x)->lpProvideClassInfoVtbl)
131 #define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl)
132 #define VIEWOBJ(x) ((IViewObject*) &(x)->lpViewObjectVtbl);
133 #define VIEWOBJ2(x) ((IViewObject2*) &(x)->lpViewObjectVtbl);
134 #define ACTIVEOBJ(x) ((IOleInPlaceActiveObject*) &(x)->lpOleInPlaceActiveObjectVtbl)
135 #define WBOLECMD(x) ((IOleCommandTarget*) &(x)->lpWBOleCommandTargetVtbl)
136 #define HLINKFRAME(x) ((IHlinkFrame*) &(x)->lpHlinkFrameVtbl)
138 #define CLIENTSITE(x) ((IOleClientSite*) &(x)->lpOleClientSiteVtbl)
139 #define INPLACESITE(x) ((IOleInPlaceSite*) &(x)->lpOleInPlaceSiteVtbl)
140 #define DOCHOSTUI(x) ((IDocHostUIHandler*) &(x)->lpDocHostUIHandlerVtbl)
141 #define DOCHOSTUI2(x) ((IDocHostUIHandler2*) &(x)->lpDocHostUIHandlerVtbl)
142 #define DOCSITE(x) ((IOleDocumentSite*) &(x)->lpOleDocumentSiteVtbl)
143 #define CLOLECMD(x) ((IOleCommandTarget*) &(x)->lpOleCommandTargetVtbl)
144 #define CLDISP(x) ((IDispatch*) &(x)->lpDispatchVtbl)
145 #define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl)
147 #define INPLACEFRAME(x) ((IOleInPlaceFrame*) &(x)->lpOleInPlaceFrameVtbl)
149 void WebBrowser_OleObject_Init(WebBrowser
*);
150 void WebBrowser_ViewObject_Init(WebBrowser
*);
151 void WebBrowser_Persist_Init(WebBrowser
*);
152 void WebBrowser_ClassInfo_Init(WebBrowser
*);
153 void WebBrowser_Events_Init(WebBrowser
*);
154 void WebBrowser_HlinkFrame_Init(WebBrowser
*);
156 void WebBrowser_OleObject_Destroy(WebBrowser
*);
158 void DocHost_Init(DocHost
*);
159 void DocHost_ClientSite_Init(DocHost
*);
160 void DocHost_Events_Init(DocHost
*);
161 void DocHost_Frame_Init(DocHost
*);
163 void DocHost_Release(DocHost
*);
164 void DocHost_ClientSite_Release(DocHost
*);
165 void DocHost_Events_Release(DocHost
*);
167 HRESULT
WebBrowser_Create(IUnknown
*,REFIID
,void**);
169 void create_doc_view_hwnd(DocHost
*);
170 void deactivate_document(DocHost
*);
171 void call_sink(ConnectionPoint
*,DISPID
,DISPPARAMS
*);
172 HRESULT
navigate_url(WebBrowser
*,LPCWSTR
,PBYTE
,ULONG
,LPWSTR
);
174 #define WB_WM_NAVIGATE2 (WM_USER+100)
176 #define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
178 /**********************************************************************
179 * Dll lifetime tracking declaration for shdocvw.dll
181 extern LONG SHDOCVW_refCount
;
182 static inline void SHDOCVW_LockModule(void) { InterlockedIncrement( &SHDOCVW_refCount
); }
183 static inline void SHDOCVW_UnlockModule(void) { InterlockedDecrement( &SHDOCVW_refCount
); }
185 extern HINSTANCE shdocvw_hinstance
;
186 extern void register_iewindow_class(void);
187 extern void unregister_iewindow_class(void);
188 extern BOOL
create_ie_window(LPCWSTR url
);
189 extern IClassFactory
*get_class_factory(void);
191 #endif /* __WINE_SHDOCVW_H */