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