shdocvw: Added beginning InternetExplorer implementation.
[wine/wine64.git] / dlls / shdocvw / shdocvw.h
blob3e6900c76deebba10f4b9edb482bc11d71e9a199
1 /*
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
26 #define COBJMACROS
28 #include <stdarg.h>
30 #include "windef.h"
31 #include "winbase.h"
32 #include "wingdi.h"
33 #include "winuser.h"
35 #include "ole2.h"
36 #include "olectl.h"
37 #include "shlobj.h"
38 #include "exdisp.h"
39 #include "mshtmhst.h"
40 #include "hlink.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;
54 typedef struct {
55 const IOleClientSiteVtbl *lpOleClientSiteVtbl;
56 const IOleInPlaceSiteVtbl *lpOleInPlaceSiteVtbl;
57 const IDocHostUIHandler2Vtbl *lpDocHostUIHandlerVtbl;
58 const IOleDocumentSiteVtbl *lpOleDocumentSiteVtbl;
59 const IOleCommandTargetVtbl *lpOleCommandTargetVtbl;
60 const IDispatchVtbl *lpDispatchVtbl;
61 const IServiceProviderVtbl *lpServiceProviderVtbl;
63 /* Interfaces of InPlaceFrame object */
64 const IOleInPlaceFrameVtbl *lpOleInPlaceFrameVtbl;
66 IDispatch *disp;
68 IUnknown *document;
69 IOleDocumentView *view;
70 IDocHostUIHandler *hostui;
72 HWND hwnd;
73 HWND frame_hwnd;
75 LPOLESTR url;
77 /* Connection points */
79 ConnectionPoint *cp_wbe2;
80 ConnectionPoint *cp_wbe;
81 ConnectionPoint *cp_pns;
82 } DocHost;
84 typedef struct {
85 /* Interfaces available via WebBrowser object */
87 const IWebBrowser2Vtbl *lpWebBrowser2Vtbl;
88 const IOleObjectVtbl *lpOleObjectVtbl;
89 const IOleInPlaceObjectVtbl *lpOleInPlaceObjectVtbl;
90 const IOleControlVtbl *lpOleControlVtbl;
91 const IPersistStorageVtbl *lpPersistStorageVtbl;
92 const IPersistStreamInitVtbl *lpPersistStreamInitVtbl;
93 const IProvideClassInfo2Vtbl *lpProvideClassInfoVtbl;
94 const IConnectionPointContainerVtbl *lpConnectionPointContainerVtbl;
95 const IViewObject2Vtbl *lpViewObjectVtbl;
96 const IOleInPlaceActiveObjectVtbl *lpOleInPlaceActiveObjectVtbl;
97 const IOleCommandTargetVtbl *lpWBOleCommandTargetVtbl;
98 const IHlinkFrameVtbl *lpHlinkFrameVtbl;
100 LONG ref;
102 IOleClientSite *client;
103 IOleContainer *container;
104 IOleInPlaceSite *inplace;
106 /* window context */
108 HWND iphwnd;
109 HWND frame_hwnd;
110 IOleInPlaceFrame *frame;
111 IOleInPlaceUIWindow *uiwindow;
112 RECT pos_rect;
113 RECT clip_rect;
114 OLEINPLACEFRAMEINFO frameinfo;
116 HWND shell_embedding_hwnd;
118 DocHost doc_host;
119 } WebBrowser;
121 typedef struct {
122 const IWebBrowser2Vtbl *lpWebBrowser2Vtbl;
124 LONG ref;
126 HWND frame_hwnd;
128 DocHost doc_host;
129 } InternetExplorer;
131 #define WEBBROWSER(x) ((IWebBrowser*) &(x)->lpWebBrowser2Vtbl)
132 #define WEBBROWSER2(x) ((IWebBrowser2*) &(x)->lpWebBrowser2Vtbl)
133 #define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl)
134 #define INPLACEOBJ(x) ((IOleInPlaceObject*) &(x)->lpOleInPlaceObjectVtbl)
135 #define CONTROL(x) ((IOleControl*) &(x)->lpOleControlVtbl)
136 #define PERSTORAGE(x) ((IPersistStorage*) &(x)->lpPersistStorageVtbl)
137 #define PERSTRINIT(x) ((IPersistStreamInit*) &(x)->lpPersistStreamInitVtbl)
138 #define CLASSINFO(x) ((IProvideClassInfo2*) &(x)->lpProvideClassInfoVtbl)
139 #define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl)
140 #define VIEWOBJ(x) ((IViewObject*) &(x)->lpViewObjectVtbl);
141 #define VIEWOBJ2(x) ((IViewObject2*) &(x)->lpViewObjectVtbl);
142 #define ACTIVEOBJ(x) ((IOleInPlaceActiveObject*) &(x)->lpOleInPlaceActiveObjectVtbl)
143 #define WBOLECMD(x) ((IOleCommandTarget*) &(x)->lpWBOleCommandTargetVtbl)
144 #define HLINKFRAME(x) ((IHlinkFrame*) &(x)->lpHlinkFrameVtbl)
146 #define CLIENTSITE(x) ((IOleClientSite*) &(x)->lpOleClientSiteVtbl)
147 #define INPLACESITE(x) ((IOleInPlaceSite*) &(x)->lpOleInPlaceSiteVtbl)
148 #define DOCHOSTUI(x) ((IDocHostUIHandler*) &(x)->lpDocHostUIHandlerVtbl)
149 #define DOCHOSTUI2(x) ((IDocHostUIHandler2*) &(x)->lpDocHostUIHandlerVtbl)
150 #define DOCSITE(x) ((IOleDocumentSite*) &(x)->lpOleDocumentSiteVtbl)
151 #define CLOLECMD(x) ((IOleCommandTarget*) &(x)->lpOleCommandTargetVtbl)
152 #define CLDISP(x) ((IDispatch*) &(x)->lpDispatchVtbl)
153 #define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl)
155 #define INPLACEFRAME(x) ((IOleInPlaceFrame*) &(x)->lpOleInPlaceFrameVtbl)
157 void WebBrowser_OleObject_Init(WebBrowser*);
158 void WebBrowser_ViewObject_Init(WebBrowser*);
159 void WebBrowser_Persist_Init(WebBrowser*);
160 void WebBrowser_ClassInfo_Init(WebBrowser*);
161 void WebBrowser_Events_Init(WebBrowser*);
162 void WebBrowser_HlinkFrame_Init(WebBrowser*);
164 void WebBrowser_OleObject_Destroy(WebBrowser*);
166 void DocHost_Init(DocHost*,IDispatch*);
167 void DocHost_ClientSite_Init(DocHost*);
168 void DocHost_Events_Init(DocHost*);
169 void DocHost_Frame_Init(DocHost*);
171 void DocHost_Release(DocHost*);
172 void DocHost_ClientSite_Release(DocHost*);
173 void DocHost_Events_Release(DocHost*);
175 HRESULT WebBrowser_Create(IUnknown*,REFIID,void**);
177 void create_doc_view_hwnd(DocHost*);
178 void deactivate_document(DocHost*);
179 void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*);
180 HRESULT navigate_url(DocHost*,LPCWSTR,PBYTE,ULONG,LPWSTR);
182 HRESULT create_mozctl(REFIID,void**);
184 HRESULT InternetExplorer_Create(IUnknown*,REFIID,void**);
185 void InternetExplorer_WebBrowser_Init(InternetExplorer*);
187 #define WB_WM_NAVIGATE2 (WM_USER+100)
189 #define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
191 /**********************************************************************
192 * Dll lifetime tracking declaration for shdocvw.dll
194 extern LONG SHDOCVW_refCount;
195 static inline void SHDOCVW_LockModule(void) { InterlockedIncrement( &SHDOCVW_refCount ); }
196 static inline void SHDOCVW_UnlockModule(void) { InterlockedDecrement( &SHDOCVW_refCount ); }
198 extern HINSTANCE shdocvw_hinstance;
199 extern void register_iewindow_class(void);
200 extern void unregister_iewindow_class(void);
201 extern BOOL create_ie_window(LPCWSTR url);
203 #endif /* __WINE_SHDOCVW_H */