crypt32: Fixed day/month mismatch in time encoding routines.
[wine] / dlls / shdocvw / shdocvw.h
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  */
21
22 #ifndef __WINE_SHDOCVW_H
23 #define __WINE_SHDOCVW_H
24
25 #define COM_NO_WINDOWS_H
26 #define COBJMACROS
27
28 #include <stdarg.h>
29
30 #include "windef.h"
31 #include "winbase.h"
32 #include "wingdi.h"
33 #include "winuser.h"
34
35 #include "ole2.h"
36 #include "olectl.h"
37 #include "shlobj.h"
38 #include "exdisp.h"
39 #include "mshtmhst.h"
40 #include "hlink.h"
41
42 /**********************************************************************
43  * Shell Instance Objects
44  */
45 extern HRESULT SHDOCVW_GetShellInstanceObjectClassObject(REFCLSID rclsid, 
46     REFIID riid, LPVOID *ppvClassObj);
47
48 /**********************************************************************
49  * WebBrowser declaration for SHDOCVW.DLL
50  */
51
52 typedef struct ConnectionPoint ConnectionPoint;
53
54 typedef struct {
55     /* Interfaces available via WebBrowser object */
56
57     const IWebBrowser2Vtbl              *lpWebBrowser2Vtbl;
58     const IOleObjectVtbl                *lpOleObjectVtbl;
59     const IOleInPlaceObjectVtbl         *lpOleInPlaceObjectVtbl;
60     const IOleControlVtbl               *lpOleControlVtbl;
61     const IPersistStorageVtbl           *lpPersistStorageVtbl;
62     const IPersistStreamInitVtbl        *lpPersistStreamInitVtbl;
63     const IProvideClassInfo2Vtbl        *lpProvideClassInfoVtbl;
64     const IConnectionPointContainerVtbl *lpConnectionPointContainerVtbl;
65     const IViewObject2Vtbl              *lpViewObjectVtbl;
66     const IOleInPlaceActiveObjectVtbl   *lpOleInPlaceActiveObjectVtbl;
67     const IOleCommandTargetVtbl         *lpWBOleCommandTargetVtbl;
68     const IHlinkFrameVtbl               *lpHlinkFrameVtbl;
69
70     /* Interfaces available for embeded document */
71
72     const IOleClientSiteVtbl            *lpOleClientSiteVtbl;
73     const IOleInPlaceSiteVtbl           *lpOleInPlaceSiteVtbl;
74     const IDocHostUIHandler2Vtbl        *lpDocHostUIHandlerVtbl;
75     const IOleDocumentSiteVtbl          *lpOleDocumentSiteVtbl;
76     const IOleCommandTargetVtbl         *lpClOleCommandTargetVtbl;
77     const IDispatchVtbl                 *lpDispatchVtbl;
78     const IServiceProviderVtbl          *lpClServiceProviderVtbl;
79
80     /* Interfaces of InPlaceFrame object */
81
82     const IOleInPlaceFrameVtbl          *lpOleInPlaceFrameVtbl;
83
84     LONG ref;
85
86     IUnknown *document;
87
88     IOleClientSite *client;
89     IOleContainer *container;
90     IOleDocumentView *view;
91     IDocHostUIHandler *hostui;
92
93     LPOLESTR url;
94
95     /* window context */
96
97     HWND iphwnd;
98     HWND frame_hwnd;
99     IOleInPlaceFrame *frame;
100     IOleInPlaceUIWindow *uiwindow;
101     RECT pos_rect;
102     RECT clip_rect;
103     OLEINPLACEFRAMEINFO frameinfo;
104
105     HWND doc_view_hwnd;
106     HWND shell_embedding_hwnd;
107
108     /* Connection points */
109
110     ConnectionPoint *cp_wbe2;
111     ConnectionPoint *cp_wbe;
112     ConnectionPoint *cp_pns;
113 } WebBrowser;
114
115 #define WEBBROWSER(x)   ((IWebBrowser*)                 &(x)->lpWebBrowser2Vtbl)
116 #define WEBBROWSER2(x)  ((IWebBrowser2*)                &(x)->lpWebBrowser2Vtbl)
117 #define OLEOBJ(x)       ((IOleObject*)                  &(x)->lpOleObjectVtbl)
118 #define INPLACEOBJ(x)   ((IOleInPlaceObject*)           &(x)->lpOleInPlaceObjectVtbl)
119 #define CONTROL(x)      ((IOleControl*)                 &(x)->lpOleControlVtbl)
120 #define PERSTORAGE(x)   ((IPersistStorage*)             &(x)->lpPersistStorageVtbl)
121 #define PERSTRINIT(x)   ((IPersistStreamInit*)          &(x)->lpPersistStreamInitVtbl)
122 #define CLASSINFO(x)    ((IProvideClassInfo2*)          &(x)->lpProvideClassInfoVtbl)
123 #define CONPTCONT(x)    ((IConnectionPointContainer*)   &(x)->lpConnectionPointContainerVtbl)
124 #define VIEWOBJ(x)      ((IViewObject*)                 &(x)->lpViewObjectVtbl);
125 #define VIEWOBJ2(x)     ((IViewObject2*)                &(x)->lpViewObjectVtbl);
126 #define ACTIVEOBJ(x)    ((IOleInPlaceActiveObject*)     &(x)->lpOleInPlaceActiveObjectVtbl)
127 #define WBOLECMD(x)     ((IOleCommandTarget*)           &(x)->lpWBOleCommandTargetVtbl)
128 #define HLINKFRAME(x)   ((IHlinkFrame*)                 &(x)->lpHlinkFrameVtbl)
129
130 #define CLIENTSITE(x)   ((IOleClientSite*)              &(x)->lpOleClientSiteVtbl)
131 #define INPLACESITE(x)  ((IOleInPlaceSite*)             &(x)->lpOleInPlaceSiteVtbl)
132 #define DOCHOSTUI(x)    ((IDocHostUIHandler*)           &(x)->lpDocHostUIHandlerVtbl)
133 #define DOCHOSTUI2(x)   ((IDocHostUIHandler2*)          &(x)->lpDocHostUIHandlerVtbl)
134 #define DOCSITE(x)      ((IOleDocumentSite*)            &(x)->lpOleDocumentSiteVtbl)
135 #define CLOLECMD(x)     ((IOleCommandTarget*)           &(x)->lpClOleCommandTargetVtbl)
136 #define CLDISP(x)       ((IDispatch*)                   &(x)->lpDispatchVtbl)
137 #define CLSERVPROV(x)   ((IServiceProvider*)            &(x)->lpClServiceProviderVtbl)
138
139 #define INPLACEFRAME(x) ((IOleInPlaceFrame*)            &(x)->lpOleInPlaceFrameVtbl)
140
141 void WebBrowser_OleObject_Init(WebBrowser*);
142 void WebBrowser_ViewObject_Init(WebBrowser*);
143 void WebBrowser_Persist_Init(WebBrowser*);
144 void WebBrowser_ClassInfo_Init(WebBrowser*);
145 void WebBrowser_Events_Init(WebBrowser*);
146 void WebBrowser_HlinkFrame_Init(WebBrowser*);
147
148 void WebBrowser_ClientSite_Init(WebBrowser*);
149 void WebBrowser_DocHost_Init(WebBrowser*);
150
151 void WebBrowser_Frame_Init(WebBrowser*);
152
153 void WebBrowser_OleObject_Destroy(WebBrowser*);
154 void WebBrowser_Events_Destroy(WebBrowser*);
155 void WebBrowser_ClientSite_Destroy(WebBrowser*);
156
157 HRESULT WebBrowser_Create(IUnknown*,REFIID,void**);
158
159 void create_doc_view_hwnd(WebBrowser *This);
160 void deactivate_document(WebBrowser*);
161 void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*);
162 HRESULT navigate_url(WebBrowser*,LPCWSTR,PBYTE,ULONG,LPWSTR);
163
164 #define WB_WM_NAVIGATE2 (WM_USER+100)
165
166 #define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
167
168 /**********************************************************************
169  * Dll lifetime tracking declaration for shdocvw.dll
170  */
171 extern LONG SHDOCVW_refCount;
172 static inline void SHDOCVW_LockModule(void) { InterlockedIncrement( &SHDOCVW_refCount ); }
173 static inline void SHDOCVW_UnlockModule(void) { InterlockedDecrement( &SHDOCVW_refCount ); }
174
175 extern HINSTANCE shdocvw_hinstance;
176 extern void register_iewindow_class(void);
177 extern void unregister_iewindow_class(void);
178 extern BOOL create_ie_window(LPCWSTR url);
179 extern IClassFactory *get_class_factory(void);
180
181 #endif /* __WINE_SHDOCVW_H */