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