~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/shdocvw/shdocvw.h

Version: ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * Header includes for shdocvw.dll
  3  *
  4  * Copyright 2001 John R. Sheets (for CodeWeavers)
  5  * Copyright 2005-2006 Jacek Caban for CodeWeavers
  6  *
  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.
 11  *
 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.
 16  *
 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 20  */
 21 
 22 #ifndef __WINE_SHDOCVW_H
 23 #define __WINE_SHDOCVW_H
 24 
 25 #define COBJMACROS
 26 
 27 #include <stdarg.h>
 28 
 29 #include "windef.h"
 30 #include "winbase.h"
 31 #include "wingdi.h"
 32 #include "winuser.h"
 33 
 34 #include "ole2.h"
 35 #include "olectl.h"
 36 #include "shlobj.h"
 37 #include "exdisp.h"
 38 #include "mshtmhst.h"
 39 #include "hlink.h"
 40 
 41 #include "wine/unicode.h"
 42 
 43 /**********************************************************************
 44  * Shell Instance Objects
 45  */
 46 extern HRESULT SHDOCVW_GetShellInstanceObjectClassObject(REFCLSID rclsid, 
 47     REFIID riid, LPVOID *ppvClassObj);
 48 
 49 /**********************************************************************
 50  * WebBrowser declaration for SHDOCVW.DLL
 51  */
 52 
 53 typedef struct ConnectionPoint ConnectionPoint;
 54 typedef struct DocHost DocHost;
 55 
 56 typedef struct {
 57     const IConnectionPointContainerVtbl *lpConnectionPointContainerVtbl;
 58 
 59     ConnectionPoint *wbe2;
 60     ConnectionPoint *wbe;
 61     ConnectionPoint *pns;
 62 
 63     IUnknown *impl;
 64 } ConnectionPointContainer;
 65 
 66 struct _task_header_t;
 67 
 68 typedef void (*task_proc_t)(DocHost*, struct _task_header_t*);
 69 
 70 typedef struct _task_header_t {
 71     task_proc_t proc;
 72 } task_header_t;
 73 
 74 struct DocHost {
 75     const IOleClientSiteVtbl      *lpOleClientSiteVtbl;
 76     const IOleInPlaceSiteVtbl     *lpOleInPlaceSiteVtbl;
 77     const IDocHostUIHandler2Vtbl  *lpDocHostUIHandlerVtbl;
 78     const IOleDocumentSiteVtbl    *lpOleDocumentSiteVtbl;
 79     const IOleCommandTargetVtbl   *lpOleCommandTargetVtbl;
 80     const IDispatchVtbl           *lpDispatchVtbl;
 81     const IServiceProviderVtbl    *lpServiceProviderVtbl;
 82 
 83     /* Interfaces of InPlaceFrame object */
 84     const IOleInPlaceFrameVtbl          *lpOleInPlaceFrameVtbl;
 85 
 86     IDispatch *disp;
 87 
 88     IDispatch *client_disp;
 89     IDocHostUIHandler *hostui;
 90     IOleInPlaceFrame *frame;
 91 
 92     IUnknown *document;
 93     IOleDocumentView *view;
 94 
 95     HWND hwnd;
 96     HWND frame_hwnd;
 97 
 98     LPOLESTR url;
 99 
100     VARIANT_BOOL silent;
101     VARIANT_BOOL offline;
102     VARIANT_BOOL busy;
103 
104     ConnectionPointContainer cps;
105 };
106 
107 struct WebBrowser {
108     /* Interfaces available via WebBrowser object */
109 
110     const IWebBrowser2Vtbl              *lpWebBrowser2Vtbl;
111     const IOleObjectVtbl                *lpOleObjectVtbl;
112     const IOleInPlaceObjectVtbl         *lpOleInPlaceObjectVtbl;
113     const IOleControlVtbl               *lpOleControlVtbl;
114     const IPersistStorageVtbl           *lpPersistStorageVtbl;
115     const IPersistMemoryVtbl            *lpPersistMemoryVtbl;
116     const IPersistStreamInitVtbl        *lpPersistStreamInitVtbl;
117     const IProvideClassInfo2Vtbl        *lpProvideClassInfoVtbl;
118     const IViewObject2Vtbl              *lpViewObjectVtbl;
119     const IOleInPlaceActiveObjectVtbl   *lpOleInPlaceActiveObjectVtbl;
120     const IOleCommandTargetVtbl         *lpOleCommandTargetVtbl;
121     const IHlinkFrameVtbl               *lpHlinkFrameVtbl;
122     const IServiceProviderVtbl          *lpServiceProviderVtbl;
123 
124     LONG ref;
125 
126     INT version;
127 
128     IOleClientSite *client;
129     IOleContainer *container;
130     IOleInPlaceSite *inplace;
131 
132     /* window context */
133 
134     HWND frame_hwnd;
135     IOleInPlaceUIWindow *uiwindow;
136     RECT pos_rect;
137     RECT clip_rect;
138     OLEINPLACEFRAMEINFO frameinfo;
139     SIZEL extent;
140 
141     HWND shell_embedding_hwnd;
142 
143     VARIANT_BOOL register_browser;
144     VARIANT_BOOL visible;
145     VARIANT_BOOL menu_bar;
146     VARIANT_BOOL address_bar;
147     VARIANT_BOOL status_bar;
148     VARIANT_BOOL tool_bar;
149     VARIANT_BOOL full_screen;
150     VARIANT_BOOL theater_mode;
151 
152     DocHost doc_host;
153 };
154 
155 struct InternetExplorer {
156     const IWebBrowser2Vtbl *lpWebBrowser2Vtbl;
157 
158     LONG ref;
159 
160     HWND frame_hwnd;
161 
162     DocHost doc_host;
163 };
164 
165 #define WEBBROWSER(x)   ((IWebBrowser*)                 &(x)->lpWebBrowser2Vtbl)
166 #define WEBBROWSER2(x)  ((IWebBrowser2*)                &(x)->lpWebBrowser2Vtbl)
167 #define OLEOBJ(x)       ((IOleObject*)                  &(x)->lpOleObjectVtbl)
168 #define INPLACEOBJ(x)   ((IOleInPlaceObject*)           &(x)->lpOleInPlaceObjectVtbl)
169 #define CONTROL(x)      ((IOleControl*)                 &(x)->lpOleControlVtbl)
170 #define PERSTORAGE(x)   ((IPersistStorage*)             &(x)->lpPersistStorageVtbl)
171 #define PERMEMORY(x)    ((IPersistMemory*)              &(x)->lpPersistMemoryVtbl)
172 #define PERSTRINIT(x)   ((IPersistStreamInit*)          &(x)->lpPersistStreamInitVtbl)
173 #define CLASSINFO(x)    ((IProvideClassInfo2*)          &(x)->lpProvideClassInfoVtbl)
174 #define CONPTCONT(x)    ((IConnectionPointContainer*)   &(x)->lpConnectionPointContainerVtbl)
175 #define VIEWOBJ(x)      ((IViewObject*)                 &(x)->lpViewObjectVtbl);
176 #define VIEWOBJ2(x)     ((IViewObject2*)                &(x)->lpViewObjectVtbl);
177 #define ACTIVEOBJ(x)    ((IOleInPlaceActiveObject*)     &(x)->lpOleInPlaceActiveObjectVtbl)
178 #define OLECMD(x)       ((IOleCommandTarget*)           &(x)->lpOleCommandTargetVtbl)
179 #define HLINKFRAME(x)   ((IHlinkFrame*)                 &(x)->lpHlinkFrameVtbl)
180 
181 #define CLIENTSITE(x)   ((IOleClientSite*)              &(x)->lpOleClientSiteVtbl)
182 #define INPLACESITE(x)  ((IOleInPlaceSite*)             &(x)->lpOleInPlaceSiteVtbl)
183 #define DOCHOSTUI(x)    ((IDocHostUIHandler*)           &(x)->lpDocHostUIHandlerVtbl)
184 #define DOCHOSTUI2(x)   ((IDocHostUIHandler2*)          &(x)->lpDocHostUIHandlerVtbl)
185 #define DOCSITE(x)      ((IOleDocumentSite*)            &(x)->lpOleDocumentSiteVtbl)
186 #define CLDISP(x)       ((IDispatch*)                   &(x)->lpDispatchVtbl)
187 #define SERVPROV(x)     ((IServiceProvider*)            &(x)->lpServiceProviderVtbl)
188 
189 #define INPLACEFRAME(x) ((IOleInPlaceFrame*)            &(x)->lpOleInPlaceFrameVtbl)
190 
191 void WebBrowser_OleObject_Init(WebBrowser*);
192 void WebBrowser_ViewObject_Init(WebBrowser*);
193 void WebBrowser_Persist_Init(WebBrowser*);
194 void WebBrowser_ClassInfo_Init(WebBrowser*);
195 void WebBrowser_HlinkFrame_Init(WebBrowser*);
196 
197 void WebBrowser_OleObject_Destroy(WebBrowser*);
198 
199 void DocHost_Init(DocHost*,IDispatch*);
200 void DocHost_ClientSite_Init(DocHost*);
201 void DocHost_Frame_Init(DocHost*);
202 
203 void DocHost_Release(DocHost*);
204 void DocHost_ClientSite_Release(DocHost*);
205 
206 void ConnectionPointContainer_Init(ConnectionPointContainer*,IUnknown*);
207 void ConnectionPointContainer_Destroy(ConnectionPointContainer*);
208 
209 HRESULT WebBrowserV1_Create(IUnknown*,REFIID,void**);
210 HRESULT WebBrowserV2_Create(IUnknown*,REFIID,void**);
211 
212 void create_doc_view_hwnd(DocHost*);
213 void deactivate_document(DocHost*);
214 void object_available(DocHost*);
215 void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*);
216 HRESULT navigate_url(DocHost*,LPCWSTR,const VARIANT*,const VARIANT*,VARIANT*,VARIANT*);
217 HRESULT go_home(DocHost*);
218 
219 #define WM_DOCHOSTTASK (WM_USER+0x300)
220 void push_dochost_task(DocHost*,task_header_t*,task_proc_t,BOOL);
221 LRESULT  process_dochost_task(DocHost*,LPARAM);
222 
223 HRESULT InternetExplorer_Create(IUnknown*,REFIID,void**);
224 void InternetExplorer_WebBrowser_Init(InternetExplorer*);
225 
226 HRESULT CUrlHistory_Create(IUnknown*,REFIID,void**);
227 
228 HRESULT InternetShortcut_Create(IUnknown*,REFIID,void**);
229 
230 HRESULT TaskbarList_Create(IUnknown*,REFIID,void**);
231 
232 #define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
233 
234 /**********************************************************************
235  * Dll lifetime tracking declaration for shdocvw.dll
236  */
237 extern LONG SHDOCVW_refCount;
238 static inline void SHDOCVW_LockModule(void) { InterlockedIncrement( &SHDOCVW_refCount ); }
239 static inline void SHDOCVW_UnlockModule(void) { InterlockedDecrement( &SHDOCVW_refCount ); }
240 
241 extern HINSTANCE shdocvw_hinstance;
242 extern void register_iewindow_class(void);
243 extern void unregister_iewindow_class(void);
244 
245 HRESULT register_class_object(BOOL);
246 HRESULT get_typeinfo(ITypeInfo**);
247 DWORD register_iexplore(BOOL);
248 
249 /* memory allocation functions */
250 
251 static inline void *heap_alloc(size_t len)
252 {
253     return HeapAlloc(GetProcessHeap(), 0, len);
254 }
255 
256 static inline void *heap_realloc(void *mem, size_t len)
257 {
258     return HeapReAlloc(GetProcessHeap(), 0, mem, len);
259 }
260 
261 static inline BOOL heap_free(void *mem)
262 {
263     return HeapFree(GetProcessHeap(), 0, mem);
264 }
265 
266 static inline LPWSTR heap_strdupW(LPCWSTR str)
267 {
268     LPWSTR ret = NULL;
269 
270     if(str) {
271         DWORD size;
272 
273         size = (strlenW(str)+1)*sizeof(WCHAR);
274         ret = heap_alloc(size);
275         memcpy(ret, str, size);
276     }
277 
278     return ret;
279 }
280 
281 static inline LPWSTR co_strdupW(LPCWSTR str)
282 {
283     WCHAR *ret = CoTaskMemAlloc((strlenW(str) + 1)*sizeof(WCHAR));
284     if (ret)
285         lstrcpyW(ret, str);
286     return ret;
287 }
288 
289 static inline LPWSTR co_strdupAtoW(LPCSTR str)
290 {
291     INT len;
292     WCHAR *ret;
293     len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
294     ret = CoTaskMemAlloc(len*sizeof(WCHAR));
295     if (ret)
296         MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
297     return ret;
298 }
299 
300 static inline LPSTR co_strdupWtoA(LPCWSTR str)
301 {
302     INT len;
303     CHAR *ret;
304     len = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, 0, 0);
305     ret = CoTaskMemAlloc(len);
306     if (ret)
307         WideCharToMultiByte(CP_ACP, 0, str, -1, ret, len, 0, 0);
308     return ret;
309 }
310 
311 #endif /* __WINE_SHDOCVW_H */
312 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.