mshtml: Get rid of no longer needed app-startup observer initialization.
[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.2.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 WCHAR PRUnichar;
46 typedef ULONG PRUint32;
47 typedef LONG PRInt32;
48 typedef WORD PRUint16;
49 typedef INT16 PRInt16;
50 typedef BYTE PRUint8;
51 typedef BOOL PRBool;
52 typedef LONGLONG PRInt64;
53 typedef ULONGLONG PRUint64;
54 typedef PRUint64 DOMTimeStamp;
55 typedef PRUint32 nsLoadFlags;
56
57 typedef struct {
58     void *v;
59     void *d1;
60     PRUint32 d2;
61     void *d3;
62 } nsCStringContainer;
63
64 typedef struct {
65     void *v;
66     void *d1;
67     PRUint32 d2;
68     void *d3;
69 } nsStringContainer;
70
71 typedef nsCStringContainer nsACString;
72 typedef nsStringContainer nsAString;
73
74 interface nsIWebBrowserChrome;
75 interface nsILoadGroup;
76 interface nsIDOMNode;
77 interface nsIDOMDocument;
78 interface nsIDOMEvent;
79 interface nsIEditor;
80 interface nsISelectionController;
81 interface nsITransactionManager;
82 interface nsITransaction;
83 interface nsIInlineSpellChecker;
84 interface nsIOutputStream;
85 interface nsIEditorObserver;
86 interface nsIEditActionListener;
87 interface nsIDocumentStateListener;
88 interface nsIDOMCSSStyleSheet;
89 interface nsIDOMDocumentView;
90 interface nsIDOMWindow;
91 interface nsIDOMElement;
92
93 interface IMoniker;
94
95 [
96     object,
97     uuid(00000000-0000-0000-c000-000000000046),
98     local
99 ]
100 interface nsISupports
101 {
102     nsresult QueryInterface(nsIIDRef riid, void **result);
103     nsrefcnt AddRef();
104     nsrefcnt Release();
105 }
106
107 /* Currently we don't need a full declaration of these interfaces */
108 typedef nsISupports nsISHistory;
109 typedef nsISupports nsIWidget;
110 typedef nsISupports nsIDOMBarProp;
111 typedef nsISupports nsIPrompt;
112 typedef nsISupports nsIAuthPrompt;
113 typedef nsISupports nsIDOMNamedNodeMap;
114 typedef nsISupports nsIDOMDocumentType;
115 typedef nsISupports nsIDOMDOMImplementation;
116 typedef nsISupports nsIDOMCDATASection;
117 typedef nsISupports nsIDOMProcessingInstruction;
118 typedef nsISupports nsIDOMEntityReference;
119 typedef nsISupports nsIWebProgressListener;
120 typedef nsISupports nsIDOMCSSValue;
121 typedef nsISupports nsIPrintSession;
122 typedef nsISupports nsIControllerCommandTable;
123 typedef nsISupports nsIPrincipal;
124 typedef nsISupports nsIAtom;
125 typedef nsISupports nsISupportsArray;
126 typedef nsISupports nsIContentFilter;
127 typedef nsISupports nsIDOMMediaList;
128 typedef nsISupports nsIDOMHTMLTableCaptionElement;
129 typedef nsISupports nsIDOMHTMLTableSectionElement;
130 typedef nsISupports nsIDOMClientRectList;
131 typedef nsISupports nsIDOMLocation;
132 typedef nsISupports nsINode;
133 typedef nsISupports nsIStyleSheet;
134 typedef nsISupports nsIStyleRule;
135 typedef nsISupports nsIVariant;
136 typedef nsISupports nsIDOMUserDataHandler;
137 typedef nsISupports nsIDocShellLoadInfo;
138 typedef nsISupports nsISHEntry;
139 typedef nsISupports nsIPresShell;
140 typedef nsISupports nsIContentViewer;
141 typedef nsISupports nsIDocumentCharsetInfo;
142 typedef nsISupports nsILayoutHistoryState;
143 typedef nsISupports nsISecureBrowserUI;
144 typedef nsISupports nsIDOMStorage;
145 typedef nsISupports nsIDOMDOMTokenList;
146 typedef nsISupports nsITransferable;
147 typedef nsISupports nsIDOMHTMLHeadElement;
148 typedef nsISupports nsIDOMFileList;
149 typedef nsISupports nsIControllers;
150 typedef nsISupports nsIDOMValidityState;
151 typedef nsISupports nsIPluginInstanceOwner;
152 typedef nsISupports nsIPluginStreamListener;
153 typedef nsISupports nsIContentSink;
154 typedef nsISupports nsIParserFilter;
155 typedef nsISupports nsIDTD;
156 typedef nsISupports nsIObserver;
157
158 [
159     object,
160     uuid(8bb35ed9-e332-462d-9155-4a002ab5c958),
161     local
162 ]
163 interface nsIServiceManager : nsISupports
164 {
165     nsresult GetService(nsCIDRef aClass, nsIIDRef aIID, void **result);
166     nsresult GetServiceByContractID(const char *aContractID, nsIIDRef aIID, void **result);
167     nsresult IsServiceInstantiated(nsCIDRef aClass, nsIIDRef aIID, BOOL *_retval);
168     nsresult IsServiceInstantiatedByContractID(const char *aContractID, nsIIDRef aIID, BOOL *_retval);
169 }
170
171 [
172     object,
173     uuid(00000001-0000-0000-c000-000000000046),
174     local
175 ]
176 interface nsIFactory : nsISupports
177 {
178     nsresult CreateInstance(nsISupports *aOuter, const nsIID *iid, void **result);
179     nsresult LockFactory(PRBool lock);
180 }
181
182 [
183     object,
184     uuid(a88e5a60-205a-4bb1-94e1-2628daf51eae),
185     local
186 ]
187 interface nsIComponentManager : nsISupports
188 {
189     nsresult GetClassObject(nsCIDRef aClass, nsIIDRef aIID, void **result);
190     nsresult GetClassObjectByContractID(const char *aContractID, nsIIDRef aIID, void **result);
191     nsresult CreateInstance(nsCIDRef aClass, nsISupports *aDelegate, nsIIDRef aIID,
192             void **result);
193     nsresult CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate,
194             nsIIDRef aIID, void **result);
195 }
196
197 [
198     object,
199     uuid(59e7e77a-38e4-11d4-8cf5-0060b0fc14a3),
200     local
201 ]
202 interface nsIMemory : nsISupports
203 {
204     void *Alloc(/*size_t*/ int size);
205     void *Realloc(void *_ptr, /*size_t*/ int newSize);
206     void Free(void *_ptr);
207     nsresult HeapMinimize(PRBool immediate);
208     nsresult IsLowMemory(PRBool *_retval);
209 }
210
211 [
212     object,
213     uuid(9188bc85-f92e-11d2-81ef-0060083a0bcf),
214     local
215 ]
216 interface nsIWeakReference : nsISupports
217 {
218     nsresult QueryReferent(const nsIID *riid, void **result);
219 }
220
221 [
222     object,
223     uuid(9188bc86-f92e-11d2-81ef-0060083a0bcf),
224     local
225 ]
226 interface nsISupportsWeakReference : nsISupports
227 {
228     nsresult GetWeakReference(nsIWeakReference **_retval);
229 }
230
231 [
232     object,
233     uuid(033a1470-8b2a-11d3-af88-00a024ffc08c),
234     local
235 ]
236 interface nsIInterfaceRequestor : nsISupports
237 {
238     nsresult GetInterface(const nsIID *riid, void **result);
239 }
240
241 [
242     object,
243     uuid(4a2abaf0-6886-11d3-9382-00104ba0fd40),
244     local
245 ]
246 interface nsIRunnable : nsISupports
247 {
248     nsresult Run();
249 }
250
251 [
252     object,
253     uuid(d1899240-f9d2-11d2-bdd6-000064657374),
254     local
255 ]
256 interface nsISimpleEnumerator : nsISupports
257 {
258     nsresult HasMoreElements(PRBool *_retval);
259     nsresult GetNext(nsISupports **_retval);
260 }
261
262 [
263     object,
264     uuid(fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a),
265     local
266 ]
267 interface nsIInputStream : nsISupports
268 {
269     nsresult Close();
270     nsresult Available(PRUint32 *_retval);
271     nsresult Read(char *aBuf, PRUint32 aCount, PRUint32 *_retval);
272     nsresult ReadSegments(nsresult (*aWriter)(nsIInputStream *aInStream, 
273             void *aClosure, const char *aFromSegment, PRUint32 aToOffset,
274             PRUint32 aCount, PRUint32 *aWriteCount),
275             void *aClosure, PRUint32 aCount, PRUint32 *_retval);
276     nsresult IsNonBlocking(PRBool *_retval);
277 }
278
279 [
280     object,
281     uuid(07a22cc0-0ce5-11d3-9331-00104ba0fd40),
282     local
283 ]
284 interface nsIURI : nsISupports
285 {
286     nsresult GetSpec(nsACString *aSpec);
287     nsresult SetSpec(const nsACString *aSpec);
288     nsresult GetPrePath(nsACString *aPrePath);
289     nsresult GetScheme(nsACString *aScheme);
290     nsresult SetScheme(const nsACString *aScheme);
291     nsresult GetUserPass(nsACString *aUserPass);
292     nsresult SetUserPass(const nsACString *aUserPass);
293     nsresult GetUsername(nsACString *aUsername);
294     nsresult SetUsername(const nsACString *aUsername);
295     nsresult GetPassword(nsACString *aPassword);
296     nsresult SetPassword(const nsACString *aPassword);
297     nsresult GetHostPort(nsACString *aHostPort);
298     nsresult SetHostPort(const nsACString *aHostPort);
299     nsresult GetHost(nsACString *aHost);
300     nsresult SetHost(const nsACString *aHost);
301     nsresult GetPort(PRInt32 *aPort);
302     nsresult SetPort(PRInt32 aPort);
303     nsresult GetPath(nsACString *aPath);
304     nsresult SetPath(const nsACString *aPath);
305     nsresult Equals(nsIURI *other, PRBool *_retval);
306     nsresult SchemeIs(const char *scheme, PRBool *_retval);
307     nsresult Clone(nsIURI **_retval);
308     nsresult Resolve(const nsACString *relativePath, nsACString *_retval);
309     nsresult GetAsciiSpec(nsACString *aAsciiSpec);
310     nsresult GetAsciiHost(nsACString *aAsciiHost);
311     nsresult GetOriginCharset(nsACString *aOriginCharset);
312 }
313
314 [
315     object,
316     uuid(d6116970-8034-11d3-9399-00104ba0fd40),
317     local
318 ]
319 interface nsIURL : nsIURI
320 {
321     nsresult GetFilePath(nsACString *aFilePath);
322     nsresult SetFilePath(const nsACString *aFilePath);
323     nsresult GetParam(nsACString *aParam);
324     nsresult SetParam(const nsACString *aParam);
325     nsresult GetQuery(nsACString *aQuery);
326     nsresult SetQuery(const nsACString *aQuery);
327     nsresult GetRef(nsACString *aRef);
328     nsresult SetRef(const nsACString *aRef);
329     nsresult GetDirectory(nsACString *aDirectory);
330     nsresult SetDirectory(const nsACString *aDirectory);
331     nsresult GetFileName(nsACString *aFileName);
332     nsresult SetFileName(const nsACString *aFileName);
333     nsresult GetFileBaseName(nsACString *aFileBaseName);
334     nsresult SetFileBaseName(const nsACString *aFileBaseName);
335     nsresult GetFileExtension(nsACString *aFileExtension);
336     nsresult SetFileExtension(const nsACString *aFileExtension);
337     nsresult GetCommonBaseSpec(nsIURI *aURIToCompare, nsACString *_retval);
338     nsresult GetRelativeSpec(nsIURI *aURIToCompare, nsACString *_retval);
339 }
340
341 [
342     object,
343     uuid(ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe),
344     local
345 ]
346 interface nsIRequest : nsISupports
347 {
348     nsresult GetName(nsACString *aName);
349     nsresult IsPending(PRBool *_retval);
350     nsresult GetStatus(nsresult *aStatus);
351     nsresult Cancel(nsresult aStatus);
352     nsresult Suspend();
353     nsresult Resume();
354     nsresult GetLoadGroup(nsILoadGroup **aLoadGroup);
355     nsresult SetLoadGroup(nsILoadGroup *aLoadGroup);
356     nsresult GetLoadFlags(nsLoadFlags *aLoadFlags);
357     nsresult SetLoadFlags(nsLoadFlags aLoadFlags);
358 }
359
360 [
361     object,
362     uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40),
363     local
364 ]
365 interface nsIRequestObserver : nsISupports
366 {
367     nsresult OnStartRequest(nsIRequest *aRequest, nsISupports *aContext);
368     nsresult OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode);
369 }
370
371 [
372     object,
373     uuid(1a637020-1482-11d3-9333-00104ba0fd40),
374     local
375
376 interface nsIStreamListener : nsIRequestObserver
377 {
378     nsresult OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
379                              nsIInputStream *aInputStream, PRUint32 aOffset, PRUint32 aCount);
380 }
381
382 [
383     object,
384     uuid(3de0a31c-feaf-400f-9f1e-4ef71f8b20cc),
385     local
386 ]
387 interface nsILoadGroup : nsIRequest
388 {
389     nsresult GetGroupObserver(nsIRequestObserver **aGroupObserver);
390     nsresult SetGroupObserver(nsIRequestObserver *aGroupObserver);
391     nsresult GetDefaultLoadRequest(nsIRequest **aDefaultLoadRequest);
392     nsresult SetDefaultLoadRequest(nsIRequest *aDefaultLoadRequest);
393     nsresult AddRequest(nsIRequest *aRequest, nsISupports *aContext);
394     nsresult RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus);
395     nsresult GetRequests(nsISimpleEnumerator **aRequests);
396     nsresult GetActiveCount(PRUint32 *aActiveCount);
397     nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
398     nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
399 }
400
401 [
402     object,
403     uuid(c63a055a-a676-4e71-bf3c-6cfa11082018),
404     local
405 ]
406 interface nsIChannel : nsIRequest
407 {
408     nsresult GetOriginalURI(nsIURI **aOriginalURI);
409     nsresult SetOriginalURI(nsIURI *aOriginalURI);
410     nsresult GetURI(nsIURI **aURI);
411     nsresult GetOwner(nsISupports **aOwner);
412     nsresult SetOwner(nsISupports *aOwner);
413     nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
414     nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
415     nsresult GetSecurityInfo(nsISupports **aSecurityInfo);
416     nsresult GetContentType(nsACString *aContentType);
417     nsresult SetContentType(const nsACString *aContentType);
418     nsresult GetContentCharset(nsACString *aContentCharset);
419     nsresult SetContentCharset(const nsACString *aContentCharset);
420     nsresult GetContentLength(PRInt32 *aContentLength);
421     nsresult SetContentLength(PRInt32 aContentLength);
422     nsresult Open(nsIInputStream **_retval);
423     nsresult AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext);
424 }
425
426 [
427     object,
428     uuid(0cf40717-d7c1-4a94-8c1e-d6c9734101bb),
429     local
430 ]
431 interface nsIHttpHeaderVisitor : nsISupports
432 {
433     nsresult VisitHeader(const nsACString *aHeader, const nsACString *aValue);
434 }
435
436 [
437     object,
438     uuid(9277fe09-f0cc-4cd9-bbce-581dd94b0260),
439     local
440 ]
441 interface nsIHttpChannel : nsIChannel
442 {
443     nsresult GetRequestMethod(nsACString *aRequestMethod);
444     nsresult SetRequestMethod(const nsACString *aRequestMethod);
445     nsresult GetReferrer(nsIURI **aReferrer);
446     nsresult SetReferrer(nsIURI *aReferrer);
447     nsresult GetRequestHeader(const nsACString *aHeader, nsACString *_retval);
448     nsresult SetRequestHeader(const nsACString *aHeader, const nsACString *aValue, PRBool aMerge);
449     nsresult VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor);
450     nsresult GetAllowPipelining(PRBool *aAllowPipelining);
451     nsresult SetAllowPipelining(PRBool aAllowPipelining);
452     nsresult GetRedirectionLimit(PRUint32 *aRedirectionLimit);
453     nsresult SetRedirectionLimit(PRUint32 aRedirectionLimit);
454     nsresult GetResponseStatus(PRUint32 *aResponseStatus);
455     nsresult GetResponseStatusText(nsACString *aResponseStatusText);
456     nsresult GetRequestSucceeded(PRBool *aRequestSucceeded);
457     nsresult GetResponseHeader(const nsACString *header, nsACString *_retval);
458     nsresult SetResponseHeader(const nsACString *header, const nsACString *value, PRBool merge);
459     nsresult VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor);
460     nsresult IsNoStoreResponse(PRBool *_retval);
461     nsresult IsNoCacheResponse(PRBool *_retval);
462 }
463
464 [
465     object,
466     uuid(9fb2a161-d075-4bf2-b07a-26bac650cc81),
467     local
468 ]
469 interface nsIHttpChannelInternal : nsISupports
470 {
471     nsresult GetDocumentURI(nsIURI **aDocumentURI);
472     nsresult SetDocumentURI(nsIURI *aDocumentURI);
473     nsresult GetRequestVersion(PRUint32 *major, PRUint32 *minor);
474     nsresult GetResponseVersion(PRUint32 *major, PRUint32 *minor);
475     nsresult SetCookie(const char *aCookieHeader);
476     nsresult SetupFallbackChannel(const char *aFallbackKey);
477     nsresult GetForceAllowThirdPartyCookie(PRBool *aForceAllowThirdPartyCookie);
478     nsresult SetForceAllowThirdPartyCookie(PRBool aForceAllowThirdPartyCookie);
479     nsresult GetCanceled(PRBool *aCanceled);
480     nsresult GetChannelIsForDownload(PRBool *aChannelIsForDownload);
481     nsresult SetChannelIsForDownload(PRBool aChannelIsForDownload);
482 }
483
484 [
485     object,
486     uuid(ddf633d8-e9a4-439d-ad88-de636fd9bb75),
487     local
488 ]
489 interface nsIUploadChannel : nsISupports
490 {
491     nsresult SetUploadStream(nsIInputStream *aStream, const nsACString *aContentType,
492                              PRInt32 aContentLength);
493     nsresult GetUploadStream(nsIInputStream **aUploadStream);
494 }
495
496 [
497     object,
498     uuid(a6cf90c1-15b3-11d2-932e-00805f8add32),
499     local
500 ]
501 interface nsIDOMCSSRule : nsISupports
502 {
503     nsresult GetType(PRUint16 *aType);
504     nsresult GetCssText(nsAString *aCssText);
505     nsresult SetCssText(const nsAString *aCssText);
506     nsresult GetParentStyleSheet(nsIDOMCSSStyleSheet **aParentStyleSheet);
507     nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
508 }
509
510 [
511     object,
512     uuid(a6cf90be-15b3-11d2-932e-00805f8add32),
513     local
514 ]
515 interface nsIDOMCSSStyleDeclaration : nsISupports
516 {
517     nsresult GetCssText(nsAString *aCssText);
518     nsresult SetCssText(const nsAString *aCssText);
519     nsresult GetPropertyValue(const nsAString *propertyName, nsAString *_retval);
520     nsresult GetPropertyCSSValue(const nsAString *propertyName, nsIDOMCSSValue **_retval);
521     nsresult RemoveProperty(const nsAString *propertyName, nsAString *_retval);
522     nsresult GetPropertyPriority(const nsAString *propertyName, nsAString *_retval);
523     nsresult SetProperty(const nsAString *propertyName, const nsAString *value,
524                          const nsAString *priority);
525     nsresult GetLength(PRUint32 *aLength);
526     nsresult Item(PRUint32 index, nsAString *_retval);
527     nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
528 }
529
530 [
531     object,
532     uuid(a6cf90c0-15b3-11d2-932e-00805f8add32),
533     local
534 ]
535 interface nsIDOMCSSRuleList : nsISupports
536 {
537     nsresult GetLength(PRUint32 *aLength);
538     nsresult Item(PRUint32 index, nsIDOMCSSRule **_retval);
539 }
540
541 [
542     object,
543     uuid(a6cf9080-15b3-11d2-932e-00805f8add32),
544     local
545 ]
546 interface nsIDOMStyleSheet : nsISupports
547 {
548     nsresult GetType(nsAString *aType);
549     nsresult GetDisabled(PRBool *aDisabled);
550     nsresult SetDisabled(PRBool aDisabled);
551     nsresult GetOwnerNode(nsIDOMNode **aOwnerNode);
552     nsresult GetParentStyleSheet(nsIDOMStyleSheet **aParentStyleSheet);
553     nsresult GetHref(nsAString *aHref);
554     nsresult GetTitle(nsAString *aTitle);
555     nsresult GetMedia(nsIDOMMediaList **aMedia);
556 }
557
558 [
559     object,
560     uuid(a6cf90c2-15b3-11d2-932e-00805f8add32),
561     local
562 ]
563 interface nsIDOMCSSStyleSheet : nsIDOMStyleSheet
564 {
565     nsresult GetOwnerRule(nsIDOMCSSRule **aOwnerRule);
566     nsresult GetCssRules(nsIDOMCSSRuleList **aCssRules);
567     nsresult InsertRule(const nsAString *rule, PRUint32 index, PRUint32 *_retval);
568     nsresult DeleteRule(PRUint32 index);
569 }
570
571 [
572     object,
573     uuid(a6cf9081-15b3-11d2-932e-00805f8add32),
574     local
575 ]
576 interface nsIDOMStyleSheetList : nsISupports
577 {
578     nsresult GetLength(PRUint32 *aLength);
579     nsresult Item(PRUint32 index, nsIDOMStyleSheet **_retval);
580 }
581
582 [
583     object,
584     uuid(a6cf907d-15b3-11d2-932e-00805f8add32),
585     local
586 ]
587 interface nsIDOMNodeList : nsISupports
588 {
589     nsresult Item(PRUint32 index, nsIDOMNode **_retval);
590     nsresult GetLength(PRUint32 *aLength);
591 }
592
593 [
594     object,
595     uuid(29fb2a18-1dd2-11b2-8dd9-a6fd5d5ad12f),
596     local
597 ]
598 interface nsIDOM3Node : nsISupports
599 {
600     enum NSDOCPOSITION {
601         DISCONNECTED = 1,
602         PRECEDING = 2,
603         FOLLOWING = 4,
604         CONTAINS = 8,
605         CONTAINED_BY = 16,
606         IMPLEMENTATION_SPECIFIC = 32
607     };
608
609     nsresult GetBaseURI(nsAString *aBaseURI);
610     nsresult CompareDocumentPosition(nsIDOMNode *other, PRUint16 *_retval);
611     nsresult GetTextContent(nsAString *aTextContent);
612     nsresult SetTextContent(const nsAString *aTextContent);
613     nsresult IsSameNode(nsIDOMNode *other, PRBool *_retval);
614     nsresult LookupPrefix(const nsAString *namespaceURI, PRBool *_retval);
615     nsresult IsDefaultNamespace(const nsAString *namespaceURI, PRBool *_retval);
616     nsresult LookupNamespaceURI(const nsAString *prefix, nsAString _retval);
617     nsresult IsEqualNode(nsIDOMNode *arg, PRBool *_retval);
618     nsresult GetFeature(const nsAString *feature, const nsAString *version, nsISupports **_retval);
619     nsresult SetUserData(const nsAString *key, nsIVariant *data, nsIDOMUserDataHandler *handler, nsIVariant **_retval);
620     nsresult GetUserData(const nsAString *key, nsIVariant **_retval);
621 }
622
623 [
624     object,
625     uuid(a6cf907c-15b3-11d2-932e-00805f8add32),
626     local
627 ]
628 interface nsIDOMNode : nsISupports
629 {
630     enum NSNODETYPE {
631         ELEMENT_NODE = 1,
632         ATTRIBUTE_NODE = 2,
633         TEXT_NODE = 3,
634         CDATA_SELECTION_NODE = 4,
635         ENTITY_REFERENCE_NODE = 5,
636         ENTITY_NODE = 6,
637         PROCESSING_INSTRUCTION_NODE = 7,
638         COMMENT_NODE = 8,
639         DOCUMENT_NODE = 9,
640         DOCUMENT_TYPE_NODE = 10,
641         DOCUMENT_FRAGMENT_NODE = 11,
642         NOTATION_NODE = 12
643     };
644
645     nsresult GetNodeName(nsAString *aNodeName);
646     nsresult GetNodeValue(nsAString *aNodeValue);
647     nsresult SetNodeValue(const nsAString *aNodeValue);
648     nsresult GetNodeType(PRUint16 *aNodeType);
649     nsresult GetParentNode(nsIDOMNode **aParentNode);
650     nsresult GetChildNodes(nsIDOMNodeList **aChildNodes);
651     nsresult GetFirstChild(nsIDOMNode **aFirstChild);
652     nsresult GetLastChild(nsIDOMNode **aLastChild);
653     nsresult GetPreviousSibling(nsIDOMNode **aPreviousSibling);
654     nsresult GetNextSibling(nsIDOMNode **aNextSibling);
655     nsresult GetAttributes(nsIDOMNamedNodeMap **aAttributes);
656     nsresult GetOwnerDocument(nsIDOMDocument **aOwnerDocument);
657     nsresult InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild, nsIDOMNode **_retval);
658     nsresult ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild, nsIDOMNode **_retval);
659     nsresult RemoveChild(nsIDOMNode *oldChild, nsIDOMNode **_retval);
660     nsresult AppendChild(nsIDOMNode *newChild, nsIDOMNode **_retval);
661     nsresult HasChildNodes(PRBool *_retval);
662     nsresult CloneNode(PRBool deep, nsIDOMNode **_retval);
663     nsresult Normalize();
664     nsresult IsSupported(const nsAString *feature, const nsAString *version, PRBool *_retval);
665     nsresult GetNamespaceURI(nsAString *aNamespaceURI);
666     nsresult GetPrefix(nsAString *aPrefix);
667     nsresult SetPrefix(const nsAString *aPrefix);
668     nsresult GetLocalName(nsAString *aLocalName);
669     nsresult HasAttributes(PRBool *_retval);
670 }
671
672 [
673     object,
674     uuid(a6cf9070-15b3-11d2-932e-00805f8add32),
675     local
676 ]
677 interface nsIDOMAttr : nsIDOMNode
678 {
679     nsresult GetName(nsAString *aName);
680     nsresult GetSpecified(PRBool *aSpecified);
681     nsresult GetValue(nsAString *aValue);
682     nsresult SetValue(const nsAString *aValue);
683     nsresult GetOwnerElement(nsIDOMElement **aOwnerElement);
684 }
685
686 [
687     object,
688     uuid(a6cf9078-15b3-11d2-932e-00805f8add32),
689     local
690 ]
691 interface nsIDOMElement : nsIDOMNode
692 {
693     nsresult GetTagName(nsAString *aTagName);
694     nsresult GetAttribute(const nsAString *name, nsAString *_retval);
695     nsresult SetAttribute(const nsAString *name, const nsAString *value);
696     nsresult RemoveAttribute(const nsAString *name);
697     nsresult GetAttributeNode(const nsAString *name, nsIDOMAttr **_retval);
698     nsresult SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
699     nsresult RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval);
700     nsresult GetElementsByTagName(const nsAString *name, nsIDOMNodeList **_retval);
701     nsresult GetAttributeNS(const nsAString *namespaceURI, const nsAString *localName,
702                             nsAString *_retval);
703     nsresult SetAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName,
704                             const nsAString *value);
705     nsresult RemoveAttributeNS(const nsAString *namespaceURI, const nsAString *localName);
706     nsresult GetAttributeNodeNS(const nsAString *namespaceURI, const nsAString *localName,
707                                 nsIDOMAttr **_retval);
708     nsresult SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
709     nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName,
710                                     nsIDOMNodeList **_retval);
711     nsresult HasAttribute(const nsAString *name, PRBool *_retval);
712     nsresult HasAttributeNS(const nsAString *namespaceURI, const nsAString *localName,
713                             PRBool *_retval);
714 }
715
716 [
717     object,
718     uuid(99715845-95fc-4a56-aa53-214b65c26e22),
719     local
720 ]
721 interface nsIDOMElementCSSInlineStyle : nsISupports
722 {
723     nsresult GetStyle(nsIDOMCSSStyleDeclaration **aStyle);
724 }
725
726 [
727     object,
728     uuid(b2f824c4-d9d3-499b-8d3b-45c8245497c6),
729     local
730 ]
731 interface nsIDOMClientRect : nsISupports
732 {
733     nsresult GetLeft(float *aLeft);
734     nsresult GetTop(float *aTop);
735     nsresult GetRight(float *aRight);
736     nsresult GetBottom(float *aBottom);
737     nsresult GetWidth(float *aWidth);
738     nsresult GetHeight(float *aHeight);
739 }
740
741 [
742     object,
743     uuid(d894b5d4-44f3-422a-a220-7763c12d4a94),
744     local
745 ]
746 interface nsIDOMNSElement : nsISupports
747 {
748     nsresult GetElementsByClassName(const nsAString *classes, nsIDOMNodeList **_retval);
749     nsresult GetClientRects(nsIDOMClientRectList **_retval);
750     nsresult GetBoundingClientRect(nsIDOMClientRect **_retval);
751     nsresult GetScrollTop(PRInt32 *aScrollTop);
752     nsresult SetScrollTop(PRInt32 aScrollTop);
753     nsresult GetScrollLeft(PRInt32 *aScrollLeft);
754     nsresult SetScrollLeft(PRInt32 aScrollLeft);
755     nsresult GetScrollHeight(PRInt32 *aScrollHeight);
756     nsresult GetScrollWidth(PRInt32 *aScrollWidth);
757     nsresult GetClientTop(PRInt32 *aClientTop);
758     nsresult GetClientLeft(PRInt32 *aClientLeft);
759     nsresult GetClientHeight(PRInt32 *aClientHeight);
760     nsresult GetClientWidth(PRInt32 *aClientWidth);
761     nsresult GetFirstElementChild(nsIDOMElement **aFirstElementChild);
762     nsresult GetLastElementChild(nsIDOMElement **aLastElementChild);
763     nsresult GetPreviousElementSibling(nsIDOMElement **aPreviousElementSibling);
764     nsresult GetNextElementSibling(nsIDOMElement **aNextElementSibling);
765     nsresult GetChildElementCount(PRUint32 *aChildElementCount);
766     nsresult GetChildren(nsIDOMNodeList **aChildren);
767     nsresult GetClassList(nsIDOMDOMTokenList **aClassList);
768     nsresult SetCapture(PRBool retargetToElement);
769     nsresult ReleaseCapture();
770     nsresult MozMatchesSelector(const nsAString *selector, PRBool *_retval);
771 }
772
773 cpp_quote("#undef GetClassName")
774
775 [
776     object,
777     uuid(a6cf9085-15b3-11d2-932e-00805f8add32),
778     local
779 ]
780 interface nsIDOMHTMLElement : nsIDOMElement
781 {
782     nsresult GetId(nsAString *aId);
783     nsresult SetId(const nsAString *aId);
784     nsresult GetTitle(nsAString *aTitle);
785     nsresult SetTitle(const nsAString *aTitle);
786     nsresult GetLang(nsAString *aLang);
787     nsresult SetLang(const nsAString *aLang);
788     nsresult GetDir(nsAString *aDir);
789     nsresult SetDir(const nsAString *aDir);
790     nsresult GetClassName(nsAString *aClassName);
791     nsresult SetClassName(const nsAString *aClassName);
792 }
793
794 [
795     object,
796     uuid(f0ffe1d2-9615-492b-aae1-05428ebc2a70),
797     local
798 ]
799 interface nsIDOMNSHTMLElement : nsISupports
800 {
801     nsresult GetOffsetTop(PRInt32 *aOffsetTop);
802     nsresult GetOffsetLeft(PRInt32 *aOffsetLeft);
803     nsresult GetOffsetWidth(PRInt32 *aOffsetWidth);
804     nsresult GetOffsetHeight(PRInt32 *aOffsetHeight);
805     nsresult GetOffsetParent(nsIDOMElement **aOffsetParent);
806     nsresult GetInnerHTML(nsAString *aInnerHTML);
807     nsresult SetInnerHTML(const nsAString *aInnerHTML);
808     nsresult GetHidden(PRBool *aHidden);
809     nsresult SetHidden(PRBool aHidden);
810     nsresult GetTabIndex(PRInt32 *aTabIndex);
811     nsresult SetTabIndex(PRInt32 aTabIndex);
812     nsresult GetContentEditable(nsAString *aContentEditable);
813     nsresult SetContentEditable(const nsAString *aContentEditable);
814     nsresult GetIsContentEditable(PRBool *aIsContentEditable);
815     nsresult GetDraggable(PRBool *aDraggable);
816     nsresult SetDraggable(PRBool aDraggable);
817     nsresult Blur();
818     nsresult Focus();
819     nsresult ScrollIntoView(PRBool top, PRUint8 _argc);
820     nsresult GetSpellcheck(PRBool *aSpellcheck);
821     nsresult SetSpellcheck(PRBool aSpellcheck);
822 }
823
824 [
825     object,
826     uuid(a6cf9083-15b3-11d2-932e-00805f8add32),
827     local
828 ]
829 interface nsIDOMHTMLCollection : nsISupports
830 {
831     nsresult GetLength(PRUint32 *aLength);
832     nsresult Item(PRUint32 index, nsIDOMNode **_retval);
833     nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval);
834 }
835
836 [
837     object,
838     uuid(a6cf9072-15b3-11d2-932e-00805f8add32),
839     local
840 ]
841 interface nsIDOMCharacterData : nsIDOMNode
842 {
843     nsresult GetData(nsAString *aData);
844     nsresult SetData(const nsAString *aData);
845     nsresult GetLength(PRUint32 *aLength);
846     nsresult SubstringData(PRUint32 offset, PRUint32 count, nsAString *_retval);
847     nsresult AppendData(const nsAString *arg);
848     nsresult InsertData(PRUint32 offset, const nsAString *arg);
849     nsresult DeleteData(PRUint32 offset, PRUint32 count);
850     nsresult ReplaceData(PRUint32 offset, PRUint32 count, const nsAString *arg);
851 }
852
853 [
854     object,
855     uuid(a6cf9082-15b3-11d2-932e-00805f8add32),
856     local
857 ]
858 interface nsIDOMText : nsIDOMCharacterData
859 {
860     nsresult SplitText(PRUint32 offset, nsIDOMText **_retval);
861 }
862
863 [
864     object,
865     uuid(a6cf9073-15b3-11d2-932e-00805f8add32),
866     local
867 ]
868 interface nsIDOMComment : nsIDOMCharacterData
869 {
870 }
871
872 [
873     object,
874     uuid(a6cf9076-15b3-11d2-932e-00805f8add32),
875     local
876 ]
877 interface nsIDOMDocumentFragment : nsIDOMNode
878 {
879 }
880
881 [
882     object,
883     uuid(f51ebade-8b1a-11d3-aae7-0010830123b4),
884     local
885 ]
886 interface nsIDOMAbstractView : nsISupports
887 {
888     nsresult GetDocument(nsIDOMDocumentView **aDocument);
889 }
890
891 [
892     object,
893     uuid(0b9341f3-95d4-4fa4-adcd-e119e0db2889),
894     local
895 ]
896 interface nsIDOMViewCSS : nsIDOMAbstractView
897 {
898     nsresult GetComputedStyle(nsIDOMElement *elt, const nsAString *pseudoElt, nsIDOMCSSStyleDeclaration **_retval);
899 }
900
901 [
902     object,
903     uuid(a6cf9075-15b3-11d2-932e-00805f8add32),
904     local
905 ]
906 interface nsIDOMDocument : nsIDOMNode
907 {
908     nsresult GetDoctype(nsIDOMDocumentType **aDoctype);
909     nsresult GetImplementation(nsIDOMDOMImplementation **aImplementation);
910     nsresult GetDocumentElement(nsIDOMElement **aDocumentElement);
911     nsresult CreateElement(const nsAString *tagName, nsIDOMElement **_retval);
912     nsresult CreateDocumentFragment(nsIDOMDocumentFragment **_retval);
913     nsresult CreateTextNode(const nsAString *data, nsIDOMText **_retval);
914     nsresult CreateComment(const nsAString *data, nsIDOMComment **_retval);
915     nsresult CreateCDATASection(const nsAString *data, nsIDOMCDATASection **_retval);
916     nsresult CreateProcessingInstruction(const nsAString *target, const nsAString *data,
917                                          nsIDOMProcessingInstruction **_retval);
918     nsresult CreateAttribute(const nsAString *name, nsIDOMAttr **_retval);
919     nsresult CreateEntityReference(const nsAString *name, nsIDOMEntityReference **_retval);
920     nsresult GetElementsByTagName(const nsAString *tagname, nsIDOMNodeList **_retval);
921     nsresult ImportNode(nsIDOMNode *importedNode, PRBool deep, nsIDOMNode **_retval);
922     nsresult CreateElementNS(const nsAString *namespaceURI, const nsAString *qualifiedName,
923                              nsIDOMElement **_retval);
924     nsresult CreateAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName,
925                                nsIDOMAttr **_retval);
926     nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName,
927                                     nsIDOMNodeList **_retval);
928     nsresult GetElementById(const nsAString *elementId, nsIDOMElement **_retval);
929 }
930
931 [
932     object,
933     uuid(92f2c6f8-3668-4a47-8251-2a900afe11fa),
934     local
935 ]
936 interface nsIDOMNSDocument : nsISupports
937 {
938     nsresult GetCharacterSet(nsAString *aCharacterSet);
939     nsresult GetDir(nsAString *aDir);
940     nsresult SetDir(const nsAString *aDir);
941     nsresult GetLocation(nsIDOMLocation **aLocation);
942     nsresult GetTitle(nsAString *aTitle);
943     nsresult SetTitle(const nsAString *aTitle);
944     nsresult GetContentType(nsAString *aContentType);
945     nsresult GetReadyState(nsAString *aReadyState);
946     nsresult GetLastModified(nsAString *aLastModified);
947     nsresult GetReferrer(nsAString *aReferrer);
948     nsresult HasFocus(PRBool *_retval);
949     nsresult GetActiveElement(nsIDOMElement **aActiveElement);
950     nsresult GetCurrentScript(nsIDOMElement **aActiveElement);
951     nsresult GetElementsByClassName(const nsAString *classes, nsIDOMNodeList **_retval);
952     nsresult ElementFromPoint(float x, float y, nsIDOMElement **_retval);
953     nsresult ReleaseCapture();
954     nsresult MozSetImageElement(const nsAString *aImageElementId, nsIDOMElement *aImageElement);
955 }
956
957 [
958     object,
959     uuid(a6cf9084-15b3-11d2-932e-00805f8add32),
960     local
961 ]
962 interface nsIDOMHTMLDocument : nsIDOMDocument
963 {
964     nsresult GetTitle(nsAString *aTitle);
965     nsresult SetTitle(const nsAString *aTitle);
966     nsresult GetReferrer(nsAString *aReferrer);
967     nsresult GetDomain(nsAString *aDomain);
968     nsresult GetURL(nsAString *aURL);
969     nsresult GetBody(nsIDOMHTMLElement **aBody);
970     nsresult SetBody(nsIDOMHTMLElement *aBody);
971     nsresult GetImages(nsIDOMHTMLCollection **aImages);
972     nsresult GetApplets(nsIDOMHTMLCollection **aApplets);
973     nsresult GetLinks(nsIDOMHTMLCollection **aLinks);
974     nsresult GetForms(nsIDOMHTMLCollection **aForms);
975     nsresult GetAnchors(nsIDOMHTMLCollection **aAnchors);
976     nsresult GetCookie(nsAString *aCookie);
977     nsresult SetCookie(const nsAString *aCookie);
978     nsresult Open();
979     nsresult Close();
980     nsresult Write(const nsAString *text);
981     nsresult Writeln(const nsAString *text);
982     nsresult GetElementsByName(const nsAString *elementName, nsIDOMNodeList **_retval);
983 }
984
985 [
986     object,
987     uuid(95cd5ad4-ae8a-4f0e-b168-35e03d5e0b9a),
988     local
989 ]
990 interface nsIDOMNSHTMLDocument : nsISupports
991 {
992     nsresult GetWidth(PRInt32 *aWidth);
993     nsresult GetHeight(PRInt32 *aHeight);
994     nsresult GetAlinkColor(nsAString *aAlinkColor);
995     nsresult SetAlinkColor(const nsAString *aAlinkColor);
996     nsresult GetLinkColor(nsAString *aLinkColor);
997     nsresult SetLinkColor(const nsAString *aLinkColor);
998     nsresult GetVlinkColor(nsAString *aVlinkColor);
999     nsresult SetVlinkColor(const nsAString *aVlinkColor);
1000     nsresult GetBgColor(nsAString *aBgColor);
1001     nsresult SetBgColor(const nsAString *aBgColor);
1002     nsresult GetFgColor(nsAString *aFgColor);
1003     nsresult SetFgColor(const nsAString *aFgColor);
1004     nsresult GetDomain(nsAString *aDomain);
1005     nsresult SetDomain(const nsAString *aDomain);
1006     nsresult GetEmbeds(nsIDOMHTMLCollection **aEmbeds);
1007     nsresult GetSelection(nsAString *_retval);
1008     nsresult Open(nsACString *aContentType, PRBool aReplace, nsIDOMDocument **_retval);
1009     nsresult Clear();
1010     nsresult CaptureEvents(PRInt32 eventFlags);
1011     nsresult ReleaseEvents(PRInt32 eventFlags);
1012     nsresult RouteEvent(nsIDOMEvent *evt);
1013     nsresult GetCompatMode(nsAString *aCompatMode);
1014     nsresult GetPlugins(nsIDOMHTMLCollection **aPlugins);
1015     nsresult GetDesignMode(nsAString *aDesignMode);
1016     nsresult SetDesignMode(const nsAString *aDesignMode);
1017     nsresult ExecCommand(const nsAString *commandID, PRBool doShowUI, const nsAString *value, PRBool *_retval);
1018     nsresult ExecCommandShowHelp(const nsAString *commandID, PRBool *_retval);
1019     nsresult QueryCommandEnabled(const nsAString *commandID, PRBool *_retval);
1020     nsresult QueryCommandIndeterm(const nsAString *commandID, PRBool *_retval);
1021     nsresult QueryCommandState(const nsAString *commandID, PRBool *_retval);
1022     nsresult QueryCommandSupported(const nsAString *commandID, PRBool *_retval);
1023     nsresult QueryCommandText(const nsAString *commandID, nsAString *_retval);
1024     nsresult QueryCommandValue(const nsAString *commandID, nsAString *_retval);
1025     nsresult GetHead(nsIDOMHTMLHeadElement *_retval);
1026 }
1027
1028 [
1029     object,
1030     uuid(3d9f4973-dd2e-48f5-b5f7-2634e09eadd9),
1031     local
1032 ]
1033 interface nsIDOMDocumentStyle : nsISupports
1034 {
1035     nsresult GetStyleSheets(nsIDOMStyleSheetList **aStyleSheets);
1036 }
1037
1038 [
1039     object,
1040     uuid(1acdb2ba-1dd2-11b2-95bc-9542495d2569),
1041     local
1042 ]
1043 interface nsIDOMDocumentView : nsISupports
1044 {
1045     nsresult GetDefaultView(nsIDOMAbstractView **aDefaultView);
1046 }
1047
1048 [
1049     object,
1050     uuid(46b91d66-28e2-11d4-ab1e-0010830123b4),
1051     local
1052 ]
1053 interface nsIDOMDocumentEvent : nsISupports
1054 {
1055 cpp_quote("#undef CreateEvent")
1056     nsresult CreateEvent(const nsAString *eventType, nsIDOMEvent **_retval);
1057 }
1058
1059 [
1060     object,
1061     uuid(a6cf90ce-15b3-11d2-932e-00805f8add32),
1062     local
1063 ]
1064 interface nsIDOMRange : nsISupports
1065 {
1066     enum {
1067         NS_START_TO_START,
1068         NS_START_TO_END,
1069         NS_END_TO_END,
1070         NS_END_TO_START
1071     };
1072
1073     nsresult GetStartContainer(nsIDOMNode **aStartContainer);
1074     nsresult GetStartOffset(PRInt32 *aStartOffset);
1075     nsresult GetEndContainer(nsIDOMNode **aEndContainer);
1076     nsresult GetEndOffset(PRInt32 *aEndOffset);
1077     nsresult GetCollapsed(PRBool *aCollapsed);
1078     nsresult GetCommonAncestorContainer(nsIDOMNode **aCommonAncestorContainer);
1079     nsresult SetStart(nsIDOMNode *refNode, PRInt32 offset);
1080     nsresult SetEnd(nsIDOMNode *refNode, PRInt32 offset);
1081     nsresult SetStartBefore(nsIDOMNode *refNode);
1082     nsresult SetStartAfter(nsIDOMNode *refNode);
1083     nsresult SetEndBefore(nsIDOMNode *refNode);
1084     nsresult SetEndAfter(nsIDOMNode *refNode);
1085     nsresult Collapse(PRBool toStart);
1086     nsresult SelectNode(nsIDOMNode *refNode);
1087     nsresult SelectNodeContents(nsIDOMNode *refNode);
1088     nsresult CompareBoundaryPoints(PRUint16 how, nsIDOMRange *sourceRange, PRInt16 *_retval);
1089     nsresult DeleteContents();
1090     nsresult ExtractContents(nsIDOMDocumentFragment **_retval);
1091     nsresult CloneContents(nsIDOMDocumentFragment **_retval);
1092     nsresult InsertNode(nsIDOMNode *newNode);
1093     nsresult SurroundContents(nsIDOMNode *newParent);
1094     nsresult CloneRange(nsIDOMRange **_retval);
1095     nsresult ToString(nsAString *_retval);
1096     nsresult Detach();
1097 }
1098
1099 [
1100     object,
1101     uuid(fed93d11-f24d-41d8-ae55-4197927999bb),
1102     local
1103 ]
1104 interface nsIDOMNSRange : nsISupports
1105 {
1106     nsresult CreateContextualFragment([in] const nsAString *fragment, [out] nsIDOMDocumentFragment **_retval);
1107     nsresult IsPointInRange([in] nsIDOMNode *parent, [in] PRInt32 offset, [out] PRBool *_retval);
1108     nsresult ComparePoint([in] nsIDOMNode *parent, [in] PRInt32 offset, [out] PRInt16 *_retval);
1109     nsresult GetClientRects(nsIDOMClientRectList **_retval);
1110     nsresult GetBoundingClientRect(nsIDOMClientRect **_retval);
1111 }
1112
1113
1114 [
1115     object,
1116     uuid(7b9badc6-c9bc-447a-8670-dbd195aed24b),
1117     local
1118 ]
1119 interface nsIDOMDocumentRange : nsISupports
1120 {
1121     nsresult CreateRange(nsIDOMRange **_retval);
1122 }
1123
1124 [
1125     object,
1126     uuid(b2c7ed59-8634-4352-9e37-5484c8b6e4e1),
1127     local
1128 ]
1129 interface nsISelection : nsISupports
1130 {
1131     nsresult GetAnchorNode(nsIDOMNode **aAnchorNode);
1132     nsresult GetAnchorOffset(PRInt32 *aAnchorOffset);
1133     nsresult GetFocusNode(nsIDOMNode **aFocusNode);
1134     nsresult GetFocusOffset(PRInt32 *aFocusOffset);
1135     nsresult GetIsCollapsed(PRBool *aIsCollapsed);
1136     nsresult GetRangeCount(PRInt32 *aRangeCount);
1137     nsresult GetRangeAt(PRInt32 index, nsIDOMRange **_retval);
1138     nsresult Collapse(nsIDOMNode *parentNode, PRInt32 offset);
1139     nsresult Extend(nsIDOMNode *parentNode, PRInt32 offset);
1140     nsresult CollapseToStart();
1141     nsresult CollapseToEnd();
1142     nsresult ContainsNode(nsIDOMNode *node, PRBool entirelyContained, PRBool *_retval);
1143     nsresult SelectAllChildren(nsIDOMNode *parentNode);
1144     nsresult AddRange(nsIDOMRange *range);
1145     nsresult RemoveRange(nsIDOMRange *range);
1146     nsresult RemoveAllRanges();
1147     nsresult DeleteFromDocument();
1148     nsresult SelectionLanguageChange(PRBool langRTL);
1149     nsresult ToString(PRUnichar **_retval);
1150 }
1151
1152 [
1153     object,
1154     uuid(a6cf906f-15b3-11d2-932e-00805f8add32),
1155     local
1156 ]
1157 interface nsIDOMWindowCollection : nsISupports
1158 {
1159     nsresult GetLength(PRUint32 *aLength);
1160     nsresult Item(PRUint32 index, nsIDOMWindow **_retval);
1161     nsresult NamedItem(const nsAString *name, nsIDOMWindow **_retval);
1162 }
1163
1164 [
1165     object,
1166     uuid(a6cf906b-15b3-11d2-932e-00805f8add32),
1167     local
1168 ]
1169 interface nsIDOMWindow : nsISupports
1170 {
1171     nsresult GetDocument(nsIDOMDocument **aDocument);
1172     nsresult GetParent(nsIDOMWindow **aParent);
1173     nsresult GetTop(nsIDOMWindow **aTop);
1174     nsresult GetScrollbars(nsIDOMBarProp **aScrollbars);
1175     nsresult GetFrames(nsIDOMWindowCollection **aFrames);
1176     nsresult GetName(nsAString *aName);
1177     nsresult SetName(const nsAString *aName);
1178     nsresult GetTextZoom(float *aTextZoom);
1179     nsresult SetTextZoom(float aTextZoom);
1180     nsresult GetScrollX(PRInt32 *aScrollX);
1181     nsresult GetScrollY(PRInt32 *aScrollY);
1182     nsresult ScrollTo(PRInt32 xScroll, PRInt32 yScroll);
1183     nsresult ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif);
1184     nsresult GetSelection(nsISelection **_retval);
1185     nsresult ScrollByLines(PRInt32 numLines);
1186     nsresult ScrollByPages(PRInt32 numPages);
1187     nsresult SizeToContent();
1188 }
1189
1190 [
1191     object,
1192     uuid(a6cf908e-15b3-11d2-932e-00805f8add32),
1193     local
1194 ]
1195 interface nsIDOMHTMLBodyElement : nsIDOMHTMLElement
1196 {
1197     nsresult GetALink(nsAString *aALink);
1198     nsresult SetALink(const nsAString *aALink);
1199     nsresult GetBackground(nsAString *aBackground);
1200     nsresult SetBackground(const nsAString *aBackground);
1201     nsresult GetBgColor(nsAString *aBgColor);
1202     nsresult SetBgColor(const nsAString *aBgColor);
1203     nsresult GetLink(nsAString *aLink);
1204     nsresult SetLink(const nsAString *aLink);
1205     nsresult GetText(nsAString *aText);
1206     nsresult SetText(const nsAString *aText);
1207     nsresult GetVLink(nsAString *aVLink);
1208     nsresult SetVLink(const nsAString *aVLink);
1209 }
1210
1211 [
1212     object,
1213     uuid(0884ce23-e069-499e-a13c-a91c8ae0fc98),
1214     local
1215 ]
1216 interface nsIDOMHTMLFormElement : nsIDOMHTMLElement
1217 {
1218     nsresult GetName(nsAString *aName);
1219     nsresult SetName(const nsAString *aName);
1220     nsresult GetAcceptCharset(nsAString *aAcceptCharset);
1221     nsresult SetAcceptCharset(const nsAString *aAcceptCharset);
1222     nsresult GetAction(nsAString *aAction);
1223     nsresult SetAction(const nsAString *aAction);
1224     nsresult GetAutocomplete(nsAString *aAutocomplete);
1225     nsresult SetAutocomplete(const nsAString *aAutocomplete);
1226     nsresult GetEnctype(nsAString *aEnctype);
1227     nsresult SetEnctype(const nsAString *aEnctype);
1228     nsresult GetMethod(nsAString *aMethod);
1229     nsresult SetMethod(const nsAString *aMethod);
1230     nsresult GetNoValidate(PRBool *aNoValidate);
1231     nsresult SetNoValidate(PRBool aNoValidate);
1232     nsresult GetTarget(nsAString *aTarget);
1233     nsresult SetTarget(const nsAString *aTarget);
1234     nsresult GetElements(nsIDOMHTMLCollection **aElements);
1235     nsresult GetLength(PRInt32 *aLength);
1236     nsresult Submit();
1237     nsresult Reset();
1238 }
1239
1240 [
1241     object,
1242     uuid(0805059d-f18f-4095-ae6b-0bf6df80b7b8),
1243     local
1244 ]
1245 interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
1246 {
1247     nsresult GetAccept(nsAString *aAccept);
1248     nsresult SetAccept(const nsAString *aAccept);
1249     nsresult GetAlt(nsAString *aAlt);
1250     nsresult SetAlt(const nsAString *aAlt);
1251     nsresult GetAutocomplete(nsAString *aAutocomplete);
1252     nsresult SetAutocomplete(const nsAString *aAutocomplete);
1253     nsresult GetAutofocus(PRBool *aAutofocus);
1254     nsresult SetAutofocus(PRBool aAutofocus);
1255     nsresult GetDefaultChecked(PRBool *aDefaultChecked);
1256     nsresult SetDefaultChecked(PRBool aDefaultChecked);
1257     nsresult GetChecked(PRBool *aChecked);
1258     nsresult SetChecked(PRBool aChecked);
1259     nsresult GetDisabled(PRBool *aDisabled);
1260     nsresult SetDisabled(PRBool aDisabled);
1261     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1262     nsresult GetFormAction(nsAString *aFormAction);
1263     nsresult SetFormAction(const nsAString *aFormAction);
1264     nsresult GetFormEnctype(nsAString *aFormEnctype);
1265     nsresult SetFormEnctype(const nsAString *aFormEnctype);
1266     nsresult GetFormMethod(nsAString *aFormMethod);
1267     nsresult SetFormMethod(const nsAString *aFormMethod);
1268     nsresult GetFormNoValidate(PRBool *aFormNoValidate);
1269     nsresult SetFormNoValidate(PRBool aFormNoValidate);
1270     nsresult GetFormTarget(nsAString *aFormTarget);
1271     nsresult SetFormTarget(const nsAString *aFormTarget);
1272     nsresult GetFiles(nsIDOMFileList **aFiles);
1273     nsresult GetIndeterminate(PRBool *aIndeterminate);
1274     nsresult SetIndeterminate(PRBool aIndeterminate);
1275     nsresult GetList(nsIDOMHTMLElement **aList);
1276     nsresult GetMaxLength(PRInt32 *aMaxLength);
1277     nsresult SetMaxLength(PRInt32 aMaxLength);
1278     nsresult GetMultiple(PRBool *aMultiple);
1279     nsresult SetMultiple(PRBool aMultiple);
1280     nsresult GetName(nsAString *aName);
1281     nsresult SetName(const nsAString *aName);
1282     nsresult GetPattern(nsAString *aPattern);
1283     nsresult SetPattern(const nsAString *aPattern);
1284     nsresult GetPlaceholder(nsAString *aPlaceholder);
1285     nsresult SetPlaceholder(const nsAString *aPlaceholder);
1286     nsresult GetReadOnly(PRBool *aReadOnly);
1287     nsresult SetReadOnly(PRBool aReadOnly);
1288     nsresult GetRequired(PRBool *aRequired);
1289     nsresult SetRequired(PRBool aRequired);
1290     nsresult GetAccessKey(nsAString *aAccessKey);
1291     nsresult SetAccessKey(const nsAString *aAccessKey);
1292     nsresult GetAlign(nsAString *aAlign);
1293     nsresult SetAlign(const nsAString *aAlign);
1294     nsresult GetSize(PRUint32 *aSize);
1295     nsresult SetSize(PRUint32 aSize);
1296     nsresult GetSrc(nsAString *aSrc);
1297     nsresult SetSrc(const nsAString *aSrc);
1298     nsresult GetType(nsAString *aType);
1299     nsresult SetType(const nsAString *aType);
1300     nsresult GetDefaultValue(nsAString *aDefaultValue);
1301     nsresult SetDefaultValue(const nsAString *aDefaultValue);
1302     nsresult GetValue(nsAString *aValue);
1303     nsresult SetValue(const nsAString *aValue);
1304     nsresult GetWillValidate(PRBool *aWillValidate);
1305     nsresult GetValidity(nsIDOMValidityState **aValidity);
1306     nsresult GetValidationMessage(nsAString *aValidationMessage);
1307     nsresult CheckValidity(PRBool *_retval);
1308     nsresult SetCustomValidity(const nsAString *error);
1309     nsresult Select();
1310     nsresult GetSelectionStart(PRInt32 *aSelectionStart);
1311     nsresult SetSelectionStart(PRInt32 aSelectionStart);
1312     nsresult GetSelectionEnd(PRInt32 *aSelectionEnd);
1313     nsresult SetSelectionEnd(PRInt32 aSelectionEnd);
1314     nsresult SetSelectionRange(PRInt32 selectionStart, PRInt32 selectionEnd);
1315     nsresult GetTabIndex(PRInt32 *aTabIndex);
1316     nsresult SetTabIndex(PRInt32 aTabIndex);
1317     nsresult GetUseMap(nsAString *aUseMap);
1318     nsresult SetUseMap(const nsAString *aUseMap);
1319     nsresult GetControllers(nsIControllers **aControllers);
1320     nsresult GetTextLength(PRInt32 *aTextLength);
1321     nsresult MozGetFileNameArray(PRUint32 *aLength, PRUnichar ***aFileNames);
1322     nsresult MozSetFileNameArray(const PRUnichar **aFileNames, PRUint32 aLength);
1323     nsresult MozIsTextField(PRBool aExcludePassword, PRBool *_retval);
1324     nsresult Blur();
1325     nsresult Focus();
1326     nsresult Click();
1327 }
1328
1329 [
1330     object,
1331     uuid(611d00f5-1eb8-4571-b995-2a2019d2d11c),
1332     local
1333 ]
1334 interface nsIDOMHTMLOptionElement : nsIDOMHTMLElement
1335 {
1336     nsresult GetDisabled(PRBool *aDisabled);
1337     nsresult SetDisabled(PRBool aDisabled);
1338     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1339     nsresult GetLabel(nsAString *aLabel);
1340     nsresult SetLabel(const nsAString *aLabel);
1341     nsresult GetDefaultSelected(PRBool *aDefaultSelected);
1342     nsresult SetDefaultSelected(PRBool aDefaultSelected);
1343     nsresult GetSelected(PRBool *aSelected);
1344     nsresult SetSelected(PRBool aSelected);
1345     nsresult GetValue(nsAString *aValue);
1346     nsresult SetValue(const nsAString *aValue);
1347     nsresult GetText(nsAString *aText);
1348     nsresult SetText(const nsAString *aText);
1349     nsresult GetIndex(PRInt32 *aIndex);
1350 }
1351
1352 [
1353     object,
1354     uuid(bce0213c-f70f-488f-b93f-688acca55d63),
1355     local
1356 ]
1357 interface nsIDOMHTMLOptionsCollection : nsISupports
1358 {
1359     nsresult GetLength(PRUint32 *aLength);
1360     nsresult SetLength(PRUint32 aLength);
1361     nsresult Item(PRUint32 index, nsIDOMNode **_retval);
1362     nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval);
1363 }
1364
1365 [
1366     object,
1367     uuid(e3c6d960-972c-4a5e-a8f4-6ca65d578abf),
1368     local
1369 ]
1370 interface nsIDOMHTMLSelectElement : nsIDOMHTMLElement
1371 {
1372     nsresult GetAutofocus(PRBool *aAutofocus);
1373     nsresult SetAutofocus(PRBool aAutofocus);
1374     nsresult GetDisabled(PRBool *aDisabled);
1375     nsresult SetDisabled(PRBool aDisabled);
1376     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1377     nsresult GetMultiple(PRBool *aMultiple);
1378     nsresult SetMultiple(PRBool aMultiple);
1379     nsresult GetName(nsAString *aName);
1380     nsresult SetName(const nsAString *aName);
1381     nsresult GetSize(PRInt32 *aSize);
1382     nsresult SetSize(PRInt32 aSize);
1383     nsresult GetType(nsAString *aType);
1384     nsresult GetOptions(nsIDOMHTMLOptionsCollection **aOptions);
1385     nsresult GetLength(PRUint32 *aLength);
1386     nsresult SetLength(PRUint32 aLength);
1387     nsresult Item(PRUint32 index, nsIDOMNode **_retval);
1388     nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval);
1389     nsresult Add(nsIDOMHTMLElement *element, nsIDOMHTMLElement *before);
1390     nsresult Remove(PRInt32 index);
1391     nsresult GetSelectedIndex(PRInt32 *aSelectedIndex);
1392     nsresult SetSelectedIndex(PRInt32 aSelectedIndex);
1393     nsresult GetValue(nsAString *aValue);
1394     nsresult SetValue(const nsAString *aValue);
1395     nsresult GetTabIndex(PRInt32 *aTabIndex);
1396     nsresult SetTabIndex(PRInt32 aTabIndex);
1397     nsresult Blur();
1398     nsresult Focus();
1399     nsresult GetWillValidate(PRBool *aWillValidate);
1400     nsresult GetValidity(nsIDOMValidityState **aValidity);
1401     nsresult GetValidationMessage(nsAString *aValidationMessage);
1402     nsresult CheckValidity(PRBool *_retval);
1403     nsresult SetCustomValidity(const nsAString *error);
1404 }
1405
1406 [
1407     object,
1408     uuid(a6cf9094-15b3-11d2-932e-00805f8add32),
1409     local
1410 ]
1411 interface nsIDOMHTMLTextAreaElement : nsIDOMHTMLElement
1412 {
1413     nsresult GetDefaultValue(nsAString *aDefaultValue);
1414     nsresult SetDefaultValue(const nsAString *aDefaultValue);
1415     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1416     nsresult GetAccessKey(nsAString *aAccessKey);
1417     nsresult SetAccessKey(const nsAString *aAccessKey);
1418     nsresult GetCols(PRInt32 *aCols);
1419     nsresult SetCols(PRInt32 aCols);
1420     nsresult GetDisabled(PRBool *aDisabled);
1421     nsresult SetDisabled(PRBool aDisabled);
1422     nsresult GetName(nsAString *aName);
1423     nsresult SetName(const nsAString *aName);
1424     nsresult GetReadOnly(PRBool *aReadOnly);
1425     nsresult SetReadOnly(PRBool aReadOnly);
1426     nsresult GetRows(PRInt32 *aRows);
1427     nsresult SetRows(PRInt32 aRows);
1428     nsresult GetTabIndex(PRInt32 *aTabIndex);
1429     nsresult SetTabIndex(PRInt32 aTabIndex);
1430     nsresult GetType(nsAString *aType);
1431     nsresult GetValue(nsAString *aValue);
1432     nsresult SetValue(const nsAString *aValue);
1433     nsresult Blur();
1434     nsresult Focus();
1435     nsresult Select();
1436 }
1437
1438 [
1439     object,
1440     uuid(4af8568c-375c-42fd-a82f-b25a7c03fc3e),
1441     local
1442 ]
1443 interface nsIDOMHTMLScriptElement : nsIDOMHTMLElement
1444 {
1445     nsresult GetSrc(nsAString *aSrc);
1446     nsresult SetSrc(const nsAString *aSrc);
1447     nsresult GetAsync(PRBool *aAsync);
1448     nsresult SetAsync(PRBool aAsync);
1449     nsresult GetDefer(PRBool *aDefer);
1450     nsresult SetDefer(PRBool aDefer);
1451     nsresult GetType(nsAString *aType);
1452     nsresult SetType(const nsAString *aType);
1453     nsresult GetCharset(nsAString *aCharset);
1454     nsresult SetCharset(const nsAString *aCharset);
1455     nsresult GetText(nsAString *aText);
1456     nsresult SetText(const nsAString *aText);
1457     nsresult GetHtmlFor(nsAString *aHtmlFor);
1458     nsresult SetHtmlFor(const nsAString *aHtmlFor);
1459     nsresult GetEvent(nsAString *aEvent);
1460     nsresult SetEvent(const nsAString *aEvent);
1461 }
1462
1463 [
1464     object,
1465     uuid(3fc9c313-49b9-4315-b39f-7166cf362e10),
1466     local
1467 ]
1468 interface nsIDOMHTMLImageElement : nsIDOMHTMLElement
1469 {
1470     nsresult GetAlt(nsAString *aAlt);
1471     nsresult SetAlt(const nsAString *aAlt);
1472     nsresult GetSrc(nsAString *aSrc);
1473     nsresult SetSrc(const nsAString *aSrc);
1474     nsresult GetUseMap(nsAString *aUseMap);
1475     nsresult SetUseMap(const nsAString *aUseMap);
1476     nsresult GetIsMap(PRBool *aIsMap);
1477     nsresult SetIsMap(PRBool aIsMap);
1478     nsresult GetWidth(PRInt32 *aWidth);
1479     nsresult SetWidth(PRInt32 aWidth);
1480     nsresult GetHeight(PRInt32 *aHeight);
1481     nsresult SetHeight(PRInt32 aHeight);
1482     nsresult GetNaturalWidth(PRInt32 *aNaturalWidth);
1483     nsresult GetNaturalHeight(PRInt32 *aNaturalHeight);
1484     nsresult GetComplete(PRBool *aComplete);
1485     nsresult GetName(nsAString *aName);
1486     nsresult SetName(const nsAString *aName);
1487     nsresult GetAlign(nsAString *aAlign);
1488     nsresult SetAlign(const nsAString *aAlign);
1489     nsresult GetBorder(nsAString *aBorder);
1490     nsresult SetBorder(const nsAString *aBorder);
1491     nsresult GetHspace(PRInt32 *aHspace);
1492     nsresult SetHspace(PRInt32 aHspace);
1493     nsresult GetLongDesc(nsAString *aLongDesc);
1494     nsresult SetLongDesc(const nsAString *aLongDesc);
1495     nsresult GetVspace(PRInt32 *aVspace);
1496     nsresult SetVspace(PRInt32 aVspace);
1497     nsresult GetLowsrc(nsAString *aLowsrc);
1498     nsresult SetLowsrc(const nsAString *aLowsrc);
1499     nsresult GetX(PRInt32 *aX);
1500     nsresult GetY(PRInt32 *aY);
1501 }
1502
1503 [
1504     object,
1505     uuid(4e237175-3628-4dc8-892f-5270edc3c71a),
1506     local
1507 ]
1508 interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement
1509 {
1510     nsresult GetHref(nsAString *aHref);
1511     nsresult SetHref(const nsAString *aHref);
1512     nsresult GetTarget(nsAString *aTarget);
1513     nsresult SetTarget(const nsAString *aTarget);
1514     nsresult GetPing(nsAString *aPing);
1515     nsresult SetPing(const nsAString *aPing);
1516     nsresult GetRel(nsAString *aRel);
1517     nsresult SetRel(const nsAString *aRel);
1518     nsresult GetHreflang(nsAString *aHreflang);
1519     nsresult SetHreflang(const nsAString *aHreflang);
1520     nsresult GetType(nsAString *aType);
1521     nsresult SetType(const nsAString *aType);
1522     nsresult GetText(nsAString *aText);
1523     nsresult SetText(const nsAString *aText);
1524     nsresult GetProtocol(nsAString *aProtocol);
1525     nsresult SetProtocol(const nsAString *aProtocol);
1526     nsresult GetHost(nsAString *aHost);
1527     nsresult SetHost(const nsAString *aHost);
1528     nsresult GetHostname(nsAString *aHostname);
1529     nsresult SetHostname(const nsAString *aHostname);
1530     nsresult GetPort(nsAString *aPort);
1531     nsresult SetPort(const nsAString *aPort);
1532     nsresult GetPathname(nsAString *aPathname);
1533     nsresult SetPathname(const nsAString *aPathname);
1534     nsresult GetSearch(nsAString *aSearch);
1535     nsresult SetSearch(const nsAString *aSearch);
1536     nsresult GetHash(nsAString *aHash);
1537     nsresult SetHash(const nsAString *aHash);
1538     nsresult GetAccessKey(nsAString *aAccessKey);
1539     nsresult SetAccessKey(const nsAString *aAccessKey);
1540     nsresult GetCharset(nsAString *aCharset);
1541     nsresult SetCharset(const nsAString *aCharset);
1542     nsresult GetCoords(nsAString *aCoords);
1543     nsresult SetCoords(const nsAString *aCoords);
1544     nsresult GetName(nsAString *aName);
1545     nsresult SetName(const nsAString *aName);
1546     nsresult GetRev(nsAString *aRev);
1547     nsresult SetRev(const nsAString *aRev);
1548     nsresult GetShape(nsAString *aShape);
1549     nsresult SetShape(const nsAString *aShape);
1550     nsresult GetTabIndex(PRInt32 *aTabIndex);
1551     nsresult SetTabIndex(PRInt32 aTabIndex);
1552     nsresult ToString(nsAString *_retval);
1553     nsresult Blur();
1554     nsresult Focus();
1555 }
1556
1557 [
1558     object,
1559     uuid(a6cf90b2-15b3-11d2-932e-00805f8add32),
1560     local
1561 ]
1562 interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
1563 {
1564     nsresult GetCaption(nsIDOMHTMLTableCaptionElement **aCaption);
1565     nsresult SetCaption(nsIDOMHTMLTableCaptionElement *aCaption);
1566     nsresult GetTHead(nsIDOMHTMLTableSectionElement **aTHead);
1567     nsresult SetTHead(nsIDOMHTMLTableSectionElement *aTHead);
1568     nsresult GetTFoot(nsIDOMHTMLTableSectionElement **aTFoot);
1569     nsresult SetTFoot(nsIDOMHTMLTableSectionElement *aTFoot);
1570     nsresult GetRows(nsIDOMHTMLCollection **aRows);
1571     nsresult GetTBodies(nsIDOMHTMLCollection **aTBodies);
1572     nsresult GetAlign(nsAString *aAlign);
1573     nsresult SetAlign(const nsAString *aAlign);
1574     nsresult GetBgColor(nsAString *aBgColor);
1575     nsresult SetBgColor(const nsAString *aBgColor);
1576     nsresult GetBorder(nsAString *aBorder);
1577     nsresult SetBorder(const nsAString *aBorder);
1578     nsresult GetCellPadding(nsAString *aCellPadding);
1579     nsresult SetCellPadding(const nsAString *aCellPadding);
1580     nsresult GetCellSpacing(nsAString *aCellSpacing);
1581     nsresult SetCellSpacing(const nsAString *aCellSpacing);
1582     nsresult GetFrame(nsAString *aFrame);
1583     nsresult SetFrame(const nsAString *aFrame);
1584     nsresult GetRules(nsAString *aRules);
1585     nsresult SetRules(const nsAString *aRules);
1586     nsresult GetSummary(nsAString *aSummary);
1587     nsresult SetSummary(const nsAString *aSummary);
1588     nsresult GetWidth(nsAString *aWidth);
1589     nsresult SetWidth(const nsAString *aWidth);
1590     nsresult CreateTHead(nsIDOMHTMLElement **_retval);
1591     nsresult DeleteTHead();
1592     nsresult CreateTFoot(nsIDOMHTMLElement **_retval);
1593     nsresult DeleteTFoot();
1594     nsresult CreateCaption(nsIDOMHTMLElement **_retval);
1595     nsresult DeleteCaption();
1596     nsresult InsertRow(PRInt32 index, nsIDOMHTMLElement **_retval);
1597     nsresult DeleteRow(PRInt32 index);
1598 }
1599
1600 [
1601     object,
1602     uuid(a6cf90b6-15b3-11d2-932e-00805f8add32),
1603     local
1604 ]
1605 interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement
1606 {
1607     nsresult GetRowIndex(PRInt32 *aRowIndex);
1608     nsresult GetSectionRowIndex(PRInt32 *aSectionRowIndex);
1609     nsresult GetCells(nsIDOMHTMLCollection **aCells);
1610     nsresult GetAlign(nsAString *aAlign);
1611     nsresult SetAlign(const nsAString *aAlign);
1612     nsresult GetBgColor(nsAString *aBgColor);
1613     nsresult SetBgColor(const nsAString *aBgColor);
1614     nsresult GetCh(nsAString *aCh);
1615     nsresult SetCh(const nsAString *aCh);
1616     nsresult GetChOff(nsAString *aChOff);
1617     nsresult SetChOff(const nsAString *aChOff);
1618     nsresult GetVAlign(nsAString *aVAlign);
1619     nsresult SetVAlign(const nsAString *aVAlign);
1620     nsresult InsertCell(PRInt32 index, nsIDOMHTMLElement **_retval);
1621     nsresult DeleteCell(PRInt32 index);
1622 }
1623
1624 [
1625     object,
1626     uuid(a6cf90ba-15b3-11d2-932e-00805f8add32),
1627     local
1628 ]
1629 interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement
1630 {
1631     nsresult GetAlign(nsAString *aAlign);
1632     nsresult SetAlign(const nsAString *aAlign);
1633     nsresult GetFrameBorder(nsAString *aFrameBorder);
1634     nsresult SetFrameBorder(const nsAString *aFrameBorder);
1635     nsresult GetHeight(nsAString *aHeight);
1636     nsresult SetHeight(const nsAString *aHeight);
1637     nsresult GetLongDesc(nsAString *aLongDesc);
1638     nsresult SetLongDesc(const nsAString *aLongDesc);
1639     nsresult GetMarginHeight(nsAString *aMarginHeight);
1640     nsresult SetMarginHeight(const nsAString *aMarginHeight);
1641     nsresult GetMarginWidth(nsAString *aMarginWidth);
1642     nsresult SetMarginWidth(const nsAString *aMarginWidth);
1643     nsresult GetName(nsAString *aName);
1644     nsresult SetName(const nsAString *aName);
1645     nsresult GetScrolling(nsAString *aScrolling);
1646     nsresult SetScrolling(const nsAString *aScrolling);
1647     nsresult GetSrc(nsAString *aSrc);
1648     nsresult SetSrc(const nsAString *aSrc);
1649     nsresult GetWidth(nsAString *aWidth);
1650     nsresult SetWidth(const nsAString *aWidth);
1651     nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
1652 }
1653
1654 [
1655     object,
1656     uuid(a6cf90b9-15b3-11d2-932e-00805f8add32),
1657     local
1658 ]
1659 interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement
1660 {
1661     nsresult GetFrameBorder(nsAString *aFrameBorder);
1662     nsresult SetFrameBorder(const nsAString *aFrameBorder);
1663     nsresult GetLongDesc(nsAString *aLongDesc);
1664     nsresult SetLongDesc(const nsAString *aLongDesc);
1665     nsresult GetMarginHeight(nsAString *aMarginHeight);
1666     nsresult SetMarginHeight(const nsAString *aMarginHeight);
1667     nsresult GetMarginWidth(nsAString *aMarginWidth);
1668     nsresult SetMarginWidth(const nsAString *aMarginWidth);
1669     nsresult GetName(nsAString *aName);
1670     nsresult SetName(const nsAString *aName);
1671     nsresult GetNoResize(PRBool *aNoResize);
1672     nsresult SetNoResize(PRBool aNoResize);
1673     nsresult GetScrolling(nsAString *aScrolling);
1674     nsresult SetScrolling(const nsAString *aScrolling);
1675     nsresult GetSrc(nsAString *aSrc);
1676     nsresult SetSrc(const nsAString *aSrc);
1677     nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
1678 }
1679
1680 [
1681     object,
1682     uuid(9b93aab4-7fe8-4f79-9ad2-0623178a0c46),
1683     local
1684 ]
1685 interface nsIDOMHTMLObjectElement : nsIDOMHTMLElement
1686 {
1687     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1688     nsresult GetCode(nsAString *aCode);
1689     nsresult SetCode(const nsAString *aCode);
1690     nsresult GetAlign(nsAString *aAlign);
1691     nsresult SetAlign(const nsAString *aAlign);
1692     nsresult GetArchive(nsAString *aArchive);
1693     nsresult SetArchive(const nsAString *aArchive);
1694     nsresult GetBorder(nsAString *aBorder);
1695     nsresult SetBorder(const nsAString *aBorder);
1696     nsresult GetCodeBase(nsAString *aCodeBase);
1697     nsresult SetCodeBase(const nsAString *aCodeBase);
1698     nsresult GetCodeType(nsAString *aCodeType);
1699     nsresult SetCodeType(const nsAString *aCodeType);
1700     nsresult GetData(nsAString *aData);
1701     nsresult SetData(const nsAString *aData);
1702     nsresult GetDeclare(PRBool *aDeclare);
1703     nsresult SetDeclare(PRBool aDeclare);
1704     nsresult GetHeight(nsAString *aHeight);
1705     nsresult SetHeight(const nsAString *aHeight);
1706     nsresult GetHspace(PRInt32 *aHspace);
1707     nsresult SetHspace(PRInt32 aHspace);
1708     nsresult GetName(nsAString *aName);
1709     nsresult SetName(const nsAString *aName);
1710     nsresult GetStandby(nsAString *aStandby);
1711     nsresult SetStandby(const nsAString *aStandby);
1712     nsresult GetTabIndex(PRInt32 *aTabIndex);
1713     nsresult SetTabIndex(PRInt32 aTabIndex);
1714     nsresult GetType(nsAString *aType);
1715     nsresult SetType(const nsAString *aType);
1716     nsresult GetUseMap(nsAString *aUseMap);
1717     nsresult SetUseMap(const nsAString *aUseMap);
1718     nsresult GetVspace(PRInt32 *aVspace);
1719     nsresult SetVspace(PRInt32 aVspace);
1720     nsresult GetWidth(nsAString *aWidth);
1721     nsresult SetWidth(const nsAString *aWidth);
1722     nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
1723     nsresult GetWillValidate(PRBool *aWillValidate);
1724     nsresult GetValidity(nsIDOMValidityState **aValidity);
1725     nsresult GetValidationMessage(nsAString *aValidationMessage);
1726     nsresult CheckValidity(PRBool *_retval);
1727     nsresult SetCustomValidity(const nsAString *error);
1728 }
1729
1730 [
1731     object,
1732     uuid(a6cf90ad-15b3-11d2-932e-00805f8add32),
1733     local
1734 ]
1735 interface nsIDOMHTMLParamElement : nsIDOMHTMLElement
1736 {
1737     nsresult GetName(nsAString *aName);
1738     nsresult SetName(const nsAString *aName);
1739     nsresult GetType(nsAString *aType);
1740     nsresult SetType(const nsAString *aType);
1741     nsresult GetValue(nsAString *aValue);
1742     nsresult SetValue(const nsAString *aValue);
1743     nsresult GetValueType(nsAString *aValueType);
1744     nsresult SetValueType(const nsAString *aValueType);
1745 }
1746
1747 [
1748     object,
1749     uuid(a6cf908d-15b3-11d2-932e-00805f8add32),
1750     local
1751 ]
1752 interface nsIDOMHTMLStyleElement : nsIDOMHTMLElement
1753 {
1754     nsresult GetDisabled(PRBool *aDisabled);
1755     nsresult SetDisabled(PRBool aDisabled);
1756     nsresult GetMedia(nsAString *aMedia);
1757     nsresult SetMedia(const nsAString *aMedia);
1758     nsresult GetType(nsAString *aType);
1759     nsresult SetType(const nsAString *aType);
1760 }
1761
1762 [
1763     object,
1764     uuid(94928ab3-8b63-11d3-989d-001083010e9b),
1765     local
1766 ]
1767 interface nsIURIContentListener : nsISupports
1768 {
1769     nsresult OnStartURIOpen(nsIURI *aURI, PRBool *_retval);
1770     nsresult DoContent(const char *aContentType, PRBool aIsContentPreferred, nsIRequest *aRequest,
1771         nsIStreamListener **aContentHandler, PRBool *_retval);
1772     nsresult IsPreferred(const char *aContentType, char **aDesiredContentType, PRBool *_retval);
1773     nsresult CanHandleContent(const char *aContentType, PRBool aIsContentPreferred,
1774         char **aDesiredContentType, PRBool *_retval);
1775     nsresult GetLoadCookie(nsISupports **aLoadCookie);
1776     nsresult SetLoadCookie(nsISupports *aLoadCookie);
1777     nsresult GetParentContentListener(nsIURIContentListener **aParentContentListener);
1778     nsresult SetParentContentListener(nsIURIContentListener *aParentContentListener);
1779 }
1780
1781 [
1782     object,
1783     uuid(44b78386-1dd2-11b2-9ad2-e4eee2ca1916),
1784     local
1785 ]
1786 interface nsITooltipListener : nsISupports
1787 {
1788     nsresult OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText);
1789     nsresult OnHideTooltip();
1790 }
1791
1792 [
1793     object,
1794     uuid(33e9d001-caab-4ba9-8961-54902f197202),
1795     local
1796 ]
1797 interface nsIWebBrowser : nsISupports
1798 {
1799     nsresult AddWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
1800     nsresult RemoveWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
1801     nsresult GetContainerWindow(nsIWebBrowserChrome **aContainerWindow);
1802     nsresult SetContainerWindow(nsIWebBrowserChrome *aContainerWindow);
1803     nsresult GetParentURIContentListener(nsIURIContentListener **aParentURIContentListener);
1804     nsresult SetParentURIContentListener(nsIURIContentListener *aParentURIContentListener);
1805     nsresult GetContentDOMWindow(nsIDOMWindow **aContentDOMWindow);
1806     nsresult GetIsActive(PRBool *aIsActive);
1807     nsresult SetIsActive(PRBool aIsActive);
1808 }
1809
1810 cpp_quote("#define SETUP_ALLOW_JAVASCRIPT  2")
1811 cpp_quote("#define SETUP_IS_CHROME_WRAPPER 7")
1812
1813 [
1814     object,
1815     uuid(f15398a0-8018-11d3-af70-00a024ffc08c),
1816     local
1817 ]
1818 interface nsIWebBrowserSetup : nsISupports
1819 {
1820     nsresult SetProperty(PRUint32 aId, PRUint32 aValue);
1821 }
1822
1823 typedef void* nativeWindow;
1824
1825 [
1826     object,
1827     uuid(046bc8a0-8015-11d3-af70-00a024ffc08c),
1828     local
1829 ]
1830 interface nsIBaseWindow : nsISupports
1831 {
1832     nsresult InitWindow(nativeWindow parentNativeWindow, nsIWidget *parentWidget, PRInt32 x,
1833             PRInt32 y, PRInt32 cx, PRInt32 cy);
1834     nsresult Create();
1835     nsresult Destroy();
1836     nsresult SetPosition(PRInt32 x, PRInt32 y);
1837     nsresult GetPosition(PRInt32 *x, PRInt32 *y);
1838     nsresult SetSize(PRInt32 cx, PRInt32 cy, PRBool fRepaint);
1839     nsresult GetSize(PRInt32 *cx, PRInt32 *cy);
1840     nsresult SetPositionAndSize(PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy, PRBool fRepaint);
1841     nsresult GetPositionAndSize(PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy);
1842     nsresult Repaint(PRBool force);
1843     nsresult GetParentWidget(nsIWidget **aParentWidget); 
1844     nsresult SetParentWidget(nsIWidget *aParentWidget);
1845     nsresult GetParentNativeWindow(nativeWindow *aParentNativeWindow);
1846     nsresult SetParentNativeWindow(nativeWindow aParentNativeWindow);
1847     nsresult GetVisibility(PRBool *aVisibility);
1848     nsresult SetVisibility(PRBool aVisibility);
1849     nsresult GetEnabled(PRBool *aEnabled);
1850     nsresult SetEnabled(PRBool aEnabled);
1851     nsresult GetBlurSuppression(PRBool *aBlurSuppression);
1852     nsresult SetBlurSuppression(PRBool aBlurSuppression);
1853     nsresult GetMainWidget(nsIWidget **aMainWidget);
1854     nsresult SetFocus();
1855     nsresult GetTitle(PRUnichar **aTitle);
1856     nsresult SetTitle(const PRUnichar *aTitle);
1857 }
1858
1859 cpp_quote("#define LOAD_FLAGS_NONE           0x00000")
1860 cpp_quote("#define LOAD_INITIAL_DOCUMENT_URI 0x80000")
1861
1862 [
1863     object,
1864     uuid(f5d9e7b0-d930-11d3-b057-00a024ffc08c),
1865     local
1866 ]
1867 interface nsIWebNavigation : nsISupports
1868 {
1869     nsresult GetCanGoBack(PRBool *aCanGoBack);
1870     nsresult GetCanGoForward(PRBool *aCanGoForward);
1871     nsresult GoBack();
1872     nsresult GoForward();
1873     nsresult GotoIndex(PRInt32 index);
1874     nsresult LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer,
1875             nsIInputStream *aPostData, nsIInputStream *aHeaders);
1876     nsresult Reload(PRUint32 aReloadFlags);
1877     nsresult Stop(PRUint32 aStopFlags);
1878     nsresult GetDocument(nsIDOMDocument **aDocument);
1879     nsresult GetCurrentURI(nsIURI **aCurrentURI);
1880     nsresult GetReferringURI(nsIURI **aReferringURI);
1881     nsresult GetSessionHistory(nsISHistory **aSessionHistory);
1882     nsresult SetSessionHistory(nsISHistory *aSessionHistory);
1883 }
1884
1885 [
1886     object,
1887     uuid(570f39d0-efd0-11d3-b093-00a024ffc08c),
1888     local
1889 ]
1890 interface nsIWebProgress : nsISupports
1891 {
1892     nsresult AddProgressListener(nsIWebProgressListener *aListener, PRUint32 aNotifyMask);
1893     nsresult RemoveProgressListener(nsIWebProgressListener *aListener);
1894     nsresult GetDOMWindow(nsIDOMWindow **aDOMWindow);
1895     nsresult GetIsLoadingDocument(PRBool *aIsLoadingDocument);
1896 }
1897
1898 [
1899     object,
1900     uuid(343700dd-078b-42b6-a809-b9c1d7e951d0),
1901     local
1902 ]
1903 interface nsIPrintSettings : nsISupports
1904 {
1905     typedef struct { char dummy; } nsIntMargin;
1906
1907     nsresult SetPrintOptions(PRInt32 aType, PRBool aTurnOnOff);
1908     nsresult GetPrintOptions(PRInt32 aType, PRBool *_retval);
1909     nsresult GetPrintOptionsBits(PRInt32 *_retval);
1910     nsresult GetEffectivePageSize(double *aWidth, double *aHeight);
1911     nsresult Clone(nsIPrintSettings **_retval);
1912     nsresult Assign(nsIPrintSettings *aPS);
1913     nsresult GetPrintSession(nsIPrintSession **aPrintSession);
1914     nsresult SetPrintSession(nsIPrintSession *aPrintSession);
1915     nsresult GetStartPageRange(PRInt32 *aStartPageRange);
1916     nsresult SetStartPageRange(PRInt32 aStartPageRange);
1917     nsresult GetEndPageRange(PRInt32 *aEndPageRange);
1918     nsresult SetEndPageRange(PRInt32 aEndPageRange);
1919     nsresult GetEdgeTop(double *aEdgeTop);
1920     nsresult SetEdgeTop(double aEdgeTop);
1921     nsresult GetEdgeLeft(double *aEdgeLeft);
1922     nsresult SetEdgeLeft(double aEdgeLeft);
1923     nsresult GetEdgeBottom(double *aEdgeBottom);
1924     nsresult SetEdgeBottom(double aEdgeBottom);
1925     nsresult GetEdgeRight(double *aEdgeRight);
1926     nsresult SetEdgeRight(double aEdgeRight);
1927     nsresult GetMarginTop(double *aMarginTop);
1928     nsresult SetMarginTop(double aMarginTop);
1929     nsresult GetMarginLeft(double *aMarginLeft);
1930     nsresult SetMarginLeft(double aMarginLeft);
1931     nsresult GetMarginBottom(double *aMarginBottom);
1932     nsresult SetMarginBottom(double aMarginBottom);
1933     nsresult GetMarginRight(double *aMarginRight);
1934     nsresult SetMarginRight(double aMarginRight);
1935     nsresult GetUnwriteableMarginTop(double *aUnwriteableMarginTop);
1936     nsresult SetUnwriteableMarginTop(double aUnwriteableMarginTop);
1937     nsresult GetUnwriteableMarginLeft(double *aUnwriteableMarginLeft);
1938     nsresult SetUnwriteableMarginLeft(double aUnwriteableMarginLeft);
1939     nsresult GetUnwriteableMarginBottom(double *aUnwriteableMarginBottom);
1940     nsresult SetUnwriteableMarginBottom(double aUnwriteableMarginBottom);
1941     nsresult GetUnwriteableMarginRight(double *aUnwriteableMarginRight);
1942     nsresult SetUnwriteableMarginRight(double aUnwriteableMarginRight);
1943     nsresult GetScaling(double *aScaling);
1944     nsresult SetScaling(double aScaling);
1945     nsresult GetPrintBGColors(PRBool *aPrintBGColors);
1946     nsresult SetPrintBGColors(PRBool aPrintBGColors);
1947     nsresult GetPrintBGImages(PRBool *aPrintBGImages);
1948     nsresult SetPrintBGImages(PRBool aPrintBGImages);
1949     nsresult GetPrintRange(PRInt16 *aPrintRange);
1950     nsresult SetPrintRange(PRInt16 aPrintRange);
1951     nsresult GetTitle(PRUnichar **aTitle);
1952     nsresult SetTitle(const PRUnichar *aTitle);
1953     nsresult GetDocURL(PRUnichar **aDocURL);
1954     nsresult SetDocURL(const PRUnichar *aDocURL);
1955     nsresult GetHeaderStrLeft(PRUnichar **aHeaderStrLeft);
1956     nsresult SetHeaderStrLeft(const PRUnichar *aHeaderStrLeft);
1957     nsresult GetHeaderStrCenter(PRUnichar **aHeaderStrCenter);
1958     nsresult SetHeaderStrCenter(const PRUnichar *aHeaderStrCenter);
1959     nsresult GetHeaderStrRight(PRUnichar **aHeaderStrRight);
1960     nsresult SetHeaderStrRight(const PRUnichar *aHeaderStrRight);
1961     nsresult GetFooterStrLeft(PRUnichar **aFooterStrLeft);
1962     nsresult SetFooterStrLeft(const PRUnichar *aFooterStrLeft);
1963     nsresult GetFooterStrCenter(PRUnichar **aFooterStrCenter);
1964     nsresult SetFooterStrCenter(const PRUnichar *aFooterStrCenter);
1965     nsresult GetFooterStrRight(PRUnichar **aFooterStrRight);
1966     nsresult SetFooterStrRight(const PRUnichar *aFooterStrRight);
1967     nsresult GetHowToEnableFrameUI(PRInt16 *aHowToEnableFrameUI);
1968     nsresult SetHowToEnableFrameUI(PRInt16 aHowToEnableFrameUI);
1969     nsresult GetIsCancelled(PRBool *aIsCancelled);
1970     nsresult SetIsCancelled(PRBool aIsCancelled);
1971     nsresult GetPrintFrameTypeUsage(PRInt16 *aPrintFrameTypeUsage);
1972     nsresult SetPrintFrameTypeUsage(PRInt16 aPrintFrameTypeUsage);
1973     nsresult GetPrintFrameType(PRInt16 *aPrintFrameType);
1974     nsresult SetPrintFrameType(PRInt16 aPrintFrameType);
1975     nsresult GetPrintSilent(PRBool *aPrintSilent);
1976     nsresult SetPrintSilent(PRBool aPrintSilent);
1977     nsresult GetShrinkToFit(PRBool *aShrinkToFit);
1978     nsresult SetShrinkToFit(PRBool aShrinkToFit);
1979     nsresult GetShowPrintProgress(PRBool *aShowPrintProgress);
1980     nsresult SetShowPrintProgress(PRBool aShowPrintProgress);
1981     nsresult GetPaperName(PRUnichar **aPaperName);
1982     nsresult SetPaperName(const PRUnichar *aPaperName);
1983     nsresult GetPaperSizeType(PRInt16 *aPaperSizeType);
1984     nsresult SetPaperSizeType(PRInt16 aPaperSizeType);
1985     nsresult GetPaperData(PRInt16 *aPaperData);
1986     nsresult SetPaperData(PRInt16 aPaperData);
1987     nsresult GetPaperWidth(double *aPaperWidth);
1988     nsresult SetPaperWidth(double aPaperWidth);
1989     nsresult GetPaperHeight(double *aPaperHeight);
1990     nsresult SetPaperHeight(double aPaperHeight);
1991     nsresult GetPaperSizeUnit(PRInt16 *aPaperSizeUnit);
1992     nsresult SetPaperSizeUnit(PRInt16 aPaperSizeUnit);
1993     nsresult GetPlexName(PRUnichar **aPlexName);
1994     nsresult SetPlexName(const PRUnichar *aPlexName);
1995     nsresult GetColorspace(PRUnichar **aColorspace);
1996     nsresult SetColorspace(const PRUnichar *aColorspace);
1997     nsresult GetResolutionName(PRUnichar **aResolutionName);
1998     nsresult SetResolutionName(const PRUnichar aResolutionName);
1999     nsresult GetDownloadFonts(PRBool *aDownloadFonts);
2000     nsresult SetDownloadFonts(PRBool aDownloadFonts);
2001     nsresult GetPrintReversed(PRBool *aPrintReversed);
2002     nsresult SetPrintReversed(PRBool aPrintReversed);
2003     nsresult GetPrintInColor(PRBool *aPrintInColor);
2004     nsresult SetPrintInColor(PRBool aPrintInColor);
2005     nsresult GetOrientation(PRInt32 *aOrientation);
2006     nsresult SetOrientation(PRInt32 aOrientation);
2007     nsresult GetPrintCommand(PRUnichar **aPrintCommand);
2008     nsresult SetPrintCommand(const PRUnichar *aPrintCommand);
2009     nsresult GetNumCopies(PRInt32 *aNumCopies);
2010     nsresult SetNumCopies(PRInt32 aNumCopies);
2011     nsresult GetPrinterName(PRUnichar **aPrinterName);
2012     nsresult SetPrinterName(const PRUnichar *aPrinterName);
2013     nsresult GetPrintToFile(PRBool *aPrintToFile);
2014     nsresult SetPrintToFile(PRBool aPrintToFile);
2015     nsresult GetToFileName(PRUnichar **aToFileName);
2016     nsresult SetToFileName(const PRUnichar *aToFileName);
2017     nsresult GetOutputFormat(PRInt16 *aOutputFormat);
2018     nsresult SetOutputFormat(PRInt16 aOutputFormat);
2019     nsresult GetPrintPageDelay(PRInt32 *aPrintPageDelay);
2020     nsresult SetPrintPageDelay(PRInt32 aPrintPageDelay);
2021     nsresult GetIsInitializedFromPrinter(PRBool *aIsInitializedFromPrinter);
2022     nsresult SetIsInitializedFromPrinter(PRBool aIsInitializedFromPrinter);
2023     nsresult GetIsInitializedFromPrefs(PRBool *aIsInitializedFromPrefs);
2024     nsresult SetIsInitializedFromPrefs(PRBool aIsInitializedFromPrefs);
2025     nsresult SetMarginInTwips(nsIntMargin *aMargin);
2026     nsresult SetEdgeInTwips(nsIntMargin *aEdge);
2027     nsresult GetMarginInTwips(nsIntMargin *aMargin);
2028     nsresult GetEdgeInTwips(nsIntMargin *aEdge);
2029     nsresult SetupSilentPrinting();
2030     nsresult SetUnwriteableMarginInTwips(nsIntMargin *aEdge);
2031     nsresult GetUnwriteableMarginInTwips(nsIntMargin *aEdge);
2032 }
2033
2034 [
2035     object,
2036     uuid(9a7ca4b0-fbba-11d4-a869-00105a183419),
2037     local
2038 ]
2039 interface nsIWebBrowserPrint : nsISupports
2040 {
2041     nsresult GetGlobalPrintSettings(nsIPrintSettings **aGlobalPrintSettings);
2042     nsresult GetCurrentPrintSettings(nsIPrintSettings **aCurrentPrintSettings);
2043     nsresult GetCurrentChildDOMWindow(nsIDOMWindow **aCurrentChildDOMWindow);
2044     nsresult GetDoingPrint(PRBool *aDoingPrint);
2045     nsresult GetDoingPrintPreview(PRBool *aDoingPrintPreview);
2046     nsresult GetIsFramesetDocument(PRBool *aIsFramesetDocument);
2047     nsresult GetIsFramesetFrameSelected(PRBool *aIsFramesetFrameSelected);
2048     nsresult GetIsIFrameSelected(PRBool *aIsIFrameSelected);
2049     nsresult GetIsRangeSelection(PRBool *aIsRangeSelection);
2050     nsresult GetPrintPreviewNumPages(PRInt32 *aPrintPreviewNumPages);
2051     nsresult Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener);
2052     nsresult PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin,
2053                           nsIWebProgressListener *aWPListener);
2054     nsresult PrintPreviewNavigate(PRInt16 aNavType, PRInt32 aPageNum);
2055     nsresult Cancel();
2056     nsresult EnumerateDocumentNames(PRUint32 *aCount, PRUnichar ***aResult);
2057     nsresult ExitPrintPreview();
2058 }
2059
2060 [
2061     object,
2062     uuid(919e792a-6490-40b8-bba5-f9e9ad5640c8),
2063     local
2064 ]
2065 interface nsIScrollable : nsISupports
2066 {
2067     enum {
2068         ScrollOrientation_X = 1,
2069         ScrollOrientation_Y = 2
2070     };
2071
2072     enum {
2073         Scrollbar_Auto   = 1,
2074         Scrollbar_Never  = 2,
2075         Scrollbar_Always = 3
2076     };
2077
2078     nsresult GetCurScrollPos(PRInt32 scrollOrientation, PRInt32 *curPos);
2079     nsresult SetCurScrollPos(PRInt32 scrollOrientation, PRInt32 curPos);
2080     nsresult SetCurScrollPosEx(PRInt32 curHorizontalPos, PRInt32 curVerticalPos);
2081     nsresult GetScrollRange(PRInt32 scrollOrientation, PRInt32 *minPos, PRInt32 *maxPos);
2082     nsresult SetScrollRange(PRInt32 scrollOrientation, PRInt32 minPos, PRInt32 maxPos);
2083     nsresult SetScrollRangeEx(PRInt32 minHorizontalPos, PRInt32 maxHorizontalPos,
2084             PRInt32 minVerticalPos, PRInt32 maxVerticalPos);
2085     nsresult GetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 *scrollbarPref);
2086     nsresult SetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 scrollbarPref);
2087     nsresult GetScrollbarVisibility(PRBool *verticalVisible, PRBool *horizontalVisible);
2088 }
2089
2090 [
2091     object,
2092     uuid(c8c0a080-0868-11d3-915f-d9d889d48e3c),
2093     local
2094 ]
2095 interface nsIFile : nsISupports
2096 {
2097     nsresult Append(const nsAString *node);
2098     nsresult AppendNative(const nsAString *node);
2099     nsresult Normalize();
2100     nsresult Create(PRUint32 type, PRUint32 permission);
2101     nsresult GetLeafName(nsAString *aLeafName);
2102     nsresult SetLeafName(const nsAString *aLeafName);
2103     nsresult GetNativeLeafName(nsAString *aLeafName);
2104     nsresult SetNativeLeafName(const nsAString *aLeafName);
2105     nsresult CopyTo(nsIFile *newParentDir, const nsAString *newName);
2106     nsresult CopyToNative(nsIFile *newParentDir, const nsAString *newName);
2107     nsresult CopyToFollowingLinks(nsIFile *newParentDir, const nsAString *newName);
2108     nsresult CopyToFollowingLinksNative(nsIFile *newParentDir, const nsAString *newName);
2109     nsresult MoveTo(nsIFile *newParentDir, const nsAString *newName);
2110     nsresult MoveToNative(nsIFile *newParentDir, const nsAString *newName);
2111     nsresult Remove(PRBool recursive);
2112     nsresult GetPermissions(PRUint32 *aPermissions);
2113     nsresult SetPermissions(PRUint32 pPermissions);
2114     nsresult GetPermissionsOfLink(PRUint32 *aPermissions);
2115     nsresult SetPermissionsOfLink(PRUint32 pPermissions);
2116     nsresult GetLastModifiedTime(PRInt64 *aLastModifiedTime);
2117     nsresult SetLastModifiedTime(PRInt64 aLastModifiedTime);
2118     nsresult GetLastModifiedTimeOfLink(PRInt64 *aLastModifiedTimeOfLink);
2119     nsresult SetLastModifiedTimeOfLink(PRInt64 aLastModifiedTimeOfLink);
2120     nsresult GetFileSize(PRInt64 *aFileSize);
2121     nsresult SetFileSize(PRInt64 aFileSize);
2122     nsresult GetFileSizeOfLink(PRInt64 *aFileSizeOfLink);
2123     nsresult GetTarget(nsAString *aTarget);
2124     nsresult GetNativeTarget(nsACString *aNativeTarget);
2125     nsresult GetPath(nsAString *aPath);
2126     nsresult GetNativePath(nsACString *aNativePath);
2127     nsresult Exists(PRBool *_retval);
2128     nsresult IsWritable(PRBool *_retval);
2129     nsresult IsReadable(PRBool *_retval);
2130     nsresult IsExecutable(PRBool *_retval);
2131     nsresult IsHidden(PRBool *_retval);
2132     nsresult IsDirectory(PRBool *_retval);
2133     nsresult IsFile(PRBool *_retval);
2134     nsresult IsSymlink(PRBool *_retval);
2135     nsresult IsSpecial(PRBool *_retval);
2136     nsresult CreateUnique(PRUint32 type, PRUint32 permission);
2137     nsresult Clone(nsIFile **_retval);
2138     nsresult Equals(nsIFile *inFile, PRBool *_retval);
2139     nsresult Contains(nsIFile *inFile, PRBool recir, PRBool *_retval);
2140     nsresult GetParent(nsIFile **aParent);
2141     nsresult GetDirectoryEntries(nsISimpleEnumerator **aDirectoryEntries);
2142 }
2143
2144 [
2145     object,
2146     uuid(56c35506-f14b-11d3-99d3-ddbfac2ccf65),
2147     local
2148 ]
2149 interface nsIPrefBranch : nsISupports
2150 {
2151     nsresult GetRoot(char **aRoot);
2152     nsresult GetPrefType(const char *aPrefName, PRInt32 *_retval);
2153     nsresult GetBoolPref(const char *aPrefName, PRBool *_retval);
2154     nsresult SetBoolPref(const char *aPrefName, PRInt32 aValue);
2155     nsresult GetCharPref(const char *aPrefName, char **_retval);
2156     nsresult SetCharPref(const char *aPrefName, const char *aValue);
2157     nsresult GetIntPref(const char *aPrefName, PRInt32 *_retval);
2158     nsresult SetIntPref(const char *aPrefName, PRInt32 aValue);
2159     nsresult GetComplexValue(const char *aPrefName, const nsIID *aType, void **aValue);
2160     nsresult SetComplexValue(const char *aPrefName, const nsIID *aType, nsISupports *aValue);
2161     nsresult ClearUserPref(const char *aPrefName);
2162     nsresult LockPref(const char *aPrefName);
2163     nsresult PrefHasUserValue(const char *aPrefName, PRBool *_retval);
2164     nsresult PrefIsLocked(const char *aPrefName, PRBool *_retval);
2165     nsresult UnlockPref(const char *aPrefName);
2166     nsresult DeleteBranch(const char *aStartingAt);
2167     nsresult GetChildList(const char *aStartingAt, PRUint32 *aCount, char ***aChildArray);
2168     nsresult ResetBranch(const char *aStartingAt);
2169 }
2170
2171 [
2172     object,
2173     uuid(bbf8cab0-d43a-11d3-8cc2-00609792278c),
2174     local
2175 ]
2176 interface nsIDirectoryServiceProvider : nsISupports
2177 {
2178     nsresult GetFile(const char *prop, PRBool *persistent, nsIFile **_retval);
2179 }
2180
2181 [
2182     object,
2183     uuid(15fd6940-8ea7-11d3-93ad-00104ba0fd40),
2184     local
2185 ]
2186 interface nsIProtocolHandler : nsISupports
2187 {
2188     nsresult GetScheme(nsACString *aScheme);
2189     nsresult GetDefaultPort(PRInt32 *aDefaultPort);
2190     nsresult GetProtocolFlags(PRUint32 *aProtocolFlags);
2191     nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset,
2192                     nsIURI *aBaseURI, nsIURI **_retval);
2193     nsresult NewChannel(nsIURI *aURI, nsIChannel **_retval);
2194     nsresult AllowPort(PRInt32 port, const char *scheme, PRBool *_retval);
2195 }
2196
2197 [
2198     object,
2199     uuid(0e61f3b2-34d7-4c79-bfdc-4860bc7341b7),
2200     local
2201 ]
2202 interface nsIExternalProtocolHandler : nsIProtocolHandler
2203 {
2204     nsresult ExternalAppExistsForScheme(const nsACString *scheme, PRBool *_retval);
2205 }
2206
2207 [
2208     object,
2209     uuid(bddeda3f-9020-4d12-8c70-984ee9f7935e),
2210     local
2211 ]
2212 interface nsIIOService : nsISupports
2213 {
2214     nsresult GetProtocolHandler(const char *aScheme, nsIProtocolHandler **_retval);
2215     nsresult GetProtocolFlags(const char *aScheme, PRUint32 *_retval);
2216     nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
2217                     nsIURI **_retval);
2218     nsresult NewFileURI(nsIFile *aFile, nsIURI **_retval);
2219     nsresult NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval);
2220     nsresult NewChannel(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
2221                         nsIChannel **_retval);
2222     nsresult GetOffline(PRBool *aOffline);
2223     nsresult SetOffline(PRBool aOffline);
2224     nsresult AllowPort(PRInt32 aPort, const char *aScheme, PRBool *_retval);
2225     nsresult ExtractScheme(const nsACString *urlString, nsACString * _retval);
2226 }
2227
2228 [
2229     object,
2230     uuid(ca68c485-9db3-4c12-82a6-4fab7948e2d5),
2231     local,
2232 ]
2233 interface nsINetUtil : nsISupports
2234 {
2235     nsresult ParseContentType(const nsACString *aTypeHeader, nsACString *aCharset,
2236             PRBool *aHadCharset, nsACString *_retval);
2237     nsresult ProtocolHasFlags(nsIURI *aURI, PRUint32 aFlag, PRBool *_retval);
2238     nsresult URIChainHasFlags(nsIURI *aURI, PRUint32 aFlags, PRBool *_retval);
2239     nsresult ToImmutableURI(nsIURI *aURI, nsIURI **_retval);
2240     nsresult NewSimpleNestedURI(nsIURI *aURI, nsIURI **_retval);
2241     nsresult EscapeString(const nsACString *aString, PRUint32 aEscapeType, nsACString *_retval);
2242     nsresult EscapeURL(const nsACString *aStr, PRUint32 aFlags, nsACString *_retval);
2243     nsresult UnescapeString(const nsACString *aStr, PRUint32 aFlags, nsACString *_retval);
2244     nsresult ExtractCharsetFromContentType(const nsACString *aTypeHeader, nsACString *aCharset,
2245             PRInt32 *aCharsetStart, PRInt32 *aCharsetEnd, PRBool *_retval);
2246 }
2247
2248 [
2249     object,
2250     uuid(9c5d3c58-1dd1-11b2-a1c9-f3699284657a),
2251     local
2252 ]
2253 interface nsIWebBrowserFocus : nsISupports
2254 {
2255     nsresult Activate();
2256     nsresult Deactivate();
2257     nsresult SetFocusAtFirstElement();
2258     nsresult SetFocusAtLastElement();
2259     nsresult GetFocusedWindow(nsIDOMWindow **aFocusedWindow);
2260     nsresult SetFocusedWindow(nsIDOMWindow *aFocusedWindow);
2261     nsresult GetFocusedElement(nsIDOMElement **aFocusedElement);
2262     nsresult SetFocusedElement(nsIDOMElement *aFocusedElement);
2263 }
2264
2265 [
2266     object,
2267     uuid(ba434c60-9d52-11d3-afb0-00a024ffc08c),
2268     local
2269 ]
2270 interface nsIWebBrowserChrome : nsISupports
2271 {
2272     nsresult SetStatus(PRUint32 statusType, const PRUnichar *status);
2273     nsresult GetWebBrowser(nsIWebBrowser **aWebBrowser);
2274     nsresult SetWebBrowser(nsIWebBrowser *aWebBrowser);
2275     nsresult GetChromeFlags(PRUint32 *aChromeFlags);
2276     nsresult SetChromeFlags(PRUint32 aChromeFlags);
2277     nsresult DestroyBrowserWindow();
2278     nsresult SizeBrowserTo(PRInt32 aCX, PRInt32 aCY);
2279     nsresult ShowAsModal();
2280     nsresult IsWindowModal(PRBool *_retval);
2281     nsresult ExitModalEventLoop(nsresult aStatus);
2282 }
2283
2284 [
2285     object,
2286     uuid(df31c120-ded6-11d1-bd85-00805f8ae3f4),
2287     local
2288 ]
2289 interface nsIDOMEventListener : nsISupports
2290 {
2291     nsresult HandleEvent(nsIDOMEvent *event);
2292 }
2293
2294 [
2295     object,
2296     uuid(1c773b30-d1cf-11d2-bd95-00805f8ae3f4),
2297     local
2298 ]
2299 interface nsIDOMEventTarget : nsISupports
2300 {
2301     nsresult AddEventListener(const nsAString *type, nsIDOMEventListener *listener, PRBool useCapture);
2302     nsresult RemoveEventListener(const nsAString *type, nsIDOMEventListener *listener, PRBool useCapture);
2303     nsresult DispatchEvent(nsIDOMEvent *evt, PRBool *_retval);
2304 }
2305
2306 [
2307     object,
2308     uuid(a66b7b80-ff46-bd97-0080-5f8ae38add32),
2309     local
2310 ]
2311 interface nsIDOMEvent : nsISupports
2312 {
2313     nsresult GetType(nsAString *aType);
2314     nsresult GetTarget(nsIDOMEventTarget **aTarget);
2315     nsresult GetCurrentTarget(nsIDOMEventTarget **aCurrentTarget);
2316     nsresult GetEventPhase(PRUint16 *aEventPhase);
2317     nsresult GetBubbles(PRBool *aBubbles);
2318     nsresult GetCancelable(PRBool *aCancelable);
2319     nsresult GetTimeStamp(DOMTimeStamp *aTimeStamp);
2320     nsresult StopPropagation();
2321     nsresult PreventDefault();
2322     nsresult InitEvent(const nsAString *eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg);
2323 }
2324
2325 cpp_quote("#define CONTEXT_NONE              0x00")
2326 cpp_quote("#define CONTEXT_LINK              0x01")
2327 cpp_quote("#define CONTEXT_IMAGE             0x02")
2328 cpp_quote("#define CONTEXT_DOCUMENT          0x04")
2329 cpp_quote("#define CONTEXT_TEXT              0x08")
2330 cpp_quote("#define CONTEXT_INPUT             0x10")
2331 cpp_quote("#define CONTEXT_BACKGROUND_IMAGE  0x20")
2332
2333 [
2334     object,
2335     uuid(3478b6b0-3875-11d4-94ef-0020183bf181),
2336     local
2337 ]
2338 interface nsIContextMenuListener : nsISupports
2339 {
2340     nsresult OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode);
2341 }
2342
2343 [
2344     object,
2345     uuid(a6cf90c3-15b3-11d2-932e-00805f8add32),
2346     local
2347 ]
2348 interface nsIDOMUIEvent : nsIDOMEvent
2349 {
2350     nsresult GetView(nsIDOMAbstractView **aView);
2351     nsresult GetDetail(PRInt32 *aDetail);
2352     nsresult InitUIEvent(const nsAString *typeArg, PRBool canBubbleArg, PRBool cancelableArg,
2353             nsIDOMAbstractView *viewArg, PRInt32 detailArg);
2354 }
2355
2356 [
2357     object,
2358     uuid(ff751edc-8b02-aae7-0010-8301838a3123),
2359     local
2360 ]
2361 interface nsIDOMMouseEvent : nsIDOMUIEvent
2362 {
2363     nsresult GetScreenX(PRInt32 *aScreenX);
2364     nsresult GetScreenY(PRInt32 *aScreenY);
2365     nsresult GetClientX(PRInt32 *aClientX);
2366     nsresult GetClientY(PRInt32 *aClientY);
2367     nsresult GetCtrlKey(PRBool *aCtrlKey);
2368     nsresult GetShiftKey(PRBool *aShiftKey);
2369     nsresult GetAltKey(PRBool *aAltKey);
2370     nsresult GetMetaKey(PRBool *aMetaKey);
2371     nsresult GetButton(PRUint16 *aButton);
2372     nsresult GetRelatedTarget(nsIDOMEventTarget **aRelatedTarget);
2373     nsresult InitMouseEvent(const nsAString *typeArg, PRBool canBubbleArg, PRBool cancelableArg,
2374             nsIDOMAbstractView *viewArg, PRInt32 detailArg, PRInt32 screenXArg, PRInt32 screenYArg,
2375             PRInt32 clientXArg, PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg,
2376             PRBool shiftKeyArg, PRBool metaKeyArg, PRUint16 buttonArg,
2377             nsIDOMEventTarget *relatedTargetArg);
2378 }
2379
2380 [
2381     object,
2382     uuid(028e0e6e-8b01-11d3-aae7-0010838a3123),
2383     local
2384 ]
2385 interface nsIDOMKeyEvent : nsIDOMUIEvent
2386 {
2387     nsresult GetCharCode(PRUint32 *aCharCode);
2388     nsresult GetKeyCode(PRUint32 *aKeyCode);
2389     nsresult GetAltKey(PRBool *aAltKey);
2390     nsresult GetCtrlKey(PRBool *aCtrlKey);
2391     nsresult GetShiftKey(PRBool *aShiftKey);
2392     nsresult GetMetaKey(PRBool *aMetaKey);
2393     nsresult InitKeyEvent(const nsAString *typeArg, PRBool canBubbleArg,
2394             PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRBool ctrlKeyArg,
2395             PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint32 keyCodeArg,
2396             PRUint32 charCodeArg);
2397 }
2398
2399 [
2400     object,
2401     uuid(3e5432cd-9568-4bd1-8cbe-d50aba110743),
2402     local
2403 ]
2404 interface nsIEmbeddingSiteWindow : nsISupports
2405 {
2406     nsresult SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy);
2407     nsresult GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy);
2408     nsresult SetFocus();
2409     nsresult GetVisibility(PRBool *aVisibility);
2410     nsresult SetVisibility(PRBool aVisibility);
2411     nsresult GetTitle(PRUnichar **aTitle);
2412     nsresult SetTitle(const PRUnichar *aTitle);
2413     nsresult GetSiteWindow(void **aSiteWindow);
2414 }
2415
2416 [
2417     object,
2418     uuid(2417cbfe-65ad-48a6-b4b6-eb84db174392),
2419     local
2420 ]
2421 interface nsIComponentRegistrar : nsISupports
2422 {
2423     nsresult AutoRegister(nsIFile *aSpec);
2424     nsresult AutoUnregister(nsIFile *aSpec);
2425     nsresult RegisterFactory(const nsCID *aClass, const char *aClassName,
2426             const char *aContractID, nsIFactory *aFactory);
2427     nsresult UnregisterFactory(const nsCID *aClass, nsIFactory *aFactory);
2428     nsresult RegisterFactoryLocation(const nsCID *aClass, const char *aClassName,
2429             const char *aContractID, nsIFile *aFile, const char *aLoaderStr,
2430             const char *aType);
2431     nsresult UnregisterFactoryLocation(const nsCID *aClass, nsIFile *aFile);
2432     nsresult IsCIDRegistered(const nsCID *aClass, PRBool *_retval);
2433     nsresult IsContractIDRegistered(const char *aContractID, PRBool *_retval);
2434     nsresult EnumerateCIDs(nsISimpleEnumerator **_retval);
2435     nsresult EnumerateContractIDs(nsISimpleEnumerator **_retval);
2436     nsresult CIDToContractID(const nsCID *aClass, char **_retval);
2437     nsresult ContractIDToCID(const char *aContractID, nsCID **_retval);
2438 }
2439
2440 [
2441     object,
2442     uuid(1630c61a-325e-49ca-8759-a31b16c47aa5),
2443     local
2444 ]
2445 interface nsIPromptService : nsISupports
2446 {
2447     nsresult Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2448             const PRUnichar *aText);
2449     nsresult AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2450             const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState);
2451     nsresult Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2452             const PRUnichar *aText, PRBool *_retval);
2453     nsresult ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2454             const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState,
2455             PRBool *_retval);
2456     nsresult ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2457             const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title,
2458             const PRUnichar *aButton1Title, const PRUnichar *aButton2Title,
2459             const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval);
2460     nsresult Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2461             const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg,
2462             PRBool *aCheckState, PRBool *_retval);
2463     nsresult PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2464             const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword,
2465             const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval);
2466     nsresult PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2467             const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg,
2468             PRBool *aCheckState, PRBool *_retval);
2469     nsresult Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
2470             const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList,
2471             PRInt32 *aOutSelection, PRBool *_retval);
2472 }
2473
2474 [
2475     object,
2476     uuid(b128a1e6-44f3-4331-8fbe-5af360ff21ee),
2477     local
2478 ]
2479 interface nsITooltipTextProvider : nsISupports
2480 {
2481     nsresult GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval);
2482 }
2483
2484 [
2485     object,
2486     uuid(02b0625a-e7f3-11d2-9f5a-006008a6efe9),
2487     local
2488 ]
2489 interface nsIProfile : nsISupports
2490 {
2491     nsresult GetProfileCount(PRInt32 *aProfileCount);
2492     nsresult GetProfileList(PRUint32 *length, PRUnichar ***profileNames);
2493     nsresult ProfileExists(const PRUnichar *profileName, PRBool *_retval);
2494     nsresult GetCurrentProfile(PRUnichar **aCurrentProfile);
2495     nsresult SetCurrentProfile(const PRUnichar * aCurrentProfile);
2496     nsresult ShutDownCurrentProfile(PRUint32 shutDownType);
2497     nsresult CreateNewProfile(const PRUnichar *profileName,
2498             const PRUnichar *nativeProfileDir, const PRUnichar *langcode,
2499             PRBool useExistingDir);
2500     nsresult RenameProfile(const PRUnichar *oldName, const PRUnichar *newName);
2501     nsresult DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles);
2502     nsresult CloneProfile(const PRUnichar *profileName);
2503 }
2504
2505 [
2506     object,
2507     uuid(30465632-a777-44cc-90f9-8145475ef999),
2508     local
2509 ]
2510 interface nsIWindowCreator : nsISupports
2511 {
2512     nsresult CreateChromeWindow(nsIWebBrowserChrome *parent, PRUint32 chromeFlags,
2513                                    nsIWebBrowserChrome **_retval);
2514 }
2515
2516 [
2517     object,
2518     uuid(f673ec81-a4b0-11d6-964b-eb5a2bf216fc),
2519     local
2520 ]
2521 interface nsIWindowCreator2 : nsIWindowCreator
2522 {
2523     nsresult CreateChromeWindow2(nsIWebBrowserChrome *parent, PRUint32 chromeFlags,
2524                                  PRUint32 contextFlags, nsIURI *uri, PRBool *cancel,
2525                                  nsIWebBrowserChrome **_retval);
2526 }
2527
2528 [
2529     object,
2530     uuid(002286a8-494b-43b3-8ddd-49e3fc50622b),
2531     local
2532 ]
2533 interface nsIWindowWatcher : nsISupports
2534 {
2535     nsresult OpenWindow(nsIDOMWindow *aParent, const char *aUrl, const char *aName,
2536                         const char *aFeatures, nsISupports *aArguments, nsIDOMWindow **_retval);
2537     nsresult RegisterNotification(nsIObserver *aObserver);
2538     nsresult UnregisterNotification(nsIObserver *aObserver);
2539     nsresult GetWindowEnumerator(nsISimpleEnumerator **_retval);
2540     nsresult GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt **_retval);
2541     nsresult GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuthPrompt **_retval);
2542     nsresult SetWindowCreator(nsIWindowCreator *creator);
2543     nsresult GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome **_retval);
2544     nsresult GetWindowByName(const PRUnichar *aTargetName, nsIDOMWindow *aCurrentWindow,
2545                              nsIDOMWindow **_retval);
2546     nsresult GetActiveWindow(nsIDOMWindow **aActiveWindow);
2547     nsresult SetActiveWindow(nsIDOMWindow *aActiveWindow);
2548 }
2549
2550 [
2551     object,
2552     uuid(24f3f4da-18a4-448d-876d-7360fefac029),
2553     local
2554 ]
2555 interface nsIEditingSession : nsISupports
2556 {
2557     nsresult GetEditorStatus(PRUint32 *aEditorStatus);
2558     nsresult MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType,
2559             PRBool doAfterUriLoad, PRBool aMakeWholeDocumentEditable, PRBool aInteractive);
2560     nsresult WindowIsEditable(nsIDOMWindow *window, PRBool *_retval);
2561     nsresult GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval);
2562     nsresult SetupEditorOnWindow(nsIDOMWindow *window);
2563     nsresult TearDownEditorOnWindow(nsIDOMWindow *window);
2564     nsresult SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor);
2565     nsresult DisableJSAndPlugins(nsIDOMWindow *aWindow);
2566     nsresult RestoreJSAndPlugins(nsIDOMWindow *aWindow);
2567     nsresult DetachFromWindow(nsIDOMWindow *aWindow);
2568     nsresult ReattachToWindow(nsIDOMWindow *aWindow);
2569     nsresult GetJsAndPluginsDisabled(PRBool *aJsAndPluginsDisabled);
2570 }
2571
2572 [
2573     object,
2574     uuid(83f892cf-7ed3-490e-967a-62640f3158e1),
2575     local
2576 ]
2577 interface nsICommandParams : nsISupports
2578 {
2579     nsresult GetValueType(const char *name, PRInt16 *_retval);
2580     nsresult GetBooleanValue(const char *name, PRBool *_retval);
2581     nsresult GetLongValue(const char *name, PRInt32 *_retval);
2582     nsresult GetDoubleValue(const char *name, double *_retval);
2583     nsresult GetStringValue(const char *name, nsAString *_retval);
2584     nsresult GetCStringValue(const char *name, char **_retval);
2585     nsresult GetISupportsValue(const char *name, nsISupports **_retval);
2586     nsresult SetBooleanValue(const char *name, PRBool value);
2587     nsresult SetLongValue(const char *name, PRInt32 value);
2588     nsresult SetDoubleValue(const char *name, double value);
2589     nsresult SetStringValue(const char *name, const nsAString *value);
2590     nsresult SetCStringValue(const char *name, const char *value);
2591     nsresult SetISupportsValue(const char *name, nsISupports *value);
2592     nsresult RemoveValue(const char *name);
2593     nsresult HasMoreElements(PRBool *_retval);
2594     nsresult First();
2595     nsresult GetNext(char **_retval);
2596 }
2597
2598 [
2599     object,
2600     uuid(080d2001-f91e-11d4-a73c-f9242928207c),
2601     local
2602 ]
2603 interface nsICommandManager : nsISupports
2604 {
2605     nsresult AddCommandObserver(nsIObserver *aCommandObserver, const char *aCommandToObserve);
2606     nsresult RemoveCommandObserver(nsIObserver *aCommandObserver, const char *aCommandObserved);
2607     nsresult IsCommandSupported(const char *aCommandName, nsIDOMWindow *aTargetWindow, PRBool *_retval);
2608     nsresult IsCommandEnabled(const char *aCommandName, nsIDOMWindow *aTargetWindow, PRBool *_retval);
2609     nsresult GetCommandState(const char *aCommandName, nsIDOMWindow *aTargetWindow,
2610             nsICommandParams *aCommandParams);
2611     nsresult DoCommand(const char *aCommandName, nsICommandParams *aCommandParams,
2612             nsIDOMWindow *aTargetWindow);
2613 }
2614
2615 [
2616     object,
2617     uuid(47b82b60-a36f-4167-8072-6f421151ed50),
2618     local
2619 ]
2620 interface nsIControllerContext : nsISupports
2621 {
2622     nsresult Init(nsIControllerCommandTable *aCommandTable);
2623     nsresult SetCommandContext(nsISupports *aCommandContext);
2624 }
2625
2626 [
2627     object,
2628     uuid(d5b61b82-1da4-11d3-bf87-00105a1b0627),
2629     local
2630 ]
2631 interface nsIController : nsISupports
2632 {
2633     nsresult IsCommandEnabled(const char *command, PRBool *_retval);
2634     nsresult SupportsCommand(const char *command, PRBool *_retval);
2635     nsresult DoCommand(const char *command);
2636     nsresult OnEvent(const char *eventName);
2637 }
2638
2639 [
2640     object,
2641     uuid(71afb9e6-e8a7-475d-89c4-e46221ebe1a4),
2642     local
2643 ]
2644 interface nsIContent : nsISupports
2645 {
2646     /* This is not a real interface declaration. It's too internal for us. */
2647 }
2648
2649 [
2650     object,
2651     uuid(c38a7935-c854-4df7-8fd4-a26f0d279f31),
2652     local
2653 ]
2654 interface nsIDocument : nsISupports
2655 {
2656     /* This is not a real interface declaration. It's too internal for us. */
2657 }
2658
2659 [
2660     object,
2661     uuid(b1ee32f2-b8c4-49b9-93df-b6fab5d54688),
2662     local
2663 ]
2664 interface nsIContentSerializer : nsISupports
2665 {
2666     nsresult Init(PRUint32 flags, PRUint32 aWrapColumn, const char* aCharSet, PRBool aIsCopying,
2667             PRBool aIsWholeDocument);
2668     nsresult AppendText(nsIContent *aText, PRInt32 aStartOffset, PRInt32 aEndOffset, nsAString *aStr);
2669     nsresult AppendCDATASection(nsIContent *aCDATASection, PRInt32 aStartOffset,
2670             PRInt32 aEndOffset, nsAString *aStr);
2671     nsresult AppendProcessingInstruction(nsIContent* aPI, PRInt32 aStartOffset,
2672             PRInt32 aEndOffset, nsAString *aStr);
2673     nsresult AppendComment(nsIContent *aComment, PRInt32 aStartOffset, PRInt32 aEndOffset,
2674             nsAString *aStr);
2675     nsresult AppendDoctype(nsIContent *aDoctype, nsAString *aStr);
2676     nsresult AppendElementStart(nsIContent *aElement, nsIContent *aOriginalElement,
2677             nsAString *aStr);
2678     nsresult AppendElementEnd(nsIContent *aElement, nsAString *aStr);
2679     nsresult Flush(nsAString *aStr);
2680     nsresult AppendDocumentStart(nsIDocument *aDocument, nsAString *aStr);
2681 }
2682
2683 [
2684     object,
2685     uuid(972e54e1-dec3-4e3f-87ec-408a7dbcfd92),
2686     local
2687 ]
2688 interface nsIEditor  : nsISupports
2689 {
2690     typedef void *nsIPresShellPtr;
2691     typedef void *nsIContentPtr;
2692
2693     nsresult GetSelection([out] nsISelection *_retval);
2694     nsresult Init([in] nsIDOMDocument *doc, [in] nsIPresShellPtr shell, [in] nsIContentPtr aRoot, [in] nsISelectionController *aSelCon, [in] PRUint32 aFlags);
2695     nsresult SetAttributeOrEquivalent([in] nsIDOMElement *element, [in] const nsAString *sourceAttrName, [in] const nsAString *sourceAttrValue, [in] PRBool aSuppressTransaction);
2696     nsresult RemoveAttributeOrEquivalent([in] nsIDOMElement *element, [in] const nsAString *sourceAttrName, [in] PRBool aSuppressTransaction);
2697     nsresult PostCreate();
2698     nsresult PreDestroy();
2699     nsresult GetFlags([out] PRUint32 *_retval);
2700     nsresult SetFlags([in] PRUint32 val);
2701     nsresult GetContentsMIMEType([out] char **_retval);
2702     nsresult SetContentsMIMEType([in] const char *val);
2703     nsresult GetIsDocumentEditable([out] PRBool *_retval);
2704     nsresult GetDocument([out] nsIDOMDocument **_retval);
2705     nsresult GetRootElement([out] nsIDOMElement **_retval);
2706     nsresult GetSelectionController([out] nsISelectionController **_retval);
2707     nsresult DeleteSelection([in] PRInt16 action);
2708     nsresult GetDocumentIsEmpty([out] PRBool *_retval);
2709     nsresult GetDocumentModified([out] PRBool *_retval);
2710     nsresult GetDocumentCharacterSet([out] nsACString *_retval);
2711     nsresult SetDocumentCharacterSet([in] const nsACString *val);
2712     nsresult ResetModificationCount();
2713     nsresult GetModificationCount([out] PRInt32 *_retval);
2714     nsresult IncrementModificationCount([in] PRInt32 aModCount);
2715     nsresult GetTransactionManager([out] nsITransactionManager **_retval);
2716     nsresult SetTransactionManager(nsITransactionManager *aTransactionManager);
2717     nsresult DoTransaction([in] nsITransaction *txn);
2718     nsresult EnableUndo([in] PRBool enable);
2719     nsresult Undo([in] PRUint32 count);
2720     nsresult CanUndo([out] PRBool *isEnabled, [out] PRBool *canUndo);
2721     nsresult Redo([in] PRUint32 count);
2722     nsresult CanRedo([out] PRBool *isEnabled, [out] PRBool *canRedo);
2723     nsresult BeginTransaction();
2724     nsresult EndTransaction();
2725     nsresult BeginPlaceHolderTransaction([in] nsIAtom *name);
2726     nsresult EndPlaceHolderTransaction();
2727     nsresult ShouldTxnSetSelection([out] PRBool *_retval);
2728     nsresult SetShouldTxnSetSelection([in] PRBool should);
2729     nsresult GetInlineSpellChecker([out] nsIInlineSpellChecker **_retval);
2730     nsresult SyncRealTimeSpell();
2731     nsresult SetSpellcheckUserOverride(PRBool enable);
2732     nsresult Cut();
2733     nsresult CanCut([out] PRBool *_retval);
2734     nsresult Copy();
2735     nsresult CanCopy([out] PRBool *_retval);
2736     nsresult Paste([in] PRInt32 aSelectionType);
2737     nsresult PasteTransferable(nsITransferable *aTransferable);
2738     nsresult CanPaste([in] PRInt32 aSelectionType, [out] PRBool *_retval);
2739     nsresult CanPasteTransferable(nsITransferable *aTransferable, PRBool *_retval);
2740     nsresult SelectAll();
2741     nsresult BeginningOfDocument();
2742     nsresult EndOfDocument();
2743     nsresult CanDrag([in] nsIDOMEvent *aEvent, [out] PRBool *_retval);
2744     nsresult DoDrag([in] nsIDOMEvent *aEvent);
2745     nsresult InsertFromDrop([in] nsIDOMEvent *aEvent);
2746     nsresult SetAttribute([in] nsIDOMElement *aElement, [in] const nsAString *attributestr, [in] const nsAString *attvalue);
2747     nsresult GetAttributeValue([in] nsIDOMElement *aElement, [in] const nsAString *attributestr, [out] nsAString *resultValue, PRBool *_retval);
2748     nsresult RemoveAttribute([in] nsIDOMElement *aElement, [in] const nsAString *aAttribute);
2749     nsresult CloneAttribute([in] const nsAString *aAttribute, [in] nsIDOMNode *aDestNode, [in] nsIDOMNode *aSourceNode);
2750     nsresult CloneAttributes([in] nsIDOMNode *destNode, [in] nsIDOMNode *sourceNode);
2751     nsresult CreateNode([in] const nsAString *tag, [in] nsIDOMNode *parent, [in] PRInt32 position, [out] nsIDOMNode **_retval);
2752     nsresult InsertNode([in] nsIDOMNode *node, [in] nsIDOMNode *parent, [in] PRInt32 aPosition);
2753     nsresult SplitNode([in] nsIDOMNode *existingRightNode, [in] PRInt32 offset, [out] nsIDOMNode **newLeftNode);
2754     nsresult JoinNodes([in] nsIDOMNode *leftNode, [in] nsIDOMNode *rightNode, [in] nsIDOMNode *parent);
2755     nsresult DeleteNode([in] nsIDOMNode *child);
2756     nsresult MarkNodeDirty([in] nsIDOMNode *node);
2757     nsresult SwitchTextDirection();
2758     nsresult OutputToString([in] nsAString formatType, [in] PRUint32 flags, [out] nsAString *_retval);
2759     nsresult OutputToStream([in] nsIOutputStream *aStream, [in] nsAString *formatType, [in] nsACString *charsetOverride, [in] PRUint32 flags);
2760     nsresult AddEditorObserver([in] nsIEditorObserver *observer);
2761     nsresult RemoveEditorObserver([in] nsIEditorObserver *observer);
2762     nsresult AddEditActionListener([in] nsIEditActionListener *listener);
2763     nsresult RemoveEditActionListener([in] nsIEditActionListener *listener);
2764     nsresult AddDocumentStateListener([in] nsIDocumentStateListener *listener);
2765     nsresult RemoveDocumentStateListener([in] nsIDocumentStateListener *listener);
2766     nsresult DumpContentTree();
2767     nsresult DebugDumpContent();
2768     nsresult DebugUnitTests([out] PRInt32 *outNumTests, [out] PRInt32 *outNumTestsFailed);
2769     PRBool IsModifiableNode(nsIDOMNode *aNode);
2770 }
2771
2772 [
2773     object,
2774     uuid(afc36593-5787-4420-93d9-b2c0ccbf0cad),
2775     local
2776 ]
2777 interface nsIHTMLEditor : nsISupports
2778 {
2779     nsresult AddDefaultProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
2780     nsresult RemoveDefaultProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
2781     nsresult RemoveAllDefaultProperties();
2782     nsresult SetCSSInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
2783     nsresult SetInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
2784     nsresult GetInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue, [out] PRBool *aFirst, [out] PRBool *aAny, [out] PRBool *aAll);
2785     nsresult GetInlinePropertyWithAttrValue([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue, [out] PRBool *aFirst, [out] PRBool *aAny, [out] PRBool *aAll, [out] nsAString *_retval);
2786     nsresult RemoveAllInlineProperties();
2787     nsresult RemoveInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute);
2788     nsresult IncreaseFontSize();
2789     nsresult DecreaseFontSize();
2790     nsresult CanDrag([in] nsIDOMEvent *aEvent, [out] PRBool *_retval);
2791     nsresult DoDrag([in] nsIDOMEvent *aEvent);
2792     nsresult InsertFromDrop([in] nsIDOMEvent *aEvent);
2793     nsresult NodeIsBlock([in] nsIDOMNode *node, PRBool *_retval);
2794     nsresult InsertHTML([in] nsAString *aInputString);
2795     nsresult PasteNoFormatting([in] PRInt32 aSelectionType);
2796     nsresult RebuildDocumentFromSource([in] nsAString *aSourceString);
2797     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);
2798     nsresult InsertElementAtSelection([in] nsIDOMElement *aElement, [in] PRBool aDeleteSelection);
2799     nsresult SetDocumentTitle([in] nsAString *aTitle);
2800     nsresult UpdateBaseURL();
2801     nsresult SelectElement([in] nsIDOMElement *aElement);
2802     nsresult SetCaretAfterElement([in] nsIDOMElement *aElement);
2803     nsresult SetParagraphFormat([in] nsAString *aParagraphFormat);
2804     nsresult GetParagraphState([out] PRBool *aMixed, [out] nsAString *_retval);
2805     nsresult GetFontFaceState([out] PRBool *aMixed, [out] nsAString *_retval);
2806     nsresult GetFontColorState([out] PRBool *aMixed, [out] nsAString *_retval);
2807     nsresult GetBackgroundColorState([out] PRBool *aMixed, [out] nsAString *_retval);
2808     nsresult GetHighlightColorState([out] PRBool *aMixed, [out] nsAString *_retval);
2809     nsresult GetListState([out] PRBool *aMixed, [out] PRBool *aOL, [out] PRBool *aUL, [out] PRBool *aDL);
2810     nsresult GetListItemState([out] PRBool *aMixed, [out] PRBool *aLI, [out] PRBool *aDT, [out] PRBool *aDD);
2811     nsresult GetAlignment([out] PRBool *aMixed, [out] PRInt16 *aAlign);
2812     nsresult GetIndentState([out] PRBool *aCanIndent, [out] PRBool *aCanOutdent);
2813     nsresult MakeOrChangeList([in] nsAString *aListType, [in] PRBool entireList, [in] nsAString *aBulletType);
2814     nsresult RemoveList([in] nsAString *aListType);
2815     nsresult Indent([in] nsAString *aIndent);
2816     nsresult Align([in] nsAString *aAlign);
2817     nsresult GetElementOrParentByTagName([in] nsAString *aTagName, [in] nsIDOMNode *aNode, [out] nsIDOMElement **_retval);
2818     nsresult GetSelectedElement([in] nsAString *aTagName, [out] nsIDOMElement **_retval);
2819     nsresult GetHeadContentsAsHTML([out] nsAString *_retval);
2820     nsresult ReplaceHeadContentsWithHTML([in] nsAString *aSourceToInsert);
2821     nsresult CreateElementWithDefaults([in] nsAString *aTagName, [out] nsIDOMElement **_retval);
2822     nsresult InsertLinkAroundSelection([in] nsIDOMElement *aAnchorElement);
2823     nsresult SetBackgroundColor([in] nsAString *aColor);
2824     nsresult SetBodyAttribute([in] nsAString *aAttr, [in] nsAString *aValue);
2825     nsresult IgnoreSpuriousDragEvent([in] PRBool aIgnoreSpuriousDragEvent);
2826     nsresult GetLinkedObjects([out] nsISupportsArray **_retval);
2827     nsresult GetIsCSSEnabled([out] PRBool *_retval);
2828     nsresult SetIsCSSEnabled([in] PRBool prb);
2829     nsresult AddInsertionListener([in] nsIContentFilter *inFilter);
2830     nsresult RemoveInsertionListener([in] nsIContentFilter *inFilter);
2831     nsresult CreateAnonymousElement([in] nsAString *aTag, [in] nsIDOMNode *aParentNode, [in] nsAString *aAnonClass, [in] PRBool aIsCreatedHidden, [out] nsIDOMElement **_retval);
2832     nsresult GetSelectionContainer([out] nsIDOMElement **_retval);
2833     nsresult CheckSelectionStateForAnonymousButtons([in] nsISelection *aSelection);
2834     nsresult IsAnonymousElement([in] nsIDOMElement *aElement, [out] PRBool *_retval);
2835     nsresult GetReturnInParagraphCreatesNewParagraph([out] PRBool *_retval);
2836     nsresult SetReturnInParagraphCreatesNewParagraph([in] PRBool prb);
2837 }
2838
2839 [
2840     object,
2841     uuid(98cdbcc4-2d81-4191-a63f-b6c52085edbc),
2842     local
2843 ]
2844 interface nsIDocShell : nsISupports
2845 {
2846     nsresult LoadURI(nsIURI *uri, nsIDocShellLoadInfo *loadInfo, PRUint32 aLoadFlags, PRBool firstParty);
2847     nsresult LoadStream(nsIInputStream *aStream, nsIURI *aURI, const nsACString *aContentType,
2848             const nsACString *aContentCharset, nsIDocShellLoadInfo *aLoadInfo);
2849     nsresult InternalLoad(nsIURI *aURI, nsIURI *aReferrer, nsISupports *aOwner, PRUint32 aFlags, const PRUnichar *aWindowTarget,
2850             const char *aTypeHint, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, PRUint32 aLoadFlags,
2851             nsISHEntry *aSHEntry, PRBool firstParty, nsIDocShell **aDocShell, nsIRequest **aRequest);
2852     nsresult AddState(nsIVariant *aData, const nsAString *aTitle, const nsAString *aURL, PRBool aReplace);
2853     nsresult CreateLoadInfo(nsIDocShellLoadInfo **loadInfo);
2854     nsresult PrepareForNewContentModel();
2855     nsresult SetCurrentURI(nsIURI *aURI);
2856     nsresult FirePageHideNotification(PRBool isUnload);
2857     nsresult GetPresContext(void /*nsPresContext*/ **aPresContext);
2858     nsresult GetPresShell(nsIPresShell **aPresShell);
2859     nsresult GetEldestPresShell(nsIPresShell **aEldestPresShell);
2860     nsresult GetContentViewer(nsIContentViewer **aContentViewer);
2861     nsresult GetChromeEventHandler(nsIDOMEventTarget **aChromeEventHandler);
2862     nsresult SetChromeEventHandler(nsIDOMEventTarget *aChromeEventHandler);
2863     nsresult GetDocumentCharsetInfo(nsIDocumentCharsetInfo **aDocumentCharsetInfo);
2864     nsresult SetDocumentCharsetInfo(nsIDocumentCharsetInfo *aDocumentCharsetInfo);
2865     nsresult GetAllowPlugins(PRBool *aAllowPlugins);
2866     nsresult SetAllowPlugins(PRBool aAllowPlugins);
2867     nsresult GetAllowJavascript(PRBool *aAllowJavascript);
2868     nsresult SetAllowJavascript(PRBool aAllowJavascript);
2869     nsresult GetAllowMetaRedirects(PRBool *aAllowMetaRedirects);
2870     nsresult SetAllowMetaRedirects(PRBool aAllowMetaRedirects);
2871     nsresult GetAllowSubframes(PRBool *aAllowSubframes);
2872     nsresult SetAllowSubframes(PRBool aAllowSubframes);
2873     nsresult GetAllowImages(PRBool *aAllowImages);
2874     nsresult SetAllowImages(PRBool aAllowImages);
2875     nsresult GetAllowDNSPrefetch(PRBool *aAllowDNSPrefetch);
2876     nsresult SetAllowDNSPrefetch(PRBool aAllowDNSPrefetch);
2877     nsresult GetDocShellEnumerator(PRInt32 aItemType, PRInt32 aDirection, nsISimpleEnumerator **_retval);
2878     nsresult GetAppType(PRUint32 *aAppType);
2879     nsresult SetAppType(PRUint32 aAppType);
2880     nsresult GetAllowAuth(PRBool *aAllowAuth);
2881     nsresult SetAllowAuth(PRBool aAllowAuth);
2882     nsresult GetZoom(float *aZoom);
2883     nsresult SetZoom(float aZoom);
2884     nsresult GetMarginWidth(PRInt32 *aMarginWidth);
2885     nsresult SetMarginWidth(PRInt32 aMarginWidth);
2886     nsresult GetMarginHeight(PRInt32 *aMarginHeight);
2887     nsresult SetMarginHeight(PRInt32 aMarginHeight);
2888     nsresult TabToTreeOwner(PRBool forward, PRBool *tookFocus);
2889     nsresult GetBusyFlags(PRUint32 *aBusyFlags);
2890     nsresult GetLoadType(PRUint32 *aLoadType);
2891     nsresult SetLoadType(PRUint32 aLoadType);
2892     nsresult IsBeingDestroyed(PRBool *_retval);
2893     nsresult GetIsExecutingOnLoadHandler(PRBool *aIsExecutingOnLoadHandler);
2894     nsresult GetLayoutHistoryState(nsILayoutHistoryState **aLayoutHistoryState);
2895     nsresult SetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState);
2896     nsresult GetShouldSaveLayoutState(PRBool *aShouldSaveLayoutState);
2897     nsresult GetSecurityUI(nsISecureBrowserUI **aSecurityUI);
2898     nsresult SetSecurityUI(nsISecureBrowserUI *aSecurityUI);
2899     nsresult SuspendRefreshURIs();
2900     nsresult ResumeRefreshURIs();
2901     nsresult BeginRestore(nsIContentViewer *viewer, PRBool top);
2902     nsresult FinishRestore();
2903     nsresult GetRestoringDocument(PRBool *aRestoringDocument);
2904     nsresult GetUseErrorPages(PRBool *aUseErrorPages);
2905     nsresult SetUseErrorPages(PRBool aUseErrorPages);
2906     nsresult GetPreviousTransIndex(PRInt32 *aPreviousTransIndex);
2907     nsresult GetLoadedTransIndex(PRInt32 *aLoadedTransIndex);
2908     nsresult HistoryPurged(PRInt32 numEntries);
2909     nsresult GetSessionStorageForURI(nsIURI *uri, const nsAString *documentURI, nsIDOMStorage **_retval);
2910     nsresult GetSessionStorageForPrincipal(nsIPrincipal *principal, const nsAString *documentURI,
2911             PRBool create, nsIDOMStorage **_retval);
2912     nsresult AddSessionStorage(nsIPrincipal *principal, nsIDOMStorage *storage);
2913     nsresult GetCurrentDocumentChannel(nsIChannel **aCurrentDocumentChannel);
2914     nsresult SetChildOffset(PRUint32 offset);
2915     nsresult GetIsInUnload(PRBool *aIsInUnload);
2916     nsresult GetChannelIsUnsafe(PRBool *aChannelIsUnsafe);
2917     void DetachEditorFromWindow();
2918     nsresult GetIsOffScreenBrowser(PRBool *aIsOffScreenBrowser);
2919     nsresult SetIsOffScreenBrowser(PRBool aIsOffScreenBrowser);
2920     nsresult GetPrintPreview(nsIWebBrowserPrint **aPrintPreview);
2921     nsresult GetCanExecuteScripts(PRBool *aCanExecuteScripts);
2922     nsresult GetIsActive(PRBool *aIsActive);
2923     nsresult SetIsActive(PRBool aIsActive);
2924     nsresult GetHistoryID(PRUint64 *aHistoryID);
2925     nsresult GetIsAppTab(PRBool *aIsAppTab);
2926     nsresult SetIsAppTab(PRBool aIsAppTab);
2927 }
2928
2929 [
2930     object,
2931     uuid(85eea794-ed8e-4e1b-a128-d09300ae51aa),
2932     local
2933 ]
2934 interface nsIMutationObserver : nsISupports
2935 {
2936     void CharacterDataWillChange(nsIDocument *aDocument, nsIContent *aContent,
2937                                  void /*CharacterDataChangeInfo*/ *aInfo);
2938     void CharacterDataChanged(nsIDocument *aDocument, nsIContent *aContent,
2939                               void /*CharacterDataChangeInfo*/ *aInfo);
2940     void AttributeWillChange(nsIDocument *aDocument, nsIContent * aContent, PRInt32 aNameSpaceID,
2941                              nsIAtom *aAttribute, PRInt32 aModType);
2942     void AttributeChanged(nsIDocument *aDocument, nsIContent *aContent, PRInt32 aNameSpaceID,
2943                           nsIAtom *aAttribute, PRInt32 aModType);
2944     void ContentAppended(nsIDocument *aDocument, nsIContent *aContainer, nsIContent* aFirstNewContent,
2945                          PRInt32 aNewIndexInContainer);
2946     void ContentInserted(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild,
2947                          PRInt32 aIndexInContainer);
2948     void ContentRemoved(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild,
2949                         PRInt32 aIndexInContainer, nsIContent *aPreviousSibling);
2950     void NodeWillBeDestroyed(const nsINode *aNode);
2951     void ParentChainChanged(nsIContent *aContent);
2952 }
2953
2954 [
2955     object,
2956     uuid(cbc0cbd8-bbb7-46d6-a551-378a6953a714),
2957     local
2958 ]
2959 interface nsIParser : nsISupports
2960 {
2961     typedef int nsDTDMode;
2962     typedef int eParserCommands;
2963
2964     void SetContentSink(nsIContentSink *aSink);
2965     nsIContentSink *GetContentSink();
2966     void GetCommand(nsACString *aCommand);
2967     void SetCommand2(const char *aCommand);
2968     void SetCommand(eParserCommands aParserCommand);
2969     void SetDocumentCharset(const nsACString *aCharset, PRInt32 aSource);
2970     void GetDocumentCharset(nsACString *oCharset, PRInt32 *oSource);
2971     void SetParserFilter(nsIParserFilter *aFilter);
2972     nsresult GetChannel(nsIChannel **aChannel);
2973     nsresult GetDTD(nsIDTD **aDTD);
2974     nsresult GetStreamListener(nsIStreamListener **aListener);
2975     nsresult ContinueInterruptedParsing();
2976     void BlockParser();
2977     void UnblockParser();
2978     PRBool IsParserEnabled();
2979     PRBool IsComplete();
2980     nsresult Parse(nsIURI *aURL, nsIRequestObserver *aListener, void *aKey, nsDTDMode aMode);
2981     nsresult Parse2(const nsAString *aSourceBuffer, void *aKey, const nsACString *aMimeType, PRBool aLastCall, nsDTDMode aMode);
2982     void *GetRootContextKey();
2983     nsresult Terminate();
2984     nsresult ParseFragment(const nsAString *aSourceBuffer, void *aKey, void /*nsTArray<nsString>*/ *aTagStack,
2985             PRBool aXMLMode, const nsACString *aContentType, nsDTDMode aMode);
2986     nsresult ParseFragment2(const nsAString *aSourceBuffer, nsIContent *aTargetNode, nsIAtom *aContextLocalName,
2987             PRInt32 aContextNamespace, PRBool aQuirks);
2988     nsresult BuildModel();
2989     nsresult CancelParsingEvents();
2990     void Reset();
2991     PRBool CanInterrupt();
2992     PRBool IsInsertionPointDefined();
2993     void BeginEvaluatingParserInsertedScript();
2994     void EndEvaluatingParserInsertedScript();
2995     void MarkAsNotScriptCreated();
2996     PRBool IsScriptCreated();
2997 }
2998
2999 [
3000     object,
3001     uuid(3d005225-210f-4b07-b1d9-96020574c437),
3002     local
3003 ]
3004 interface nsIDocumentObserver : nsIMutationObserver
3005 {
3006     typedef int nsUpdateType;
3007
3008     typedef struct {
3009         PRUint64 mStates;
3010     } nsEventStates;
3011
3012     void BeginUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType);
3013     void EndUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType);
3014     void BeginLoad(nsIDocument *aDocument);
3015     void EndLoad(nsIDocument *aDocument);
3016     void ContentStatesChanged(nsIDocument *aDocument, nsIContent *aContent1, nsIContent *aContent2,
3017                               nsEventStates aStateMask);
3018     void DocumentStatesChanged(nsIDocument* aDocument, nsEventStates aStateMask);
3019     void StyleSheetAdded(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, PRBool aDocumentSheet);
3020     void StyleSheetRemoved(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, PRBool aDocumentSheet);
3021     void StyleSheetApplicableStateChanged(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet,
3022                                           PRBool aApplicable);
3023     void StyleRuleChanged(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aOldStyleRule,
3024                           nsIStyleRule *aNewStyleRule);
3025     void StyleRuleAdded(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule);
3026     void StyleRuleRemoved(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule);
3027     void BindToDocument(nsIDocument *aDocument, nsIContent *aContent);
3028     nsresult DoneAddingChildren(nsIContent *aContent, PRBool aHaveNotified, nsIParser *aParser);
3029 }
3030
3031 [
3032     object,
3033     uuid(3682dd99-8560-44f4-9b8f-ccce9d7b96fb),
3034     local
3035 ]
3036 interface nsIContentUtils : nsISupports
3037 {
3038     PRBool IsSafeToRunScript();
3039     PRBool ParseIntMarginValue(const nsAString *aString, nsIntMargin *result);
3040     void /*already_AddRefed<nsIDocumentLoaderFactory>*/ FindInternalContentViewer(
3041             const char *aType, int /*ContentViewerType*/ *aLoaderType);
3042     nsresult AddDocumentObserver(nsIDocument *aDocument, nsIDocumentObserver *aObserver);
3043     nsresult RemoveDocumentObserver(nsIDocument *aDocument, nsIDocumentObserver *aObserver);
3044     nsresult AddMutationObserver(nsINode *aNode, nsIMutationObserver *aObserver);
3045     nsresult RemoveMutationObserver(nsINode *aNode, nsIMutationObserver *aObserver);
3046     nsresult AddScriptRunner(nsIRunnable *aRunnable);
3047 }
3048
3049 /* Parts of npapi.h */
3050
3051 cpp_quote("#define NP_VERSION_MAJOR 0")
3052 cpp_quote("#define NP_VERSION_MINOR 25")
3053
3054 typedef unsigned char NPBool;
3055 typedef INT16 NPError;
3056 typedef INT16 NPReason;
3057 typedef char *NPMIMEType;
3058
3059 typedef struct _NPP {
3060     void *pdata;
3061     void *ndata;
3062 } NPP_t, *NPP;
3063
3064 typedef struct _NPStream {
3065     void *pdata;
3066     void *ndata;
3067     const char *url;
3068     UINT32 end;
3069     UINT32 lastmodified;
3070     void *notifyData;
3071     const char *headers;
3072 } NPStream;
3073
3074 typedef struct _NPSavedData {
3075     INT32 len;
3076     void *buf;
3077 } NPSavedData;
3078
3079 typedef struct _NPRect {
3080     UINT16 top;
3081     UINT16 left;
3082     UINT16 bottom;
3083     UINT16 right;
3084 } NPRect;
3085
3086 typedef enum {
3087     NPFocusNext = 0,
3088     NPFocusPrevious = 1
3089 } NPFocusDirection;
3090
3091 #define NP_ABI_MASK 0
3092
3093 typedef enum {
3094     NPPVpluginNameString = 1,
3095     NPPVpluginDescriptionString,
3096     NPPVpluginWindowBool,
3097     NPPVpluginTransparentBool,
3098     NPPVjavaClass,
3099     NPPVpluginWindowSize,
3100     NPPVpluginTimerInterval,
3101     NPPVpluginScriptableInstance = (10 | NP_ABI_MASK),
3102     NPPVpluginScriptableIID = 11,
3103     NPPVjavascriptPushCallerBool = 12,
3104     NPPVpluginKeepLibraryInMemory = 13,
3105     NPPVpluginNeedsXEmbed = 14,
3106     NPPVpluginScriptableNPObject = 15,
3107     NPPVformValue = 16,
3108     NPPVpluginUrlRequestsDisplayedBool = 17,
3109     NPPVpluginWantsAllNetworkStreams = 18,
3110     NPPVpluginNativeAccessibleAtkPlugId = 19,
3111     NPPVpluginCancelSrcStream = 20,
3112     NPPVSupportsAdvancedKeyHandling = 21
3113 } NPPVariable;
3114
3115 typedef enum {
3116     NPNVxDisplay = 1,
3117     NPNVxtAppContext,
3118     NPNVnetscapeWindow,
3119     NPNVjavascriptEnabledBool,
3120     NPNVasdEnabledBool,
3121     NPNVisOfflineBool,
3122     NPNVserviceManager = (10 | NP_ABI_MASK),
3123     NPNVDOMElement     = (11 | NP_ABI_MASK),
3124     NPNVDOMWindow      = (12 | NP_ABI_MASK),
3125     NPNVToolkit        = (13 | NP_ABI_MASK),
3126     NPNVSupportsXEmbedBool = 14,
3127     NPNVWindowNPObject = 15,
3128     NPNVPluginElementNPObject = 16,
3129     NPNVSupportsWindowless = 17,
3130     NPNVprivateModeBool = 18,
3131     NPNVsupportsAdvancedKeyHandling = 21
3132 } NPNVariable;
3133
3134 typedef enum {
3135     NPWindowTypeWindow = 1,
3136     NPWindowTypeDrawable
3137 } NPWindowType;
3138
3139 typedef struct _NPWindow {
3140     void *window;
3141     INT32 x;
3142     INT32 y;
3143     UINT32 width;
3144     UINT32 height;
3145     NPRect clipRect;
3146     NPWindowType type;
3147 } NPWindow;
3148
3149 typedef struct _NPFullPrint {
3150     NPBool pluginPrinted;
3151     NPBool printOne;
3152     void *platformPrint;
3153 } NPFullPrint;
3154
3155 typedef struct _NPEmbedPrint {
3156     NPWindow window;
3157     void *platformPrint;
3158 } NPEmbedPrint;
3159
3160 typedef struct _NPPrint {
3161     UINT16 mode;
3162     union {
3163         NPFullPrint fullPrint;
3164         NPEmbedPrint embedPrint;
3165     } print;
3166 } NPPrint;
3167
3168 typedef HRGN NPRegion;
3169
3170 [
3171     object,
3172     uuid(84994340-e120-4051-824f-d4ee8aef1a3e),
3173     local
3174 ]
3175 interface nsIPluginInstance : nsISupports
3176 {
3177     typedef void *JSContext;
3178     typedef void *JSObject;
3179     typedef void *gfxASurface;
3180
3181     nsresult Initialize(nsIPluginInstanceOwner *aOwner, const char *aMIMEType);
3182     nsresult Start();
3183     nsresult Stop();
3184     nsresult SetWindow(NPWindow *aWindow);
3185     nsresult NewStreamToPlugin(nsIPluginStreamListener **aListener);
3186     nsresult NewStreamFromPlugin(const char *aType, const char *aTarget, nsIOutputStream **aResult);
3187     nsresult Print(NPPrint *aPlatformPrint);
3188     nsresult HandleEvent(void *aEvent, PRInt16 *aHandled);
3189     nsresult InvalidateRect(NPRect *aRect);
3190     nsresult InvalidateRegion(NPRegion aRegion);
3191     nsresult ForceRedraw();
3192     nsresult GetMIMEType(const char **aValue);
3193     nsresult GetJSContext(JSContext **aJSContext);
3194     nsresult GetOwner(nsIPluginInstanceOwner **aOwner);
3195     nsresult SetOwner(nsIPluginInstanceOwner *aOwner);
3196     nsresult ShowStatus(const char *aMessage);
3197     nsresult InvalidateOwner();
3198     nsresult GetJSObject(JSContext *cx, JSObject **_retval);
3199     nsresult GetFormValue(nsAString *aFormValue);
3200     nsresult PushPopupsEnabledState(PRBool aEnabled);
3201     nsresult PopPopupsEnabledState();
3202     nsresult GetPluginAPIVersion(PRUint16 *aPluginAPIVersion);
3203     nsresult DefineJavaProperties();
3204     nsresult ShouldCache(PRBool *_retval);
3205     nsresult IsWindowless(PRBool *_retval);
3206     nsresult IsTransparent(PRBool *_retval);
3207     nsresult GetValueFromPlugin(NPPVariable variable, void *aValue);
3208     nsresult GetDrawingModel(PRInt32 *_retval);
3209     nsresult AsyncSetWindow(NPWindow *aWindow);
3210     nsresult NotifyPainted();
3211     nsresult GetSurface(gfxASurface **aSurface);
3212     nsresult UseAsyncPainting(PRBool *_retval);
3213
3214 }
3215
3216 [
3217     object,
3218     uuid(6d827df5-b5cd-416c-85cb-3cdd05c7aed1),
3219     local
3220 ]
3221 interface nsIPluginTagInfo : nsISupports
3222 {
3223     typedef enum {
3224         nsPluginTagType_Unknown,
3225         nsPluginTagType_Embed,
3226         nsPluginTagType_Object,
3227         nsPluginTagType_Applet
3228     }  nsPluginTagType;
3229
3230     nsresult GetAttributes(PRUint16 *aCount, const char ***aNames, const char ***aValues);
3231     nsresult GetAttribute(const char *aName, const char **aResult);
3232     nsresult GetTagType(nsPluginTagType *aTagType);
3233     nsresult GetTagText(const char **aTagText);
3234     nsresult GetParameters(PRUint16 *aCount, const char ***aNames, const char ***aValues);
3235     nsresult GetParameter(const char *aName, const char **aResult);
3236     nsresult GetDocumentBase(const char **aDocumentBase);
3237     nsresult GetDocumentEncoding(const char **aDocumentEncoding);
3238     nsresult GetAlignment(const char **aElignment);
3239     nsresult GetWidth(PRUint32 *aWidth);
3240     nsresult GetHeight(PRUint32 *aHeight);
3241     nsresult GetBorderVertSpace(PRUint32 *aBorderVertSpace);
3242     nsresult GetBorderHorizSpace(PRUint32 *aBorderHorizSpace);
3243     nsresult GetUniqueID(PRUint32 *aUniqueID);
3244     nsresult GetDOMElement(nsIDOMElement **aDOMElement);
3245 }