mshtml: Moved IHTMLFrameBase to separated object to allow sharing implementation...
[wine] / dlls / mshtml / nsiface.idl
1 /*
2  * Copyright 2005-2007 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 /* 
20  * NOTE:
21  * This file is not a typical idl file. Interfaces in this file are XPCOM
22  * interfaces (NOT MSCOM!), but we generate the header file with WIDL
23  * compatible with XPCOM, usable in C code.
24  */
25
26 cpp_quote("#define GECKO_VERSION \"1.0.0\"")
27 cpp_quote("#define GECKO_VERSION_STRING \"Wine Gecko \" GECKO_VERSION")
28
29 import "wtypes.idl";
30
31 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
32 cpp_quote("#undef GetForm")
33 cpp_quote("#undef SetPort")
34 cpp_quote("#endif")
35
36 typedef HRESULT nsresult;
37 typedef ULONG nsrefcnt;
38
39 typedef IID nsID;
40 typedef IID nsIID;
41 typedef nsIID nsCID;
42 typedef REFIID nsIIDRef;
43 typedef nsIIDRef nsCIDRef;
44
45 typedef void** nsQIResult;
46 typedef WCHAR PRUnichar;
47 typedef ULONG PRUint32;
48 typedef LONG PRInt32;
49 typedef WORD PRUint16;
50 typedef INT16 PRInt16;
51 typedef BYTE PRUint8;
52 typedef BOOL PRBool;
53 typedef LARGE_INTEGER PRInt64;
54 typedef ULARGE_INTEGER PRUint64;
55 typedef PRUint64 DOMTimeStamp;
56 typedef PRUint32 nsLoadFlags;
57
58 typedef struct {
59     void *v;
60     void *d1;
61     PRUint32 d2;
62     void *d3;
63 } nsCStringContainer;
64
65 typedef struct {
66     void *v;
67     void *d1;
68     PRUint32 d2;
69     void *d3;
70 } nsStringContainer;
71
72 typedef nsCStringContainer nsACString;
73 typedef nsStringContainer nsAString;
74
75 interface nsIWebBrowserChrome;
76 interface nsILoadGroup;
77 interface nsIDOMNode;
78 interface nsIDOMDocument;
79 interface nsIDOMEvent;
80 interface nsIEditor;
81 interface nsISelectionController;
82 interface nsITransactionManager;
83 interface nsITransaction;
84 interface nsIInlineSpellChecker;
85 interface nsIOutputStream;
86 interface nsIEditorObserver;
87 interface nsIEditActionListener;
88 interface nsIDocumentStateListener;
89 interface nsIDOMCSSStyleSheet;
90 interface nsIDOMDocumentView;
91 interface nsIDocumentObserver;
92 interface nsIDOMWindow;
93
94 interface IMoniker;
95
96 [
97     object,
98     uuid(00000000-0000-0000-c000-000000000046),
99     local
100 ]
101 interface nsISupports
102 {
103     nsresult QueryInterface(nsIIDRef riid, nsQIResult result);
104     nsrefcnt AddRef();
105     nsrefcnt Release();
106 }
107
108 /* Currently we don't need a full declaration of these interfaces */
109 typedef nsISupports nsISHistory;
110 typedef nsISupports nsIWidget;
111 typedef nsISupports nsIHttpHeaderVisitor;
112 typedef nsISupports nsIDOMBarProp;
113 typedef nsISupports nsIPrompt;
114 typedef nsISupports nsIAuthPrompt;
115 typedef nsISupports nsIDOMNamedNodeMap;
116 typedef nsISupports nsIDOMAttr;
117 typedef nsISupports nsIDOMDocumentType;
118 typedef nsISupports nsIDOMDOMImplementation;
119 typedef nsISupports nsIDOMCDATASection;
120 typedef nsISupports nsIDOMProcessingInstruction;
121 typedef nsISupports nsIDOMEntityReference;
122 typedef nsISupports nsIDOMHTMLFormElement;
123 typedef nsISupports nsIDOMHTMLOptionsCollection;
124 typedef nsISupports nsIWebProgressListener;
125 typedef nsISupports nsIDOMCSSValue;
126 typedef nsISupports nsIPrintSession;
127 typedef nsISupports nsIControllerCommandTable;
128 typedef nsISupports nsIPrincipal;
129 typedef nsISupports nsIAtom;
130 typedef nsISupports nsISupportsArray;
131 typedef nsISupports nsIContentFilter;
132 typedef nsISupports nsIDOMMediaList;
133 typedef nsISupports nsIDOMHTMLTableCaptionElement;
134 typedef nsISupports nsIDOMHTMLTableSectionElement;
135 typedef nsISupports nsIDOMClientRectList;
136 typedef nsISupports nsIDOMClientRect;
137 typedef nsISupports nsIDOMLocation;
138 typedef nsISupports nsIDocument;
139 typedef nsISupports nsIContent;
140 typedef nsISupports nsINode;
141 typedef nsISupports nsIStyleSheet;
142 typedef nsISupports nsIStyleRule;
143
144 [
145     object,
146     uuid(8bb35ed9-e332-462d-9155-4a002ab5c958),
147     local
148     /* FROZEN */
149 ]
150 interface nsIServiceManager : nsISupports
151 {
152     nsresult GetService(nsCIDRef aClass, nsIIDRef aIID, void **result);
153     nsresult GetServiceByContractID(const char *aContractID, nsIIDRef aIID, void **result);
154     nsresult IsServiceInstantiated(nsCIDRef aClass, nsIIDRef aIID, BOOL *_retval);
155     nsresult IsServiceInstantiatedByContractID(const char *aContractID, nsIIDRef aIID, BOOL *_retval);
156 }
157
158 [
159     object,
160     uuid(00000001-0000-0000-c000-000000000046),
161     local
162     /* FROZEN */
163 ]
164 interface nsIFactory : nsISupports
165 {
166     nsresult CreateInstance(nsISupports *aOuter, const nsIID *iid, void **result);
167     nsresult LockFactory(PRBool lock);
168 }
169
170 [
171     object,
172     uuid(db242e01-e4d9-11d2-9dde-000064657374),
173     local
174     /* FROZEN */
175 ]
176 interface nsIObserver : nsISupports
177 {
178     nsresult Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData);
179 }
180
181 [
182     object,
183     uuid(a88e5a60-205a-4bb1-94e1-2628daf51eae),
184     local
185     /* FROZEN */
186 ]
187 interface nsIComponentManager : nsISupports
188 {
189     nsresult GetClassObject(nsCIDRef aClass, nsIIDRef aIID, nsQIResult result);
190     nsresult GetClassObjectByContractID(const char *aContractID, nsIIDRef aIID, nsQIResult result);
191     nsresult CreateInstance(nsCIDRef aClass, nsISupports *aDelegate, nsIIDRef aIID,
192             nsQIResult result);
193     nsresult CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate,
194             nsIIDRef aIID, nsQIResult result);
195 }
196
197 [
198     object,
199     uuid(59e7e77a-38e4-11d4-8cf5-0060b0fc14a3),
200     local
201     /* FROZEN */
202 ]
203 interface nsIMemory : nsISupports
204 {
205     void *Alloc(/*size_t*/ int size);
206     void *Realloc(void *_ptr, /*size_t*/ int newSize);
207     void Free(void *_ptr);
208     nsresult HeapMinimize(PRBool immediate);
209     nsresult IsLowMemory(PRBool *_retval);
210 }
211
212 [
213     object,
214     uuid(9188bc85-f92e-11d2-81ef-0060083a0bcf),
215     local
216     /* FROZEN */
217 ]
218 interface nsIWeakReference : nsISupports
219 {
220     nsresult QueryReferent(const nsIID *riid, void **result);
221 }
222
223 [
224     object,
225     uuid(9188bc86-f92e-11d2-81ef-0060083a0bcf),
226     local
227     /* FROZEN */
228 ]
229 interface nsISupportsWeakReference : nsISupports
230 {
231     nsresult GetWeakReference(nsIWeakReference **_retval);
232 }
233
234 [
235     object,
236     uuid(033a1470-8b2a-11d3-af88-00a024ffc08c),
237     local
238     /* FROZEN */
239 ]
240 interface nsIInterfaceRequestor : nsISupports
241 {
242     nsresult GetInterface(const nsIID *riid, void **result);
243 }
244
245 [
246     object,
247     uuid(4a2abaf0-6886-11d3-9382-00104ba0fd40),
248     local
249     /* NOT_FROZEN */
250 ]
251 interface nsIRunnable : nsISupports
252 {
253     nsresult Run();
254 }
255
256 [
257     object,
258     uuid(d1899240-f9d2-11d2-bdd6-000064657374),
259     local
260     /* FROZEN */
261 ]
262 interface nsISimpleEnumerator : nsISupports
263 {
264     nsresult HasMoreElements(PRBool *_retval);
265     nsresult GetNext(nsISupports **_retval);
266 }
267
268 [
269     object,
270     uuid(fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a),
271     local
272     /* FROZEN */
273 ]
274 interface nsIInputStream : nsISupports
275 {
276     nsresult Close();
277     nsresult Available(PRUint32 *_retval);
278     nsresult Read(char *aBuf, PRUint32 aCount, PRUint32 *_retval);
279     nsresult ReadSegments(nsresult (*aWriter)(nsIInputStream *aInStream, 
280             void *aClosure, const char *aFromSegment, PRUint32 aToOffset,
281             PRUint32 aCount, PRUint32 *aWriteCount),
282             void *aClosure, PRUint32 aCount, PRUint32 *_retval);
283     nsresult IsNonBlocking(PRBool *_retval);
284 }
285
286 [
287     object,
288     uuid(07a22cc0-0ce5-11d3-9331-00104ba0fd40),
289     local
290     /* FROZEN */
291 ]
292 interface nsIURI : nsISupports
293 {
294     nsresult GetSpec(nsACString *aSpec);
295     nsresult SetSpec(const nsACString *aSpec);
296     nsresult GetPrePath(nsACString *aPrePath);
297     nsresult GetScheme(nsACString *aScheme);
298     nsresult SetScheme(const nsACString *aScheme);
299     nsresult GetUserPass(nsACString *aUserPass);
300     nsresult SetUserPass(const nsACString *aUserPass);
301     nsresult GetUsername(nsACString *aUsername);
302     nsresult SetUsername(const nsACString *aUsername);
303     nsresult GetPassword(nsACString *aPassword);
304     nsresult SetPassword(const nsACString *aPassword);
305     nsresult GetHostPort(nsACString *aHostPort);
306     nsresult SetHostPort(const nsACString *aHostPort);
307     nsresult GetHost(nsACString *aHost);
308     nsresult SetHost(const nsACString *aHost);
309     nsresult GetPort(PRInt32 *aPort);
310     nsresult SetPort(PRInt32 aPort);
311     nsresult GetPath(nsACString *aPath);
312     nsresult SetPath(const nsACString *aPath);
313     nsresult Equals(nsIURI *other, PRBool *_retval);
314     nsresult SchemeIs(const char *scheme, PRBool *_retval);
315     nsresult Clone(nsIURI **_retval);
316     nsresult Resolve(const nsACString *relativePath, nsACString *_retval);
317     nsresult GetAsciiSpec(nsACString *aAsciiSpec);
318     nsresult GetAsciiHost(nsACString *aAsciiHost);
319     nsresult GetOriginCharset(nsACString *aOriginCharset);
320 }
321
322 [
323     object,
324     uuid(d6116970-8034-11d3-9399-00104ba0fd40),
325     local
326     /* FROZEN */
327 ]
328 interface nsIURL : nsIURI
329 {
330     nsresult GetFilePath(nsACString *aFilePath);
331     nsresult SetFilePath(const nsACString *aFilePath);
332     nsresult GetParam(nsACString *aParam);
333     nsresult SetParam(const nsACString *aParam);
334     nsresult GetQuery(nsACString *aQuery);
335     nsresult SetQuery(const nsACString *aQuery);
336     nsresult GetRef(nsACString *aRef);
337     nsresult SetRef(const nsACString *aRef);
338     nsresult GetDirectory(nsACString *aDirectory);
339     nsresult SetDirectory(const nsACString *aDirectory);
340     nsresult GetFileName(nsACString *aFileName);
341     nsresult SetFileName(const nsACString *aFileName);
342     nsresult GetFileBaseName(nsACString *aFileBaseName);
343     nsresult SetFileBaseName(const nsACString *aFileBaseName);
344     nsresult GetFileExtension(nsACString *aFileExtension);
345     nsresult SetFileExtension(const nsACString *aFileExtension);
346     nsresult GetCommonBaseSpec(nsIURI *aURIToCompare, nsACString *_retval);
347     nsresult GetRelativeSpec(nsIURI *aURIToCompare, nsACString *_retval);
348 }
349
350 [
351     object,
352     uuid(ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe),
353     local
354     /* FROZEN */
355 ]
356 interface nsIRequest : nsISupports
357 {
358     nsresult GetName(nsACString *aName);
359     nsresult IsPending(PRBool *_retval);
360     nsresult GetStatus(nsresult *aStatus);
361     nsresult Cancel(nsresult aStatus);
362     nsresult Suspend();
363     nsresult Resume();
364     nsresult GetLoadGroup(nsILoadGroup **aLoadGroup);
365     nsresult SetLoadGroup(nsILoadGroup *aLoadGroup);
366     nsresult GetLoadFlags(nsLoadFlags *aLoadFlags);
367     nsresult SetLoadFlags(nsLoadFlags aLoadFlags);
368 }
369
370 [
371     object,
372     uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40),
373     local
374     /* FROZEN */
375 ]
376 interface nsIRequestObserver : nsISupports
377 {
378     nsresult OnStartRequest(nsIRequest *aRequest, nsISupports *aContext);
379     nsresult OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode);
380 }
381
382 [
383     object,
384     uuid(1a637020-1482-11d3-9333-00104ba0fd40),
385     local
386     /* FROZEN */
387
388 interface nsIStreamListener : nsIRequestObserver
389 {
390     nsresult OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
391                              nsIInputStream *aInputStream, PRUint32 aOffset, PRUint32 aCount);
392 }
393
394 [
395     object,
396     uuid(3de0a31c-feaf-400f-9f1e-4ef71f8b20cc),
397     local
398     /* FROZEN */
399 ]
400 interface nsILoadGroup : nsIRequest
401 {
402     nsresult GetGroupObserver(nsIRequestObserver **aGroupObserver);
403     nsresult SetGroupObserver(nsIRequestObserver *aGroupObserver);
404     nsresult GetDefaultLoadRequest(nsIRequest **aDefaultLoadRequest);
405     nsresult SetDefaultLoadRequest(nsIRequest *aDefaultLoadRequest);
406     nsresult AddRequest(nsIRequest *aRequest, nsISupports *aContext);
407     nsresult RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus);
408     nsresult GetRequests(nsISimpleEnumerator **aRequests);
409     nsresult GetActiveCount(PRUint32 *aActiveCount);
410     nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
411     nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
412 }
413
414 [
415     object,
416     uuid(c63a055a-a676-4e71-bf3c-6cfa11082018),
417     local
418     /* FROZEN */
419 ]
420 interface nsIChannel : nsIRequest
421 {
422     nsresult GetOriginalURI(nsIURI **aOriginalURI);
423     nsresult SetOriginalURI(nsIURI *aOriginalURI);
424     nsresult GetURI(nsIURI **aURI);
425     nsresult GetOwner(nsISupports **aOwner);
426     nsresult SetOwner(nsISupports *aOwner);
427     nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
428     nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
429     nsresult GetSecurityInfo(nsISupports **aSecurityInfo);
430     nsresult GetContentType(nsACString *aContentType);
431     nsresult SetContentType(const nsACString *aContentType);
432     nsresult GetContentCharset(nsACString *aContentCharset);
433     nsresult SetContentCharset(const nsACString *aContentCharset);
434     nsresult GetContentLength(PRInt32 *aContentLength);
435     nsresult SetContentLength(PRInt32 aContentLength);
436     nsresult Open(nsIInputStream **_retval);
437     nsresult AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext);
438 }
439
440 [
441     object,
442     uuid(9277fe09-f0cc-4cd9-bbce-581dd94b0260),
443     local
444     /* FROZEN */
445 ]
446 interface nsIHttpChannel : nsIChannel
447 {
448     nsresult GetRequestMethod(nsACString *aRequestMethod);
449     nsresult SetRequestMethod(const nsACString *aRequestMethod);
450     nsresult GetReferrer(nsIURI **aReferrer);
451     nsresult SetReferrer(nsIURI *aReferrer);
452     nsresult GetRequestHeader(const nsACString *aHeader, nsACString *_retval);
453     nsresult SetRequestHeader(const nsACString *aHeader, const nsACString *aValue, PRBool aMerge);
454     nsresult VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor);
455     nsresult GetAllowPipelining(PRBool *aAllowPipelining);
456     nsresult SetAllowPipelining(PRBool aAllowPipelining);
457     nsresult GetRedirectionLimit(PRUint32 *aRedirectionLimit);
458     nsresult SetRedirectionLimit(PRUint32 aRedirectionLimit);
459     nsresult GetResponseStatus(PRUint32 *aResponseStatus);
460     nsresult GetResponseStatusText(nsACString *aResponseStatusText);
461     nsresult GetRequestSucceeded(PRBool *aRequestSucceeded);
462     nsresult GetResponseHeader(const nsACString *header, nsACString *_retval);
463     nsresult SetResponseHeader(const nsACString *header, const nsACString *value, PRBool merge);
464     nsresult VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor);
465     nsresult IsNoStoreResponse(PRBool *_retval);
466     nsresult IsNoCacheResponse(PRBool *_retval);
467 }
468
469 [
470     object,
471     uuid(0eb66361-faaa-4e52-8c7e-6c25f11f8e3c),
472     local
473     /* NOT_FROZEN */
474 ]
475 interface nsIHttpChannelInternal : nsISupports
476 {
477     nsresult GetDocumentURI(nsIURI **aDocumentURI);
478     nsresult SetDocumentURI(nsIURI *aDocumentURI);
479     nsresult GetRequestVersion(PRUint32 *major, PRUint32 *minor);
480     nsresult GetResponseVersion(PRUint32 *major, PRUint32 *minor);
481     nsresult SetCookie(const char *aCookieHeader);
482     nsresult SetupFallbackChannel(const char *aFallbackKey);
483     nsresult GetForceAllowThirdPartyCookie(PRBool *aForceAllowThirdPartyCookie);
484     nsresult SetForceAllowThirdPartyCookie(PRBool aForceAllowThirdPartyCookie);
485 }
486
487 [
488     object,
489     uuid(ddf633d8-e9a4-439d-ad88-de636fd9bb75),
490     local
491     /* FROZEN */
492 ]
493 interface nsIUploadChannel : nsISupports
494 {
495     nsresult SetUploadStream(nsIInputStream *aStream, const nsACString *aContentType,
496                              PRInt32 aContentLength);
497     nsresult GetUploadStream(nsIInputStream **aUploadStream);
498 }
499
500 [
501     object,
502     uuid(a6cf90c1-15b3-11d2-932e-00805f8add32),
503     local
504     /* FROZEN */
505 ]
506 interface nsIDOMCSSRule : nsISupports
507 {
508     nsresult GetType(PRUint16 *aType);
509     nsresult GetCssText(nsAString *aCssText);
510     nsresult SetCssText(const nsAString *aCssText);
511     nsresult GetParentStyleSheet(nsIDOMCSSStyleSheet **aParentStyleSheet);
512     nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
513 }
514
515 [
516     object,
517     uuid(a6cf90be-15b3-11d2-932e-00805f8add32),
518     local
519     /* FROZEN */
520 ]
521 interface nsIDOMCSSStyleDeclaration : nsISupports
522 {
523     nsresult GetCssText(nsAString *aCssText);
524     nsresult SetCssText(const nsAString *aCssText);
525     nsresult GetPropertyValue(const nsAString *propertyName, nsAString *_retval);
526     nsresult GetPropertyCSSValue(const nsAString *propertyName, nsIDOMCSSValue **_retval);
527     nsresult RemoveProperty(const nsAString *propertyName, nsAString *_retval);
528     nsresult GetPropertyPriority(const nsAString *propertyName, nsAString *_retval);
529     nsresult SetProperty(const nsAString *propertyName, const nsAString *value,
530                          const nsAString *priority);
531     nsresult GetLength(PRUint32 *aLength);
532     nsresult Item(PRUint32 index, nsAString *_retval);
533     nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
534 }
535
536 [
537     object,
538     uuid(a6cf90c0-15b3-11d2-932e-00805f8add32),
539     local
540     /* FROZEN */
541 ]
542 interface nsIDOMCSSRuleList : nsISupports
543 {
544     nsresult GetLength(PRUint32 *aLength);
545     nsresult Item(PRUint32 index, nsIDOMCSSRule **_retval);
546 }
547
548 [
549     object,
550     uuid(a6cf9080-15b3-11d2-932e-00805f8add32),
551     local
552     /* FROZEN */
553 ]
554 interface nsIDOMStyleSheet : nsISupports
555 {
556     nsresult GetType(nsAString *aType);
557     nsresult GetDisabled(PRBool *aDisabled);
558     nsresult SetDisabled(PRBool aDisabled);
559     nsresult GetOwnerNode(nsIDOMNode **aOwnerNode);
560     nsresult GetParentStyleSheet(nsIDOMStyleSheet **aParentStyleSheet);
561     nsresult GetHref(nsAString *aHref);
562     nsresult GetTitle(nsAString *aTitle);
563     nsresult GetMedia(nsIDOMMediaList **aMedia);
564 }
565
566 [
567     object,
568     uuid(a6cf90c2-15b3-11d2-932e-00805f8add32),
569     local
570     /* FROZEN */
571 ]
572 interface nsIDOMCSSStyleSheet : nsIDOMStyleSheet
573 {
574     nsresult GetOwnerRule(nsIDOMCSSRule **aOwnerRule);
575     nsresult GetCssRules(nsIDOMCSSRuleList **aCssRules);
576     nsresult InsertRule(const nsAString *rule, PRUint32 index, PRUint32 *_retval);
577     nsresult DeleteRule(PRUint32 index);
578 }
579
580 [
581     object,
582     uuid(a6cf9081-15b3-11d2-932e-00805f8add32),
583     local
584     /* FROZEN */
585 ]
586 interface nsIDOMStyleSheetList : nsISupports
587 {
588     nsresult GetLength(PRUint32 *aLength);
589     nsresult Item(PRUint32 index, nsIDOMStyleSheet **_retval);
590 }
591
592 [
593     object,
594     uuid(a6cf907d-15b3-11d2-932e-00805f8add32),
595     local
596     /* FROZEN */
597 ]
598 interface nsIDOMNodeList : nsISupports
599 {
600     nsresult Item(PRUint32 index, nsIDOMNode **_retval);
601     nsresult GetLength(PRUint32 *aLength);
602 }
603
604 [
605     object,
606     uuid(a6cf907c-15b3-11d2-932e-00805f8add32),
607     local
608     /* FROZEN */
609 ]
610 interface nsIDOMNode : nsISupports
611 {
612     enum NSNODETYPE {
613         ELEMENT_NODE = 1,
614         ATTRIBUTE_NODE = 2,
615         TEXT_NODE = 3,
616         CDATA_SELECTION_NODE = 4,
617         ENTITY_REFERENCE_NODE = 5,
618         ENTITY_NODE = 6,
619         PROCESSING_INSTRUCTION_NODE = 7,
620         COMMENT_NODE = 8,
621         DOCUMENT_NODE = 9,
622         DOCUMENT_TYPE_NODE = 10,
623         DOCUMENT_FRAGMENT_NODE = 11,
624         NOTATION_NODE = 12
625     };
626
627     nsresult GetNodeName(nsAString *aNodeName);
628     nsresult GetNodeValue(nsAString *aNodeValue);
629     nsresult SetNodeValue(const nsAString *aNodeValue);
630     nsresult GetNodeType(PRUint16 *aNodeType);
631     nsresult GetParentNode(nsIDOMNode **aParentNode);
632     nsresult GetChildNodes(nsIDOMNodeList **aChildNodes);
633     nsresult GetFirstChild(nsIDOMNode **aFirstChild);
634     nsresult GetLastChild(nsIDOMNode **aLastChild);
635     nsresult GetPreviousSibling(nsIDOMNode **aPreviousSibling);
636     nsresult GetNextSibling(nsIDOMNode **aNextSibling);
637     nsresult GetAttributes(nsIDOMNamedNodeMap **aAttributes);
638     nsresult GetOwnerDocument(nsIDOMDocument **aOwnerDocument);
639     nsresult InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild, nsIDOMNode **_retval);
640     nsresult ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild, nsIDOMNode **_retval);
641     nsresult RemoveChild(nsIDOMNode *oldChild, nsIDOMNode **_retval);
642     nsresult AppendChild(nsIDOMNode *newChild, nsIDOMNode **_retval);
643     nsresult HasChildNodes(PRBool *_retval);
644     nsresult CloneNode(PRBool deep, nsIDOMNode **_retval);
645     nsresult Normalize();
646     nsresult IsSupported(const nsAString *feature, const nsAString *version, PRBool *_retval);
647     nsresult GetNamespaceURI(nsAString *aNamespaceURI);
648     nsresult GetPrefix(nsAString *aPrefix);
649     nsresult SetPrefix(const nsAString *aPrefix);
650     nsresult GetLocalName(nsAString *aLocalName);
651     nsresult HasAttributes(PRBool *_retval);
652 }
653
654 [
655     object,
656     uuid(a6cf9078-15b3-11d2-932e-00805f8add32),
657     local
658     /* FROZEN */
659 ]
660 interface nsIDOMElement : nsIDOMNode
661 {
662     nsresult GetTagName(nsAString *aTagName);
663     nsresult GetAttribute(const nsAString *name, nsAString *_retval);
664     nsresult SetAttribute(const nsAString *name, const nsAString *value);
665     nsresult RemoveAttribute(const nsAString *name);
666     nsresult GetAttributeNode(const nsAString *name, nsIDOMAttr **_retval);
667     nsresult SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
668     nsresult RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval);
669     nsresult GetElementsByTagName(const nsAString *name, nsIDOMNodeList **_retval);
670     nsresult GetAttributeNS(const nsAString *namespaceURI, const nsAString *localName,
671                             nsAString *_retval);
672     nsresult SetAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName,
673                             const nsAString *value);
674     nsresult RemoveAttributeNS(const nsAString *namespaceURI, const nsAString *localName);
675     nsresult GetAttributeNodeNS(const nsAString *namespaceURI, const nsAString *localName,
676                                 nsIDOMAttr **_retval);
677     nsresult SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
678     nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName,
679                                     nsIDOMNodeList **_retval);
680     nsresult HasAttribute(const nsAString *name, PRBool *_retval);
681     nsresult HasAttributeNS(const nsAString *namespaceURI, const nsAString *localName,
682                             PRBool *_retval);
683 }
684
685 [
686     object,
687     uuid(99715845-95fc-4a56-aa53-214b65c26e22),
688     local
689     /* FROZEN */
690 ]
691 interface nsIDOMElementCSSInlineStyle : nsISupports
692 {
693     nsresult GetStyle(nsIDOMCSSStyleDeclaration **aStyle);
694 }
695
696 [
697     object,
698     uuid(f0aef489-18c5-4de6-99d5-58b3758b098c),
699     local
700     /* NOT_FROZEN */
701 ]
702 interface nsIDOMNSElement : nsISupports
703 {
704     nsresult GetElementsByClassName(const nsAString *classes, nsIDOMNodeList **_retval);
705     nsresult GetClientRects(nsIDOMClientRectList **_retval);
706     nsresult GetBoundingClientRect(nsIDOMClientRect **_retval);
707     nsresult GetScrollTop(PRInt32 *aScrollTop);
708     nsresult SetScrollTop(PRInt32 aScrollTop);
709     nsresult GetScrollLeft(PRInt32 *aScrollLeft);
710     nsresult SetScrollLeft(PRInt32 aScrollLeft);
711     nsresult GetScrollHeight(PRInt32 *aScrollHeight);
712     nsresult GetScrollWidth(PRInt32 *aScrollWidth);
713     nsresult GetClientTop(PRInt32 *aClientTop);
714     nsresult GetClientLeft(PRInt32 *aClientLeft);
715     nsresult GetClientHeight(PRInt32 *aClientHeight);
716     nsresult GetClientWidth(PRInt32 *aClientWidth);
717     nsresult GetFirstElementChild(nsIDOMElement **aFirstElementChild);
718     nsresult GetLastElementChild(nsIDOMElement **aLastElementChild);
719     nsresult GetPreviousElementSibling(nsIDOMElement **aPreviousElementSibling);
720     nsresult GetNextElementSibling(nsIDOMElement **aNextElementSibling);
721     nsresult GetChildElementCount(PRUint32 *aChildElementCount);
722     nsresult GetChildren(nsIDOMNodeList **aChildren);
723 }
724
725 cpp_quote("#undef GetClassName")
726
727 [
728     object,
729     uuid(a6cf9085-15b3-11d2-932e-00805f8add32),
730     local
731     /* FROZEN */
732 ]
733 interface nsIDOMHTMLElement : nsIDOMElement
734 {
735     nsresult GetId(nsAString *aId);
736     nsresult SetId(const nsAString *aId);
737     nsresult GetTitle(nsAString *aTitle);
738     nsresult SetTitle(const nsAString *aTitle);
739     nsresult GetLang(nsAString *aLang);
740     nsresult SetLang(const nsAString *aLang);
741     nsresult GetDir(nsAString *aDir);
742     nsresult SetDir(const nsAString *aDir);
743     nsresult GetClassName(nsAString *aClassName);
744     nsresult SetClassName(const nsAString *aClassName);
745 }
746
747 [
748     object,
749     uuid(7f142f9a-fba7-4949-93d6-cf08a974ac51),
750     local
751     /* NOT_FROZEN */
752 ]
753 interface nsIDOMNSHTMLElement : nsISupports
754 {
755     nsresult GetOffsetTop(PRInt32 *aOffsetTop);
756     nsresult GetOffsetLeft(PRInt32 *aOffsetLeft);
757     nsresult GetOffsetWidth(PRInt32 *aOffsetWidth);
758     nsresult GetOffsetHeight(PRInt32 *aOffsetHeight);
759     nsresult GetOffsetParent(nsIDOMElement **aOffsetParent);
760     nsresult GetInnerHTML(nsAString *aInnerHTML);
761     nsresult SetInnerHTML(const nsAString *aInnerHTML);
762     nsresult GetTabIndex(PRInt32 *aTabIndex);
763     nsresult SetTabIndex(PRInt32 aTabIndex);
764     nsresult GetContentEditable(nsAString *aContentEditable);
765     nsresult SetContentEditable(const nsAString *aContentEditable);
766     nsresult blur();
767     nsresult focus();
768     nsresult ScrollIntoView(PRBool top);
769     nsresult GetSpellcheck(PRBool *aSpellcheck);
770     nsresult SetSpellcheck(PRBool aSpellcheck);
771 }
772
773 [
774     object,
775     uuid(a6cf9083-15b3-11d2-932e-00805f8add32),
776     local
777     /* FROZEN */
778 ]
779 interface nsIDOMHTMLCollection : nsISupports
780 {
781     nsresult GetLength(PRUint32 *aLength);
782     nsresult Item(PRUint32 index, nsIDOMNode **_retval);
783     nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval);
784 }
785
786 [
787     object,
788     uuid(a6cf9072-15b3-11d2-932e-00805f8add32),
789     local
790     /* FROZEN */
791 ]
792 interface nsIDOMCharacterData : nsIDOMNode
793 {
794     nsresult GetData(nsAString *aData);
795     nsresult SetData(const nsAString *aData);
796     nsresult GetLength(PRUint32 *aLength);
797     nsresult SubstringData(PRUint32 offset, PRUint32 count, nsAString *_retval);
798     nsresult AppendData(const nsAString *arg);
799     nsresult InsertData(PRUint32 offset, const nsAString *arg);
800     nsresult DeleteData(PRUint32 offset, PRUint32 count);
801     nsresult ReplaceData(PRUint32 offset, PRUint32 count, const nsAString *arg);
802 }
803
804 [
805     object,
806     uuid(a6cf9082-15b3-11d2-932e-00805f8add32),
807     local
808     /* FROZEN */
809 ]
810 interface nsIDOMText : nsIDOMCharacterData
811 {
812     nsresult SplitText(PRUint32 offset, nsIDOMText **_retval);
813 }
814
815 [
816     object,
817     uuid(a6cf9073-15b3-11d2-932e-00805f8add32),
818     local
819     /* FROZEN */
820 ]
821 interface nsIDOMComment : nsIDOMCharacterData
822 {
823 }
824
825 [
826     object,
827     uuid(a6cf9076-15b3-11d2-932e-00805f8add32),
828     local
829     /* FROZEN */
830 ]
831 interface nsIDOMDocumentFragment : nsIDOMNode
832 {
833 }
834
835 [
836     object,
837     uuid(f51ebade-8b1a-11d3-aae7-0010830123b4),
838     local
839     /* FROZEN */
840 ]
841 interface nsIDOMAbstractView : nsISupports
842 {
843     nsresult GetDocument(nsIDOMDocumentView **aDocument);
844 }
845
846 [
847     object,
848     uuid(0b9341f3-95d4-4fa4-adcd-e119e0db2889),
849     local
850     /* NOT_FROZEN */
851 ]
852 interface nsIDOMViewCSS : nsIDOMAbstractView
853 {
854     nsresult GetComputedStyle(nsIDOMElement *elt, const nsAString *pseudoElt, nsIDOMCSSStyleDeclaration **_retval);
855 }
856
857 [
858     object,
859     uuid(a6cf9075-15b3-11d2-932e-00805f8add32),
860     local
861     /* FROZEN */
862 ]
863 interface nsIDOMDocument : nsIDOMNode
864 {
865     nsresult GetDoctype(nsIDOMDocumentType **aDoctype);
866     nsresult GetImplementation(nsIDOMDOMImplementation **aImplementation);
867     nsresult GetDocumentElement(nsIDOMElement **aDocumentElement);
868     nsresult CreateElement(const nsAString *tagName, nsIDOMElement **_retval);
869     nsresult CreateDocumentFragment(nsIDOMDocumentFragment **_retval);
870     nsresult CreateTextNode(const nsAString *data, nsIDOMText **_retval);
871     nsresult CreateComment(const nsAString *data, nsIDOMComment **_retval);
872     nsresult CreateCDATASection(const nsAString *data, nsIDOMCDATASection **_retval);
873     nsresult CreateProcessingInstruction(const nsAString *target, const nsAString *data,
874                                          nsIDOMProcessingInstruction **_retval);
875     nsresult CreateAttribute(const nsAString *name, nsIDOMAttr **_retval);
876     nsresult CreateEntityReference(const nsAString *name, nsIDOMEntityReference **_retval);
877     nsresult GetElementsByTagName(const nsAString *tagname, nsIDOMNodeList **_retval);
878     nsresult ImportNode(nsIDOMNode *importedNode, PRBool deep, nsIDOMNode **_retval);
879     nsresult CreateElementNS(const nsAString *namespaceURI, const nsAString *qualifiedName,
880                              nsIDOMElement **_retval);
881     nsresult CreateAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName,
882                                nsIDOMAttr **_retval);
883     nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName,
884                                     nsIDOMNodeList **_retval);
885     nsresult GetElementById(const nsAString *elementId, nsIDOMElement **_retval);
886 }
887
888 [
889     object,
890     uuid(09a439ad-4079-46d5-a050-4d7015d1a108),
891     local
892     /* NOT_FROZEN */
893 ]
894 interface nsIDOMNSDocument : nsISupports
895 {
896     nsresult GetCharacterSet(nsAString *aCharacterSet);
897     nsresult GetDir(nsAString *aDir);
898     nsresult SetDir(const nsAString *aDir);
899     nsresult GetLocation(nsIDOMLocation **aLocation);
900     nsresult GetTitle(nsAString *aTitle);
901     nsresult SetTitle(const nsAString *aTitle);
902     nsresult GetContentType(nsAString *aContentType);
903     nsresult GetReadyState(nsAString *aReadyState);
904     nsresult GetLastModified(nsAString *aLastModified);
905     nsresult GetReferrer(nsAString *aReferrer);
906     nsresult HasFocus(PRBool *_retval);
907     nsresult GetActiveElement(nsIDOMElement **aActiveElement);
908     nsresult GetElementsByClassName(const nsAString *classes, nsIDOMNodeList **_retval);
909     nsresult ElementFromPoint(PRInt32 x, PRInt32 y, nsIDOMElement **_retval);
910
911     /* Wine extensions */
912     nsresult WineAddObserver(nsIDocumentObserver *aObserver);
913     nsresult WineRemoveObserver(nsIDocumentObserver *aObserver);
914     nsresult WineAddScriptRunner(nsIRunnable *aRunnable);
915 }
916
917 [
918     object,
919     uuid(a6cf9084-15b3-11d2-932e-00805f8add32),
920     local
921     /* FROZEN */
922 ]
923 interface nsIDOMHTMLDocument : nsIDOMDocument
924 {
925     nsresult GetTitle(nsAString *aTitle);
926     nsresult SetTitle(const nsAString *aTitle);
927     nsresult GetReferrer(nsAString *aReferrer);
928     nsresult GetDomain(nsAString *aDomain);
929     nsresult GetURL(nsAString *aURL);
930     nsresult GetBody(nsIDOMHTMLElement **aBody);
931     nsresult SetBody(nsIDOMHTMLElement *aBody);
932     nsresult GetImages(nsIDOMHTMLCollection **aImages);
933     nsresult GetApplets(nsIDOMHTMLCollection **aApplets);
934     nsresult GetLinks(nsIDOMHTMLCollection **aLinks);
935     nsresult GetForms(nsIDOMHTMLCollection **aForms);
936     nsresult GetAnchors(nsIDOMHTMLCollection **aAnchors);
937     nsresult GetCookie(nsAString *aCookie);
938     nsresult SetCookie(const nsAString *aCookie);
939     nsresult Open();
940     nsresult Close();
941     nsresult Write(const nsAString *text);
942     nsresult Writeln(const nsAString *text);
943     nsresult GetElementsByName(const nsAString *elementName, nsIDOMNodeList **_retval);
944 }
945
946 [
947     object,
948     uuid(79beb289-3644-4b54-9432-9fb993945629),
949     local
950     /* NOT_FROZEN */
951 ]
952 interface nsIDOMNSHTMLDocument : nsISupports
953 {
954     nsresult GetWidth(PRInt32 *aWidth);
955     nsresult GetHeight(PRInt32 *aHeight);
956     nsresult GetAlinkColor(nsAString *aAlinkColor);
957     nsresult SetAlinkColor(const nsAString *aAlinkColor);
958     nsresult GetLinkColor(nsAString *aLinkColor);
959     nsresult SetLinkColor(const nsAString *aLinkColor);
960     nsresult GetVlinkColor(nsAString *aVlinkColor);
961     nsresult SetVlinkColor(const nsAString *aVlinkColor);
962     nsresult GetBgColor(nsAString *aBgColor);
963     nsresult SetBgColor(const nsAString *aBgColor);
964     nsresult GetFgColor(nsAString *aFgColor);
965     nsresult SetFgColor(const nsAString *aFgColor);
966     nsresult GetDomain(nsAString *aDomain);
967     nsresult SetDomain(const nsAString *aDomain);
968     nsresult GetEmbeds(nsIDOMHTMLCollection **aEmbeds);
969     nsresult GetSelection(nsAString *_retval);
970     nsresult Open(nsACString *aContentType, PRBool aReplace, nsIDOMDocument **_retval);
971     nsresult Write();
972     nsresult Writeln();
973     nsresult Clear();
974     nsresult CaptureEvents(PRInt32 eventFlags);
975     nsresult ReleaseEvents(PRInt32 eventFlags);
976     nsresult RouteEvent(nsIDOMEvent *evt);
977     nsresult GetCompatMode(nsAString *aCompatMode);
978     nsresult GetPlugins(nsIDOMHTMLCollection **aPlugins);
979     nsresult GetDesignMode(nsAString *aDesignMode);
980     nsresult SetDesignMode(const nsAString *aDesignMode);
981     nsresult ExecCommand(const nsAString *commandID, PRBool doShowUI, const nsAString *value, PRBool *_retval);
982     nsresult ExecCommandShowHelp(const nsAString *commandID, PRBool *_retval);
983     nsresult QueryCommandEnabled(const nsAString *commandID, PRBool *_retval);
984     nsresult QueryCommandIndeterm(const nsAString *commandID, PRBool *_retval);
985     nsresult QueryCommandState(const nsAString *commandID, PRBool *_retval);
986     nsresult QueryCommandSupported(const nsAString *commandID, PRBool *_retval);
987     nsresult QueryCommandText(const nsAString *commandID, nsAString *_retval);
988     nsresult QueryCommandValue(const nsAString *commandID, nsAString *_retval);
989 }
990
991 [
992     object,
993     uuid(3d9f4973-dd2e-48f5-b5f7-2634e09eadd9),
994     local
995     /* FROZEN */
996 ]
997 interface nsIDOMDocumentStyle : nsISupports
998 {
999     nsresult GetStyleSheets(nsIDOMStyleSheetList **aStyleSheets);
1000 }
1001
1002 [
1003     object,
1004     uuid(1acdb2ba-1dd2-11b2-95bc-9542495d2569),
1005     local
1006     /* FROZEN */
1007 ]
1008 interface nsIDOMDocumentView : nsISupports
1009 {
1010     nsresult GetDefaultView(nsIDOMAbstractView **aDefaultView);
1011 }
1012
1013 [
1014     object,
1015     uuid(46b91d66-28e2-11d4-ab1e-0010830123b4),
1016     local
1017     /* FROZEN */
1018 ]
1019 interface nsIDOMDocumentEvent : nsISupports
1020 {
1021 cpp_quote("#undef CreateEvent")
1022     nsresult CreateEvent(const nsAString *eventType, nsIDOMEvent **_retval);
1023 }
1024
1025 [
1026     object,
1027     uuid(a6cf90ce-15b3-11d2-932e-00805f8add32),
1028     local
1029     /* FROZEN */
1030 ]
1031 interface nsIDOMRange : nsISupports
1032 {
1033     enum {
1034         NS_START_TO_START,
1035         NS_START_TO_END,
1036         NS_END_TO_END,
1037         NS_END_TO_START
1038     };
1039
1040     nsresult GetStartContainer(nsIDOMNode **aStartContainer);
1041     nsresult GetStartOffset(PRInt32 *aStartOffset);
1042     nsresult GetEndContainer(nsIDOMNode **aEndContainer);
1043     nsresult GetEndOffset(PRInt32 *aEndOffset);
1044     nsresult GetCollapsed(PRBool *aCollapsed);
1045     nsresult GetCommonAncestorContainer(nsIDOMNode **aCommonAncestorContainer);
1046     nsresult SetStart(nsIDOMNode *refNode, PRInt32 offset);
1047     nsresult SetEnd(nsIDOMNode *refNode, PRInt32 offset);
1048     nsresult SetStartBefore(nsIDOMNode *refNode);
1049     nsresult SetStartAfter(nsIDOMNode *refNode);
1050     nsresult SetEndBefore(nsIDOMNode *refNode);
1051     nsresult SetEndAfter(nsIDOMNode *refNode);
1052     nsresult Collapse(PRBool toStart);
1053     nsresult SelectNode(nsIDOMNode *refNode);
1054     nsresult SelectNodeContents(nsIDOMNode *refNode);
1055     nsresult CompareBoundaryPoints(PRUint16 how, nsIDOMRange *sourceRange, PRInt16 *_retval);
1056     nsresult DeleteContents();
1057     nsresult ExtractContents(nsIDOMDocumentFragment **_retval);
1058     nsresult CloneContents(nsIDOMDocumentFragment **_retval);
1059     nsresult InsertNode(nsIDOMNode *newNode);
1060     nsresult SurroundContents(nsIDOMNode *newParent);
1061     nsresult CloneRange(nsIDOMRange **_retval);
1062     nsresult ToString(nsAString *_retval);
1063     nsresult Detach();
1064 }
1065
1066 [
1067     object,
1068     uuid(59188642-23b4-41d6-bde1-302c3906d1f0),
1069     local
1070     /* NOT_FROZEN */
1071 ]
1072 interface nsIDOMNSRange : nsISupports
1073 {
1074     nsresult CreateContextualFragment([in] const nsAString *fragment, [out] nsIDOMDocumentFragment **_retval);
1075     nsresult IsPointInRange([in] nsIDOMNode *parent, [in] PRInt32 offset, [out] PRBool *_retval);
1076     nsresult ComparePoint([in] nsIDOMNode *parent, [in] PRInt32 offset, [out] PRInt16 *_retval);
1077 }
1078
1079
1080 [
1081     object,
1082     uuid(7b9badc6-c9bc-447a-8670-dbd195aed24b),
1083     local
1084     /* FROZEN */
1085 ]
1086 interface nsIDOMDocumentRange : nsISupports
1087 {
1088     nsresult CreateRange(nsIDOMRange **_retval);
1089 }
1090
1091 [
1092     object,
1093     uuid(b2c7ed59-8634-4352-9e37-5484c8b6e4e1),
1094     local
1095     /* FROZEN */
1096 ]
1097 interface nsISelection : nsISupports
1098 {
1099     nsresult GetAnchorNode(nsIDOMNode **aAnchorNode);
1100     nsresult GetAnchorOffset(PRInt32 *aAnchorOffset);
1101     nsresult GetFocusNode(nsIDOMNode **aFocusNode);
1102     nsresult GetFocusOffset(PRInt32 *aFocusOffset);
1103     nsresult GetIsCollapsed(PRBool *aIsCollapsed);
1104     nsresult GetRangeCount(PRInt32 *aRangeCount);
1105     nsresult GetRangeAt(PRInt32 index, nsIDOMRange **_retval);
1106     nsresult Collapse(nsIDOMNode *parentNode, PRInt32 offset);
1107     nsresult Extend(nsIDOMNode *parentNode, PRInt32 offset);
1108     nsresult CollapseToStart();
1109     nsresult CollapseToEnd();
1110     nsresult ContainsNode(nsIDOMNode *node, PRBool entirelyContained, PRBool *_retval);
1111     nsresult SelectAllChildren(nsIDOMNode *parentNode);
1112     nsresult AddRange(nsIDOMRange *range);
1113     nsresult RemoveRange(nsIDOMRange *range);
1114     nsresult RemoveAllRanges();
1115     nsresult DeleteFromDocument();
1116     nsresult SelectionLanguageChange(PRBool langRTL);
1117     nsresult ToString(PRUnichar **_retval);
1118 }
1119
1120 [
1121     object,
1122     uuid(a6cf906f-15b3-11d2-932e-00805f8add32),
1123     local
1124     /* FROZEN */
1125 ]
1126 interface nsIDOMWindowCollection : nsISupports
1127 {
1128     nsresult GetLength(PRUint32 *aLength);
1129     nsresult Item(PRUint32 index, nsIDOMWindow **_retval);
1130     nsresult NamedItem(const nsAString *name, nsIDOMWindow **_retval);
1131 }
1132
1133 [
1134     object,
1135     uuid(a6cf906b-15b3-11d2-932e-00805f8add32),
1136     local
1137     /* FROZEN */
1138 ]
1139 interface nsIDOMWindow : nsISupports
1140 {
1141     nsresult GetDocument(nsIDOMDocument **aDocument);
1142     nsresult GetParent(nsIDOMWindow **aParent);
1143     nsresult GetTop(nsIDOMWindow **aTop);
1144     nsresult GetScrollbars(nsIDOMBarProp **aScrollbars);
1145     nsresult GetFrames(nsIDOMWindowCollection **aFrames);
1146     nsresult GetName(nsAString *aName);
1147     nsresult SetName(const nsAString *aName);
1148     nsresult GetTextZoom(float *aTextZoom);
1149     nsresult SetTextZoom(float aTextZoom);
1150     nsresult GetScrollX(PRInt32 *aScrollX);
1151     nsresult GetScrollY(PRInt32 *aScrollY);
1152     nsresult ScrollTo(PRInt32 xScroll, PRInt32 yScroll);
1153     nsresult ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif);
1154     nsresult GetSelection(nsISelection **_retval);
1155     nsresult ScrollByLines(PRInt32 numLines);
1156     nsresult ScrollByPages(PRInt32 numPages);
1157     nsresult SizeToContent();
1158 }
1159
1160 [
1161     object,
1162     uuid(a6cf908e-15b3-11d2-932e-00805f8add32),
1163     local
1164     /* FROZEN */
1165 ]
1166 interface nsIDOMHTMLBodyElement : nsIDOMHTMLElement
1167 {
1168     nsresult GetALink(nsAString *aALink);
1169     nsresult SetALink(const nsAString *aALink);
1170     nsresult GetBackground(nsAString *aBackground);
1171     nsresult SetBackground(const nsAString *aBackground);
1172     nsresult GetBgColor(nsAString *aBgColor);
1173     nsresult SetBgColor(const nsAString *aBgColor);
1174     nsresult GetLink(nsAString *aLink);
1175     nsresult SetLink(const nsAString *aLink);
1176     nsresult GetText(nsAString *aText);
1177     nsresult SetText(const nsAString *aText);
1178     nsresult GetVLink(nsAString *aVLink);
1179     nsresult SetVLink(const nsAString *aVLink);
1180 }
1181
1182 [
1183     object,
1184     uuid(a6cf9093-15b3-11d2-932e-00805f8add32),
1185     local
1186     /* FROZEN */
1187 ]
1188 interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
1189 {
1190     nsresult GetDefaultValue(nsAString *aDefaultValue);
1191     nsresult SetDefaultValue(const nsAString *aDefaultValue);
1192     nsresult GetDefaultChecked(PRBool *aDefaultChecked);
1193     nsresult SetDefaultChecked(PRBool aDefaultChecked);
1194     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1195     nsresult GetAccept(nsAString *aAccept);
1196     nsresult SetAccept(const nsAString *aAccept);
1197     nsresult GetAccessKey(nsAString *aAccessKey);
1198     nsresult SetAccessKey(const nsAString *aAccessKey);
1199     nsresult GetAlign(nsAString *aAlign);
1200     nsresult SetAlign(const nsAString *aAlign);
1201     nsresult GetAlt(nsAString *aAlt);
1202     nsresult SetAlt(const nsAString *aAlt);
1203     nsresult GetChecked(PRBool *aChecked);
1204     nsresult SetChecked(PRBool aChecked);
1205     nsresult GetDisabled(PRBool *aDisabled);
1206     nsresult SetDisabled(PRBool aDisabled);
1207     nsresult GetMaxLength(PRInt32 *aMaxLength);
1208     nsresult SetMaxLength(PRInt32 aMaxLength);
1209     nsresult GetName(nsAString *aName);
1210     nsresult SetName(const nsAString *aName);
1211     nsresult GetReadOnly(PRBool *aReadOnly);
1212     nsresult SetReadOnly(PRBool aReadOnly);
1213     nsresult GetSize(PRUint32 *aSize);
1214     nsresult SetSize(PRUint32 aSize);
1215     nsresult GetSrc(nsAString *aSrc);
1216     nsresult SetSrc(const nsAString *aSrc);
1217     nsresult GetTabIndex(PRInt32 *aTabIndex);
1218     nsresult SetTabIndex(PRInt32 aTabIndex);
1219     nsresult GetType(nsAString *aType);
1220     nsresult SetType(const nsAString *aType);
1221     nsresult GetUseMap(nsAString *aUseMap);
1222     nsresult SetUseMap(const nsAString *aUseMap);
1223     nsresult GetValue(nsAString *aValue);
1224     nsresult SetValue(const nsAString *aValue);
1225     nsresult Blur();
1226     nsresult Focus();
1227     nsresult Select();
1228     nsresult Click();
1229 }
1230
1231 [
1232     object,
1233     uuid(a6cf9092-15b3-11d2-932e-00805f8add32),
1234     local
1235     /* FROZEN */
1236 ]
1237 interface nsIDOMHTMLOptionElement : nsIDOMHTMLElement
1238 {
1239     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1240     nsresult GetDefaultSelected(PRBool *aDefaultSelected);
1241     nsresult SetDefaultSelected(PRBool aDefaultSelected);
1242     nsresult GetText(nsAString *aText);
1243     nsresult GetIndex(PRInt32 *aIndex);
1244     nsresult GetDisabled(PRBool *aDisabled);
1245     nsresult SetDisabled(PRBool aDisabled);
1246     nsresult GetLabel(nsAString *aLabel);
1247     nsresult SetLabel(const nsAString *aLabel);
1248     nsresult GetSelected(PRBool *aSelected);
1249     nsresult SetSelected(PRBool aSelected);
1250     nsresult GetValue(nsAString *aValue);
1251     nsresult SetValue(const nsAString *aValue);
1252 }
1253
1254 [
1255     object,
1256     uuid(a6cf9090-15b3-11d2-932e-00805f8add32),
1257     local
1258     /* FROZEN */
1259 ]
1260 interface nsIDOMHTMLSelectElement : nsIDOMHTMLElement
1261 {
1262     nsresult GetType(nsAString *aType);
1263     nsresult GetSelectedIndex(PRInt32 *aSelectedIndex);
1264     nsresult SetSelectedIndex(PRInt32 aSelectedIndex);
1265     nsresult GetValue(nsAString *aValue);
1266     nsresult SetValue(const nsAString *aValue);
1267     nsresult GetLength(PRUint32 *aLength);
1268     nsresult SetLength(PRUint32 aLength);
1269     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1270     nsresult GetOptions(nsIDOMHTMLOptionsCollection **aOptions);
1271     nsresult GetDisabled(PRBool *aDisabled);
1272     nsresult SetDisabled(PRBool aDisabled);
1273     nsresult GetMultiple(PRBool *aMultiple);
1274     nsresult SetMultiple(PRBool aMultiple);
1275     nsresult GetName(nsAString *aName);
1276     nsresult SetName(const nsAString *aName);
1277     nsresult GetSize(PRInt32 *aSize);
1278     nsresult SetSize(PRInt32 aSize);
1279     nsresult GetTabIndex(PRInt32 *aTabIndex);
1280     nsresult SetTabIndex(PRInt32 aTabIndex);
1281     nsresult Add(nsIDOMHTMLElement *element, nsIDOMHTMLElement *before);
1282     nsresult Remove(PRInt32 index);
1283     nsresult Blur();
1284     nsresult Focus();
1285 }
1286
1287 [
1288     object,
1289     uuid(a6cf9094-15b3-11d2-932e-00805f8add32),
1290     local
1291     /* FROZEN */
1292 ]
1293 interface nsIDOMHTMLTextAreaElement : nsIDOMHTMLElement
1294 {
1295     nsresult GetDefaultValue(nsAString *aDefaultValue);
1296     nsresult SetDefaultValue(const nsAString *aDefaultValue);
1297     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1298     nsresult GetAccessKey(nsAString *aAccessKey);
1299     nsresult SetAccessKey(const nsAString *aAccessKey);
1300     nsresult GetCols(PRInt32 *aCols);
1301     nsresult SetCols(PRInt32 aCols);
1302     nsresult GetDisabled(PRBool *aDisabled);
1303     nsresult SetDisabled(PRBool aDisabled);
1304     nsresult GetName(nsAString *aName);
1305     nsresult SetName(const nsAString *aName);
1306     nsresult GetReadOnly(PRBool *aReadOnly);
1307     nsresult SetReadOnly(PRBool aReadOnly);
1308     nsresult GetRows(PRInt32 *aRows);
1309     nsresult SetRows(PRInt32 aRows);
1310     nsresult GetTabIndex(PRInt32 *aTabIndex);
1311     nsresult SetTabIndex(PRInt32 aTabIndex);
1312     nsresult GetType(nsAString *aType);
1313     nsresult GetValue(nsAString *aValue);
1314     nsresult SetValue(const nsAString *aValue);
1315     nsresult Blur();
1316     nsresult Focus();
1317     nsresult Select();
1318 }
1319
1320 [
1321     object,
1322     uuid(a6cf90b1-15b3-11d2-932e-00805f8add32),
1323     local
1324     /* FROZEN */
1325 ]
1326 interface nsIDOMHTMLScriptElement : nsIDOMHTMLElement
1327 {
1328     nsresult GetText(nsAString *aText);
1329     nsresult SetText(const nsAString *aText);
1330     nsresult GetHtmlFor(nsAString *aHtmlFor);
1331     nsresult SetHtmlFor(const nsAString *aHtmlFor);
1332     nsresult GetEvent(nsAString *aEvent);
1333     nsresult SetEvent(const nsAString *aEvent);
1334     nsresult GetCharset(nsAString *aCharset);
1335     nsresult SetCharset(const nsAString *aCharset);
1336     nsresult GetDefer(PRBool *aDefer);
1337     nsresult SetDefer(PRBool aDefer);
1338     nsresult GetSrc(nsAString *aSrc);
1339     nsresult SetSrc(const nsAString *aSrc);
1340     nsresult GetType(nsAString *aType);
1341     nsresult SetType(const nsAString *aType);
1342 }
1343
1344 [
1345     object,
1346     uuid(a6cf90ab-15b3-11d2-932e-00805f8add32),
1347     local
1348     /* FROZEN */
1349 ]
1350 interface nsIDOMHTMLImageElement : nsIDOMHTMLElement
1351 {
1352     nsresult GetName(nsAString *aName);
1353     nsresult SetName(const nsAString *aName);
1354     nsresult GetAlign(nsAString *aAlign);
1355     nsresult SetAlign(const nsAString *aAlign);
1356     nsresult GetAlt(nsAString *aAlt);
1357     nsresult SetAlt(const nsAString *aAlt);
1358     nsresult GetBorder(nsAString *aBorder);
1359     nsresult SetBorder(const nsAString *aBorder);
1360     nsresult GetHeight(PRInt32 *aHeight);
1361     nsresult SetHeight(PRInt32 aHeight);
1362     nsresult GetHspace(PRInt32 *aHspace);
1363     nsresult SetHspace(PRInt32 aHspace);
1364     nsresult GetIsMap(PRBool *aIsMap);
1365     nsresult SetIsMap(PRBool aIsMap);
1366     nsresult GetLongDesc(nsAString *aLongDesc);
1367     nsresult SetLongDesc(const nsAString *aLongDesc);
1368     nsresult GetSrc(nsAString *aSrc);
1369     nsresult SetSrc(const nsAString *aSrc);
1370     nsresult GetUseMap(nsAString *aUseMap);
1371     nsresult SetUseMap(const nsAString *aUseMap);
1372     nsresult GetVspace(PRInt32 *aVspace);
1373     nsresult SetVspace(PRInt32 aVspace);
1374     nsresult GetWidth(PRInt32 *aWidth);
1375     nsresult SetWidth(PRInt32 aWidth);
1376 }
1377
1378 [
1379     object,
1380     uuid(a6cf90aa-15b3-11d2-932e-00805f8add32),
1381     local
1382     /* FROZEN */
1383 ]
1384 interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement
1385 {
1386     nsresult GetAccessKey(nsAString *aAccessKey);
1387     nsresult SetAccessKey(const nsAString *aAccessKey);
1388     nsresult GetCharset(nsAString *aCharset);
1389     nsresult SetCharset(const nsAString *aCharset);
1390     nsresult GetCoords(nsAString *aCoords);
1391     nsresult SetCoords(const nsAString *aCoords);
1392     nsresult GetHref(nsAString *aHref);
1393     nsresult SetHref(const nsAString *aHref);
1394     nsresult GetHreflang(nsAString *aHreflang);
1395     nsresult SetHreflang(const nsAString *aHreflang);
1396     nsresult GetName(nsAString *aName);
1397     nsresult SetName(const nsAString *aName);
1398     nsresult GetRel(nsAString *aRel);
1399     nsresult SetRel(const nsAString *aRel);
1400     nsresult GetRev(nsAString *aRev);
1401     nsresult SetRev(const nsAString *aRev);
1402     nsresult GetShape(nsAString *aShape);
1403     nsresult SetShape(const nsAString *aShape);
1404     nsresult GetTabIndex(PRInt32 *aTabIndex);
1405     nsresult SetTabIndex(PRInt32 aTabIndex);
1406     nsresult GetTarget(nsAString *aTarget);
1407     nsresult SetTarget(const nsAString *aTarget);
1408     nsresult GetType(nsAString *aType);
1409     nsresult SetType(const nsAString *aType);
1410     nsresult Blur();
1411     nsresult Focus();
1412 }
1413
1414 [
1415     object,
1416     uuid(a6cf90b2-15b3-11d2-932e-00805f8add32),
1417     local
1418     /* FROZEN */
1419 ]
1420 interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
1421 {
1422     nsresult GetCaption(nsIDOMHTMLTableCaptionElement **aCaption);
1423     nsresult SetCaption(nsIDOMHTMLTableCaptionElement *aCaption);
1424     nsresult GetTHead(nsIDOMHTMLTableSectionElement **aTHead);
1425     nsresult SetTHead(nsIDOMHTMLTableSectionElement *aTHead);
1426     nsresult GetTFoot(nsIDOMHTMLTableSectionElement **aTFoot);
1427     nsresult SetTFoot(nsIDOMHTMLTableSectionElement *aTFoot);
1428     nsresult GetRows(nsIDOMHTMLCollection **aRows);
1429     nsresult GetTBodies(nsIDOMHTMLCollection **aTBodies);
1430     nsresult GetAlign(nsAString *aAlign);
1431     nsresult SetAlign(const nsAString *aAlign);
1432     nsresult GetBgColor(nsAString *aBgColor);
1433     nsresult SetBgColor(const nsAString *aBgColor);
1434     nsresult GetBorder(nsAString *aBorder);
1435     nsresult SetBorder(const nsAString *aBorder);
1436     nsresult GetCellPadding(nsAString *aCellPadding);
1437     nsresult SetCellPadding(const nsAString *aCellPadding);
1438     nsresult GetCellSpacing(nsAString *aCellSpacing);
1439     nsresult SetCellSpacing(const nsAString *aCellSpacing);
1440     nsresult GetFrame(nsAString *aFrame);
1441     nsresult SetFrame(const nsAString *aFrame);
1442     nsresult GetRules(nsAString *aRules);
1443     nsresult SetRules(const nsAString *aRules);
1444     nsresult GetSummary(nsAString *aSummary);
1445     nsresult SetSummary(const nsAString *aSummary);
1446     nsresult GetWidth(nsAString *aWidth);
1447     nsresult SetWidth(const nsAString *aWidth);
1448     nsresult CreateTHead(nsIDOMHTMLElement **_retval);
1449     nsresult DeleteTHead();
1450     nsresult CreateTFoot(nsIDOMHTMLElement **_retval);
1451     nsresult DeleteTFoot();
1452     nsresult CreateCaption(nsIDOMHTMLElement **_retval);
1453     nsresult DeleteCaption();
1454     nsresult InsertRow(PRInt32 index, nsIDOMHTMLElement **_retval);
1455     nsresult DeleteRow(PRInt32 index);
1456 }
1457
1458 [
1459     object,
1460     uuid(a6cf90b6-15b3-11d2-932e-00805f8add32),
1461     local
1462     /* FROZEN */
1463 ]
1464 interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement
1465 {
1466     nsresult GetRowIndex(PRInt32 *aRowIndex);
1467     nsresult GetSectionRowIndex(PRInt32 *aSectionRowIndex);
1468     nsresult GetCells(nsIDOMHTMLCollection **aCells);
1469     nsresult GetAlign(nsAString *aAlign);
1470     nsresult SetAlign(const nsAString *aAlign);
1471     nsresult GetBgColor(nsAString *aBgColor);
1472     nsresult SetBgColor(const nsAString *aBgColor);
1473     nsresult GetCh(nsAString *aCh);
1474     nsresult SetCh(const nsAString *aCh);
1475     nsresult GetChOff(nsAString *aChOff);
1476     nsresult SetChOff(const nsAString *aChOff);
1477     nsresult GetVAlign(nsAString *aVAlign);
1478     nsresult SetVAlign(const nsAString *aVAlign);
1479     nsresult InsertCell(PRInt32 index, nsIDOMHTMLElement **_retval);
1480     nsresult DeleteCell(PRInt32 index);
1481 }
1482
1483 [
1484     object,
1485     uuid(a6cf90ba-15b3-11d2-932e-00805f8add32),
1486     local
1487     /* FROZEN */
1488 ]
1489 interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement
1490 {
1491     nsresult GetAlign(nsAString *aAlign);
1492     nsresult SetAlign(const nsAString *aAlign);
1493     nsresult GetFrameBorder(nsAString *aFrameBorder);
1494     nsresult SetFrameBorder(const nsAString *aFrameBorder);
1495     nsresult GetHeight(nsAString *aHeight);
1496     nsresult SetHeight(const nsAString *aHeight);
1497     nsresult GetLongDesc(nsAString *aLongDesc);
1498     nsresult SetLongDesc(const nsAString *aLongDesc);
1499     nsresult GetMarginHeight(nsAString *aMarginHeight);
1500     nsresult SetMarginHeight(const nsAString *aMarginHeight);
1501     nsresult GetMarginWidth(nsAString *aMarginWidth);
1502     nsresult SetMarginWidth(const nsAString *aMarginWidth);
1503     nsresult GetName(nsAString *aName);
1504     nsresult SetName(const nsAString *aName);
1505     nsresult GetScrolling(nsAString *aScrolling);
1506     nsresult SetScrolling(const nsAString *aScrolling);
1507     nsresult GetSrc(nsAString *aSrc);
1508     nsresult SetSrc(const nsAString *aSrc);
1509     nsresult GetWidth(nsAString *aWidth);
1510     nsresult SetWidth(const nsAString *aWidth);
1511     nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
1512 }
1513
1514 [
1515     object,
1516     uuid(a6cf90b9-15b3-11d2-932e-00805f8add32),
1517     local
1518     /* FROZEN */
1519 ]
1520 interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement
1521 {
1522     nsresult GetFrameBorder(nsAString *aFrameBorder);
1523     nsresult SetFrameBorder(const nsAString *aFrameBorder);
1524     nsresult GetLongDesc(nsAString *aLongDesc);
1525     nsresult SetLongDesc(const nsAString *aLongDesc);
1526     nsresult GetMarginHeight(nsAString *aMarginHeight);
1527     nsresult SetMarginHeight(const nsAString *aMarginHeight);
1528     nsresult GetMarginWidth(nsAString *aMarginWidth);
1529     nsresult SetMarginWidth(const nsAString *aMarginWidth);
1530     nsresult GetName(nsAString *aName);
1531     nsresult SetName(const nsAString *aName);
1532     nsresult GetNoResize(PRBool *aNoResize);
1533     nsresult SetNoResize(PRBool aNoResize);
1534     nsresult GetScrolling(nsAString *aScrolling);
1535     nsresult SetScrolling(const nsAString *aScrolling);
1536     nsresult GetSrc(nsAString *aSrc);
1537     nsresult SetSrc(const nsAString *aSrc);
1538     nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
1539 }
1540
1541 [
1542     object,
1543     uuid(94928ab3-8b63-11d3-989d-001083010e9b),
1544     local
1545     /* FROZEN */
1546 ]
1547 interface nsIURIContentListener : nsISupports
1548 {
1549     nsresult OnStartURIOpen(nsIURI *aURI, PRBool *_retval);
1550     nsresult DoContent(const char *aContentType, PRBool aIsContentPreferred, nsIRequest *aRequest,
1551         nsIStreamListener **aContentHandler, PRBool *_retval);
1552     nsresult IsPreferred(const char *aContentType, char **aDesiredContentType, PRBool *_retval);
1553     nsresult CanHandleContent(const char *aContentType, PRBool aIsContentPreferred,
1554         char **aDesiredContentType, PRBool *_retval);
1555     nsresult GetLoadCookie(nsISupports **aLoadCookie);
1556     nsresult SetLoadCookie(nsISupports *aLoadCookie);
1557     nsresult GetParentContentListener(nsIURIContentListener **aParentContentListener);
1558     nsresult SetParentContentListener(nsIURIContentListener *aParentContentListener);
1559 }
1560
1561 [
1562     object,
1563     uuid(44b78386-1dd2-11b2-9ad2-e4eee2ca1916),
1564     local
1565     /* FROZEN */
1566 ]
1567 interface nsITooltipListener : nsISupports
1568 {
1569     nsresult OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText);
1570     nsresult OnHideTooltip();
1571 }
1572
1573 [
1574     object,
1575     uuid(69e5df00-7b8b-11d3-af61-00a024ffc08c),
1576     local
1577     /* FROZEN */
1578 ]
1579 interface nsIWebBrowser : nsISupports
1580 {
1581     nsresult AddWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
1582     nsresult RemoveWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
1583     nsresult GetContainerWindow(nsIWebBrowserChrome **aContainerWindow);
1584     nsresult SetContainerWindow(nsIWebBrowserChrome *aContainerWindow);
1585     nsresult GetParentURIContentListener(nsIURIContentListener **aParentURIContentListener);
1586     nsresult SetParentURIContentListener(nsIURIContentListener *aParentURIContentListener);
1587     nsresult GetContentDOMWindow(nsIDOMWindow **aContentDOMWindow);
1588 }
1589
1590 cpp_quote("#define SETUP_ALLOW_JAVASCRIPT  2")
1591 cpp_quote("#define SETUP_IS_CHROME_WRAPPER 7")
1592
1593 [
1594     object,
1595     uuid(f15398a0-8018-11d3-af70-00a024ffc08c),
1596     local
1597     /* FROZEN */
1598 ]
1599 interface nsIWebBrowserSetup : nsISupports
1600 {
1601     nsresult SetProperty(PRUint32 aId, PRUint32 aValue);
1602 }
1603
1604 typedef void* nativeWindow;
1605
1606 [
1607     object,
1608     uuid(046bc8a0-8015-11d3-af70-00a024ffc08c),
1609     local
1610     /* NOT_FROZEN */
1611 ]
1612 interface nsIBaseWindow : nsISupports
1613 {
1614     nsresult InitWindow(nativeWindow parentNativeWindow, nsIWidget *parentWidget, PRInt32 x,
1615             PRInt32 y, PRInt32 cx, PRInt32 cy);
1616     nsresult Create();
1617     nsresult Destroy();
1618     nsresult SetPosition(PRInt32 x, PRInt32 y);
1619     nsresult GetPosition(PRInt32 *x, PRInt32 *y);
1620     nsresult SetSize(PRInt32 cx, PRInt32 cy, PRBool fRepaint);
1621     nsresult GetSize(PRInt32 *cx, PRInt32 *cy);
1622     nsresult SetPositionAndSize(PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy, PRBool fRepaint);
1623     nsresult GetPositionAndSize(PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy);
1624     nsresult Repaint(PRBool force);
1625     nsresult GetParentWidget(nsIWidget **aParentWidget); 
1626     nsresult SetParentWidget(nsIWidget *aParentWidget);
1627     nsresult GetParentNativeWindow(nativeWindow *aParentNativeWindow);
1628     nsresult SetParentNativeWindow(nativeWindow aParentNativeWindow);
1629     nsresult GetVisibility(PRBool *aVisibility);
1630     nsresult SetVisibility(PRBool aVisibility);
1631     nsresult GetEnabled(PRBool *aEnabled);
1632     nsresult SetEnabled(PRBool aEnabled);
1633     nsresult GetBlurSuppression(PRBool *aBlurSuppression);
1634     nsresult SetBlurSuppression(PRBool aBlurSuppression);
1635     nsresult GetMainWidget(nsIWidget **aMainWidget);
1636     nsresult SetFocus();
1637     nsresult GetTitle(PRUnichar **aTitle);
1638     nsresult SetTitle(const PRUnichar *aTitle);
1639 }
1640
1641 cpp_quote("#define LOAD_FLAGS_NONE 0")
1642
1643 [
1644     object,
1645     uuid(f5d9e7b0-d930-11d3-b057-00a024ffc08c),
1646     local
1647     /* NOT_FROZEN */
1648 ]
1649 interface nsIWebNavigation : nsISupports
1650 {
1651     nsresult GetCanGoBack(PRBool *aCanGoBack);
1652     nsresult GetCanGoForward(PRBool *aCanGoForward);
1653     nsresult GoBack();
1654     nsresult GoForward();
1655     nsresult GotoIndex(PRInt32 index);
1656     nsresult LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer,
1657             nsIInputStream *aPostData, nsIInputStream *aHeaders);
1658     nsresult Reload(PRUint32 aReloadFlags);
1659     nsresult Stop(PRUint32 aStopFlags);
1660     nsresult GetDocument(nsIDOMDocument **aDocument);
1661     nsresult GetCurrentURI(nsIURI **aCurrentURI);
1662     nsresult GetReferringURI(nsIURI **aReferringURI);
1663     nsresult GetSessionHistory(nsISHistory **aSessionHistory);
1664     nsresult SetSessionHistory(nsISHistory *aSessionHistory);
1665 }
1666
1667 [
1668     object,
1669     uuid(570f39d0-efd0-11d3-b093-00a024ffc08c),
1670     local
1671     /* FROZEN */
1672 ]
1673 interface nsIWebProgress : nsISupports
1674 {
1675     nsresult AddProgressListener(nsIWebProgressListener *aListener, PRUint32 aNotifyMask);
1676     nsresult RemoveProgressListener(nsIWebProgressListener *aListener);
1677     nsresult GetDOMWindow(nsIDOMWindow **aDOMWindow);
1678     nsresult GetIsLoadingDocument(PRBool *aIsLoadingDocument);
1679 }
1680
1681 [
1682     object,
1683     uuid(343700dd-078b-42b6-a809-b9c1d7e951d0),
1684     local
1685     /* NOT_FROZEN */
1686 ]
1687 interface nsIPrintSettings : nsISupports
1688 {
1689     typedef struct { char dummy; } nsIntMargin;
1690
1691     nsresult SetPrintOptions(PRInt32 aType, PRBool aTurnOnOff);
1692     nsresult GetPrintOptions(PRInt32 aType, PRBool *_retval);
1693     nsresult GetPrintOptionsBits(PRInt32 *_retval);
1694     nsresult GetEffectivePageSize(double *aWidth, double *aHeight);
1695     nsresult Clone(nsIPrintSettings **_retval);
1696     nsresult Assign(nsIPrintSettings *aPS);
1697     nsresult GetPrintSession(nsIPrintSession **aPrintSession);
1698     nsresult SetPrintSession(nsIPrintSession *aPrintSession);
1699     nsresult GetStartPageRange(PRInt32 *aStartPageRange);
1700     nsresult SetStartPageRange(PRInt32 aStartPageRange);
1701     nsresult GetEndPageRange(PRInt32 *aEndPageRange);
1702     nsresult SetEndPageRange(PRInt32 aEndPageRange);
1703     nsresult GetEdgeTop(double *aEdgeTop);
1704     nsresult SetEdgeTop(double aEdgeTop);
1705     nsresult GetEdgeLeft(double *aEdgeLeft);
1706     nsresult SetEdgeLeft(double aEdgeLeft);
1707     nsresult GetEdgeBottom(double *aEdgeBottom);
1708     nsresult SetEdgeBottom(double aEdgeBottom);
1709     nsresult GetEdgeRight(double *aEdgeRight);
1710     nsresult SetEdgeRight(double aEdgeRight);
1711     nsresult GetMarginTop(double *aMarginTop);
1712     nsresult SetMarginTop(double aMarginTop);
1713     nsresult GetMarginLeft(double *aMarginLeft);
1714     nsresult SetMarginLeft(double aMarginLeft);
1715     nsresult GetMarginBottom(double *aMarginBottom);
1716     nsresult SetMarginBottom(double aMarginBottom);
1717     nsresult GetMarginRight(double *aMarginRight);
1718     nsresult SetMarginRight(double aMarginRight);
1719     nsresult GetUnwriteableMarginTop(double *aUnwriteableMarginTop);
1720     nsresult SetUnwriteableMarginTop(double aUnwriteableMarginTop);
1721     nsresult GetUnwriteableMarginLeft(double *aUnwriteableMarginLeft);
1722     nsresult SetUnwriteableMarginLeft(double aUnwriteableMarginLeft);
1723     nsresult GetUnwriteableMarginBottom(double *aUnwriteableMarginBottom);
1724     nsresult SetUnwriteableMarginBottom(double aUnwriteableMarginBottom);
1725     nsresult GetUnwriteableMarginRight(double *aUnwriteableMarginRight);
1726     nsresult SetUnwriteableMarginRight(double aUnwriteableMarginRight);
1727     nsresult GetScaling(double *aScaling);
1728     nsresult SetScaling(double aScaling);
1729     nsresult GetPrintBGColors(PRBool *aPrintBGColors);
1730     nsresult SetPrintBGColors(PRBool aPrintBGColors);
1731     nsresult GetPrintBGImages(PRBool *aPrintBGImages);
1732     nsresult SetPrintBGImages(PRBool aPrintBGImages);
1733     nsresult GetPrintRange(PRInt16 *aPrintRange);
1734     nsresult SetPrintRange(PRInt16 aPrintRange);
1735     nsresult GetTitle(PRUnichar **aTitle);
1736     nsresult SetTitle(const PRUnichar *aTitle);
1737     nsresult GetDocURL(PRUnichar **aDocURL);
1738     nsresult SetDocURL(const PRUnichar *aDocURL);
1739     nsresult GetHeaderStrLeft(PRUnichar **aHeaderStrLeft);
1740     nsresult SetHeaderStrLeft(const PRUnichar *aHeaderStrLeft);
1741     nsresult GetHeaderStrCenter(PRUnichar **aHeaderStrCenter);
1742     nsresult SetHeaderStrCenter(const PRUnichar *aHeaderStrCenter);
1743     nsresult GetHeaderStrRight(PRUnichar **aHeaderStrRight);
1744     nsresult SetHeaderStrRight(const PRUnichar *aHeaderStrRight);
1745     nsresult GetFooterStrLeft(PRUnichar **aFooterStrLeft);
1746     nsresult SetFooterStrLeft(const PRUnichar *aFooterStrLeft);
1747     nsresult GetFooterStrCenter(PRUnichar **aFooterStrCenter);
1748     nsresult SetFooterStrCenter(const PRUnichar *aFooterStrCenter);
1749     nsresult GetFooterStrRight(PRUnichar **aFooterStrRight);
1750     nsresult SetFooterStrRight(const PRUnichar *aFooterStrRight);
1751     nsresult GetHowToEnableFrameUI(PRInt16 *aHowToEnableFrameUI);
1752     nsresult SetHowToEnableFrameUI(PRInt16 aHowToEnableFrameUI);
1753     nsresult GetIsCancelled(PRBool *aIsCancelled);
1754     nsresult SetIsCancelled(PRBool aIsCancelled);
1755     nsresult GetPrintFrameTypeUsage(PRInt16 *aPrintFrameTypeUsage);
1756     nsresult SetPrintFrameTypeUsage(PRInt16 aPrintFrameTypeUsage);
1757     nsresult GetPrintFrameType(PRInt16 *aPrintFrameType);
1758     nsresult SetPrintFrameType(PRInt16 aPrintFrameType);
1759     nsresult GetPrintSilent(PRBool *aPrintSilent);
1760     nsresult SetPrintSilent(PRBool aPrintSilent);
1761     nsresult GetShrinkToFit(PRBool *aShrinkToFit);
1762     nsresult SetShrinkToFit(PRBool aShrinkToFit);
1763     nsresult GetShowPrintProgress(PRBool *aShowPrintProgress);
1764     nsresult SetShowPrintProgress(PRBool aShowPrintProgress);
1765     nsresult GetPaperName(PRUnichar **aPaperName);
1766     nsresult SetPaperName(const PRUnichar *aPaperName);
1767     nsresult GetPaperSizeType(PRInt16 *aPaperSizeType);
1768     nsresult SetPaperSizeType(PRInt16 aPaperSizeType);
1769     nsresult GetPaperData(PRInt16 *aPaperData);
1770     nsresult SetPaperData(PRInt16 aPaperData);
1771     nsresult GetPaperWidth(double *aPaperWidth);
1772     nsresult SetPaperWidth(double aPaperWidth);
1773     nsresult GetPaperHeight(double *aPaperHeight);
1774     nsresult SetPaperHeight(double aPaperHeight);
1775     nsresult GetPaperSizeUnit(PRInt16 *aPaperSizeUnit);
1776     nsresult SetPaperSizeUnit(PRInt16 aPaperSizeUnit);
1777     nsresult GetPlexName(PRUnichar **aPlexName);
1778     nsresult SetPlexName(const PRUnichar *aPlexName);
1779     nsresult GetColorspace(PRUnichar **aColorspace);
1780     nsresult SetColorspace(const PRUnichar *aColorspace);
1781     nsresult GetResolutionName(PRUnichar **aResolutionName);
1782     nsresult SetResolutionName(const PRUnichar aResolutionName);
1783     nsresult GetDownloadFonts(PRBool *aDownloadFonts);
1784     nsresult SetDownloadFonts(PRBool aDownloadFonts);
1785     nsresult GetPrintReversed(PRBool *aPrintReversed);
1786     nsresult SetPrintReversed(PRBool aPrintReversed);
1787     nsresult GetPrintInColor(PRBool *aPrintInColor);
1788     nsresult SetPrintInColor(PRBool aPrintInColor);
1789     nsresult GetOrientation(PRInt32 *aOrientation);
1790     nsresult SetOrientation(PRInt32 aOrientation);
1791     nsresult GetPrintCommand(PRUnichar **aPrintCommand);
1792     nsresult SetPrintCommand(const PRUnichar *aPrintCommand);
1793     nsresult GetNumCopies(PRInt32 *aNumCopies);
1794     nsresult SetNumCopies(PRInt32 aNumCopies);
1795     nsresult GetPrinterName(PRUnichar **aPrinterName);
1796     nsresult SetPrinterName(const PRUnichar *aPrinterName);
1797     nsresult GetPrintToFile(PRBool *aPrintToFile);
1798     nsresult SetPrintToFile(PRBool aPrintToFile);
1799     nsresult GetToFileName(PRUnichar **aToFileName);
1800     nsresult SetToFileName(const PRUnichar *aToFileName);
1801     nsresult GetOutputFormat(PRInt16 *aOutputFormat);
1802     nsresult SetOutputFormat(PRInt16 aOutputFormat);
1803     nsresult GetPrintPageDelay(PRInt32 *aPrintPageDelay);
1804     nsresult SetPrintPageDelay(PRInt32 aPrintPageDelay);
1805     nsresult GetIsInitializedFromPrinter(PRBool *aIsInitializedFromPrinter);
1806     nsresult SetIsInitializedFromPrinter(PRBool aIsInitializedFromPrinter);
1807     nsresult GetIsInitializedFromPrefs(PRBool *aIsInitializedFromPrefs);
1808     nsresult SetIsInitializedFromPrefs(PRBool aIsInitializedFromPrefs);
1809     nsresult SetMarginInTwips(nsIntMargin *aMargin);
1810     nsresult SetEdgeInTwips(nsIntMargin *aEdge);
1811     nsresult GetMarginInTwips(nsIntMargin *aMargin);
1812     nsresult GetEdgeInTwips(nsIntMargin *aEdge);
1813     nsresult SetupSilentPrinting();
1814     nsresult SetUnwriteableMarginInTwips(nsIntMargin *aEdge);
1815     nsresult GetUnwriteableMarginInTwips(nsIntMargin *aEdge);
1816 }
1817
1818 [
1819     object,
1820     uuid(9a7ca4b0-fbba-11d4-a869-00105a183419),
1821     local
1822     /* FROZEN */
1823 ]
1824 interface nsIWebBrowserPrint : nsISupports
1825 {
1826     nsresult GetGlobalPrintSettings(nsIPrintSettings **aGlobalPrintSettings);
1827     nsresult GetCurrentPrintSettings(nsIPrintSettings **aCurrentPrintSettings);
1828     nsresult GetCurrentChildDOMWindow(nsIDOMWindow **aCurrentChildDOMWindow);
1829     nsresult GetDoingPrint(PRBool *aDoingPrint);
1830     nsresult GetDoingPrintPreview(PRBool *aDoingPrintPreview);
1831     nsresult GetIsFramesetDocument(PRBool *aIsFramesetDocument);
1832     nsresult GetIsFramesetFrameSelected(PRBool *aIsFramesetFrameSelected);
1833     nsresult GetIsIFrameSelected(PRBool *aIsIFrameSelected);
1834     nsresult GetIsRangeSelection(PRBool *aIsRangeSelection);
1835     nsresult GetPrintPreviewNumPages(PRInt32 *aPrintPreviewNumPages);
1836     nsresult Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener);
1837     nsresult PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin,
1838                           nsIWebProgressListener *aWPListener);
1839     nsresult PrintPreviewNavigate(PRInt16 aNavType, PRInt32 aPageNum);
1840     nsresult Cancel();
1841     nsresult EnumerateDocumentNames(PRUint32 *aCount, PRUnichar ***aResult);
1842     nsresult ExitPrintPreview();
1843 }
1844
1845 [
1846     object,
1847     uuid(919e792a-6490-40b8-bba5-f9e9ad5640c8),
1848     local
1849     /* NOT_FROZEN */
1850 ]
1851 interface nsIScrollable : nsISupports
1852 {
1853     enum {
1854         ScrollOrientation_X = 1,
1855         ScrollOrientation_Y = 2
1856     };
1857
1858     enum {
1859         Scrollbar_Auto   = 1,
1860         Scrollbar_Never  = 2,
1861         Scrollbar_Always = 3
1862     };
1863
1864     nsresult GetCurScrollPos(PRInt32 scrollOrientation, PRInt32 *curPos);
1865     nsresult SetCurScrollPos(PRInt32 scrollOrientation, PRInt32 curPos);
1866     nsresult SetCurScrollPosEx(PRInt32 curHorizontalPos, PRInt32 curVerticalPos);
1867     nsresult GetScrollRange(PRInt32 scrollOrientation, PRInt32 *minPos, PRInt32 *maxPos);
1868     nsresult SetScrollRange(PRInt32 scrollOrientation, PRInt32 minPos, PRInt32 maxPos);
1869     nsresult SetScrollRangeEx(PRInt32 minHorizontalPos, PRInt32 maxHorizontalPos,
1870             PRInt32 minVerticalPos, PRInt32 maxVerticalPos);
1871     nsresult GetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 *scrollbarPref);
1872     nsresult SetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 scrollbarPref);
1873     nsresult GetScrollbarVisibility(PRBool *verticalVisible, PRBool *horizontalVisible);
1874 }
1875
1876 [
1877     object,
1878     uuid(c8c0a080-0868-11d3-915f-d9d889d48e3c),
1879     local
1880     /* FROZEN */
1881 ]
1882 interface nsIFile : nsISupports
1883 {
1884     nsresult Append(const nsAString *node);
1885     nsresult AppendNative(const nsAString *node);
1886     nsresult Normalize();
1887     nsresult Create(PRUint32 type, PRUint32 permission);
1888     nsresult GetLeafName(nsAString *aLeafName);
1889     nsresult SetLeafName(const nsAString *aLeafName);
1890     nsresult GetNativeLeafName(nsAString *aLeafName);
1891     nsresult SetNativeLeafName(const nsAString *aLeafName);
1892     nsresult CopyTo(nsIFile *newParentDir, const nsAString *newName);
1893     nsresult CopyToNative(nsIFile *newParentDir, const nsAString *newName);
1894     nsresult CopyToFollowingLinks(nsIFile *newParentDir, const nsAString *newName);
1895     nsresult CopyToFollowingLinksNative(nsIFile *newParentDir, const nsAString *newName);
1896     nsresult MoveTo(nsIFile *newParentDir, const nsAString *newName);
1897     nsresult MoveToNative(nsIFile *newParentDir, const nsAString *newName);
1898     nsresult Remove(PRBool recursive);
1899     nsresult GetPermissions(PRUint32 *aPermissions);
1900     nsresult SetPermissions(PRUint32 pPermissions);
1901     nsresult GetPermissionsOfLink(PRUint32 *aPermissions);
1902     nsresult SetPermissionsOfLink(PRUint32 pPermissions);
1903     nsresult GetLastModifiedTime(PRInt64 *aLastModifiedTime);
1904     nsresult SetLastModifiedTime(PRInt64 aLastModifiedTime);
1905     nsresult GetFileSize(PRInt64 *aFileSize);
1906     nsresult SetFileSize(PRInt64 aFileSize);
1907     nsresult GetFileSizeOfLink(PRInt64 *aFileSizeOfLink);
1908     nsresult GetTarget(nsAString *aTarget);
1909     nsresult GetNativeTarget(nsACString *aNativeTarget);
1910     nsresult GetPath(nsAString *aPath);
1911     nsresult GetNativePath(nsACString *aNativePath);
1912     nsresult Exists(PRBool *_retval);
1913     nsresult IsWritable(PRBool *_retval);
1914     nsresult IsReadable(PRBool *_retval);
1915     nsresult IsExecutable(PRBool *_retval);
1916     nsresult IsHidden(PRBool *_retval);
1917     nsresult IsDirectory(PRBool *_retval);
1918     nsresult IsFile(PRBool *_retval);
1919     nsresult IsSymlink(PRBool *_retval);
1920     nsresult IsSpecial(PRBool *_retval);
1921     nsresult CreateUnique(PRUint32 type, PRUint32 permission);
1922     nsresult Clone(nsIFile **_retval);
1923     nsresult Equals(nsIFile *inFile, PRBool *_retval);
1924     nsresult Contains(nsIFile *inFile, PRBool recir, PRBool *_retval);
1925     nsresult GetParent(nsIFile **aParent);
1926     nsresult GetDirectoryEntries(nsISimpleEnumerator **aDirectoryEntries);
1927 }
1928
1929 [
1930     object,
1931     uuid(56c35506-f14b-11d3-99d3-ddbfac2ccf65),
1932     local
1933     /* FROZEN */
1934 ]
1935 interface nsIPrefBranch : nsISupports
1936 {
1937     nsresult GetRoot(char **aRoot);
1938     nsresult GetPrefType(const char *aPrefName, PRInt32 *_retval);
1939     nsresult GetBoolPref(const char *aPrefName, PRBool *_retval);
1940     nsresult SetBoolPref(const char *aPrefName, PRInt32 aValue);
1941     nsresult GetCharPref(const char *aPrefName, char **_retval);
1942     nsresult SetCharPref(const char *aPrefName, const char *aValue);
1943     nsresult GetIntPref(const char *aPrefName, PRInt32 *_retval);
1944     nsresult SetIntPref(const char *aPrefName, PRInt32 aValue);
1945     nsresult GetComplexValue(const char *aPrefName, const nsIID *aType, void **aValue);
1946     nsresult SetComplexValue(const char *aPrefName, const nsIID *aType, nsISupports *aValue);
1947     nsresult ClearUserPref(const char *aPrefName);
1948     nsresult LockPref(const char *aPrefName);
1949     nsresult PrefHasUserValue(const char *aPrefName, PRBool *_retval);
1950     nsresult PrefIsLocked(const char *aPrefName, PRBool *_retval);
1951     nsresult UnlockPref(const char *aPrefName);
1952     nsresult DeleteBranch(const char *aStartingAt);
1953     nsresult GetChildList(const char *aStartingAt, PRUint32 *aCount, char ***aChildArray);
1954     nsresult ResetBranch(const char *aStartingAt);
1955 }
1956
1957 [
1958     object,
1959     uuid(15fd6940-8ea7-11d3-93ad-00104ba0fd40),
1960     local
1961     /* FROZEN */
1962 ]
1963 interface nsIProtocolHandler : nsISupports
1964 {
1965     nsresult GetScheme(nsACString *aScheme);
1966     nsresult GetDefaultPort(PRInt32 *aDefaultPort);
1967     nsresult GetProtocolFlags(PRUint32 *aProtocolFlags);
1968     nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset,
1969                     nsIURI *aBaseURI, nsIURI **_retval);
1970     nsresult NewChannel(nsIURI *aURI, nsIChannel **_retval);
1971     nsresult AllowPort(PRInt32 port, const char *scheme, PRBool *_retval);
1972 }
1973
1974 [
1975     object,
1976     uuid(0e61f3b2-34d7-4c79-bfdc-4860bc7341b7),
1977     local
1978     /* NOT_FROZEN */
1979 ]
1980 interface nsIExternalProtocolHandler : nsIProtocolHandler
1981 {
1982     nsresult ExternalAppExistsForScheme(const nsACString *scheme, PRBool *_retval);
1983 }
1984
1985 [
1986     object,
1987     uuid(bddeda3f-9020-4d12-8c70-984ee9f7935e),
1988     local
1989     /* FROZEN */
1990 ]
1991 interface nsIIOService : nsISupports
1992 {
1993     nsresult GetProtocolHandler(const char *aScheme, nsIProtocolHandler **_retval);
1994     nsresult GetProtocolFlags(const char *aScheme, PRUint32 *_retval);
1995     nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
1996                     nsIURI **_retval);
1997     nsresult NewFileURI(nsIFile *aFile, nsIURI **_retval);
1998     nsresult NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval);
1999     nsresult NewChannel(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
2000                         nsIChannel **_retval);
2001     nsresult GetOffline(PRBool *aOffline);
2002     nsresult SetOffline(PRBool aOffline);
2003     nsresult AllowPort(PRInt32 aPort, const char *aScheme, PRBool *_retval);
2004     nsresult ExtractScheme(const nsACString *urlString, nsACString * _retval);
2005 }
2006
2007 [
2008     object,
2009     uuid(a50d5516-5c0a-4f08-b427-703ca0c44ac3),
2010     local,
2011     /* NOT_FROZEN */
2012 ]
2013 interface nsINetUtil : nsISupports
2014 {
2015     nsresult ParseContentType(const nsACString *aTypeHeader, nsACString *aCharset,
2016             PRBool *aHadCharset, nsACString *_retval);
2017     nsresult ProtocolHasFlags(nsIURI *aURI, PRUint32 aFlag, PRBool *_retval);
2018     nsresult URIChainHasFlags(nsIURI *aURI, PRUint32 aFlags, PRBool *_retval);
2019     nsresult ToImmutableURI(nsIURI *aURI, nsIURI **_retval);
2020     nsresult EscapeString(const nsACString *aString, PRUint32 aEscapeType, nsACString *_retval);
2021     nsresult EscapeURL(const nsACString *aStr, PRUint32 aFlags, nsACString *_retval);
2022     nsresult UnescapeString(const nsACString *aStr, PRUint32 aFlags, nsACString *_retval);
2023     nsresult ExtractCharsetFromContentType(const nsACString *aTypeHeader, nsACString *aCharset,
2024             PRInt32 *aCharsetStart, PRInt32 *aCharsetEnd, PRBool *_retval);
2025 }
2026
2027 [
2028     object,
2029     uuid(9c5d3c58-1dd1-11b2-a1c9-f3699284657a),
2030     local
2031     /* FROZEN */
2032 ]
2033 interface nsIWebBrowserFocus : nsISupports
2034 {
2035     nsresult Activate();
2036     nsresult Deactivate();
2037     nsresult SetFocusAtFirstElement();
2038     nsresult SetFocusAtLastElement();
2039     nsresult GetFocusedWindow(nsIDOMWindow **aFocusedWindow);
2040     nsresult SetFocusedWindow(nsIDOMWindow *aFocusedWindow);
2041     nsresult GetFocusedElement(nsIDOMElement **aFocusedElement);
2042     nsresult SetFocusedElement(nsIDOMElement *aFocusedElement);
2043 }
2044
2045 [
2046     object,
2047     uuid(ba434c60-9d52-11d3-afb0-00a024ffc08c),
2048     local
2049     /* FROZEN */
2050 ]
2051 interface nsIWebBrowserChrome : nsISupports
2052 {
2053     nsresult SetStatus(PRUint32 statusType, const PRUnichar *status);
2054     nsresult GetWebBrowser(nsIWebBrowser **aWebBrowser);
2055     nsresult SetWebBrowser(nsIWebBrowser *aWebBrowser);
2056     nsresult GetChromeFlags(PRUint32 *aChromeFlags);
2057     nsresult SetChromeFlags(PRUint32 aChromeFlags);
2058     nsresult DestroyBrowserWindow();
2059     nsresult SizeBrowserTo(PRInt32 aCX, PRInt32 aCY);
2060     nsresult ShowAsModal();
2061     nsresult IsWindowModal(PRBool *_retval);
2062     nsresult ExitModalEventLoop(nsresult aStatus);
2063 }
2064
2065 [
2066     object,
2067     uuid(df31c120-ded6-11d1-bd85-00805f8ae3f4),
2068     local
2069     /* FROZEN */
2070 ]
2071 interface nsIDOMEventListener : nsISupports
2072 {
2073     nsresult HandleEvent(nsIDOMEvent *event);
2074 }
2075
2076 [
2077     object,
2078     uuid(1c773b30-d1cf-11d2-bd95-00805f8ae3f4),
2079     local
2080     /* FROZEN */
2081 ]
2082 interface nsIDOMEventTarget : nsISupports
2083 {
2084     nsresult AddEventListener(const nsAString *type, nsIDOMEventListener *listener, PRBool useCapture);
2085     nsresult RemoveEventListener(const nsAString *type, nsIDOMEventListener *listener, PRBool useCapture);
2086     nsresult DispatchEvent(nsIDOMEvent *evt, PRBool *_retval);
2087 }
2088
2089 [
2090     object,
2091     uuid(a66b7b80-ff46-bd97-0080-5f8ae38add32),
2092     local
2093     /* FROZEN */
2094 ]
2095 interface nsIDOMEvent : nsISupports
2096 {
2097     nsresult GetType(nsAString *aType);
2098     nsresult GetTarget(nsIDOMEventTarget **aTarget);
2099     nsresult GetCurrentTarget(nsIDOMEventTarget **aCurrentTarget);
2100     nsresult GetEventPhase(PRUint16 *aEventPhase);
2101     nsresult GetBubbles(PRBool *aBubbles);
2102     nsresult GetCancelable(PRBool *aCancelable);
2103     nsresult GetTimeStamp(DOMTimeStamp *aTimeStamp);
2104     nsresult StopPropagation();
2105     nsresult PreventDefault();
2106     nsresult InitEvent(const nsAString *eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg);
2107 }
2108
2109 cpp_quote("#define CONTEXT_NONE              0x00")
2110 cpp_quote("#define CONTEXT_LINK              0x01")
2111 cpp_quote("#define CONTEXT_IMAGE             0x02")
2112 cpp_quote("#define CONTEXT_DOCUMENT          0x04")
2113 cpp_quote("#define CONTEXT_TEXT              0x08")
2114 cpp_quote("#define CONTEXT_INPUT             0x10")
2115 cpp_quote("#define CONTEXT_BACKGROUND_IMAGE  0x20")
2116
2117 [
2118     object,
2119     uuid(3478b6b0-3875-11d4-94ef-0020183bf181),
2120     local
2121     /* FROZEN */
2122 ]
2123 interface nsIContextMenuListener : nsISupports
2124 {
2125     nsresult OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode);
2126 }
2127
2128 [
2129     object,
2130     uuid(a6cf90c3-15b3-11d2-932e-00805f8add32),
2131     local
2132     /* FROZEN */
2133 ]
2134 interface nsIDOMUIEvent : nsIDOMEvent
2135 {
2136     nsresult GetView(nsIDOMAbstractView **aView);
2137     nsresult GetDetail(PRInt32 *aDetail);
2138     nsresult InitUIEvent(const nsAString *typeArg, PRBool canBubbleArg, PRBool cancelableArg,
2139             nsIDOMAbstractView *viewArg, PRInt32 detailArg);
2140 }
2141
2142 [
2143     object,
2144     uuid(ff751edc-8b02-aae7-0010-8301838a3123),
2145     local
2146     /* FROZEN */
2147 ]
2148 interface nsIDOMMouseEvent : nsIDOMUIEvent
2149 {
2150     nsresult GetScreenX(PRInt32 *aScreenX);
2151     nsresult GetScreenY(PRInt32 *aScreenY);
2152     nsresult GetClientX(PRInt32 *aClientX);
2153     nsresult GetClientY(PRInt32 *aClientY);
2154     nsresult GetCtrlKey(PRBool *aCtrlKey);
2155     nsresult GetShiftKey(PRBool *aShiftKey);
2156     nsresult GetAltKey(PRBool *aAltKey);
2157     nsresult GetMetaKey(PRBool *aMetaKey);
2158     nsresult GetButton(PRUint16 *aButton);
2159     nsresult GetRelatedTarget(nsIDOMEventTarget * *aRelatedTarget);
2160     nsresult InitMouseEvent(const nsAString *typeArg, PRBool canBubbleArg, PRBool cancelableArg,
2161             nsIDOMAbstractView *viewArg, PRInt32 detailArg, PRInt32 screenXArg, PRInt32 screenYArg,
2162             PRInt32 clientXArg, PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg,
2163             PRBool shiftKeyArg, PRBool metaKeyArg, PRUint16 buttonArg,
2164             nsIDOMEventTarget *relatedTargetArg);
2165 }
2166
2167 [
2168     object,
2169     uuid(028e0e6e-8b01-11d3-aae7-0010838a3123),
2170     local
2171     /* NOT_FROZEN */
2172 ]
2173 interface nsIDOMKeyEvent : nsIDOMUIEvent
2174 {
2175     nsresult GetCharCode(PRUint32 *aCharCode);
2176     nsresult GetKeyCode(PRUint32 *aKeyCode);
2177     nsresult GetAltKey(PRBool *aAltKey);
2178     nsresult GetCtrlKey(PRBool *aCtrlKey);
2179     nsresult GetShiftKey(PRBool *aShiftKey);
2180     nsresult GetMetaKey(PRBool *aMetaKey);
2181     nsresult InitKeyEvent(const nsAString *typeArg, PRBool canBubbleArg,
2182             PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRBool ctrlKeyArg,
2183             PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint32 keyCodeArg,
2184             PRUint32 charCodeArg);
2185 }
2186
2187 [
2188     object,
2189     uuid(3e5432cd-9568-4bd1-8cbe-d50aba110743),
2190     local
2191     /* FROZEN */
2192 ]
2193 interface nsIEmbeddingSiteWindow : nsISupports
2194 {
2195     nsresult SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy);
2196     nsresult GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy);
2197     nsresult SetFocus();
2198     nsresult GetVisibility(PRBool *aVisibility);
2199     nsresult SetVisibility(PRBool aVisibility);
2200     nsresult GetTitle(PRUnichar **aTitle);
2201     nsresult SetTitle(const PRUnichar *aTitle);
2202     nsresult GetSiteWindow(void **aSiteWindow);
2203 }
2204
2205 [
2206     object,
2207     uuid(2417cbfe-65ad-48a6-b4b6-eb84db174392),
2208     local
2209     /* FROZEN */
2210 ]
2211 interface nsIComponentRegistrar : nsISupports
2212 {
2213     nsresult AutoRegister(nsIFile *aSpec);
2214     nsresult AutoUnregister(nsIFile *aSpec);
2215     nsresult RegisterFactory(const nsCID *aClass, const char *aClassName,
2216             const char *aContractID, nsIFactory *aFactory);
2217     nsresult UnregisterFactory(const nsCID *aClass, nsIFactory *aFactory);
2218     nsresult RegisterFactoryLocation(const nsCID *aClass, const char *aClassName,
2219             const char *aContractID, nsIFile *aFile, const char *aLoaderStr,
2220             const char *aType);
2221     nsresult UnregisterFactoryLocation(const nsCID *aClass, nsIFile *aFile);
2222     nsresult IsCIDRegistered(const nsCID *aClass, PRBool *_retval);
2223     nsresult IsContractIDRegistered(const char *aContractID, PRBool *_retval);
2224     nsresult EnumerateCIDs(nsISimpleEnumerator **_retval);
2225     nsresult EnumerateContractIDs(nsISimpleEnumerator **_retval);
2226     nsresult CIDToContractID(const nsCID *aClass, char **_retval);
2227     nsresult ContractIDToCID(const char *aContractID, nsCID **_retval);
2228 }
2229
2230 [
2231     object,
2232     uuid(1630c61a-325e-49ca-8759-a31b16c47aa5),
2233     local
2234     /* FROZEN */
2235 ]
2236 interface nsIPromptService : nsISupports
2237 {
2238     nsresult Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2239             const PRUnichar *aText);
2240     nsresult AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2241             const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState);
2242     nsresult Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2243             const PRUnichar *aText, PRBool *_retval);
2244     nsresult ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2245             const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState,
2246             PRBool *_retval);
2247     nsresult ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2248             const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title,
2249             const PRUnichar *aButton1Title, const PRUnichar *aButton2Title,
2250             const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval);
2251     nsresult Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2252             const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg,
2253             PRBool *aCheckState, PRBool *_retval);
2254     nsresult PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2255             const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword,
2256             const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval);
2257     nsresult PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2258             const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg,
2259             PRBool *aCheckState, PRBool *_retval);
2260     nsresult Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2261             const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList,
2262             PRInt32 *aOutSelection, PRBool *_retval);
2263 }
2264
2265 [
2266     object,
2267     uuid(b128a1e6-44f3-4331-8fbe-5af360ff21ee),
2268     local
2269     /* FROZEN */
2270 ]
2271 interface nsITooltipTextProvider : nsISupports
2272 {
2273     nsresult GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval);
2274 }
2275
2276 [
2277     object,
2278     uuid(02b0625a-e7f3-11d2-9f5a-006008a6efe9),
2279     local
2280     /* FROZEN */
2281 ]
2282 interface nsIProfile : nsISupports
2283 {
2284     nsresult GetProfileCount(PRInt32 *aProfileCount);
2285     nsresult GetProfileList(PRUint32 *length, PRUnichar ***profileNames);
2286     nsresult ProfileExists(const PRUnichar *profileName, PRBool *_retval);
2287     nsresult GetCurrentProfile(PRUnichar * *aCurrentProfile);
2288     nsresult SetCurrentProfile(const PRUnichar * aCurrentProfile);
2289     nsresult ShutDownCurrentProfile(PRUint32 shutDownType);
2290     nsresult CreateNewProfile(const PRUnichar *profileName,
2291             const PRUnichar *nativeProfileDir, const PRUnichar *langcode,
2292             PRBool useExistingDir);
2293     nsresult RenameProfile(const PRUnichar *oldName, const PRUnichar *newName);
2294     nsresult DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles);
2295     nsresult CloneProfile(const PRUnichar *profileName);
2296 }
2297
2298 [
2299     object,
2300     uuid(30465632-a777-44cc-90f9-8145475ef999),
2301     local
2302     /* FROZEN */
2303 ]
2304 interface nsIWindowCreator : nsISupports
2305 {
2306     nsresult CreateChromeWindow(nsIWebBrowserChrome *parent, PRUint32 chromeFlags,
2307                                    nsIWebBrowserChrome **_retval);
2308 }
2309
2310 [
2311     object,
2312     uuid(f673ec81-a4b0-11d6-964b-eb5a2bf216fc),
2313     local
2314     /* NOT_FROZEN */
2315 ]
2316 interface nsIWindowCreator2 : nsIWindowCreator
2317 {
2318     nsresult CreateChromeWindow2(nsIWebBrowserChrome *parent, PRUint32 chromeFlags,
2319                                  PRUint32 contextFlags, nsIURI *uri, PRBool *cancel,
2320                                  nsIWebBrowserChrome **_retval);
2321 }
2322
2323 [
2324     object,
2325     uuid(002286a8-494b-43b3-8ddd-49e3fc50622b),
2326     local
2327     /* FROZEN */
2328 ]
2329 interface nsIWindowWatcher : nsISupports
2330 {
2331     nsresult OpenWindow(nsIDOMWindow *aParent, const char *aUrl, const char *aName,
2332                         const char *aFeatures, nsISupports *aArguments, nsIDOMWindow **_retval);
2333     nsresult RegisterNotification(nsIObserver *aObserver);
2334     nsresult UnregisterNotification(nsIObserver *aObserver);
2335     nsresult GetWindowEnumerator(nsISimpleEnumerator **_retval);
2336     nsresult GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt **_retval);
2337     nsresult GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuthPrompt **_retval);
2338     nsresult SetWindowCreator(nsIWindowCreator *creator);
2339     nsresult GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome **_retval);
2340     nsresult GetWindowByName(const PRUnichar *aTargetName, nsIDOMWindow *aCurrentWindow,
2341                              nsIDOMWindow **_retval);
2342     nsresult GetActiveWindow(nsIDOMWindow **aActiveWindow);
2343     nsresult SetActiveWindow(nsIDOMWindow *aActiveWindow);
2344 }
2345
2346 [
2347     object,
2348     uuid(274cd32e-3675-47e1-9d8a-fc6504ded9ce),
2349     local
2350     /* NOT_FROZEN */
2351 ]
2352 interface nsIEditingSession : nsISupports
2353 {
2354     nsresult GetEditorStatus(PRUint32 *aEditorStatus);
2355     nsresult MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType,
2356             PRBool doAfterUriLoad, PRBool aMakeWholeDocumentEditable, PRBool aInteractive);
2357     nsresult WindowIsEditable(nsIDOMWindow *window, PRBool *_retval);
2358     nsresult GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval);
2359     nsresult SetupEditorOnWindow(nsIDOMWindow *window);
2360     nsresult TearDownEditorOnWindow(nsIDOMWindow *window);
2361     nsresult SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor);
2362     nsresult DisableJSAndPlugins(nsIDOMWindow *aWindow);
2363     nsresult RestoreJSAndPlugins(nsIDOMWindow *aWindow);
2364     nsresult DetachFromWindow(nsIDOMWindow *aWindow);
2365     nsresult ReattachToWindow(nsIDOMWindow *aWindow);
2366 }
2367
2368 [
2369     object,
2370     uuid(83f892cf-7ed3-490e-967a-62640f3158e1),
2371     local
2372     /* NOT_FROZEN */
2373 ]
2374 interface nsICommandParams : nsISupports
2375 {
2376     nsresult GetValueType(const char *name, PRInt16 *_retval);
2377     nsresult GetBooleanValue(const char *name, PRBool *_retval);
2378     nsresult GetLongValue(const char *name, PRInt32 *_retval);
2379     nsresult GetDoubleValue(const char *name, double *_retval);
2380     nsresult GetStringValue(const char *name, nsAString *_retval);
2381     nsresult GetCStringValue(const char *name, char **_retval);
2382     nsresult GetISupportsValue(const char *name, nsISupports **_retval);
2383     nsresult SetBooleanValue(const char *name, PRBool value);
2384     nsresult SetLongValue(const char *name, PRInt32 value);
2385     nsresult SetDoubleValue(const char *name, double value);
2386     nsresult SetStringValue(const char *name, const nsAString *value);
2387     nsresult SetCStringValue(const char *name, const char *value);
2388     nsresult SetISupportsValue(const char *name, nsISupports *value);
2389     nsresult RemoveValue(const char *name);
2390     nsresult HasMoreElements(PRBool *_retval);
2391     nsresult First();
2392     nsresult GetNext(char **_retval);
2393 }
2394
2395 [
2396     object,
2397     uuid(080d2001-f91e-11d4-a73c-f9242928207c),
2398     local
2399     /* NOT_FROZEN */
2400 ]
2401 interface nsICommandManager : nsISupports
2402 {
2403     nsresult AddCommandObserver(nsIObserver *aCommandObserver, const char *aCommandToObserve);
2404     nsresult RemoveCommandObserver(nsIObserver *aCommandObserver, const char *aCommandObserved);
2405     nsresult IsCommandSupported(const char *aCommandName, nsIDOMWindow *aTargetWindow, PRBool *_retval);
2406     nsresult IsCommandEnabled(const char *aCommandName, nsIDOMWindow *aTargetWindow, PRBool *_retval);
2407     nsresult GetCommandState(const char *aCommandName, nsIDOMWindow *aTargetWindow,
2408             nsICommandParams *aCommandParams);
2409     nsresult DoCommand(const char *aCommandName, nsICommandParams *aCommandParams,
2410             nsIDOMWindow *aTargetWindow);
2411 }
2412
2413 [
2414     object,
2415     uuid(47b82b60-a36f-4167-8072-6f421151ed50),
2416     local
2417     /* NOT_FROZEN */
2418 ]
2419 interface nsIControllerContext : nsISupports
2420 {
2421     nsresult Init(nsIControllerCommandTable *aCommandTable);
2422     nsresult SetCommandContext(nsISupports *aCommandContext);
2423 }
2424
2425 [
2426     object,
2427     uuid(d5b61b82-1da4-11d3-bf87-00105a1b0627),
2428     local
2429     /* NOT_FROZEN */
2430 ]
2431 interface nsIController : nsISupports
2432 {
2433     nsresult IsCommandEnabled(const char *command, PRBool *_retval);
2434     nsresult SupportsCommand(const char *command, PRBool *_retval);
2435     nsresult DoCommand(const char *command);
2436     nsresult OnEvent(const char *eventName);
2437 }
2438
2439 [
2440     object,
2441     uuid(34769de0-30d0-4cef-894a-fcd8bb27c4b4),
2442     local
2443     /* NOT_FROZEN */
2444 ]
2445 interface nsIContentSerializer : nsISupports
2446 {
2447     nsresult Init(PRUint32 flags, PRUint32 aWrapColumn, const char* aCharSet, PRBool aIsCopying,
2448             PRBool aIsWholeDocument);
2449     nsresult AppendText(nsIDOMText *aText, PRInt32 aStartOffset, PRInt32 aEndOffset, nsAString *aStr);
2450     nsresult AppendCDATASection(nsIDOMCDATASection *aCDATASection, PRInt32 aStartOffset,
2451             PRInt32 aEndOffset, nsAString *aStr);
2452     nsresult AppendProcessingInstruction(nsIDOMProcessingInstruction* aPI, PRInt32 aStartOffset,
2453             PRInt32 aEndOffset, nsAString *aStr);
2454     nsresult AppendComment(nsIDOMComment *aComment, PRInt32 aStartOffset, PRInt32 aEndOffset,
2455             nsAString *aStr);
2456     nsresult AppendDoctype(nsIDOMDocumentType *aDoctype, nsAString *aStr);
2457     nsresult AppendElementStart(nsIDOMElement *aElement, nsIDOMElement *aOriginalElement,
2458             nsAString *aStr);
2459     nsresult AppendElementEnd(nsIDOMElement *aElement, nsAString *aStr);
2460     nsresult Flush(nsAString *aStr);
2461     nsresult AppendDocumentStart(nsIDOMDocument *aDocument, nsAString *aStr);
2462 }
2463
2464 [
2465     object,
2466     uuid(96b60ba0-634a-41e4-928e-78ab0b3c4b46),
2467     local
2468     /* NOT_FROZEN */
2469 ]
2470 interface nsIEditor  : nsISupports
2471 {
2472     typedef void *nsIPresShellPtr;
2473     typedef void *nsIContentPtr;
2474
2475     nsresult GetSelection([out] nsISelection *_retval);
2476     nsresult Init([in] nsIDOMDocument *doc, [in] nsIPresShellPtr shell, [in] nsIContentPtr aRoot, [in] nsISelectionController *aSelCon, [in] PRUint32 aFlags);
2477     nsresult SetAttributeOrEquivalent([in] nsIDOMElement *element, [in] const nsAString *sourceAttrName, [in] const nsAString *sourceAttrValue, [in] PRBool aSuppressTransaction);
2478     nsresult RemoveAttributeOrEquivalent([in] nsIDOMElement *element, [in] const nsAString *sourceAttrName, [in] PRBool aSuppressTransaction);
2479     nsresult PostCreate();
2480     nsresult PreDestroy();
2481     nsresult GetFlags([out] PRUint32 *_retval);
2482     nsresult SetFlags([in] PRUint32 val);
2483     nsresult GetContentsMIMEType([out] char **_retval);
2484     nsresult SetContentsMIMEType([in] const char *val);
2485     nsresult GetIsDocumentEditable([out] PRBool *_retval);
2486     nsresult GetDocument([out] nsIDOMDocument **_retval);
2487     nsresult GetRootElement([out] nsIDOMElement **_retval);
2488     nsresult GetSelectionController([out] nsISelectionController **_retval);
2489     nsresult DeleteSelection([in] PRInt16 action);
2490     nsresult GetDocumentIsEmpty([out] PRBool *_retval);
2491     nsresult GetDocumentModified([out] PRBool *_retval);
2492     nsresult GetDocumentCharacterSet([out] nsACString *_retval);
2493     nsresult SetDocumentCharacterSet([in] const nsACString *val);
2494     nsresult ResetModificationCount();
2495     nsresult GetModificationCount([out] PRInt32 *_retval);
2496     nsresult IncrementModificationCount([in] PRInt32 aModCount);
2497     nsresult GetTransactionManager([out] nsITransactionManager **_retval);
2498     nsresult SetTransactionManager(nsITransactionManager *aTransactionManager);
2499     nsresult DoTransaction([in] nsITransaction *txn);
2500     nsresult EnableUndo([in] PRBool enable);
2501     nsresult Undo([in] PRUint32 count);
2502     nsresult CanUndo([out] PRBool *isEnabled, [out] PRBool *canUndo);
2503     nsresult Redo([in] PRUint32 count);
2504     nsresult CanRedo([out] PRBool *isEnabled, [out] PRBool *canRedo);
2505     nsresult BeginTransaction();
2506     nsresult EndTransaction();
2507     nsresult BeginPlaceHolderTransaction([in] nsIAtom *name);
2508     nsresult EndPlaceHolderTransaction();
2509     nsresult ShouldTxnSetSelection([out] PRBool *_retval);
2510     nsresult SetShouldTxnSetSelection([in] PRBool should);
2511     nsresult GetInlineSpellChecker([out] nsIInlineSpellChecker **_retval);
2512     nsresult SyncRealTimeSpell();
2513     nsresult SetSpellcheckUserOverride(PRBool enable);
2514     nsresult Cut();
2515     nsresult CanCut([out] PRBool *_retval);
2516     nsresult Copy();
2517     nsresult CanCopy([out] PRBool *_retval);
2518     nsresult Paste([in] PRInt32 aSelectionType);
2519     nsresult CanPaste([in] PRInt32 aSelectionType, [out] PRBool *_retval);
2520     nsresult SelectAll();
2521     nsresult BeginningOfDocument();
2522     nsresult EndOfDocument();
2523     nsresult CanDrag([in] nsIDOMEvent *aEvent, [out] PRBool *_retval);
2524     nsresult DoDrag([in] nsIDOMEvent *aEvent);
2525     nsresult InsertFromDrop([in] nsIDOMEvent *aEvent);
2526     nsresult SetAttribute([in] nsIDOMElement *aElement, [in] const nsAString *attributestr, [in] const nsAString *attvalue);
2527     nsresult GetAttributeValue([in] nsIDOMElement *aElement, [in] const nsAString *attributestr, [out] nsAString *resultValue, PRBool *_retval);
2528     nsresult RemoveAttribute([in] nsIDOMElement *aElement, [in] const nsAString *aAttribute);
2529     nsresult CloneAttribute([in] const nsAString *aAttribute, [in] nsIDOMNode *aDestNode, [in] nsIDOMNode *aSourceNode);
2530     nsresult CloneAttributes([in] nsIDOMNode *destNode, [in] nsIDOMNode *sourceNode);
2531     nsresult CreateNode([in] const nsAString *tag, [in] nsIDOMNode *parent, [in] PRInt32 position, [out] nsIDOMNode **_retval);
2532     nsresult InsertNode([in] nsIDOMNode *node, [in] nsIDOMNode *parent, [in] PRInt32 aPosition);
2533     nsresult SplitNode([in] nsIDOMNode *existingRightNode, [in] PRInt32 offset, [out] nsIDOMNode **newLeftNode);
2534     nsresult JoinNodes([in] nsIDOMNode *leftNode, [in] nsIDOMNode *rightNode, [in] nsIDOMNode *parent);
2535     nsresult DeleteNode([in] nsIDOMNode *child);
2536     nsresult MarkNodeDirty([in] nsIDOMNode *node);
2537     nsresult SwitchTextDirection();
2538     nsresult OutputToString([in] nsAString formatType, [in] PRUint32 flags, [out] nsAString *_retval);
2539     nsresult OutputToStream([in] nsIOutputStream *aStream, [in] nsAString *formatType, [in] nsACString *charsetOverride, [in] PRUint32 flags);
2540     nsresult AddEditorObserver([in] nsIEditorObserver *observer);
2541     nsresult RemoveEditorObserver([in] nsIEditorObserver *observer);
2542     nsresult AddEditActionListener([in] nsIEditActionListener *listener);
2543     nsresult RemoveEditActionListener([in] nsIEditActionListener *listener);
2544     nsresult AddDocumentStateListener([in] nsIDocumentStateListener *listener);
2545     nsresult RemoveDocumentStateListener([in] nsIDocumentStateListener *listener);
2546     nsresult DumpContentTree();
2547     nsresult DebugDumpContent();
2548     nsresult DebugUnitTests([out] PRInt32 *outNumTests, [out] PRInt32 *outNumTestsFailed);
2549     PRBool IsModifiableNode(nsIDOMNode *aNode);
2550 }
2551
2552 [
2553     object,
2554     uuid(afc36593-5787-4420-93d9-b2c0ccbf0cad),
2555     local
2556     /* NOT_FROZEN */
2557 ]
2558 interface nsIHTMLEditor : nsISupports
2559 {
2560     nsresult AddDefaultProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
2561     nsresult RemoveDefaultProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
2562     nsresult RemoveAllDefaultProperties();
2563     nsresult SetCSSInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
2564     nsresult SetInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
2565     nsresult GetInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue, [out] PRBool *aFirst, [out] PRBool *aAny, [out] PRBool *aAll);
2566     nsresult GetInlinePropertyWithAttrValue([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue, [out] PRBool *aFirst, [out] PRBool *aAny, [out] PRBool *aAll, [out] nsAString *_retval);
2567     nsresult RemoveAllInlineProperties();
2568     nsresult RemoveInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute);
2569     nsresult IncreaseFontSize();
2570     nsresult DecreaseFontSize();
2571     nsresult CanDrag([in] nsIDOMEvent *aEvent, [out] PRBool *_retval);
2572     nsresult DoDrag([in] nsIDOMEvent *aEvent);
2573     nsresult InsertFromDrop([in] nsIDOMEvent *aEvent);
2574     nsresult NodeIsBlock([in] nsIDOMNode *node, PRBool *_retval);
2575     nsresult InsertHTML([in] nsAString *aInputString);
2576     nsresult PasteNoFormatting([in] PRInt32 aSelectionType);
2577     nsresult RebuildDocumentFromSource([in] nsAString *aSourceString);
2578     nsresult InsertHTMLWithContext([in] nsAString *aInputString, [in] nsAString *aContextStr, [in] nsAString *aInfoStr, [in] nsAString *aFlavor, [in] nsIDOMDocument *aSourceDoc, [in] nsIDOMNode *aDestinationNode, [in] PRInt32 aDestinationOffset, [in] PRBool aDeleteSelection);
2579     nsresult InsertElementAtSelection([in] nsIDOMElement *aElement, [in] PRBool aDeleteSelection);
2580     nsresult SetDocumentTitle([in] nsAString *aTitle);
2581     nsresult UpdateBaseURL();
2582     nsresult SelectElement([in] nsIDOMElement *aElement);
2583     nsresult SetCaretAfterElement([in] nsIDOMElement *aElement);
2584     nsresult SetParagraphFormat([in] nsAString *aParagraphFormat);
2585     nsresult GetParagraphState([out] PRBool *aMixed, [out] nsAString *_retval);
2586     nsresult GetFontFaceState([out] PRBool *aMixed, [out] nsAString *_retval);
2587     nsresult GetFontColorState([out] PRBool *aMixed, [out] nsAString *_retval);
2588     nsresult GetBackgroundColorState([out] PRBool *aMixed, [out] nsAString *_retval);
2589     nsresult GetHighlightColorState([out] PRBool *aMixed, [out] nsAString *_retval);
2590     nsresult GetListState([out] PRBool *aMixed, [out] PRBool *aOL, [out] PRBool *aUL, [out] PRBool *aDL);
2591     nsresult GetListItemState([out] PRBool *aMixed, [out] PRBool *aLI, [out] PRBool *aDT, [out] PRBool *aDD);
2592     nsresult GetAlignment([out] PRBool *aMixed, [out] PRInt16 *aAlign);
2593     nsresult GetIndentState([out] PRBool *aCanIndent, [out] PRBool *aCanOutdent);
2594     nsresult MakeOrChangeList([in] nsAString *aListType, [in] PRBool entireList, [in] nsAString *aBulletType);
2595     nsresult RemoveList([in] nsAString *aListType);
2596     nsresult Indent([in] nsAString *aIndent);
2597     nsresult Align([in] nsAString *aAlign);
2598     nsresult GetElementOrParentByTagName([in] nsAString *aTagName, [in] nsIDOMNode *aNode, [out] nsIDOMElement **_retval);
2599     nsresult GetSelectedElement([in] nsAString *aTagName, [out] nsIDOMElement **_retval);
2600     nsresult GetHeadContentsAsHTML([out] nsAString *_retval);
2601     nsresult ReplaceHeadContentsWithHTML([in] nsAString *aSourceToInsert);
2602     nsresult CreateElementWithDefaults([in] nsAString *aTagName, [out] nsIDOMElement **_retval);
2603     nsresult InsertLinkAroundSelection([in] nsIDOMElement *aAnchorElement);
2604     nsresult SetBackgroundColor([in] nsAString *aColor);
2605     nsresult SetBodyAttribute([in] nsAString *aAttr, [in] nsAString *aValue);
2606     nsresult IgnoreSpuriousDragEvent([in] PRBool aIgnoreSpuriousDragEvent);
2607     nsresult GetLinkedObjects([out] nsISupportsArray **_retval);
2608     nsresult GetIsCSSEnabled([out] PRBool *_retval);
2609     nsresult SetIsCSSEnabled([in] PRBool prb);
2610     nsresult AddInsertionListener([in] nsIContentFilter *inFilter);
2611     nsresult RemoveInsertionListener([in] nsIContentFilter *inFilter);
2612     nsresult CreateAnonymousElement([in] nsAString *aTag, [in] nsIDOMNode *aParentNode, [in] nsAString *aAnonClass, [in] PRBool aIsCreatedHidden, [out] nsIDOMElement **_retval);
2613     nsresult GetSelectionContainer([out] nsIDOMElement **_retval);
2614     nsresult CheckSelectionStateForAnonymousButtons([in] nsISelection *aSelection);
2615     nsresult IsAnonymousElement([in] nsIDOMElement *aElement, [out] PRBool *_retval);
2616     nsresult GetReturnInParagraphCreatesNewParagraph([out] PRBool *_retval);
2617     nsresult SetReturnInParagraphCreatesNewParagraph([in] PRBool prb);
2618 }
2619
2620 [
2621     object,
2622     uuid(365d600b-868a-452a-8de8-f46fad8fee53),
2623     local
2624     /* NOT_FROZEN */
2625 ]
2626 interface nsIMutationObserver : nsISupports
2627 {
2628     void CharacterDataWillChange(nsIDocument *aDocument, nsIContent *aContent,
2629                                  void /*CharacterDataChangeInfo*/ *aInfo);
2630     void CharacterDataChanged(nsIDocument *aDocument, nsIContent *aContent,
2631                               void /*CharacterDataChangeInfo*/ *aInfo);
2632     void AttributeWillChange(nsIDocument *aDocument, nsIContent * aContent, PRInt32 aNameSpaceID,
2633                              nsIAtom *aAttribute, PRInt32 aModType);
2634     void AttributeChanged(nsIDocument *aDocument, nsIContent *aContent, PRInt32 aNameSpaceID,
2635                           nsIAtom *aAttribute, PRInt32 aModType, PRUint32 aStateMask);
2636     void ContentAppended(nsIDocument *aDocument, nsIContent *aContainer, PRInt32 aNewIndexInContainer);
2637     void ContentInserted(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild,
2638                          PRInt32 aIndexInContainer);
2639     void ContentRemoved(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild,
2640                         PRInt32 aIndexInContainer);
2641     void NodeWillBeDestroyed(const nsINode *aNode);
2642     void ParentChainChanged(nsIContent *aContent);
2643 }
2644
2645 [
2646     object,
2647     uuid(4e14e321-a4bb-49f8-a57a-2363668d14d0),
2648     local
2649     /* NOT_FROZEN */
2650 ]
2651 interface nsIDocumentObserver : nsIMutationObserver
2652 {
2653     typedef int nsUpdateType;
2654
2655     void BeginUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType);
2656     void EndUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType);
2657     void BeginLoad(nsIDocument *aDocument);
2658     void EndLoad(nsIDocument *aDocument);
2659     void ContentStatesChanged(nsIDocument *aDocument, nsIContent *aContent1, nsIContent *aContent2,
2660                               PRInt32 aStateMask);
2661     void StyleSheetAdded(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, PRBool aDocumentSheet);
2662     void StyleSheetRemoved(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, PRBool aDocumentSheet);
2663     void StyleSheetApplicableStateChanged(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet,
2664                                           PRBool aApplicable);
2665     void StyleRuleChanged(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aOldStyleRule,
2666                           nsIStyleRule *aNewStyleRule);
2667     void StyleRuleAdded(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule);
2668     void StyleRuleRemoved(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule);
2669     void BindToDocument(nsIDocument *aDocument, nsIContent *aContent);
2670     void DoneAddingChildren(nsIContent *aContent, PRBool aHaveNotified);
2671 }
2672
2673 /*
2674  * NOTE:
2675  * This is a private Wine interface that is implemented by our implementation
2676  * of nsIURI to store its owner.
2677  */
2678 [
2679     object,
2680     uuid(5088272e-900b-11da-c687-000fea57f21a),
2681     local
2682     /* INTERNAL */
2683 ]
2684 interface nsIWineURI : nsIURL
2685 {
2686     typedef struct NSContainer NSContainer;
2687     typedef struct HTMLWindow HTMLWindow;
2688
2689     nsresult GetNSContainer(NSContainer **aNSContainer);
2690     nsresult SetNSContainer(NSContainer *aNSContainer);
2691     nsresult GetWindow(HTMLWindow **aHTMLWindow);
2692     nsresult SetWindow(HTMLWindow *aHTMLWindow);
2693     nsresult GetIsDocumentURI(PRBool *aIsDocumentURI);
2694     nsresult SetIsDocumentURI(PRBool aIsDocumentURI);
2695     nsresult GetWineURL(LPCWSTR *aURL);
2696     nsresult SetWineURL(LPCWSTR aURL);
2697 }