ReactOS 0.4.16-dev-226-g79f2289
ieframe.h
Go to the documentation of this file.
1/*
2 * Header includes for ieframe.dll
3 *
4 * Copyright 2011 Jacek Caban for CodeWeavers
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#pragma once
22
23#include <stdarg.h>
24
25#define COBJMACROS
26
27#include "windef.h"
28#include "winbase.h"
29#include "wingdi.h"
30#include "winuser.h"
31#ifdef __REACTOS__
32#include <winnls.h>
33#include <wincon.h>
34#endif
35
36#include "ole2.h"
37#include "olectl.h"
38#include "shlobj.h"
39#include "mshtmhst.h"
40#include "exdisp.h"
41#include "hlink.h"
42#include "htiface.h"
43#include "shdeprecated.h"
44#include "docobjectservice.h"
45
46#include "wine/heap.h"
47#include "wine/list.h"
48
50typedef struct DocHost DocHost;
51
52typedef struct {
54
58
61
62typedef struct {
68
72
73struct _task_header_t;
74
75typedef void (*task_proc_t)(DocHost*, struct _task_header_t*);
76typedef void (*task_destr_t)(struct _task_header_t*);
77
78typedef struct _task_header_t {
79 struct list entry;
83
84typedef struct {
88
90
93
94typedef struct {
98
99typedef struct {
103
104typedef struct {
108
110{
118
119struct DocHost {
129
130 /* Interfaces of InPlaceFrame object */
132
133 IWebBrowser2 *wb;
134
139
143
145
148
150
152
156
157 READYSTATE ready_state;
158 READYSTATE doc_state;
161
163 IShellUIHelper2 *shell_ui_helper;
164
165 struct {
167 unsigned size;
168 unsigned length;
169 unsigned position;
172
176};
177
179 IWebBrowser2 IWebBrowser2_iface;
193
195
197
202
206
207 /* window context */
208
213 OLEINPLACEFRAMEINFO frameinfo;
215
217
226
228};
229
232 IWebBrowser2 IWebBrowser2_iface;
236
239
245
246 struct list entry;
247};
248
253
255
262
265
268
272
275
286void set_doc_state(DocHost*,READYSTATE) DECLSPEC_HIDDEN;
292
293#define WM_DOCHOSTTASK (WM_USER+0x300)
297
302
305
306#define TID_LIST \
307 XCLSID(WebBrowser) \
308 XCLSID(WebBrowser_V1) \
309 XIID(IWebBrowser2)
310
311typedef enum {
312#define XIID(iface) iface ## _tid,
313#define XCLSID(class) class ## _tid,
315#undef XIID
316#undef XCLSID
319
321
328
331
334
335static inline void lock_module(void) {
337}
338
339static inline void unlock_module(void) {
341}
342
344{
345 LPWSTR ret = NULL;
346
347 if(str) {
348 DWORD size;
349
350 size = (lstrlenW(str)+1)*sizeof(WCHAR);
352 if(ret)
353 memcpy(ret, str, size);
354 }
355
356 return ret;
357}
358
360{
361 WCHAR *ret = CoTaskMemAlloc((lstrlenW(str) + 1)*sizeof(WCHAR));
362 if (ret)
363 lstrcpyW(ret, str);
364 return ret;
365}
366
368{
369 INT len;
370 WCHAR *ret;
371 len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
372 ret = CoTaskMemAlloc(len*sizeof(WCHAR));
373 if (ret)
375 return ret;
376}
377
379{
380 INT len;
381 CHAR *ret;
382 len = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, 0, 0);
384 if (ret)
385 WideCharToMultiByte(CP_ACP, 0, str, -1, ret, len, 0, 0);
386 return ret;
387}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
void(* task_proc_t)(BindProtocol *, task_header_t *)
Definition: bindprot.c:24
Definition: list.h:37
#define NULL
Definition: types.h:112
#define CP_ACP
Definition: compat.h:109
OLECHAR * BSTR
Definition: compat.h:2293
#define lstrcpyW
Definition: compat.h:749
#define WideCharToMultiByte
Definition: compat.h:111
short VARIANT_BOOL
Definition: compat.h:2290
#define MultiByteToWideChar
Definition: compat.h:110
#define lstrlenW
Definition: compat.h:750
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
GLenum GLsizei len
Definition: glext.h:6722
void set_doc_state(DocHost *, READYSTATE) DECLSPEC_HIDDEN
Definition: dochost.c:234
HRESULT refresh_document(DocHost *, const VARIANT *) DECLSPEC_HIDDEN
Definition: dochost.c:572
void DocHost_Init(DocHost *, IWebBrowser2 *, const IDocHostContainerVtbl *) DECLSPEC_HIDDEN
Definition: dochost.c:1106
void WebBrowser_ViewObject_Init(WebBrowser *) DECLSPEC_HIDDEN
Definition: view.c:253
void WebBrowser_ClassInfo_Init(WebBrowser *) DECLSPEC_HIDDEN
Definition: classinfo.c:100
void DocHost_ClientSite_Release(DocHost *) DECLSPEC_HIDDEN
Definition: client.c:722
void call_sink(ConnectionPoint *, DISPID, DISPPARAMS *) DECLSPEC_HIDDEN
Definition: events.c:391
HRESULT get_typeinfo(tid_t, ITypeInfo **) DECLSPEC_HIDDEN
Definition: ieframe_main.c:61
void release_dochost_client(DocHost *) DECLSPEC_HIDDEN
Definition: dochost.c:601
void(* task_proc_t)(DocHost *, struct _task_header_t *)
Definition: ieframe.h:75
HRESULT update_ie_statustext(InternetExplorer *, LPCWSTR) DECLSPEC_HIDDEN
Definition: iexplore.c:63
IClassFactory InternetExplorerFactory DECLSPEC_HIDDEN
Definition: ieframe.h:330
HRESULT WINAPI CUrlHistory_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: urlhist.c:126
BOOL HlinkFrame_QI(HlinkFrame *, REFIID, void **) DECLSPEC_HIDDEN
Definition: navigate.c:1666
HRESULT set_dochost_url(DocHost *, const WCHAR *) DECLSPEC_HIDDEN
Definition: navigate.c:134
HRESULT dochost_object_available(DocHost *, IUnknown *) DECLSPEC_HIDDEN
Definition: dochost.c:304
void IEHTMLWindow_Init(DocHost *) DECLSPEC_HIDDEN
Definition: iehtmlwnd.c:692
void push_dochost_task(DocHost *, task_header_t *, task_proc_t, task_destr_t, BOOL) DECLSPEC_HIDDEN
Definition: dochost.c:39
HRESULT go_forward(DocHost *) DECLSPEC_HIDDEN
Definition: navigate.c:1132
static LPWSTR co_strdupAtoW(LPCSTR str)
Definition: ieframe.h:367
struct _task_header_t task_header_t
void register_iewindow_class(void) DECLSPEC_HIDDEN
Definition: iexplore.c:713
void HlinkFrame_Init(HlinkFrame *, IUnknown *, DocHost *) DECLSPEC_HIDDEN
Definition: navigate.c:1694
void InternetExplorer_WebBrowser_Init(InternetExplorer *) DECLSPEC_HIDDEN
Definition: ie.c:872
static void lock_module(void)
Definition: ieframe.h:335
tid_t
Definition: ieframe.h:311
@ LAST_tid
Definition: ieframe.h:317
HRESULT navigate_url(DocHost *, LPCWSTR, const VARIANT *, const VARIANT *, VARIANT *, VARIANT *) DECLSPEC_HIDDEN
Definition: navigate.c:941
void unregister_iewindow_class(void) DECLSPEC_HIDDEN
Definition: iexplore.c:735
HRESULT get_location_url(DocHost *, BSTR *) DECLSPEC_HIDDEN
Definition: navigate.c:1142
HRESULT WINAPI WebBrowserV1_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: webbrowser.c:1264
void DocHost_Frame_Init(DocHost *) DECLSPEC_HIDDEN
Definition: frame.c:182
HRESULT WINAPI InternetShortcut_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: intshcut.c:824
void detach_browser_service(ShellBrowser *) DECLSPEC_HIDDEN
Definition: shellbrowser.c:940
void ConnectionPointContainer_Init(ConnectionPointContainer *, IUnknown *) DECLSPEC_HIDDEN
Definition: events.c:431
void NewWindowManager_Init(DocHost *) DECLSPEC_HIDDEN
static LPWSTR heap_strdupW(LPCWSTR str)
Definition: ieframe.h:343
HRESULT go_back(DocHost *) DECLSPEC_HIDDEN
Definition: navigate.c:1122
DWORD release_extern_ref(InternetExplorer *, BOOL) DECLSPEC_HIDDEN
Definition: ie.c:756
void DocHost_ClientSite_Init(DocHost *) DECLSPEC_HIDDEN
Definition: client.c:712
#define TID_LIST
Definition: ieframe.h:306
void abort_dochost_tasks(DocHost *, task_proc_t) DECLSPEC_HIDDEN
Definition: dochost.c:70
static void unlock_module(void)
Definition: ieframe.h:339
void WebBrowser_OleObject_Init(WebBrowser *) DECLSPEC_HIDDEN
Definition: oleobject.c:1199
void deactivate_document(DocHost *) DECLSPEC_HIDDEN
Definition: dochost.c:510
void handle_navigation_error(DocHost *, HRESULT, BSTR, IHTMLWindow2 *) DECLSPEC_HIDDEN
Definition: navigate.c:315
void DocHost_Release(DocHost *) DECLSPEC_HIDDEN
Definition: dochost.c:1128
HRESULT WINAPI WebBrowser_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: webbrowser.c:1269
void create_doc_view_hwnd(DocHost *) DECLSPEC_HIDDEN
Definition: dochost.c:479
void WebBrowser_Persist_Init(WebBrowser *) DECLSPEC_HIDDEN
Definition: persist.c:279
static LPSTR co_strdupWtoA(LPCWSTR str)
Definition: ieframe.h:378
void ConnectionPointContainer_Destroy(ConnectionPointContainer *) DECLSPEC_HIDDEN
Definition: events.c:442
HRESULT create_browser_service(DocHost *, ShellBrowser **) DECLSPEC_HIDDEN
Definition: shellbrowser.c:921
HRESULT WINAPI InternetExplorerManager_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: iexplore.c:926
HRESULT go_home(DocHost *) DECLSPEC_HIDDEN
Definition: navigate.c:1065
void on_commandstate_change(DocHost *, LONG, BOOL) DECLSPEC_HIDDEN
Definition: dochost.c:83
void update_navigation_commands(DocHost *dochost) DECLSPEC_HIDDEN
Definition: dochost.c:106
static LPWSTR co_strdupW(LPCWSTR str)
Definition: ieframe.h:359
void released_obj(void) DECLSPEC_HIDDEN
Definition: iexplore.c:946
LRESULT process_dochost_tasks(DocHost *) DECLSPEC_HIDDEN
Definition: dochost.c:55
void notify_download_state(DocHost *, BOOL) DECLSPEC_HIDDEN
Definition: navigate.c:153
HRESULT create_shell_ui_helper(IShellUIHelper2 **) DECLSPEC_HIDDEN
void WebBrowser_OleObject_Destroy(WebBrowser *) DECLSPEC_HIDDEN
Definition: oleobject.c:1222
struct _IDocHostContainerVtbl IDocHostContainerVtbl
void(* task_destr_t)(struct _task_header_t *)
Definition: ieframe.h:76
HRESULT WINAPI InternetExplorer_Create(IClassFactory *, IUnknown *, REFIID, void **) DECLSPEC_HIDDEN
Definition: iexplore.c:837
LONG module_ref
Definition: ieframe_main.c:31
IClassFactory InternetExplorerFactory
Definition: ieframe_main.c:241
IClassFactory InternetExplorerManagerFactory
Definition: ieframe_main.c:251
HINSTANCE ieframe_instance
Definition: ieframe_main.c:32
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static LPOLESTR
Definition: stg_prop.c:27
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
static VARIANTARG static DISPID
Definition: ordinal.c:52
interface IHTMLWindow2 IHTMLWindow2
Definition: mshtmhst.idl:64
#define BOOL
Definition: nt_native.h:43
long LONG
Definition: pedump.c:60
#define REFIID
Definition: guiddef.h:118
const WCHAR * str
ConnectionPoint * pns
Definition: ieframe.h:57
ConnectionPoint * wbe2
Definition: ieframe.h:55
IConnectionPointContainer IConnectionPointContainer_iface
Definition: ieframe.h:53
ConnectionPoint * wbe
Definition: ieframe.h:56
IEHTMLWindow html_window
Definition: ieframe.h:174
IShellUIHelper2 * shell_ui_helper
Definition: ieframe.h:163
VARIANT_BOOL busy
Definition: ieframe.h:155
struct DocHost::@428 travellog
const IDocHostContainerVtbl * container_vtbl
Definition: ieframe.h:144
ConnectionPointContainer cps
Definition: ieframe.h:173
READYSTATE ready_state
Definition: ieframe.h:157
int loading_pos
Definition: ieframe.h:170
VARIANT_BOOL offline
Definition: ieframe.h:154
VARIANT_BOOL silent
Definition: ieframe.h:153
IUnknown * doc_navigate
Definition: ieframe.h:142
travellog_entry_t * log
Definition: ieframe.h:166
IWebBrowser2 * wb
Definition: ieframe.h:133
IOleInPlaceFrame IOleInPlaceFrame_iface
Definition: ieframe.h:131
IOleCommandTarget IOleCommandTarget_iface
Definition: ieframe.h:125
NewWindowManager nwm
Definition: ieframe.h:175
IDispatch IDispatch_iface
Definition: ieframe.h:126
BOOL is_prop_notif
Definition: ieframe.h:160
IOleClientSite IOleClientSite_iface
Definition: ieframe.h:120
READYSTATE doc_state
Definition: ieframe.h:158
IUnknown * document
Definition: ieframe.h:140
IDocHostUIHandler * hostui
Definition: ieframe.h:136
IPropertyNotifySink IPropertyNotifySink_iface
Definition: ieframe.h:127
IOleCommandTarget * olecmd
Definition: ieframe.h:138
unsigned position
Definition: ieframe.h:169
IServiceProvider IServiceProvider_iface
Definition: ieframe.h:128
unsigned length
Definition: ieframe.h:168
IOleInPlaceFrame * frame
Definition: ieframe.h:137
IOleInPlaceSiteEx IOleInPlaceSiteEx_iface
Definition: ieframe.h:121
IOleControlSite IOleControlSite_iface
Definition: ieframe.h:124
IOleDocumentSite IOleDocumentSite_iface
Definition: ieframe.h:123
IDocHostUIHandler2 IDocHostUIHandler2_iface
Definition: ieframe.h:122
IOleDocumentView * view
Definition: ieframe.h:141
IDispatch * client_disp
Definition: ieframe.h:135
LPOLESTR url
Definition: ieframe.h:151
HWND hwnd
Definition: ieframe.h:146
HWND frame_hwnd
Definition: ieframe.h:147
ShellBrowser * browser_service
Definition: ieframe.h:162
unsigned size
Definition: ieframe.h:167
struct list task_queue
Definition: ieframe.h:149
DWORD prop_notif_cookie
Definition: ieframe.h:159
ITargetFrame2 ITargetFrame2_iface
Definition: ieframe.h:65
IUnknown * outer
Definition: ieframe.h:69
DocHost * doc_host
Definition: ieframe.h:70
IWebBrowserPriv2IE9 IWebBrowserPriv2IE9_iface
Definition: ieframe.h:67
ITargetFrame ITargetFrame_iface
Definition: ieframe.h:64
IHlinkFrame IHlinkFrame_iface
Definition: ieframe.h:63
ITargetFramePriv2 ITargetFramePriv2_iface
Definition: ieframe.h:66
DocHost * doc_host
Definition: ieframe.h:96
IHTMLWindow2 IHTMLWindow2_iface
Definition: ieframe.h:95
IServiceProvider IServiceProvider_iface
Definition: ieframe.h:234
HWND toolbar_hwnd
Definition: ieframe.h:242
DocHost doc_host
Definition: ieframe.h:231
struct list entry
Definition: ieframe.h:246
HWND status_hwnd
Definition: ieframe.h:241
HlinkFrame hlink_frame
Definition: ieframe.h:235
IWebBrowser2 IWebBrowser2_iface
Definition: ieframe.h:232
IExternalConnection IExternalConnection_iface
Definition: ieframe.h:233
INewWindowManager INewWindowManager_iface
Definition: ieframe.h:100
DocHost * doc_host
Definition: ieframe.h:101
Implementation of IShellBrowserImpl interface in explorer child windows.
Definition: ieframe.h:84
LONG ref
Definition: ieframe.h:89
IDocObjectService IDocObjectService_iface
Definition: ieframe.h:87
DocHost * doc_host
Definition: ieframe.h:91
IShellBrowser IShellBrowser_iface
Definition: ieframe.h:85
IBrowserService IBrowserService_iface
Definition: ieframe.h:86
IViewObject2 IViewObject2_iface
Definition: ieframe.h:187
VARIANT_BOOL tool_bar
Definition: ieframe.h:223
VARIANT_BOOL register_browser
Definition: ieframe.h:218
IOleObject IOleObject_iface
Definition: ieframe.h:180
OLEINPLACEFRAMEINFO frameinfo
Definition: ieframe.h:213
VARIANT_BOOL status_bar
Definition: ieframe.h:222
IOleInPlaceUIWindow * uiwindow
Definition: ieframe.h:210
IWebBrowser2 IWebBrowser2_iface
Definition: ieframe.h:179
LONG ref
Definition: ieframe.h:194
IOleContainer * container
Definition: ieframe.h:200
HWND frame_hwnd
Definition: ieframe.h:209
INT version
Definition: ieframe.h:196
VARIANT_BOOL theater_mode
Definition: ieframe.h:225
IOleClientSite * client_closed
Definition: ieframe.h:199
HlinkFrame hlink_frame
Definition: ieframe.h:192
DocHost doc_host
Definition: ieframe.h:227
IPersistStreamInit IPersistStreamInit_iface
Definition: ieframe.h:185
IServiceProvider IServiceProvider_iface
Definition: ieframe.h:190
IOleCommandTarget IOleCommandTarget_iface
Definition: ieframe.h:189
SIZEL extent
Definition: ieframe.h:214
HWND shell_embedding_hwnd
Definition: ieframe.h:216
IOleClientSite * client
Definition: ieframe.h:198
IPersistStorage IPersistStorage_iface
Definition: ieframe.h:183
VARIANT_BOOL visible
Definition: ieframe.h:219
RECT pos_rect
Definition: ieframe.h:211
DWORD sink_aspects
Definition: ieframe.h:204
IDataObject IDataObject_iface
Definition: ieframe.h:191
VARIANT_BOOL menu_bar
Definition: ieframe.h:220
IOleInPlaceActiveObject IOleInPlaceActiveObject_iface
Definition: ieframe.h:188
VARIANT_BOOL full_screen
Definition: ieframe.h:224
IProvideClassInfo2 IProvideClassInfo2_iface
Definition: ieframe.h:186
IOleControl IOleControl_iface
Definition: ieframe.h:182
IPersistMemory IPersistMemory_iface
Definition: ieframe.h:184
DWORD sink_flags
Definition: ieframe.h:205
IOleInPlaceSiteEx * inplace
Definition: ieframe.h:201
IAdviseSink * sink
Definition: ieframe.h:203
IOleInPlaceObject IOleInPlaceObject_iface
Definition: ieframe.h:181
VARIANT_BOOL address_bar
Definition: ieframe.h:221
RECT clip_rect
Definition: ieframe.h:212
void(* get_docobj_rect)(DocHost *, RECT *)
Definition: ieframe.h:113
HRESULT(* set_status_text)(DocHost *, const WCHAR *)
Definition: ieframe.h:114
void(* set_url)(DocHost *, const WCHAR *)
Definition: ieframe.h:116
ULONG(* release)(DocHost *)
Definition: ieframe.h:112
void(* on_command_state_change)(DocHost *, LONG, BOOL)
Definition: ieframe.h:115
ULONG(* addref)(DocHost *)
Definition: ieframe.h:111
task_proc_t proc
Definition: ieframe.h:80
struct list entry
Definition: ieframe.h:79
task_destr_t destr
Definition: ieframe.h:81
Definition: ieframe.h:104
WCHAR * url
Definition: ieframe.h:105
IStream * stream
Definition: ieframe.h:106
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
int ret
LONG_PTR LRESULT
Definition: windef.h:209
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
char CHAR
Definition: xmlstorage.h:175