mshtml: Added IOmNavigator::get_appMinorVersion implementation.
[wine] / dlls / mshtml / mshtml_private.h
1 /*
2  * Copyright 2005-2009 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 #include "wingdi.h"
20 #include "docobj.h"
21 #include "docobjectservice.h"
22 #include "comcat.h"
23 #include "mshtml.h"
24 #include "mshtmhst.h"
25 #include "hlink.h"
26 #include "perhist.h"
27 #include "dispex.h"
28 #include "objsafe.h"
29
30 #include "wine/list.h"
31 #include "wine/unicode.h"
32
33 #ifdef INIT_GUID
34 #include "initguid.h"
35 #endif
36
37 #include "nsiface.h"
38
39 #define NS_ERROR_GENERATE_FAILURE(module,code) \
40     ((nsresult) (((PRUint32)(1<<31)) | ((PRUint32)(module+0x45)<<16) | ((PRUint32)(code))))
41
42 #define NS_OK                     ((nsresult)0x00000000L)
43 #define NS_ERROR_FAILURE          ((nsresult)0x80004005L)
44 #define NS_ERROR_OUT_OF_MEMORY    ((nsresult)0x8007000EL)
45 #define NS_ERROR_NOT_IMPLEMENTED  ((nsresult)0x80004001L)
46 #define NS_NOINTERFACE            ((nsresult)0x80004002L)
47 #define NS_ERROR_INVALID_POINTER  ((nsresult)0x80004003L)
48 #define NS_ERROR_NULL_POINTER     NS_ERROR_INVALID_POINTER
49 #define NS_ERROR_NOT_AVAILABLE    ((nsresult)0x80040111L)
50 #define NS_ERROR_INVALID_ARG      ((nsresult)0x80070057L) 
51 #define NS_ERROR_UNEXPECTED       ((nsresult)0x8000ffffL)
52
53 #define NS_ERROR_MODULE_NETWORK    6
54
55 #define NS_BINDING_ABORTED         NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 2)
56 #define NS_ERROR_UNKNOWN_PROTOCOL  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 18)
57
58 #define NS_FAILED(res) ((res) & 0x80000000)
59 #define NS_SUCCEEDED(res) (!NS_FAILED(res))
60
61 #define NSAPI WINAPI
62
63 #define MSHTML_E_NODOC    0x800a025c
64
65 typedef struct HTMLDOMNode HTMLDOMNode;
66 typedef struct ConnectionPoint ConnectionPoint;
67 typedef struct BSCallback BSCallback;
68 typedef struct event_target_t event_target_t;
69
70 #define TID_LIST \
71     XIID(NULL) \
72     XDIID(DispCEventObj) \
73     XDIID(DispCPlugins) \
74     XDIID(DispDOMChildrenCollection) \
75     XDIID(DispHTMLAnchorElement) \
76     XDIID(DispHTMLBody) \
77     XDIID(DispHTMLCommentElement) \
78     XDIID(DispHTMLCurrentStyle) \
79     XDIID(DispHTMLDocument) \
80     XDIID(DispHTMLDOMAttribute) \
81     XDIID(DispHTMLDOMTextNode) \
82     XDIID(DispHTMLElementCollection) \
83     XDIID(DispHTMLEmbed) \
84     XDIID(DispHTMLFormElement) \
85     XDIID(DispHTMLGenericElement) \
86     XDIID(DispHTMLFrameElement) \
87     XDIID(DispHTMLHeadElement) \
88     XDIID(DispHTMLIFrame) \
89     XDIID(DispHTMLImg) \
90     XDIID(DispHTMLInputElement) \
91     XDIID(DispHTMLLocation) \
92     XDIID(DispHTMLNavigator) \
93     XDIID(DispHTMLObjectElement) \
94     XDIID(DispHTMLOptionElement) \
95     XDIID(DispHTMLScreen) \
96     XDIID(DispHTMLScriptElement) \
97     XDIID(DispHTMLSelectElement) \
98     XDIID(DispHTMLStyle) \
99     XDIID(DispHTMLStyleElement) \
100     XDIID(DispHTMLStyleSheetsCollection) \
101     XDIID(DispHTMLTable) \
102     XDIID(DispHTMLTableRow) \
103     XDIID(DispHTMLTextAreaElement) \
104     XDIID(DispHTMLTitleElement) \
105     XDIID(DispHTMLUnknownElement) \
106     XDIID(DispHTMLWindow2) \
107     XDIID(HTMLDocumentEvents) \
108     XIID(IHTMLAnchorElement) \
109     XIID(IHTMLBodyElement) \
110     XIID(IHTMLBodyElement2) \
111     XIID(IHTMLCommentElement) \
112     XIID(IHTMLCurrentStyle) \
113     XIID(IHTMLCurrentStyle2) \
114     XIID(IHTMLCurrentStyle3) \
115     XIID(IHTMLCurrentStyle4) \
116     XIID(IHTMLDocument2) \
117     XIID(IHTMLDocument3) \
118     XIID(IHTMLDocument4) \
119     XIID(IHTMLDocument5) \
120     XIID(IHTMLDOMAttribute) \
121     XIID(IHTMLDOMChildrenCollection) \
122     XIID(IHTMLDOMNode) \
123     XIID(IHTMLDOMNode2) \
124     XIID(IHTMLDOMTextNode) \
125     XIID(IHTMLElement) \
126     XIID(IHTMLElement2) \
127     XIID(IHTMLElement3) \
128     XIID(IHTMLElement4) \
129     XIID(IHTMLElementCollection) \
130     XIID(IHTMLEmbedElement) \
131     XIID(IHTMLEventObj) \
132     XIID(IHTMLFiltersCollection) \
133     XIID(IHTMLFormElement) \
134     XIID(IHTMLFrameBase) \
135     XIID(IHTMLFrameBase2) \
136     XIID(IHTMLFrameElement3) \
137     XIID(IHTMLGenericElement) \
138     XIID(IHTMLHeadElement) \
139     XIID(IHTMLIFrameElement) \
140     XIID(IHTMLImageElementFactory) \
141     XIID(IHTMLImgElement) \
142     XIID(IHTMLInputElement) \
143     XIID(IHTMLLocation) \
144     XIID(IHTMLMimeTypesCollection) \
145     XIID(IHTMLObjectElement) \
146     XIID(IHTMLOptionElement) \
147     XIID(IHTMLPluginsCollection) \
148     XIID(IHTMLRect) \
149     XIID(IHTMLScreen) \
150     XIID(IHTMLScriptElement) \
151     XIID(IHTMLSelectElement) \
152     XIID(IHTMLStyle) \
153     XIID(IHTMLStyle2) \
154     XIID(IHTMLStyle3) \
155     XIID(IHTMLStyle4) \
156     XIID(IHTMLStyle5) \
157     XIID(IHTMLStyle6) \
158     XIID(IHTMLStyleElement) \
159     XIID(IHTMLStyleSheetsCollection) \
160     XIID(IHTMLTable) \
161     XIID(IHTMLTableRow) \
162     XIID(IHTMLTextAreaElement) \
163     XIID(IHTMLTextContainer) \
164     XIID(IHTMLTitleElement) \
165     XIID(IHTMLUniqueName) \
166     XIID(IHTMLWindow2) \
167     XIID(IHTMLWindow3) \
168     XIID(IHTMLWindow4) \
169     XIID(IOmNavigator)
170
171 typedef enum {
172 #define XIID(iface) iface ## _tid,
173 #define XDIID(iface) iface ## _tid,
174 TID_LIST
175 #undef XIID
176 #undef XDIID
177     LAST_tid
178 } tid_t;
179
180 typedef struct dispex_data_t dispex_data_t;
181 typedef struct dispex_dynamic_data_t dispex_dynamic_data_t;
182
183 #define MSHTML_DISPID_CUSTOM_MIN 0x60000000
184 #define MSHTML_DISPID_CUSTOM_MAX 0x6fffffff
185 #define MSHTML_CUSTOM_DISPID_CNT (MSHTML_DISPID_CUSTOM_MAX-MSHTML_DISPID_CUSTOM_MIN)
186
187 typedef struct DispatchEx DispatchEx;
188
189 typedef struct {
190     HRESULT (*value)(DispatchEx*,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
191     HRESULT (*get_dispid)(DispatchEx*,BSTR,DWORD,DISPID*);
192     HRESULT (*invoke)(DispatchEx*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
193 } dispex_static_data_vtbl_t;
194
195 typedef struct {
196     const dispex_static_data_vtbl_t *vtbl;
197     const tid_t disp_tid;
198     dispex_data_t *data;
199     const tid_t* const iface_tids;
200 } dispex_static_data_t;
201
202 struct DispatchEx {
203     IDispatchEx IDispatchEx_iface;
204
205     IUnknown *outer;
206
207     dispex_static_data_t *data;
208     dispex_dynamic_data_t *dynamic_data;
209 };
210
211 void init_dispex(DispatchEx*,IUnknown*,dispex_static_data_t*) DECLSPEC_HIDDEN;
212 void release_dispex(DispatchEx*) DECLSPEC_HIDDEN;
213 BOOL dispex_query_interface(DispatchEx*,REFIID,void**) DECLSPEC_HIDDEN;
214 HRESULT dispex_get_dprop_ref(DispatchEx*,const WCHAR*,BOOL,VARIANT**) DECLSPEC_HIDDEN;
215 HRESULT get_dispids(tid_t,DWORD*,DISPID**) DECLSPEC_HIDDEN;
216 HRESULT remove_prop(DispatchEx*,BSTR,VARIANT_BOOL*) DECLSPEC_HIDDEN;
217 void release_typelib(void) DECLSPEC_HIDDEN;
218 HRESULT get_htmldoc_classinfo(ITypeInfo **typeinfo) DECLSPEC_HIDDEN;
219
220 typedef struct HTMLWindow HTMLWindow;
221 typedef struct HTMLDocumentNode HTMLDocumentNode;
222 typedef struct HTMLDocumentObj HTMLDocumentObj;
223 typedef struct HTMLFrameBase HTMLFrameBase;
224 typedef struct NSContainer NSContainer;
225
226 typedef enum {
227     SCRIPTMODE_GECKO,
228     SCRIPTMODE_ACTIVESCRIPT
229 } SCRIPTMODE;
230
231 typedef struct ScriptHost ScriptHost;
232
233 typedef enum {
234     GLOBAL_SCRIPTVAR,
235     GLOBAL_ELEMENTVAR
236 } global_prop_type_t;
237
238 typedef struct {
239     global_prop_type_t type;
240     WCHAR *name;
241     ScriptHost *script_host;
242     DISPID id;
243 } global_prop_t;
244
245 typedef struct {
246     IHTMLOptionElementFactory IHTMLOptionElementFactory_iface;
247
248     LONG ref;
249
250     HTMLWindow *window;
251 } HTMLOptionElementFactory;
252
253 typedef struct {
254     DispatchEx dispex;
255     IHTMLImageElementFactory IHTMLImageElementFactory_iface;
256
257     LONG ref;
258
259     HTMLWindow *window;
260 } HTMLImageElementFactory;
261
262 struct HTMLLocation {
263     DispatchEx dispex;
264     IHTMLLocation IHTMLLocation_iface;
265
266     LONG ref;
267
268     HTMLWindow *window;
269 };
270
271 typedef struct {
272     HTMLWindow *window;
273     LONG ref;
274 }  windowref_t;
275
276 typedef struct nsChannelBSC nsChannelBSC;
277
278 struct HTMLWindow {
279     DispatchEx dispex;
280     IHTMLWindow2       IHTMLWindow2_iface;
281     IHTMLWindow3       IHTMLWindow3_iface;
282     IHTMLWindow4       IHTMLWindow4_iface;
283     IHTMLPrivateWindow IHTMLPrivateWindow_iface;
284     IDispatchEx        IDispatchEx_iface;
285     IServiceProvider   IServiceProvider_iface;
286
287     LONG ref;
288
289     windowref_t *window_ref;
290     LONG task_magic;
291
292     HTMLDocumentNode *doc;
293     HTMLDocumentObj *doc_obj;
294     nsIDOMWindow *nswindow;
295     HTMLWindow *parent;
296     HTMLFrameBase *frame_element;
297     READYSTATE readystate;
298
299     nsChannelBSC *bscallback;
300     IMoniker *mon;
301     LPOLESTR url;
302
303     IHTMLEventObj *event;
304
305     SCRIPTMODE scriptmode;
306     struct list script_hosts;
307
308     IInternetSecurityManager *secmgr;
309
310     HTMLOptionElementFactory *option_factory;
311     HTMLImageElementFactory *image_factory;
312     HTMLLocation *location;
313     IHTMLScreen *screen;
314
315     global_prop_t *global_props;
316     DWORD global_prop_cnt;
317     DWORD global_prop_size;
318
319     struct list children;
320     struct list sibling_entry;
321     struct list entry;
322 };
323
324 typedef enum {
325     UNKNOWN_USERMODE,
326     BROWSEMODE,
327     EDITMODE        
328 } USERMODE;
329
330 typedef struct _cp_static_data_t {
331     tid_t tid;
332     void (*on_advise)(IUnknown*,struct _cp_static_data_t*);
333     DWORD id_cnt;
334     DISPID *ids;
335 } cp_static_data_t;
336
337 typedef struct ConnectionPointContainer {
338     IConnectionPointContainer IConnectionPointContainer_iface;
339
340     ConnectionPoint *cp_list;
341     IUnknown *outer;
342     struct ConnectionPointContainer *forward_container;
343 } ConnectionPointContainer;
344
345 struct ConnectionPoint {
346     IConnectionPoint IConnectionPoint_iface;
347
348     ConnectionPointContainer *container;
349
350     union {
351         IUnknown *unk;
352         IDispatch *disp;
353         IPropertyNotifySink *propnotif;
354     } *sinks;
355     DWORD sinks_size;
356
357     const IID *iid;
358     cp_static_data_t *data;
359
360     ConnectionPoint *next;
361 };
362
363 struct HTMLDocument {
364     IHTMLDocument2              IHTMLDocument2_iface;
365     IHTMLDocument3              IHTMLDocument3_iface;
366     IHTMLDocument4              IHTMLDocument4_iface;
367     IHTMLDocument5              IHTMLDocument5_iface;
368     IHTMLDocument6              IHTMLDocument6_iface;
369     IPersistMoniker             IPersistMoniker_iface;
370     IPersistFile                IPersistFile_iface;
371     IPersistHistory             IPersistHistory_iface;
372     IMonikerProp                IMonikerProp_iface;
373     IOleObject                  IOleObject_iface;
374     IOleDocument                IOleDocument_iface;
375     IOleDocumentView            IOleDocumentView_iface;
376     IOleInPlaceActiveObject     IOleInPlaceActiveObject_iface;
377     IViewObjectEx               IViewObjectEx_iface;
378     IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface;
379     IServiceProvider            IServiceProvider_iface;
380     IOleCommandTarget           IOleCommandTarget_iface;
381     IOleControl                 IOleControl_iface;
382     IHlinkTarget                IHlinkTarget_iface;
383     IPersistStreamInit          IPersistStreamInit_iface;
384     IDispatchEx                 IDispatchEx_iface;
385     ISupportErrorInfo           ISupportErrorInfo_iface;
386     IObjectWithSite             IObjectWithSite_iface;
387     IOleContainer               IOleContainer_iface;
388     IObjectSafety               IObjectSafety_iface;
389     IProvideClassInfo           IProvideClassInfo_iface;
390
391     IUnknown *unk_impl;
392     IDispatchEx *dispex;
393
394     HTMLDocumentObj *doc_obj;
395     HTMLDocumentNode *doc_node;
396
397     HTMLWindow *window;
398
399     LONG task_magic;
400
401     ConnectionPointContainer cp_container;
402     ConnectionPoint cp_htmldocevents;
403     ConnectionPoint cp_htmldocevents2;
404     ConnectionPoint cp_propnotif;
405     ConnectionPoint cp_dispatch;
406
407     IOleAdviseHolder *advise_holder;
408 };
409
410 static inline HRESULT htmldoc_query_interface(HTMLDocument *This, REFIID riid, void **ppv)
411 {
412     return IUnknown_QueryInterface(This->unk_impl, riid, ppv);
413 }
414
415 static inline ULONG htmldoc_addref(HTMLDocument *This)
416 {
417     return IUnknown_AddRef(This->unk_impl);
418 }
419
420 static inline ULONG htmldoc_release(HTMLDocument *This)
421 {
422     return IUnknown_Release(This->unk_impl);
423 }
424
425 struct HTMLDocumentObj {
426     HTMLDocument basedoc;
427     DispatchEx dispex;
428     ICustomDoc ICustomDoc_iface;
429
430     LONG ref;
431
432     NSContainer *nscontainer;
433
434     IOleClientSite *client;
435     IDocHostUIHandler *hostui;
436     BOOL custom_hostui;
437     IOleInPlaceSite *ipsite;
438     IOleInPlaceFrame *frame;
439     IOleInPlaceUIWindow *ip_window;
440     IAdviseSink *view_sink;
441     IDocObjectService *doc_object_service;
442
443     DOCHOSTUIINFO hostinfo;
444
445     IOleUndoManager *undomgr;
446
447     HWND hwnd;
448     HWND tooltips_hwnd;
449
450     BOOL request_uiactivate;
451     BOOL in_place_active;
452     BOOL ui_active;
453     BOOL window_active;
454     BOOL hostui_setup;
455     BOOL container_locked;
456     BOOL focus;
457     INT download_state;
458
459     USERMODE usermode;
460     LPWSTR mime;
461
462     DWORD update;
463 };
464
465 typedef struct nsWeakReference nsWeakReference;
466
467 struct NSContainer {
468     nsIWebBrowserChrome      nsIWebBrowserChrome_iface;
469     nsIContextMenuListener   nsIContextMenuListener_iface;
470     nsIURIContentListener    nsIURIContentListener_iface;
471     nsIEmbeddingSiteWindow   nsIEmbeddingSiteWindow_iface;
472     nsITooltipListener       nsITooltipListener_iface;
473     nsIInterfaceRequestor    nsIInterfaceRequestor_iface;
474     nsISupportsWeakReference nsISupportsWeakReference_iface;
475
476     nsIWebBrowser *webbrowser;
477     nsIWebNavigation *navigation;
478     nsIBaseWindow *window;
479     nsIWebBrowserFocus *focus;
480
481     nsIEditor *editor;
482     nsIController *editor_controller;
483
484     LONG ref;
485
486     nsWeakReference *weak_reference;
487
488     NSContainer *parent;
489     HTMLDocumentObj *doc;
490
491     nsIURIContentListener *content_listener;
492
493     HWND hwnd;
494 };
495
496 typedef struct {
497     HRESULT (*qi)(HTMLDOMNode*,REFIID,void**);
498     void (*destructor)(HTMLDOMNode*);
499     HRESULT (*clone)(HTMLDOMNode*,nsIDOMNode*,HTMLDOMNode**);
500     event_target_t **(*get_event_target)(HTMLDOMNode*);
501     HRESULT (*call_event)(HTMLDOMNode*,DWORD,BOOL*);
502     HRESULT (*put_disabled)(HTMLDOMNode*,VARIANT_BOOL);
503     HRESULT (*get_disabled)(HTMLDOMNode*,VARIANT_BOOL*);
504     HRESULT (*get_document)(HTMLDOMNode*,IDispatch**);
505     HRESULT (*get_readystate)(HTMLDOMNode*,BSTR*);
506     HRESULT (*get_dispid)(HTMLDOMNode*,BSTR,DWORD,DISPID*);
507     HRESULT (*invoke)(HTMLDOMNode*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
508     HRESULT (*bind_to_tree)(HTMLDOMNode*);
509 } NodeImplVtbl;
510
511 struct HTMLDOMNode {
512     DispatchEx dispex;
513     IHTMLDOMNode  IHTMLDOMNode_iface;
514     IHTMLDOMNode2 IHTMLDOMNode2_iface;
515     const NodeImplVtbl *vtbl;
516
517     LONG ref;
518
519     nsIDOMNode *nsnode;
520     HTMLDocumentNode *doc;
521     event_target_t *event_target;
522     ConnectionPointContainer *cp_container;
523
524     HTMLDOMNode *next;
525 };
526
527 typedef struct {
528     HTMLDOMNode node;
529     ConnectionPointContainer cp_container;
530
531     IHTMLElement  IHTMLElement_iface;
532     IHTMLElement2 IHTMLElement2_iface;
533     IHTMLElement3 IHTMLElement3_iface;
534     IHTMLElement4 IHTMLElement4_iface;
535
536     nsIDOMHTMLElement *nselem;
537     HTMLStyle *style;
538     struct list attrs;
539 } HTMLElement;
540
541 #define HTMLELEMENT_TIDS    \
542     IHTMLDOMNode_tid,       \
543     IHTMLDOMNode2_tid,      \
544     IHTMLElement_tid,       \
545     IHTMLElement2_tid,      \
546     IHTMLElement3_tid,      \
547     IHTMLElement4_tid
548
549 typedef struct {
550     HTMLElement element;
551
552     IHTMLTextContainer IHTMLTextContainer_iface;
553
554     ConnectionPoint cp;
555 } HTMLTextContainer;
556
557 struct HTMLFrameBase {
558     HTMLElement element;
559
560     IHTMLFrameBase  IHTMLFrameBase_iface;
561     IHTMLFrameBase2 IHTMLFrameBase2_iface;
562
563     HTMLWindow *content_window;
564
565     nsIDOMHTMLFrameElement *nsframe;
566     nsIDOMHTMLIFrameElement *nsiframe;
567 };
568
569 typedef struct nsDocumentEventListener nsDocumentEventListener;
570
571 struct HTMLDocumentNode {
572     HTMLDOMNode node;
573     HTMLDocument basedoc;
574
575     IInternetHostSecurityManager IInternetHostSecurityManager_iface;
576
577     nsIDocumentObserver          nsIDocumentObserver_iface;
578
579     LONG ref;
580
581     nsIDOMHTMLDocument *nsdoc;
582     HTMLDOMNode *nodes;
583     BOOL content_ready;
584     event_target_t *body_event_target;
585
586     ICatInformation *catmgr;
587     nsDocumentEventListener *nsevent_listener;
588     BOOL *event_vector;
589
590     WCHAR **elem_vars;
591     unsigned elem_vars_size;
592     unsigned elem_vars_cnt;
593
594     BOOL skip_mutation_notif;
595
596     struct list bindings;
597     struct list selection_list;
598     struct list range_list;
599     struct list plugin_hosts;
600 };
601
602 HRESULT HTMLDocument_Create(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
603 HRESULT HTMLLoadOptions_Create(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
604 HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument*,HTMLDocumentObj*,HTMLWindow*,HTMLDocumentNode**) DECLSPEC_HIDDEN;
605 HRESULT create_document_fragment(nsIDOMNode*,HTMLDocumentNode*,HTMLDocumentNode**) DECLSPEC_HIDDEN;
606
607 HRESULT HTMLWindow_Create(HTMLDocumentObj*,nsIDOMWindow*,HTMLWindow*,HTMLWindow**) DECLSPEC_HIDDEN;
608 void update_window_doc(HTMLWindow*) DECLSPEC_HIDDEN;
609 HTMLWindow *nswindow_to_window(const nsIDOMWindow*) DECLSPEC_HIDDEN;
610 nsIDOMWindow *get_nsdoc_window(nsIDOMDocument*) DECLSPEC_HIDDEN;
611 HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLWindow*) DECLSPEC_HIDDEN;
612 HTMLImageElementFactory *HTMLImageElementFactory_Create(HTMLWindow*) DECLSPEC_HIDDEN;
613 HRESULT HTMLLocation_Create(HTMLWindow*,HTMLLocation**) DECLSPEC_HIDDEN;
614 IOmNavigator *OmNavigator_Create(void) DECLSPEC_HIDDEN;
615 HRESULT HTMLScreen_Create(IHTMLScreen**) DECLSPEC_HIDDEN;
616
617 void HTMLDocument_HTMLDocument3_Init(HTMLDocument*) DECLSPEC_HIDDEN;
618 void HTMLDocument_HTMLDocument5_Init(HTMLDocument*) DECLSPEC_HIDDEN;
619 void HTMLDocument_Persist_Init(HTMLDocument*) DECLSPEC_HIDDEN;
620 void HTMLDocument_OleCmd_Init(HTMLDocument*) DECLSPEC_HIDDEN;
621 void HTMLDocument_OleObj_Init(HTMLDocument*) DECLSPEC_HIDDEN;
622 void HTMLDocument_View_Init(HTMLDocument*) DECLSPEC_HIDDEN;
623 void HTMLDocument_Window_Init(HTMLDocument*) DECLSPEC_HIDDEN;
624 void HTMLDocument_Service_Init(HTMLDocument*) DECLSPEC_HIDDEN;
625 void HTMLDocument_Hlink_Init(HTMLDocument*) DECLSPEC_HIDDEN;
626
627 void HTMLDocumentNode_SecMgr_Init(HTMLDocumentNode*) DECLSPEC_HIDDEN;
628
629 HRESULT HTMLCurrentStyle_Create(HTMLElement*,IHTMLCurrentStyle**) DECLSPEC_HIDDEN;
630
631 void ConnectionPoint_Init(ConnectionPoint*,ConnectionPointContainer*,REFIID,cp_static_data_t*) DECLSPEC_HIDDEN;
632 void ConnectionPointContainer_Init(ConnectionPointContainer*,IUnknown*) DECLSPEC_HIDDEN;
633 void ConnectionPointContainer_Destroy(ConnectionPointContainer*) DECLSPEC_HIDDEN;
634
635 NSContainer *NSContainer_Create(HTMLDocumentObj*,NSContainer*) DECLSPEC_HIDDEN;
636 void NSContainer_Release(NSContainer*) DECLSPEC_HIDDEN;
637 nsresult create_chrome_window(nsIWebBrowserChrome*,nsIWebBrowserChrome**) DECLSPEC_HIDDEN;
638
639 void init_mutation(nsIComponentManager*) DECLSPEC_HIDDEN;
640 void init_document_mutation(HTMLDocumentNode*) DECLSPEC_HIDDEN;
641 void release_document_mutation(HTMLDocumentNode*) DECLSPEC_HIDDEN;
642
643 void HTMLDocument_LockContainer(HTMLDocumentObj*,BOOL) DECLSPEC_HIDDEN;
644 void show_context_menu(HTMLDocumentObj*,DWORD,POINT*,IDispatch*) DECLSPEC_HIDDEN;
645 void notif_focus(HTMLDocumentObj*) DECLSPEC_HIDDEN;
646
647 void show_tooltip(HTMLDocumentObj*,DWORD,DWORD,LPCWSTR) DECLSPEC_HIDDEN;
648 void hide_tooltip(HTMLDocumentObj*) DECLSPEC_HIDDEN;
649 HRESULT get_client_disp_property(IOleClientSite*,DISPID,VARIANT*) DECLSPEC_HIDDEN;
650
651 HRESULT ProtocolFactory_Create(REFCLSID,REFIID,void**) DECLSPEC_HIDDEN;
652
653 BOOL load_gecko(BOOL) DECLSPEC_HIDDEN;
654 void close_gecko(void) DECLSPEC_HIDDEN;
655 void register_nsservice(nsIComponentRegistrar*,nsIServiceManager*) DECLSPEC_HIDDEN;
656 void init_nsio(nsIComponentManager*,nsIComponentRegistrar*) DECLSPEC_HIDDEN;
657 void release_nsio(void) DECLSPEC_HIDDEN;
658 BOOL is_gecko_path(const char*) DECLSPEC_HIDDEN;
659
660 HRESULT nsuri_to_url(LPCWSTR,BOOL,BSTR*) DECLSPEC_HIDDEN;
661
662 HRESULT navigate_url(HTMLWindow*,const WCHAR*,const WCHAR*) DECLSPEC_HIDDEN;
663 HRESULT set_frame_doc(HTMLFrameBase*,nsIDOMDocument*) DECLSPEC_HIDDEN;
664
665 void call_property_onchanged(ConnectionPoint*,DISPID) DECLSPEC_HIDDEN;
666 HRESULT call_set_active_object(IOleInPlaceUIWindow*,IOleInPlaceActiveObject*) DECLSPEC_HIDDEN;
667
668 void *nsalloc(size_t) __WINE_ALLOC_SIZE(1) DECLSPEC_HIDDEN;
669 void nsfree(void*) DECLSPEC_HIDDEN;
670
671 void nsACString_InitDepend(nsACString*,const char*) DECLSPEC_HIDDEN;
672 void nsACString_SetData(nsACString*,const char*) DECLSPEC_HIDDEN;
673 PRUint32 nsACString_GetData(const nsACString*,const char**) DECLSPEC_HIDDEN;
674 void nsACString_Finish(nsACString*) DECLSPEC_HIDDEN;
675
676 BOOL nsAString_Init(nsAString*,const PRUnichar*) DECLSPEC_HIDDEN;
677 void nsAString_InitDepend(nsAString*,const PRUnichar*) DECLSPEC_HIDDEN;
678 void nsAString_SetData(nsAString*,const PRUnichar*) DECLSPEC_HIDDEN;
679 PRUint32 nsAString_GetData(const nsAString*,const PRUnichar**) DECLSPEC_HIDDEN;
680 void nsAString_Finish(nsAString*) DECLSPEC_HIDDEN;
681 HRESULT return_nsstr(nsresult,nsAString*,BSTR*) DECLSPEC_HIDDEN;
682
683 nsICommandParams *create_nscommand_params(void) DECLSPEC_HIDDEN;
684 HRESULT nsnode_to_nsstring(nsIDOMNode*,nsAString*) DECLSPEC_HIDDEN;
685 void get_editor_controller(NSContainer*) DECLSPEC_HIDDEN;
686 nsresult get_nsinterface(nsISupports*,REFIID,void**) DECLSPEC_HIDDEN;
687
688 void init_nsevents(HTMLDocumentNode*) DECLSPEC_HIDDEN;
689 void release_nsevents(HTMLDocumentNode*) DECLSPEC_HIDDEN;
690 void add_nsevent_listener(HTMLDocumentNode*,nsIDOMNode*,LPCWSTR) DECLSPEC_HIDDEN;
691
692 void set_window_bscallback(HTMLWindow*,nsChannelBSC*) DECLSPEC_HIDDEN;
693 void set_current_mon(HTMLWindow*,IMoniker*) DECLSPEC_HIDDEN;
694 HRESULT start_binding(HTMLWindow*,HTMLDocumentNode*,BSCallback*,IBindCtx*) DECLSPEC_HIDDEN;
695 HRESULT async_start_doc_binding(HTMLWindow*,nsChannelBSC*) DECLSPEC_HIDDEN;
696 void abort_document_bindings(HTMLDocumentNode*) DECLSPEC_HIDDEN;
697 void set_download_state(HTMLDocumentObj*,int) DECLSPEC_HIDDEN;
698
699 HRESULT bind_mon_to_buffer(HTMLDocumentNode*,IMoniker*,void**,DWORD*) DECLSPEC_HIDDEN;
700
701 void set_ready_state(HTMLWindow*,READYSTATE) DECLSPEC_HIDDEN;
702
703 HRESULT HTMLSelectionObject_Create(HTMLDocumentNode*,nsISelection*,IHTMLSelectionObject**) DECLSPEC_HIDDEN;
704 HRESULT HTMLTxtRange_Create(HTMLDocumentNode*,nsIDOMRange*,IHTMLTxtRange**) DECLSPEC_HIDDEN;
705 HRESULT HTMLStyle_Create(nsIDOMCSSStyleDeclaration*,HTMLStyle**) DECLSPEC_HIDDEN;
706 IHTMLStyleSheet *HTMLStyleSheet_Create(nsIDOMStyleSheet*) DECLSPEC_HIDDEN;
707 IHTMLStyleSheetsCollection *HTMLStyleSheetsCollection_Create(nsIDOMStyleSheetList*) DECLSPEC_HIDDEN;
708
709 void detach_selection(HTMLDocumentNode*) DECLSPEC_HIDDEN;
710 void detach_ranges(HTMLDocumentNode*) DECLSPEC_HIDDEN;
711 HRESULT get_node_text(HTMLDOMNode*,BSTR*) DECLSPEC_HIDDEN;
712 HRESULT replace_node_by_html(nsIDOMHTMLDocument*,nsIDOMNode*,const WCHAR*);
713
714 HRESULT create_nselem(HTMLDocumentNode*,const WCHAR*,nsIDOMHTMLElement**) DECLSPEC_HIDDEN;
715
716 HRESULT HTMLDOMTextNode_Create(HTMLDocumentNode*,nsIDOMNode*,HTMLDOMNode**) DECLSPEC_HIDDEN;
717
718 typedef struct {
719     DispatchEx dispex;
720     IHTMLDOMAttribute IHTMLDOMAttribute_iface;
721
722     LONG ref;
723
724     DISPID dispid;
725     HTMLElement *elem;
726     struct list entry;
727 } HTMLDOMAttribute;
728
729 HRESULT HTMLDOMAttribute_Create(HTMLElement*,DISPID,HTMLDOMAttribute**) DECLSPEC_HIDDEN;
730
731 HRESULT HTMLElement_Create(HTMLDocumentNode*,nsIDOMNode*,BOOL,HTMLElement**) DECLSPEC_HIDDEN;
732 HRESULT HTMLCommentElement_Create(HTMLDocumentNode*,nsIDOMNode*,HTMLElement**) DECLSPEC_HIDDEN;
733 HRESULT HTMLAnchorElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
734 HRESULT HTMLBodyElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
735 HRESULT HTMLEmbedElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
736 HRESULT HTMLFormElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
737 HRESULT HTMLFrameElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
738 HRESULT HTMLHeadElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
739 HRESULT HTMLIFrame_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
740 HRESULT HTMLStyleElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
741 HRESULT HTMLImgElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
742 HRESULT HTMLInputElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
743 HRESULT HTMLObjectElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
744 HRESULT HTMLOptionElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
745 HRESULT HTMLScriptElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
746 HRESULT HTMLSelectElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
747 HRESULT HTMLTable_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
748 HRESULT HTMLTableRow_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
749 HRESULT HTMLTextAreaElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
750 HRESULT HTMLTitleElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
751 HRESULT HTMLGenericElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
752
753 void HTMLDOMNode_Init(HTMLDocumentNode*,HTMLDOMNode*,nsIDOMNode*) DECLSPEC_HIDDEN;
754 void HTMLElement_Init(HTMLElement*,HTMLDocumentNode*,nsIDOMHTMLElement*,dispex_static_data_t*) DECLSPEC_HIDDEN;
755 void HTMLElement2_Init(HTMLElement*) DECLSPEC_HIDDEN;
756 void HTMLElement3_Init(HTMLElement*) DECLSPEC_HIDDEN;
757 void HTMLTextContainer_Init(HTMLTextContainer*,HTMLDocumentNode*,nsIDOMHTMLElement*,dispex_static_data_t*) DECLSPEC_HIDDEN;
758 void HTMLFrameBase_Init(HTMLFrameBase*,HTMLDocumentNode*,nsIDOMHTMLElement*,dispex_static_data_t*) DECLSPEC_HIDDEN;
759
760 HRESULT HTMLDOMNode_QI(HTMLDOMNode*,REFIID,void**) DECLSPEC_HIDDEN;
761 void HTMLDOMNode_destructor(HTMLDOMNode*) DECLSPEC_HIDDEN;
762
763 HRESULT HTMLElement_QI(HTMLDOMNode*,REFIID,void**) DECLSPEC_HIDDEN;
764 void HTMLElement_destructor(HTMLDOMNode*) DECLSPEC_HIDDEN;
765 HRESULT HTMLElement_clone(HTMLDOMNode*,nsIDOMNode*,HTMLDOMNode**) DECLSPEC_HIDDEN;
766
767 HRESULT HTMLFrameBase_QI(HTMLFrameBase*,REFIID,void**) DECLSPEC_HIDDEN;
768 void HTMLFrameBase_destructor(HTMLFrameBase*) DECLSPEC_HIDDEN;
769
770 HRESULT get_node(HTMLDocumentNode*,nsIDOMNode*,BOOL,HTMLDOMNode**) DECLSPEC_HIDDEN;
771 void release_nodes(HTMLDocumentNode*) DECLSPEC_HIDDEN;
772
773 void release_script_hosts(HTMLWindow*) DECLSPEC_HIDDEN;
774 void connect_scripts(HTMLWindow*) DECLSPEC_HIDDEN;
775 void doc_insert_script(HTMLWindow*,nsIDOMHTMLScriptElement*) DECLSPEC_HIDDEN;
776 IDispatch *script_parse_event(HTMLWindow*,LPCWSTR) DECLSPEC_HIDDEN;
777 HRESULT exec_script(HTMLWindow*,const WCHAR*,const WCHAR*,VARIANT*) DECLSPEC_HIDDEN;
778 void set_script_mode(HTMLWindow*,SCRIPTMODE) DECLSPEC_HIDDEN;
779 BOOL find_global_prop(HTMLWindow*,BSTR,DWORD,ScriptHost**,DISPID*) DECLSPEC_HIDDEN;
780 IDispatch *get_script_disp(ScriptHost*) DECLSPEC_HIDDEN;
781 HRESULT search_window_props(HTMLWindow*,BSTR,DWORD,DISPID*) DECLSPEC_HIDDEN;
782
783 IHTMLElementCollection *create_all_collection(HTMLDOMNode*,BOOL) DECLSPEC_HIDDEN;
784 IHTMLElementCollection *create_collection_from_nodelist(HTMLDocumentNode*,IUnknown*,nsIDOMNodeList*) DECLSPEC_HIDDEN;
785 IHTMLElementCollection *create_collection_from_htmlcol(HTMLDocumentNode*,IUnknown*,nsIDOMHTMLCollection*) DECLSPEC_HIDDEN;
786
787 /* commands */
788 typedef struct {
789     DWORD id;
790     HRESULT (*query)(HTMLDocument*,OLECMD*);
791     HRESULT (*exec)(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
792 } cmdtable_t;
793
794 extern const cmdtable_t editmode_cmds[] DECLSPEC_HIDDEN;
795
796 void do_ns_command(HTMLDocument*,const char*,nsICommandParams*) DECLSPEC_HIDDEN;
797
798 /* timer */
799 #define UPDATE_UI       0x0001
800 #define UPDATE_TITLE    0x0002
801
802 void update_doc(HTMLDocument*,DWORD) DECLSPEC_HIDDEN;
803 void update_title(HTMLDocumentObj*) DECLSPEC_HIDDEN;
804
805 /* editor */
806 void init_editor(HTMLDocument*) DECLSPEC_HIDDEN;
807 void handle_edit_event(HTMLDocument*,nsIDOMEvent*) DECLSPEC_HIDDEN;
808 HRESULT editor_exec_copy(HTMLDocument*,DWORD,VARIANT*,VARIANT*) DECLSPEC_HIDDEN;
809 HRESULT editor_exec_cut(HTMLDocument*,DWORD,VARIANT*,VARIANT*) DECLSPEC_HIDDEN;
810 HRESULT editor_exec_paste(HTMLDocument*,DWORD,VARIANT*,VARIANT*) DECLSPEC_HIDDEN;
811 void handle_edit_load(HTMLDocument*) DECLSPEC_HIDDEN;
812 HRESULT editor_is_dirty(HTMLDocument*) DECLSPEC_HIDDEN;
813 void set_dirty(HTMLDocument*,VARIANT_BOOL) DECLSPEC_HIDDEN;
814
815 extern DWORD mshtml_tls DECLSPEC_HIDDEN;
816
817 typedef struct task_t task_t;
818 typedef void (*task_proc_t)(task_t*);
819
820 struct task_t {
821     LONG target_magic;
822     task_proc_t proc;
823     struct task_t *next;
824 };
825
826 typedef struct {
827     task_t header;
828     HTMLDocumentObj *doc;
829 } docobj_task_t;
830
831 typedef struct {
832     HWND thread_hwnd;
833     task_t *task_queue_head;
834     task_t *task_queue_tail;
835     struct list timer_list;
836 } thread_data_t;
837
838 thread_data_t *get_thread_data(BOOL) DECLSPEC_HIDDEN;
839 HWND get_thread_hwnd(void) DECLSPEC_HIDDEN;
840
841 LONG get_task_target_magic(void) DECLSPEC_HIDDEN;
842 void push_task(task_t*,task_proc_t,LONG) DECLSPEC_HIDDEN;
843 void remove_target_tasks(LONG) DECLSPEC_HIDDEN;
844
845 DWORD set_task_timer(HTMLDocument*,DWORD,BOOL,IDispatch*) DECLSPEC_HIDDEN;
846 HRESULT clear_task_timer(HTMLDocument*,BOOL,DWORD) DECLSPEC_HIDDEN;
847
848 const char *debugstr_variant(const VARIANT*) DECLSPEC_HIDDEN;
849
850 DEFINE_GUID(CLSID_AboutProtocol, 0x3050F406, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
851 DEFINE_GUID(CLSID_JSProtocol, 0x3050F3B2, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
852 DEFINE_GUID(CLSID_MailtoProtocol, 0x3050F3DA, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
853 DEFINE_GUID(CLSID_ResProtocol, 0x3050F3BC, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
854 DEFINE_GUID(CLSID_SysimageProtocol, 0x76E67A63, 0x06E9, 0x11D2, 0xA8,0x40, 0x00,0x60,0x08,0x05,0x93,0x82);
855
856 DEFINE_GUID(CLSID_CMarkup,0x3050f4fb,0x98b5,0x11cf,0xbb,0x82,0x00,0xaa,0x00,0xbd,0xce,0x0b);
857
858 DEFINE_OLEGUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0);
859
860 /* memory allocation functions */
861
862 static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t len)
863 {
864     return HeapAlloc(GetProcessHeap(), 0, len);
865 }
866
867 static inline void * __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t len)
868 {
869     return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
870 }
871
872 static inline void * __WINE_ALLOC_SIZE(2) heap_realloc(void *mem, size_t len)
873 {
874     return HeapReAlloc(GetProcessHeap(), 0, mem, len);
875 }
876
877 static inline void * __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, size_t len)
878 {
879     return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, len);
880 }
881
882 static inline BOOL heap_free(void *mem)
883 {
884     return HeapFree(GetProcessHeap(), 0, mem);
885 }
886
887 static inline LPWSTR heap_strdupW(LPCWSTR str)
888 {
889     LPWSTR ret = NULL;
890
891     if(str) {
892         DWORD size;
893
894         size = (strlenW(str)+1)*sizeof(WCHAR);
895         ret = heap_alloc(size);
896         memcpy(ret, str, size);
897     }
898
899     return ret;
900 }
901
902 static inline LPWSTR heap_strndupW(LPCWSTR str, unsigned len)
903 {
904     LPWSTR ret = NULL;
905
906     if(str) {
907         ret = heap_alloc((len+1)*sizeof(WCHAR));
908         memcpy(ret, str, len*sizeof(WCHAR));
909         ret[len] = 0;
910     }
911
912     return ret;
913 }
914
915 static inline char *heap_strdupA(const char *str)
916 {
917     char *ret = NULL;
918
919     if(str) {
920         DWORD size;
921
922         size = strlen(str)+1;
923         ret = heap_alloc(size);
924         memcpy(ret, str, size);
925     }
926
927     return ret;
928 }
929
930 static inline WCHAR *heap_strdupAtoW(const char *str)
931 {
932     LPWSTR ret = NULL;
933
934     if(str) {
935         DWORD len;
936
937         len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
938         ret = heap_alloc(len*sizeof(WCHAR));
939         MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
940     }
941
942     return ret;
943 }
944
945 static inline char *heap_strdupWtoA(LPCWSTR str)
946 {
947     char *ret = NULL;
948
949     if(str) {
950         DWORD size = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
951         ret = heap_alloc(size);
952         WideCharToMultiByte(CP_ACP, 0, str, -1, ret, size, NULL, NULL);
953     }
954
955     return ret;
956 }
957
958 static inline void windowref_addref(windowref_t *ref)
959 {
960     InterlockedIncrement(&ref->ref);
961 }
962
963 static inline void windowref_release(windowref_t *ref)
964 {
965     if(!InterlockedDecrement(&ref->ref))
966         heap_free(ref);
967 }
968
969 HDC get_display_dc(void) DECLSPEC_HIDDEN;
970 HINSTANCE get_shdoclc(void) DECLSPEC_HIDDEN;
971 void set_statustext(HTMLDocumentObj*,INT,LPCWSTR) DECLSPEC_HIDDEN;
972
973 extern HINSTANCE hInst DECLSPEC_HIDDEN;