d3d9/tests: Add a software vertexprocessing buffer discard test.
[wine] / dlls / mshtml / nsiface.idl
1 /*
2  * Copyright 2005-2012 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.9\"")
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 LONGLONG PRInt64;
52 typedef ULONGLONG PRUint64;
53
54 /*
55  * Mozilla uses stdint.h types for its headers. Following defines make this IDL file
56  * more similar to original declarations. Note that it's only a widl trick, we can't
57  * use stdint.h types in C.
58  */
59 #define int16_t PRInt16
60 #define int32_t PRInt32
61 #define int64_t PRInt64
62
63 #define uint8_t PRUint8
64 #define uint16_t PRUint16
65 #define uint32_t PRUint32
66 #define uint64_t PRUint64
67
68 typedef uint64_t DOMTimeStamp;
69 typedef uint32_t nsLoadFlags;
70 typedef int64_t PRTime;
71
72 /* Similar trick to stdint.h types for C++ bool type */
73 typedef unsigned char cpp_bool;
74 #define bool cpp_bool
75
76 typedef struct {
77     void *v;
78     void *d1;
79     uint32_t d2;
80     void *d3;
81 } nsCStringContainer;
82
83 typedef struct {
84     void *v;
85     void *d1;
86     uint32_t d2;
87     void *d3;
88 } nsStringContainer;
89
90 typedef nsCStringContainer nsACString;
91 typedef nsStringContainer nsAString;
92
93 interface nsIWebBrowserChrome;
94 interface nsILoadGroup;
95 interface nsIDOMNode;
96 interface nsIDOMDocument;
97 interface nsIDOMEvent;
98 interface nsIEditor;
99 interface nsISelectionController;
100 interface nsITransactionManager;
101 interface nsITransaction;
102 interface nsIInlineSpellChecker;
103 interface nsIOutputStream;
104 interface nsIEditorObserver;
105 interface nsIEditActionListener;
106 interface nsIDocumentStateListener;
107 interface nsIDOMCSSStyleSheet;
108 interface nsIDOMDocumentView;
109 interface nsIDOMWindow;
110 interface nsIDOMElement;
111 interface nsIDOMRange;
112 interface nsIDOMEventTarget;
113 interface nsISelection;
114 interface nsIDOMHTMLSelectElement;
115 interface nsIFile;
116
117 interface IMoniker;
118
119 [
120     object,
121     uuid(00000000-0000-0000-c000-000000000046),
122     local
123 ]
124 interface nsISupports
125 {
126     nsresult QueryInterface(nsIIDRef riid, void **result);
127     nsrefcnt AddRef();
128     nsrefcnt Release();
129 }
130
131 /* Currently we don't need a full declaration of these interfaces */
132 typedef nsISupports nsISHistory;
133 typedef nsISupports nsIWidget;
134 typedef nsISupports nsIDOMBarProp;
135 typedef nsISupports nsIPrompt;
136 typedef nsISupports nsIAuthPrompt;
137 typedef nsISupports nsIDOMDocumentType;
138 typedef nsISupports nsIDOMDOMImplementation;
139 typedef nsISupports nsIDOMCDATASection;
140 typedef nsISupports nsIDOMProcessingInstruction;
141 typedef nsISupports nsIDOMEntityReference;
142 typedef nsISupports nsIWebProgressListener;
143 typedef nsISupports nsIDOMCSSValue;
144 typedef nsISupports nsIPrintSession;
145 typedef nsISupports nsIControllerCommandTable;
146 typedef nsISupports nsIPrincipal;
147 typedef nsISupports nsIAtom;
148 typedef nsISupports nsISupportsArray;
149 typedef nsISupports nsIContentFilter;
150 typedef nsISupports nsIDOMMediaList;
151 typedef nsISupports nsIDOMHTMLTableCaptionElement;
152 typedef nsISupports nsIDOMHTMLTableSectionElement;
153 typedef nsISupports nsIDOMClientRectList;
154 typedef nsISupports nsINode;
155 typedef nsISupports nsIStyleSheet;
156 typedef nsISupports nsIStyleRule;
157 typedef nsISupports nsIDOMUserDataHandler;
158 typedef nsISupports nsIDocShellLoadInfo;
159 typedef nsISupports nsISHEntry;
160 typedef nsISupports nsIPresShell;
161 typedef nsISupports nsIContentViewer;
162 typedef nsISupports nsIDocumentCharsetInfo;
163 typedef nsISupports nsILayoutHistoryState;
164 typedef nsISupports nsISecureBrowserUI;
165 typedef nsISupports nsIDOMStorage;
166 typedef nsISupports nsIDOMDOMTokenList;
167 typedef nsISupports nsITransferable;
168 typedef nsISupports nsIDOMFileList;
169 typedef nsISupports nsIDOMFile;
170 typedef nsISupports nsIControllers;
171 typedef nsISupports nsIDOMValidityState;
172 typedef nsISupports nsIPluginInstanceOwner;
173 typedef nsISupports nsIPluginStreamListener;
174 typedef nsISupports nsIContentSink;
175 typedef nsISupports nsIParserFilter;
176 typedef nsISupports nsIDTD;
177 typedef nsISupports nsIObserver;
178 typedef nsISupports nsIDOMNodeFilter;
179 typedef nsISupports nsIDOMNodeIterator;
180 typedef nsISupports nsIDOMTreeWalker;
181 typedef nsISupports nsIHttpUpgradeListener;
182 typedef nsISupports nsIDOMDOMStringMap;
183 typedef nsISupports nsIDOMDOMStringList;
184 typedef nsISupports nsIDOMOfflineResourceList;
185 typedef nsISupports nsIDOMHistory;
186 typedef nsISupports nsIDOMNavigator;
187 typedef nsISupports nsIDOMMediaQueryList;
188 typedef nsISupports nsIDOMScreen;
189 typedef nsISupports nsIDOMCrypto;
190 typedef nsISupports nsIDOMPkcs11;
191 typedef nsISupports nsIAnimationFrameListener;
192 typedef nsISupports nsIDOMMozURLProperty;
193 typedef nsISupports nsIDOMStorageList;
194 typedef nsISupports nsILocalFile;
195 typedef nsISupports nsIDOMHTMLMenuElement;
196 typedef nsISupports nsIDOMCaretPosition;
197 typedef nsISupports nsIFrameRequestCallback;
198 typedef nsISupports nsICycleCollectorListener;
199 typedef nsISupports nsIDOMHTMLCanvasElement;
200 typedef nsISupports nsIQueryContentEventResult;
201 typedef nsISupports nsIDOMBlob;
202 typedef nsISupports nsIPrivacyTransitionObserver;
203 typedef nsISupports nsIDOMHTMLPropertiesCollection;
204 typedef nsISupports mozIDOMApplication;
205
206 typedef void *JSContext;
207 typedef void *JSObject;
208 typedef uint64_t jsval;
209
210 [
211     object,
212     uuid(8bb35ed9-e332-462d-9155-4a002ab5c958),
213     local
214 ]
215 interface nsIServiceManager : nsISupports
216 {
217     nsresult GetService(nsCIDRef aClass, nsIIDRef aIID, void **result);
218     nsresult GetServiceByContractID(const char *aContractID, nsIIDRef aIID, void **result);
219     nsresult IsServiceInstantiated(nsCIDRef aClass, nsIIDRef aIID, BOOL *_retval);
220     nsresult IsServiceInstantiatedByContractID(const char *aContractID, nsIIDRef aIID, BOOL *_retval);
221 }
222
223 [
224     object,
225     uuid(00000001-0000-0000-c000-000000000046),
226     local
227 ]
228 interface nsIFactory : nsISupports
229 {
230     nsresult CreateInstance(nsISupports *aOuter, const nsIID *iid, void **result);
231     nsresult LockFactory(bool lock);
232 }
233
234 [
235     object,
236     uuid(59e7e77a-38e4-11d4-8cf5-0060b0fc14a3),
237     local
238 ]
239 interface nsIMemory : nsISupports
240 {
241     void *Alloc(/*size_t*/ int size);
242     void *Realloc(void *_ptr, /*size_t*/ int newSize);
243     void Free(void *_ptr);
244     nsresult HeapMinimize(bool immediate);
245     nsresult IsLowMemory(bool *_retval);
246 }
247
248 [
249     object,
250     uuid(9188bc85-f92e-11d2-81ef-0060083a0bcf),
251     local
252 ]
253 interface nsIWeakReference : nsISupports
254 {
255     nsresult QueryReferent(const nsIID *riid, void **result);
256 }
257
258 [
259     object,
260     uuid(9188bc86-f92e-11d2-81ef-0060083a0bcf),
261     local
262 ]
263 interface nsISupportsWeakReference : nsISupports
264 {
265     nsresult GetWeakReference(nsIWeakReference **_retval);
266 }
267
268 [
269     object,
270     uuid(033a1470-8b2a-11d3-af88-00a024ffc08c),
271     local
272 ]
273 interface nsIInterfaceRequestor : nsISupports
274 {
275     nsresult GetInterface(const nsIID *riid, void **result);
276 }
277
278 [
279     object,
280     uuid(4a2abaf0-6886-11d3-9382-00104ba0fd40),
281     local
282 ]
283 interface nsIRunnable : nsISupports
284 {
285     nsresult Run();
286 }
287
288 [
289     object,
290     uuid(d1899240-f9d2-11d2-bdd6-000064657374),
291     local
292 ]
293 interface nsISimpleEnumerator : nsISupports
294 {
295     nsresult HasMoreElements(bool *_retval);
296     nsresult GetNext(nsISupports **_retval);
297 }
298
299 [
300     object,
301     uuid(81e4c2de-acac-4ad6-901a-b5fb1b851a0d),
302     local
303 ]
304 interface nsIVariant : nsISupports
305 {
306     nsresult GetDataType(uint16_t *aDataType);
307     nsresult GetAsInt8(uint8_t *_retval);
308     nsresult GetAsInt16(int16_t *_retval);
309     nsresult GetAsInt32(int32_t *_retval);
310     nsresult GetAsInt64(int64_t *_retval);
311     nsresult GetAsUint8(uint8_t *_retval);
312     nsresult GetAsUint16(uint16_t *_retval);
313     nsresult GetAsUint32(uint32_t *_retval);
314     nsresult GetAsUint64(uint64_t *_retval);
315     nsresult GetAsFloat(float *_retval);
316     nsresult GetAsDouble(double *_retval);
317     nsresult GetAsBool(bool *_retval);
318     nsresult GetAsChar(char *_retval);
319     nsresult GetAsWChar(PRUnichar *_retval);
320     nsresult GetAsID(nsID *retval);
321     nsresult GetAsAString(nsAString *_retval);
322     nsresult GetAsDOMString(nsAString *_retval);
323     nsresult GetAsACString(nsACString *_retval);
324     nsresult GetAsAUTF8String(nsACString *_retval);
325     nsresult GetAsString(char * *_retval);
326     nsresult GetAsWString(PRUnichar * *_retval);
327     nsresult GetAsISupports(nsISupports * *_retval);
328     nsresult GetAsJSVal(long /*jsval*/ *_retval);
329     nsresult GetAsInterface(nsIID **iid, void **iface);
330     nsresult GetAsArray(uint16_t *type, nsIID *iid, uint32_t *count, void **ptr);
331     nsresult GetAsStringWithSize(uint32_t *size, char **str);
332     nsresult GetAsWStringWithSize(uint32_t *size, PRUnichar **str);
333 }
334
335 [
336     object,
337     uuid(5586a590-8c82-11d5-90f3-0010a4e73d9a),
338     local
339 ]
340 interface nsIWritableVariant : nsIVariant
341 {
342     nsresult GetWritable(bool *aWritable);
343     nsresult SetWritable(bool aWritable);
344     nsresult SetAsInt8(uint8_t aValue);
345     nsresult SetAsInt16(int16_t aValue);
346     nsresult SetAsInt32(int32_t aValue);
347     nsresult SetAsInt64(int64_t aValue);
348     nsresult SetAsUint8(uint8_t aValue);
349     nsresult SetAsUint16(uint16_t aValue);
350     nsresult SetAsUint32(uint32_t aValue);
351     nsresult SetAsUint64(uint64_t aValue);
352     nsresult SetAsFloat(float aValue);
353     nsresult SetAsDouble(double aValue);
354     nsresult SetAsBool(bool aValue);
355     nsresult SetAsChar(char aValue);
356     nsresult SetAsWChar(PRUnichar aValue);
357     nsresult SetAsID(const nsID *aValue);
358     nsresult SetAsAString(const nsAString *aValue);
359     nsresult SetAsDOMString(const nsAString *aValue);
360     nsresult SetAsACString(const nsACString *aValue);
361     nsresult SetAsAUTF8String(const nsACString *aValue);
362     nsresult SetAsString(const char * aValue);
363     nsresult SetAsWString(const PRUnichar * aValue);
364     nsresult SetAsISupports(nsISupports *aValue);
365     nsresult SetAsInterface(const nsIID *iid, void *iface);
366     nsresult SetAsArray(uint16_t type, const nsIID *iid, uint32_t count, void *ptr);
367     nsresult SetAsStringWithSize(uint32_t size, const char *str);
368     nsresult SetAsWStringWithSize(uint32_t size, const PRUnichar *str);
369     nsresult SetAsVoid();
370     nsresult SetAsEmpty();
371     nsresult SetAsEmptyArray();
372     nsresult SetFromVariant(nsIVariant *aValue);
373 }
374
375 [
376     object,
377     uuid(53cdbc97-c2d7-4e30-b2c3-45b2ee79db18),
378     local
379 ]
380 interface nsIInputStream : nsISupports
381 {
382     nsresult Close();
383     nsresult Available(uint64_t *_retval);
384     nsresult Read(char *aBuf, uint32_t aCount, uint32_t *_retval);
385     nsresult ReadSegments(nsresult (*aWriter)(nsIInputStream *aInStream,
386             void *aClosure, const char *aFromSegment, uint32_t aToOffset,
387             uint32_t aCount, uint32_t *aWriteCount),
388             void *aClosure, uint32_t aCount, uint32_t *_retval);
389     nsresult IsNonBlocking(bool *_retval);
390 }
391
392 [
393     object,
394     uuid(395fe045-7d18-4adb-a3fd-af98c8a1af11),
395     local
396 ]
397 interface nsIURI : nsISupports
398 {
399     nsresult GetSpec(nsACString *aSpec);
400     nsresult SetSpec(const nsACString *aSpec);
401     nsresult GetPrePath(nsACString *aPrePath);
402     nsresult GetScheme(nsACString *aScheme);
403     nsresult SetScheme(const nsACString *aScheme);
404     nsresult GetUserPass(nsACString *aUserPass);
405     nsresult SetUserPass(const nsACString *aUserPass);
406     nsresult GetUsername(nsACString *aUsername);
407     nsresult SetUsername(const nsACString *aUsername);
408     nsresult GetPassword(nsACString *aPassword);
409     nsresult SetPassword(const nsACString *aPassword);
410     nsresult GetHostPort(nsACString *aHostPort);
411     nsresult SetHostPort(const nsACString *aHostPort);
412     nsresult GetHost(nsACString *aHost);
413     nsresult SetHost(const nsACString *aHost);
414     nsresult GetPort(int32_t *aPort);
415     nsresult SetPort(int32_t aPort);
416     nsresult GetPath(nsACString *aPath);
417     nsresult SetPath(const nsACString *aPath);
418     nsresult Equals(nsIURI *other, bool *_retval);
419     nsresult SchemeIs(const char *scheme, bool *_retval);
420     nsresult Clone(nsIURI **_retval);
421     nsresult Resolve(const nsACString *relativePath, nsACString *_retval);
422     nsresult GetAsciiSpec(nsACString *aAsciiSpec);
423     nsresult GetAsciiHost(nsACString *aAsciiHost);
424     nsresult GetOriginCharset(nsACString *aOriginCharset);
425     nsresult GetRef(nsACString *aRef);
426     nsresult SetRef(const nsACString *aRef);
427     nsresult EqualsExceptRef(nsIURI *other, bool *_retval);
428     nsresult CloneIgnoringRef(nsIURI **_retval);
429     nsresult GetSpecIgnoringRef(nsACString *aSpecIgnoringRef);
430     nsresult GetHasRef(bool *aHasRef);
431 }
432
433 [
434     object,
435     uuid(1419aa16-f134-4154-9886-00c7c5147a13),
436     local
437 ]
438 interface nsIURL : nsIURI
439 {
440     nsresult GetFilePath(nsACString *aFilePath);
441     nsresult SetFilePath(const nsACString *aFilePath);
442     nsresult GetQuery(nsACString *aQuery);
443     nsresult SetQuery(const nsACString *aQuery);
444     nsresult GetDirectory(nsACString *aDirectory);
445     nsresult SetDirectory(const nsACString *aDirectory);
446     nsresult GetFileName(nsACString *aFileName);
447     nsresult SetFileName(const nsACString *aFileName);
448     nsresult GetFileBaseName(nsACString *aFileBaseName);
449     nsresult SetFileBaseName(const nsACString *aFileBaseName);
450     nsresult GetFileExtension(nsACString *aFileExtension);
451     nsresult SetFileExtension(const nsACString *aFileExtension);
452     nsresult GetCommonBaseSpec(nsIURI *aURIToCompare, nsACString *_retval);
453     nsresult GetRelativeSpec(nsIURI *aURIToCompare, nsACString *_retval);
454 }
455
456 [
457     object,
458     uuid(7750029c-1b0a-414e-8359-a77f24a2a0a6),
459     local
460 ]
461 interface nsIFileURL : nsIURL
462 {
463     nsresult GetFile(nsIFile **aFile);
464     nsresult SetFile(nsIFile *aFile);
465 }
466
467 [
468     object,
469     uuid(321578d0-03c1-4d95-8821-021ac612d18d),
470     local
471 ]
472 interface nsIMutable : nsISupports
473 {
474     nsresult GetMutable(bool *aMutable);
475     nsresult SetMutable(bool aMutable);
476 }
477
478 [
479     object,
480     uuid(babd6cca-ebe7-4329-967c-d6b9e33caa81),
481     local
482 ]
483 interface nsIStandardURL : nsIMutable
484 {
485     nsresult Init(uint32_t aUrlType, int32_t aDefaultPort, const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI);
486 }
487
488 [
489     object,
490     uuid(ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe),
491     local
492 ]
493 interface nsIRequest : nsISupports
494 {
495     nsresult GetName(nsACString *aName);
496     nsresult IsPending(bool *_retval);
497     nsresult GetStatus(nsresult *aStatus);
498     nsresult Cancel(nsresult aStatus);
499     nsresult Suspend();
500     nsresult Resume();
501     nsresult GetLoadGroup(nsILoadGroup **aLoadGroup);
502     nsresult SetLoadGroup(nsILoadGroup *aLoadGroup);
503     nsresult GetLoadFlags(nsLoadFlags *aLoadFlags);
504     nsresult SetLoadFlags(nsLoadFlags aLoadFlags);
505 }
506
507 [
508     object,
509     uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40),
510     local
511 ]
512 interface nsIRequestObserver : nsISupports
513 {
514     nsresult OnStartRequest(nsIRequest *aRequest, nsISupports *aContext);
515     nsresult OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode);
516 }
517
518 [
519     object,
520     uuid(3b4c8a77-76ba-4610-b316-678c73a3b88c),
521     local
522 ]
523 interface nsIStreamListener : nsIRequestObserver
524 {
525     nsresult OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
526                              nsIInputStream *aInputStream, uint64_t aOffset, uint32_t aCount);
527 }
528
529 [
530     object,
531     uuid(3de0a31c-feaf-400f-9f1e-4ef71f8b20cc),
532     local
533 ]
534 interface nsILoadGroup : nsIRequest
535 {
536     nsresult GetGroupObserver(nsIRequestObserver **aGroupObserver);
537     nsresult SetGroupObserver(nsIRequestObserver *aGroupObserver);
538     nsresult GetDefaultLoadRequest(nsIRequest **aDefaultLoadRequest);
539     nsresult SetDefaultLoadRequest(nsIRequest *aDefaultLoadRequest);
540     nsresult AddRequest(nsIRequest *aRequest, nsISupports *aContext);
541     nsresult RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus);
542     nsresult GetRequests(nsISimpleEnumerator **aRequests);
543     nsresult GetActiveCount(uint32_t *aActiveCount);
544     nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
545     nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
546 }
547
548 [
549     object,
550     uuid(98f3b51b-bb55-4276-a43c-db636f8d77e3),
551     local
552 ]
553 interface nsIChannel : nsIRequest
554 {
555     nsresult GetOriginalURI(nsIURI **aOriginalURI);
556     nsresult SetOriginalURI(nsIURI *aOriginalURI);
557     nsresult GetURI(nsIURI **aURI);
558     nsresult GetOwner(nsISupports **aOwner);
559     nsresult SetOwner(nsISupports *aOwner);
560     nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
561     nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
562     nsresult GetSecurityInfo(nsISupports **aSecurityInfo);
563     nsresult GetContentType(nsACString *aContentType);
564     nsresult SetContentType(const nsACString *aContentType);
565     nsresult GetContentCharset(nsACString *aContentCharset);
566     nsresult SetContentCharset(const nsACString *aContentCharset);
567     nsresult GetContentLength(int32_t *aContentLength);
568     nsresult SetContentLength(int32_t aContentLength);
569     nsresult Open(nsIInputStream **_retval);
570     nsresult AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext);
571     nsresult GetContentDisposition(uint32_t *aContentDisposition);
572     nsresult SetContentDisposition(uint32_t aContentDisposition);
573     nsresult GetContentDispositionFilename(nsAString *aContentDispositionFilename);
574     nsresult SetContentDispositionFilename(const nsAString *aContentDispositionFilename);
575     nsresult GetContentDispositionHeader(nsACString *aContentDispositionHeader);
576 }
577
578 [
579     object,
580     uuid(35412859-b9d9-423c-8866-2d4559fdd2be),
581     local
582 ]
583 interface nsIHttpHeaderVisitor : nsISupports
584 {
585     nsresult VisitHeader(const nsACString *aHeader, const nsACString *aValue);
586 }
587
588 [
589     object,
590     uuid(9277fe09-f0cc-4cd9-bbce-581dd94b0260),
591     local
592 ]
593 interface nsIHttpChannel : nsIChannel
594 {
595     nsresult GetRequestMethod(nsACString *aRequestMethod);
596     nsresult SetRequestMethod(const nsACString *aRequestMethod);
597     nsresult GetReferrer(nsIURI **aReferrer);
598     nsresult SetReferrer(nsIURI *aReferrer);
599     nsresult GetRequestHeader(const nsACString *aHeader, nsACString *_retval);
600     nsresult SetRequestHeader(const nsACString *aHeader, const nsACString *aValue, bool aMerge);
601     nsresult VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor);
602     nsresult GetAllowPipelining(bool *aAllowPipelining);
603     nsresult SetAllowPipelining(bool aAllowPipelining);
604     nsresult GetRedirectionLimit(uint32_t *aRedirectionLimit);
605     nsresult SetRedirectionLimit(uint32_t aRedirectionLimit);
606     nsresult GetResponseStatus(uint32_t *aResponseStatus);
607     nsresult GetResponseStatusText(nsACString *aResponseStatusText);
608     nsresult GetRequestSucceeded(bool *aRequestSucceeded);
609     nsresult GetResponseHeader(const nsACString *header, nsACString *_retval);
610     nsresult SetResponseHeader(const nsACString *header, const nsACString *value, bool merge);
611     nsresult VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor);
612     nsresult IsNoStoreResponse(bool *_retval);
613     nsresult IsNoCacheResponse(bool *_retval);
614 }
615
616 [
617     object,
618     uuid(9363fd96-af59-47e8-bddf-1d5e91acd336),
619     local
620 ]
621 interface nsIHttpChannelInternal : nsISupports
622 {
623     nsresult GetDocumentURI(nsIURI **aDocumentURI);
624     nsresult SetDocumentURI(nsIURI *aDocumentURI);
625     nsresult GetRequestVersion(uint32_t *major, uint32_t *minor);
626     nsresult GetResponseVersion(uint32_t *major, uint32_t *minor);
627     nsresult SetCookie(const char *aCookieHeader);
628     nsresult SetupFallbackChannel(const char *aFallbackKey);
629     nsresult GetForceAllowThirdPartyCookie(bool *aForceAllowThirdPartyCookie);
630     nsresult SetForceAllowThirdPartyCookie(bool aForceAllowThirdPartyCookie);
631     nsresult GetCanceled(bool *aCanceled);
632     nsresult GetChannelIsForDownload(bool *aChannelIsForDownload);
633     nsresult SetChannelIsForDownload(bool aChannelIsForDownload);
634     nsresult GetLocalAddress(nsACString *aLocalAddress);
635     nsresult GetLocalPort(int32_t *aLocalPort);
636     nsresult GetRemoteAddress(nsACString *aRemoteAddress);
637     nsresult GetRemotePort(int32_t *aRemotePort);
638     nsresult SetCacheKeysRedirectChain(void /*nsTArray<nsCString>*/ *cacheKeys);
639     nsresult HTTPUpgrade(const nsACString *aProtocolName, nsIHttpUpgradeListener *aListener);
640     nsresult GetAllowSpdy(bool *aAllowSpdy);
641     nsresult SetAllowSpdy(bool aAllowSpdy);
642 }
643
644 [
645     object,
646     uuid(5cfe15bd-5adb-4a7f-9e55-4f5a67d15794),
647     local
648 ]
649 interface nsIUploadChannel : nsISupports
650 {
651     nsresult SetUploadStream(nsIInputStream *aStream, const nsACString *aContentType,
652                              int64_t aContentLength);
653     nsresult GetUploadStream(nsIInputStream **aUploadStream);
654 }
655
656 [
657     object,
658     uuid(8d171460-a716-41f1-92be-8c659db39b45),
659     local
660 ]
661 interface nsIAsyncVerifyRedirectCallback : nsISupports
662 {
663     nsresult OnRedirectVerifyCallback(nsresult result);
664 }
665
666 [
667     object,
668     uuid(a430d870-df77-4502-9570-d46a8de33154),
669     local
670 ]
671 interface nsIChannelEventSink : nsISupports
672 {
673     cpp_quote("#define REDIRECT_TEMPORARY 1")
674     cpp_quote("#define REDIRECT_PERMANENT 2")
675     cpp_quote("#define REDIRECT_INTERNAL  4")
676
677     nsresult AsyncOnChannelRedirect(nsIChannel *oldChannel, nsIChannel *newChannel, uint32_t flags,
678                                     nsIAsyncVerifyRedirectCallback *callback);
679 }
680
681 [
682     object,
683     uuid(a6cf906d-15b3-11d2-932e-00805f8add32),
684     local
685 ]
686 interface nsIDOMLocation : nsISupports
687 {
688     nsresult GetHash(nsAString *aHash);
689     nsresult SetHash(const nsAString *aHash);
690     nsresult GetHost(nsAString *aHost);
691     nsresult SetHost(const nsAString *aHost);
692     nsresult GetHostname(nsAString *aHostname);
693     nsresult SetHostname(const nsAString *aHostname);
694     nsresult GetHref(nsAString *aHref);
695     nsresult SetHref(const nsAString *aHref);
696     nsresult GetPathname(nsAString *aPathname);
697     nsresult SetPathname(const nsAString *aPathname);
698     nsresult GetPort(nsAString *aPort);
699     nsresult SetPort(const nsAString *aPort);
700     nsresult GetProtocol(nsAString *aProtocol);
701     nsresult SetProtocol(const nsAString *aProtocol);
702     nsresult GetSearch(nsAString *aSearch);
703     nsresult SetSearch(const nsAString *aSearch);
704     nsresult Reload(bool forceget);
705     nsresult Replace(const nsAString *url);
706     nsresult Assign(const nsAString *url);
707     nsresult ToString(nsAString *_retval);
708 }
709
710 [
711     object,
712     uuid(2938307a-9d70-4b63-8afc-0197e82318ad),
713     local
714 ]
715 interface nsIDOMCSSRule : nsISupports
716 {
717     nsresult GetType(uint16_t *aType);
718     nsresult GetCssText(nsAString *aCssText);
719     nsresult SetCssText(const nsAString *aCssText);
720     nsresult GetParentStyleSheet(nsIDOMCSSStyleSheet **aParentStyleSheet);
721     nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
722 }
723
724 [
725     object,
726     uuid(a6cf90be-15b3-11d2-932e-00805f8add32),
727     local
728 ]
729 interface nsIDOMCSSStyleDeclaration : nsISupports
730 {
731     nsresult GetCssText(nsAString *aCssText);
732     nsresult SetCssText(const nsAString *aCssText);
733     nsresult GetPropertyValue(const nsAString *propertyName, nsAString *_retval);
734     nsresult GetPropertyCSSValue(const nsAString *propertyName, nsIDOMCSSValue **_retval);
735     nsresult RemoveProperty(const nsAString *propertyName, nsAString *_retval);
736     nsresult GetPropertyPriority(const nsAString *propertyName, nsAString *_retval);
737     nsresult SetProperty(const nsAString *propertyName, const nsAString *value,
738                          const nsAString *priority);
739     nsresult GetLength(uint32_t *aLength);
740     nsresult Item(uint32_t index, nsAString *_retval);
741     nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
742 }
743
744 [
745     object,
746     uuid(a6cf90c0-15b3-11d2-932e-00805f8add32),
747     local
748 ]
749 interface nsIDOMCSSRuleList : nsISupports
750 {
751     nsresult GetLength(uint32_t *aLength);
752     nsresult Item(uint32_t index, nsIDOMCSSRule **_retval);
753 }
754
755 [
756     object,
757     uuid(a6cf9080-15b3-11d2-932e-00805f8add32),
758     local
759 ]
760 interface nsIDOMStyleSheet : nsISupports
761 {
762     nsresult GetType(nsAString *aType);
763     nsresult GetDisabled(bool *aDisabled);
764     nsresult SetDisabled(bool aDisabled);
765     nsresult GetOwnerNode(nsIDOMNode **aOwnerNode);
766     nsresult GetParentStyleSheet(nsIDOMStyleSheet **aParentStyleSheet);
767     nsresult GetHref(nsAString *aHref);
768     nsresult GetTitle(nsAString *aTitle);
769     nsresult GetMedia(nsIDOMMediaList **aMedia);
770 }
771
772 [
773     object,
774     uuid(a6cf90c2-15b3-11d2-932e-00805f8add32),
775     local
776 ]
777 interface nsIDOMCSSStyleSheet : nsIDOMStyleSheet
778 {
779     nsresult GetOwnerRule(nsIDOMCSSRule **aOwnerRule);
780     nsresult GetCssRules(nsIDOMCSSRuleList **aCssRules);
781     nsresult InsertRule(const nsAString *rule, uint32_t index, uint32_t *_retval);
782     nsresult DeleteRule(uint32_t index);
783 }
784
785 [
786     object,
787     uuid(a6cf9081-15b3-11d2-932e-00805f8add32),
788     local
789 ]
790 interface nsIDOMStyleSheetList : nsISupports
791 {
792     nsresult GetLength(uint32_t *aLength);
793     nsresult Item(uint32_t index, nsIDOMStyleSheet **_retval);
794 }
795
796 [
797     object,
798     uuid(496852ba-e48d-4fa5-982e-e0dc1b475bf1),
799     local
800 ]
801 interface nsIDOMNodeList : nsISupports
802 {
803     nsresult Item(uint32_t index, nsIDOMNode **_retval);
804     nsresult GetLength(uint32_t *aLength);
805     /* Followed by semi-internal API that we don't want to use */
806 }
807
808 [
809     object,
810     uuid(a6cf907b-15b3-11d2-932e-00805f8add32),
811     local
812 ]
813 interface nsIDOMNamedNodeMap : nsISupports
814 {
815     nsresult GetNamedItem(const nsAString *name, nsIDOMNode **_retval);
816     nsresult SetNamedItem(nsIDOMNode *arg, nsIDOMNode **_retval);
817     nsresult RemoveNamedItem(const nsAString *name, nsIDOMNode **_retval);
818     nsresult Item(uint32_t index, nsIDOMNode **_retval);
819     nsresult GetLength(uint32_t *aLength);
820     nsresult GetNamedItemNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMNode **_retval);
821     nsresult SetNamedItemNS(nsIDOMNode *arg, nsIDOMNode **_retval);
822     nsresult RemoveNamedItemNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMNode **_retval);
823 }
824
825 [
826     object,
827     uuid(5e9bcec9-5928-4f77-8a9c-424ef01c20e1),
828     local
829 ]
830 interface nsIDOMNode : nsISupports
831 {
832     enum NSNODETYPE {
833         ELEMENT_NODE = 1,
834         ATTRIBUTE_NODE = 2,
835         TEXT_NODE = 3,
836         CDATA_SELECTION_NODE = 4,
837         ENTITY_REFERENCE_NODE = 5,
838         ENTITY_NODE = 6,
839         PROCESSING_INSTRUCTION_NODE = 7,
840         COMMENT_NODE = 8,
841         DOCUMENT_NODE = 9,
842         DOCUMENT_TYPE_NODE = 10,
843         DOCUMENT_FRAGMENT_NODE = 11,
844         NOTATION_NODE = 12
845     };
846
847     enum {
848         DOCUMENT_POSITION_DISCONNECTED = 1,
849         DOCUMENT_POSITION_PRECEDING = 2,
850         DOCUMENT_POSITION_FOLLOWING = 4,
851         DOCUMENT_POSITION_CONTAINS = 8,
852         DOCUMENT_POSITION_CONTAINED_BY = 16,
853         DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32
854     };
855
856     nsresult GetNodeName(nsAString *aNodeName);
857     nsresult GetNodeValue(nsAString *aNodeValue);
858     nsresult SetNodeValue(const nsAString *aNodeValue);
859     nsresult GetNodeType(uint16_t *aNodeType);
860     nsresult GetParentNode(nsIDOMNode **aParentNode);
861     nsresult GetParentElement(nsIDOMElement **aParentElement);
862     nsresult GetChildNodes(nsIDOMNodeList **aChildNodes);
863     nsresult GetFirstChild(nsIDOMNode **aFirstChild);
864     nsresult GetLastChild(nsIDOMNode **aLastChild);
865     nsresult GetPreviousSibling(nsIDOMNode **aPreviousSibling);
866     nsresult GetNextSibling(nsIDOMNode **aNextSibling);
867     nsresult GetAttributes(nsIDOMNamedNodeMap **aAttributes);
868     nsresult GetOwnerDocument(nsIDOMDocument **aOwnerDocument);
869     nsresult InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild, nsIDOMNode **_retval);
870     nsresult ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild, nsIDOMNode **_retval);
871     nsresult RemoveChild(nsIDOMNode *oldChild, nsIDOMNode **_retval);
872     nsresult AppendChild(nsIDOMNode *newChild, nsIDOMNode **_retval);
873     nsresult HasChildNodes(bool *_retval);
874     nsresult CloneNode(bool deep, uint8_t _argc, nsIDOMNode **_retval);
875     nsresult Normalize();
876     nsresult IsSupported(const nsAString *feature, const nsAString *version, bool *_retval);
877     nsresult GetNamespaceURI(nsAString *aNamespaceURI);
878     nsresult GetPrefix(nsAString *aPrefix);
879     nsresult GetLocalName(nsAString *aLocalName);
880     nsresult HasAttributes(bool *_retval);
881     nsresult GetDOMBaseURI(nsAString *aBaseURI);
882     nsresult CompareDocumentPosition(nsIDOMNode *other, uint16_t *_retval);
883     nsresult GetTextContent(nsAString *aTextContent);
884     nsresult SetTextContent(const nsAString *aTextContent);
885     nsresult LookupPrefix(const nsAString *namespaceURI, nsAString *_retval);
886     nsresult IsDefaultNamespace(const nsAString *namespaceURI, bool *_retval);
887     nsresult LookupNamespaceURI(const nsAString *prefix, nsAString *_retval);
888     nsresult IsEqualNode(nsIDOMNode *arg, bool *_retval);
889     nsresult SetUserData(const nsAString *key, nsIVariant *data, nsIDOMUserDataHandler *handler, nsIVariant **_retval);
890     nsresult GetUserData(const nsAString *key, nsIVariant **_retval);
891     nsresult Contains(nsIDOMNode *aOther, bool *_retval);
892
893     nsresult GetMshtmlNode(nsISupports **aMshtmlNode);
894     nsresult SetMshtmlNode(nsISupports *aMshtmlNode);
895 }
896
897 [
898     object,
899     uuid(03da4bc9-1b9a-41dc-a1a4-32414d48d704),
900     local
901 ]
902 interface nsIDOMAttr : nsIDOMNode
903 {
904     nsresult GetName(nsAString *aName);
905     nsresult GetSpecified(bool *aSpecified);
906     nsresult GetValue(nsAString *aValue);
907     nsresult SetValue(const nsAString *aValue);
908     nsresult GetOwnerElement(nsIDOMElement **aOwnerElement);
909     nsresult GetIsId(bool *aIsId);
910 }
911
912 [
913     object,
914     uuid(b2f824c4-d9d3-499b-8d3b-45c8245497c6),
915     local
916 ]
917 interface nsIDOMClientRect : nsISupports
918 {
919     nsresult GetLeft(float *aLeft);
920     nsresult GetTop(float *aTop);
921     nsresult GetRight(float *aRight);
922     nsresult GetBottom(float *aBottom);
923     nsresult GetWidth(float *aWidth);
924     nsresult GetHeight(float *aHeight);
925 }
926
927 [
928     object,
929     uuid(69d44ce2-b544-49a8-bb5f-87804b971ee4),
930     local
931 ]
932 interface nsIDOMElement : nsIDOMNode
933 {
934     nsresult GetTagName(nsAString *aTagName);
935     nsresult GetClassList(nsIDOMDOMTokenList **aClassList);
936     nsresult GetAttribute(const nsAString *name, nsAString *_retval);
937     nsresult GetAttributeNS(const nsAString *namespaceURI, const nsAString *localName, nsAString *_retval);
938     nsresult SetAttribute(const nsAString *name, const nsAString *value);
939     nsresult SetAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName, const nsAString *value);
940     nsresult RemoveAttribute(const nsAString *name);
941     nsresult RemoveAttributeNS(const nsAString *namespaceURI, const nsAString *localName);
942     nsresult HasAttribute(const nsAString *name, bool *_retval);
943     nsresult HasAttributeNS(const nsAString *namespaceURI, const nsAString *localName, bool *_retval);
944     nsresult GetAttributeNode(const nsAString *name, nsIDOMAttr **_retval);
945     nsresult SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
946     nsresult RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval);
947     nsresult GetAttributeNodeNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMAttr **_retval);
948     nsresult SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
949     nsresult GetElementsByTagName(const nsAString *name, nsIDOMNodeList **_retval);
950     nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMNodeList **_retval);
951     nsresult GetElementsByClassName(const nsAString *classes, nsIDOMNodeList **_retval);
952     nsresult GetChildElements(nsIDOMNodeList **aChildren);
953     nsresult GetFirstElementChild(nsIDOMElement **aFirstElementChild);
954     nsresult GetLastElementChild(nsIDOMElement **aLastElementChild);
955     nsresult GetPreviousElementSibling(nsIDOMElement **aPreviousElementSibling);
956     nsresult GetNextElementSibling(nsIDOMElement **aNextElementSibling);
957     nsresult GetChildElementCount(uint32_t *aChildElementCount);
958     nsresult GetOnmouseenter(JSContext *cx, jsval *aOnmouseenter);
959     nsresult SetOnmouseenter(JSContext *cx, const jsval *aOnmouseenter);
960     nsresult GetOnmouseleave(JSContext *cx, jsval *aOnmouseleave);
961     nsresult SetOnmouseleave(JSContext *cx, const jsval *aOnmouseleave);
962     nsresult GetClientRects(nsIDOMClientRectList **_retval);
963     nsresult GetBoundingClientRect(nsIDOMClientRect **_retval);
964     nsresult GetScrollTop(int32_t *aScrollTop);
965     nsresult SetScrollTop(int32_t aScrollTop);
966     nsresult GetScrollLeft(int32_t *aScrollLeft);
967     nsresult SetScrollLeft(int32_t aScrollLeft);
968     nsresult GetScrollWidth(int32_t *aScrollWidth);
969     nsresult GetScrollHeight(int32_t *aScrollHeight);
970     nsresult GetClientTop(int32_t *aClientTop);
971     nsresult GetClientLeft(int32_t *aClientLeft);
972     nsresult GetClientWidth(int32_t *aClientWidth);
973     nsresult GetClientHeight(int32_t *aClientHeight);
974     nsresult GetScrollLeftMax(int32_t *aScrollLeftMax);
975     nsresult GetScrollTopMax(int32_t *aScrollTopMax);
976     nsresult MozMatchesSelector(const nsAString *selector, bool *_retval);
977     nsresult SetCapture(bool retargetToElement);
978     nsresult ReleaseCapture();
979     nsresult MozRequestFullScreen();
980     nsresult MozRequestPointerLock();
981 }
982
983 [
984     object,
985     uuid(99715845-95fc-4a56-aa53-214b65c26e22),
986     local
987 ]
988 interface nsIDOMElementCSSInlineStyle : nsISupports
989 {
990     nsresult GetStyle(nsIDOMCSSStyleDeclaration **aStyle);
991 }
992
993 cpp_quote("#undef GetClassName")
994
995 [
996     object,
997     uuid(9a677a5b-e6f7-4e2e-9ef9-22c2ac9967b3),
998     local
999 ]
1000 interface nsIDOMHTMLElement : nsIDOMElement
1001 {
1002     nsresult GetId(nsAString *aId);
1003     nsresult SetId(const nsAString *aId);
1004     nsresult GetTitle(nsAString *aTitle);
1005     nsresult SetTitle(const nsAString *aTitle);
1006     nsresult GetLang(nsAString *aLang);
1007     nsresult SetLang(const nsAString *aLang);
1008     nsresult GetDir(nsAString *aDir);
1009     nsresult SetDir(const nsAString *aDir);
1010     nsresult GetClassName(nsAString *aClassName);
1011     nsresult SetClassName(const nsAString *aClassName);
1012     nsresult GetDataset(nsIDOMDOMStringMap **aDataset);
1013     nsresult GetItemScope(bool *aItemScope);
1014     nsresult SetItemScope(bool aItemScope);
1015     nsresult GetItemType(nsIVariant **aItemType);
1016     nsresult SetItemType(nsIVariant *aItemType);
1017     nsresult GetItemId(nsAString *aItemId);
1018     nsresult SetItemId(const nsAString *aItemId);
1019     nsresult GetProperties(nsIDOMHTMLPropertiesCollection **aProperties);
1020     nsresult GetItemValue(nsIVariant **aItemValue);
1021     nsresult SetItemValue(nsIVariant *aItemValue);
1022     nsresult GetItemProp(nsIVariant **aItemProp);
1023     nsresult SetItemProp(nsIVariant *aItemProp);
1024     nsresult GetItemRef(nsIVariant **aItemRef);
1025     nsresult SetItemRef(nsIVariant *aItemRef);
1026     nsresult GetHidden(bool *aHidden);
1027     nsresult SetHidden(bool aHidden);
1028     nsresult Click();
1029     nsresult GetTabIndex(int32_t *aTabIndex);
1030     nsresult SetTabIndex(int32_t aTabIndex);
1031     nsresult Focus();
1032     nsresult Blur();
1033     nsresult GetAccessKey(nsAString *aAccessKey);
1034     nsresult SetAccessKey(const nsAString *aAccessKey);
1035     nsresult GetAccessKeyLabel(nsAString *aAccessKeyLabel);
1036     nsresult GetDraggable(bool *aDraggable);
1037     nsresult SetDraggable(bool aDraggable);
1038     nsresult GetContentEditable(nsAString *aContentEditable);
1039     nsresult SetContentEditable(const nsAString *aContentEditable);
1040     nsresult GetIsContentEditable(bool *aIsContentEditable);
1041     nsresult GetContextMenu(nsIDOMHTMLMenuElement **aContextMenu);
1042     nsresult GetSpellcheck(bool *aSpellcheck);
1043     nsresult SetSpellcheck(bool aSpellcheck);
1044     nsresult GetInnerHTML(nsAString *aInnerHTML);
1045     nsresult SetInnerHTML(const nsAString *aInnerHTML);
1046     nsresult GetOuterHTML(nsAString *aInnerHTML);
1047     nsresult SetOuterHTML(const nsAString *aInnerHTML);
1048     nsresult InsertAdjacentHTML(const nsAString *position, const nsAString *text);
1049     nsresult ScrollIntoView(bool top, uint8_t _argc);
1050     nsresult GetOffsetParent(nsIDOMElement * *aOffsetParent);
1051     nsresult GetOffsetTop(int32_t *aOffsetTop);
1052     nsresult GetOffsetLeft(int32_t *aOffsetLeft);
1053     nsresult GetOffsetWidth(int32_t *aOffsetWidth);
1054     nsresult GetOffsetHeight(int32_t *aOffsetHeight);
1055 }
1056
1057 [
1058     object,
1059     uuid(8b38545f-7fa5-47d5-a902-c8ea8e78fb0d),
1060     local
1061 ]
1062 interface nsIDOMHTMLHeadElement : nsIDOMHTMLElement
1063 {
1064 }
1065
1066
1067 [
1068     object,
1069     uuid(db690d8f-3bca-4198-be64-78adb7f38bf8),
1070     local
1071 ]
1072 interface nsIDOMHTMLCollection : nsISupports
1073 {
1074     nsresult GetLength(uint32_t *aLength);
1075     nsresult Item(uint32_t index, nsIDOMNode **_retval);
1076     nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval);
1077     /* Followed by semi-internal API that we don't want to use */
1078 }
1079
1080 [
1081     object,
1082     uuid(cb75c251-afc7-444f-b2d6-b9635555f3ed),
1083     local
1084 ]
1085 interface nsIDOMCharacterData : nsIDOMNode
1086 {
1087     nsresult GetData(nsAString *aData);
1088     nsresult SetData(const nsAString *aData);
1089     nsresult GetLength(uint32_t *aLength);
1090     nsresult SubstringData(uint32_t offset, uint32_t count, nsAString *_retval);
1091     nsresult AppendData(const nsAString *arg);
1092     nsresult InsertData(uint32_t offset, const nsAString *arg);
1093     nsresult DeleteData(uint32_t offset, uint32_t count);
1094     nsresult ReplaceData(uint32_t offset, uint32_t count, const nsAString *arg);
1095 }
1096
1097 [
1098     object,
1099     uuid(437ed60c-febd-4bd0-892f-cf358adc3c96),
1100     local
1101 ]
1102 interface nsIDOMText : nsIDOMCharacterData
1103 {
1104     nsresult SplitText(uint32_t offset, nsIDOMText **_retval);
1105     nsresult GetWholeText(nsAString *aWholeText);
1106 }
1107
1108 [
1109     object,
1110     uuid(cea49a35-dac9-4c4d-9830-4660abb3b6bc),
1111     local
1112 ]
1113 interface nsIDOMComment : nsIDOMCharacterData
1114 {
1115 }
1116
1117 [
1118     object,
1119     uuid(4a15eb0c-d5bc-4902-9d50-21b12cab47e7),
1120     local
1121 ]
1122 interface nsIDOMDocumentFragment : nsIDOMNode
1123 {
1124 }
1125
1126 [
1127     object,
1128     uuid(b7e90442-74d6-494e-af01-906d95926dec),
1129     local
1130 ]
1131 interface nsIDOMDocument : nsIDOMNode
1132 {
1133     nsresult GetDoctype(nsIDOMDocumentType **aDoctype);
1134     nsresult GetImplementation(nsIDOMDOMImplementation **aImplementation);
1135     nsresult GetDocumentElement(nsIDOMElement **aDocumentElement);
1136     nsresult CreateElement(const nsAString *tagName, nsIDOMElement **_retval);
1137     nsresult CreateDocumentFragment(nsIDOMDocumentFragment **_retval);
1138     nsresult CreateTextNode(const nsAString *data, nsIDOMText **_retval);
1139     nsresult CreateComment(const nsAString *data, nsIDOMComment **_retval);
1140     nsresult CreateCDATASection(const nsAString *data, nsIDOMCDATASection **_retval);
1141     nsresult CreateProcessingInstruction(const nsAString *target, const nsAString *data, nsIDOMProcessingInstruction **_retval);
1142     nsresult CreateAttribute(const nsAString *name, nsIDOMAttr **_retval);
1143     nsresult GetElementsByTagName(const nsAString *tagname, nsIDOMNodeList **_retval);
1144     nsresult ImportNode(nsIDOMNode *importedNode, bool deep, uint8_t _argc, nsIDOMNode **_retval);
1145     nsresult CreateElementNS(const nsAString *namespaceURI, const nsAString *qualifiedName, nsIDOMElement **_retval);
1146     nsresult CreateAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName, nsIDOMAttr **_retval);
1147     nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName, nsIDOMNodeList **_retval);
1148     nsresult GetElementById(const nsAString *elementId, nsIDOMElement **_retval);
1149     nsresult GetInputEncoding(nsAString *aInputEncoding);
1150     nsresult GetDocumentURI(nsAString *aDocumentURI);
1151     nsresult AdoptNode(nsIDOMNode *source, nsIDOMNode **_retval);
1152     nsresult CreateRange(nsIDOMRange **_retval);
1153     nsresult CreateNodeIterator(nsIDOMNode *root, uint32_t whatToShow, nsIDOMNodeFilter *filter, uint8_t _argc,
1154             nsIDOMNodeIterator **_retval);
1155     nsresult CreateTreeWalker(nsIDOMNode *root, uint32_t whatToShow, nsIDOMNodeFilter *filter, uint8_t _argc,
1156             nsIDOMTreeWalker **_retval);
1157     cpp_quote("#undef CreateEvent")
1158     nsresult CreateEvent(const nsAString *eventType, nsIDOMEvent **_retval);
1159     nsresult GetDefaultView(nsIDOMWindow **aDefaultView);
1160     nsresult GetCharacterSet(nsAString *aCharacterSet);
1161     nsresult GetDir(nsAString *aDir);
1162     nsresult SetDir(const nsAString *aDir);
1163     nsresult GetLocation(nsIDOMLocation **aLocation);
1164     nsresult GetTitle(nsAString *aTitle);
1165     nsresult SetTitle(const nsAString *aTitle);
1166     nsresult GetReadyState(nsAString *aReadyState);
1167     nsresult GetLastModified(nsAString *aLastModified);
1168     nsresult GetReferrer(nsAString *aReferrer);
1169     nsresult HasFocus(bool *_retval);
1170     nsresult GetActiveElement(nsIDOMElement **aActiveElement);
1171     nsresult GetElementsByClassName(const nsAString *classes, nsIDOMNodeList **_retval);
1172     nsresult GetStyleSheets(nsIDOMStyleSheetList **aStyleSheets);
1173     nsresult GetPreferredStyleSheetSet(nsAString *aPreferredStyleSheetSet);
1174     nsresult GetSelectedStyleSheetSet(nsAString *aSelectedStyleSheetSet);
1175     nsresult SetSelectedStyleSheetSet(const nsAString *aSelectedStyleSheetSet);
1176     nsresult GetLastStyleSheetSet(nsAString *aLastStyleSheetSet);
1177     nsresult GetStyleSheetSets(nsIDOMDOMStringList **aStyleSheetSets);
1178     nsresult EnableStyleSheetsForSet(const nsAString *name);
1179     nsresult ElementFromPoint(float x, float y, nsIDOMElement **_retval);
1180     nsresult GetContentType(nsAString *aContentType);
1181     nsresult GetMozSyntheticDocument(bool *aMozSyntheticDocument);
1182     nsresult GetCurrentScript(nsIDOMElement **aCurrentScript);
1183     nsresult ReleaseCapture();
1184     nsresult MozSetImageElement(const nsAString *aImageElementId, nsIDOMElement *aImageElement);
1185     nsresult GetMozFullScreenElement(nsIDOMElement **aMozFullScreenElement);
1186     nsresult MozCancelFullScreen();
1187     nsresult GetMozFullScreen(bool *aMozFullScreen);
1188     nsresult GetMozFullScreenEnabled(bool *aMozFullScreenEnabled);
1189     nsresult GetMozPointerLockElement(nsIDOMElement **aMozPointerLockElement);
1190     nsresult MozExitPointerLock();
1191     nsresult GetOnreadystatechange(JSContext* cx, jsval aOnreadystatechange);
1192     nsresult SetOnreadystatechange(JSContext* cx, const jsval *aOnreadystatechange);
1193     nsresult GetOnmouseenter(JSContext* cx, jsval *aOnmouseenter);
1194     nsresult SetOnmouseenter(JSContext* cx, const jsval *aOnmouseenter);
1195     nsresult GetOnmouseleave(JSContext* cx, jsval *aOnmouseleave) = 0;
1196     nsresult SetOnmouseleave(JSContext* cx, const jsval *aOnmouseleave);
1197     nsresult GetHidden(bool *aHidden);
1198     nsresult GetMozHidden(bool *aMozHidden);
1199     nsresult GetVisibilityState(nsAString *aVisibilityState);
1200     nsresult GetMozVisibilityState(nsAString *aMozVisibilityState);
1201 }
1202
1203 [
1204     object,
1205     uuid(ecae54c6-2ab9-4167-b0ef-61960aadbb68),
1206     local
1207 ]
1208 interface nsIDOMHTMLDocument : nsIDOMDocument
1209 {
1210     nsresult GetURL(nsAString *aURL);
1211     nsresult GetDomain(nsAString *aDomain);
1212     nsresult SetDomain(const nsAString *aDomain);
1213     nsresult GetCookie(nsAString *aCookie);
1214     nsresult SetCookie(const nsAString *aCookie);
1215     nsresult GetCompatMode(nsAString *aCompatMode);
1216     nsresult GetHead(nsIDOMHTMLHeadElement **aHead);
1217     nsresult GetBody(nsIDOMHTMLElement **aBody);
1218     nsresult SetBody(nsIDOMHTMLElement *aBody);
1219     nsresult GetImages(nsIDOMHTMLCollection **aImages);
1220     nsresult GetEmbeds(nsIDOMHTMLCollection **aEmbeds);
1221     nsresult GetPlugins(nsIDOMHTMLCollection **aPlugins);
1222     nsresult GetLinks(nsIDOMHTMLCollection **aLinks);
1223     nsresult GetForms(nsIDOMHTMLCollection **aForms);
1224     nsresult GetScripts(nsIDOMHTMLCollection **aScripts);
1225     nsresult GetElementsByName(const nsAString *elementName, nsIDOMNodeList **_retval);
1226     nsresult GetItems(const nsAString *types, nsIDOMNodeList **_retval);
1227     nsresult Open(const nsAString *aContentTypeOrUrl, const nsAString *aReplaceOrName, const nsAString *aFeatures,
1228             JSContext *cx, uint8_t _argc, nsISupports **_retval);
1229     nsresult Close();
1230     nsresult Write(const nsAString *text, JSContext *cx);
1231     nsresult Writeln(const nsAString *text, JSContext *cx);
1232     nsresult GetDesignMode(nsAString *aDesignMode);
1233     nsresult SetDesignMode(const nsAString *aDesignMode);
1234     nsresult ExecCommand(const nsAString *commandID, bool doShowUI, const nsAString *value, bool *_retval);
1235     nsresult QueryCommandEnabled(const nsAString *commandID, bool *_retval);
1236     nsresult QueryCommandIndeterm(const nsAString *commandID, bool *_retval);
1237     nsresult QueryCommandState(const nsAString *commandID, bool *_retval);
1238     nsresult QueryCommandSupported(const nsAString *commandID, bool *_retval);
1239     nsresult QueryCommandValue(const nsAString *commandID, nsAString *_retval);
1240     nsresult GetFgColor(nsAString *aFgColor);
1241     nsresult SetFgColor(const nsAString *aFgColor);
1242     nsresult GetBgColor(nsAString *aBgColor);
1243     nsresult SetBgColor(const nsAString *aBgColor);
1244     nsresult GetLinkColor(nsAString *aLinkColor);
1245     nsresult SetLinkColor(const nsAString *aLinkColor);
1246     nsresult GetVlinkColor(nsAString *aVlinkColor);
1247     nsresult SetVlinkColor(const nsAString *aVlinkColor);
1248     nsresult GetAlinkColor(nsAString *aAlinkColor);
1249     nsresult SetAlinkColor(const nsAString *aAlinkColor);
1250     nsresult GetAnchors(nsIDOMHTMLCollection **aAnchors);
1251     nsresult GetApplets(nsIDOMHTMLCollection **aApplets);
1252     nsresult Clear();
1253     nsresult GetSelection(nsISelection **_retval);
1254     nsresult CaptureEvents(int32_t eventFlags);
1255     nsresult ReleaseEvents(int32_t eventFlags);
1256     nsresult RouteEvent(nsIDOMEvent *evt);
1257 }
1258
1259 [
1260     object,
1261     uuid(1f94055c-42e7-4a30-96a1-6a804f1c2d1e),
1262     local
1263 ]
1264 interface nsIDOMRange : nsISupports
1265 {
1266     enum {
1267         NS_START_TO_START,
1268         NS_START_TO_END,
1269         NS_END_TO_END,
1270         NS_END_TO_START
1271     };
1272
1273     nsresult GetStartContainer(nsIDOMNode **aStartContainer);
1274     nsresult GetStartOffset(int32_t *aStartOffset);
1275     nsresult GetEndContainer(nsIDOMNode **aEndContainer);
1276     nsresult GetEndOffset(int32_t *aEndOffset);
1277     nsresult GetCollapsed(bool *aCollapsed);
1278     nsresult GetCommonAncestorContainer(nsIDOMNode **aCommonAncestorContainer);
1279     nsresult SetStart(nsIDOMNode *refNode, int32_t offset);
1280     nsresult SetEnd(nsIDOMNode *refNode, int32_t offset);
1281     nsresult SetStartBefore(nsIDOMNode *refNode);
1282     nsresult SetStartAfter(nsIDOMNode *refNode);
1283     nsresult SetEndBefore(nsIDOMNode *refNode);
1284     nsresult SetEndAfter(nsIDOMNode *refNode);
1285     nsresult Collapse(bool toStart);
1286     nsresult SelectNode(nsIDOMNode *refNode);
1287     nsresult SelectNodeContents(nsIDOMNode *refNode);
1288     nsresult CompareBoundaryPoints(uint16_t how, nsIDOMRange *sourceRange, int16_t *_retval);
1289     nsresult DeleteContents();
1290     nsresult ExtractContents(nsIDOMDocumentFragment **_retval);
1291     nsresult CloneContents(nsIDOMDocumentFragment **_retval);
1292     nsresult InsertNode(nsIDOMNode *newNode);
1293     nsresult SurroundContents(nsIDOMNode *newParent);
1294     nsresult CloneRange(nsIDOMRange **_retval);
1295     nsresult ToString(nsAString *_retval);
1296     nsresult Detach();
1297     nsresult CreateContextualFragment([in] const nsAString *fragment, [out] nsIDOMDocumentFragment **_retval);
1298     nsresult IsPointInRange([in] nsIDOMNode *parent, [in] int32_t offset, [out] bool *_retval);
1299     nsresult ComparePoint([in] nsIDOMNode *parent, [in] int32_t offset, [out] int16_t *_retval);
1300     nsresult IntersectsNode(nsIDOMNode *node, bool *_retval);
1301     nsresult GetClientRects(nsIDOMClientRectList **_retval);
1302     nsresult GetBoundingClientRect(nsIDOMClientRect **_retval);
1303 }
1304
1305 [
1306     object,
1307     uuid(12cf5a4d-fffb-4f2f-9cec-c65195661d76),
1308     local
1309 ]
1310 interface nsISelection : nsISupports
1311 {
1312     nsresult GetAnchorNode(nsIDOMNode **aAnchorNode);
1313     nsresult GetAnchorOffset(int32_t *aAnchorOffset);
1314     nsresult GetFocusNode(nsIDOMNode **aFocusNode);
1315     nsresult GetFocusOffset(int32_t *aFocusOffset);
1316     nsresult GetIsCollapsed(bool *aIsCollapsed);
1317     bool /* don't use */ Collapsed();
1318     nsresult GetRangeCount(int32_t *aRangeCount);
1319     nsresult GetRangeAt(int32_t index, nsIDOMRange **_retval);
1320     nsresult Collapse(nsIDOMNode *parentNode, int32_t offset);
1321     nsresult CollapseNative(nsINode *parentNode, int32_t offset);
1322     nsresult Extend(nsIDOMNode *parentNode, int32_t offset);
1323     nsresult ExtendNative(nsINode *parentNode, int32_t offset);
1324     nsresult CollapseToStart();
1325     nsresult CollapseToEnd();
1326     nsresult ContainsNode(nsIDOMNode *node, bool entirelyContained, bool *_retval);
1327     nsresult SelectAllChildren(nsIDOMNode *parentNode);
1328     nsresult AddRange(nsIDOMRange *range);
1329     nsresult RemoveRange(nsIDOMRange *range);
1330     nsresult RemoveAllRanges();
1331     nsresult DeleteFromDocument();
1332     nsresult SelectionLanguageChange(bool langRTL);
1333     nsresult ToString(nsAString *_retval);
1334     nsresult Modify(const nsAString *alter, const nsAString *direction, const nsAString *granularity);
1335 }
1336
1337 [
1338     object,
1339     uuid(a6cf906f-15b3-11d2-932e-00805f8add32),
1340     local
1341 ]
1342 interface nsIDOMWindowCollection : nsISupports
1343 {
1344     nsresult GetLength(uint32_t *aLength);
1345     nsresult Item(uint32_t index, nsIDOMWindow **_retval);
1346     nsresult NamedItem(const nsAString *name, nsIDOMWindow **_retval);
1347 }
1348
1349 [
1350     object,
1351     uuid(7afa38e6-45a1-4f0b-ae84-997669d14059),
1352     local
1353 ]
1354 interface nsIDOMWindow : nsISupports
1355 {
1356     nsresult GetWindow(nsIDOMWindow **aWindow);
1357     nsresult GetSelf(nsIDOMWindow **aSelf);
1358     nsresult GetDocument(nsIDOMDocument **aDocument);
1359     nsresult GetName(nsAString *aName);
1360     nsresult SetName(const nsAString *aName);
1361     nsresult GetLocation(nsIDOMLocation **aLocation);
1362     nsresult GetHistory(nsIDOMHistory **aHistory);
1363     nsresult GetLocationbar(nsIDOMBarProp **aLocationbar);
1364     nsresult GetMenubar(nsIDOMBarProp **aMenubar);
1365     nsresult GetPersonalbar(nsIDOMBarProp **aPersonalbar);
1366     nsresult GetScrollbars(nsIDOMBarProp **aScrollbars);
1367     nsresult GetStatusbar(nsIDOMBarProp **aStatusbar);
1368     nsresult GetToolbar(nsIDOMBarProp **aToolbar);
1369     nsresult GetStatus(nsAString *aStatus);
1370     nsresult SetStatus(const nsAString *aStatus);
1371     nsresult Close();
1372     nsresult Stop();
1373     nsresult Focus();
1374     nsresult Blur();
1375     nsresult GetLength(uint32_t *aLength);
1376     nsresult GetScriptableTop(nsIDOMWindow **aTop);
1377     nsresult GetRealTop(nsIDOMWindow **aTop);
1378     nsresult GetScriptableParent(nsIDOMWindow **aParent);
1379     nsresult GetRealParent(nsIDOMWindow **aParent);
1380     nsresult GetOpener(nsIDOMWindow **aOpener);
1381     nsresult SetOpener(nsIDOMWindow *aOpener);
1382     nsresult GetScriptableFrameElement(nsIDOMElement **aFrameElement);
1383     nsresult GetRealFrameElement(nsIDOMElement **aFrameElement);
1384     nsresult GetNavigator(nsIDOMNavigator **aNavigator);
1385     nsresult GetApplicationCache(nsIDOMOfflineResourceList **aApplicationCache);
1386     nsresult Alert(const nsAString *text);
1387     nsresult Confirm(const nsAString *text, bool *_retval);
1388     nsresult Prompt(const nsAString *aMessage, const nsAString *aInitial, nsAString *_retval);
1389     nsresult Print();
1390     nsresult ShowModalDialog(const nsAString *aURI, nsIVariant *aArgs, const nsAString *aOptions, nsIVariant **_retval);
1391     nsresult PostMessageMoz(const long /*jsval*/ *message, const nsAString *targetOrigin, JSContext *cx);
1392     nsresult Atob(const nsAString *aAsciiString, nsAString *_retval);
1393     nsresult Btoa(const nsAString *aBase64Data, nsAString *_retval);
1394     nsresult GetSessionStorage(nsIDOMStorage **aSessionStorage);
1395     nsresult GetLocalStorage(nsIDOMStorage **aLocalStorage);
1396     nsresult GetSelection(nsISelection **_retval);
1397     nsresult MatchMedia(const nsAString *media_query_list, nsIDOMMediaQueryList **_retval);
1398     nsresult GetScreen(nsIDOMScreen **aScreen);
1399     nsresult GetInnerWidth(int32_t *aInnerWidth);
1400     nsresult SetInnerWidth(int32_t aInnerWidth);
1401     nsresult GetInnerHeight(int32_t *aInnerHeight);
1402     nsresult SetInnerHeight(int32_t aInnerHeight);
1403     nsresult GetScrollX(int32_t *aScrollX);
1404     nsresult GetPageXOffset(int32_t *aPageXOffset);
1405     nsresult GetScrollY(int32_t *aScrollY);
1406     nsresult GetPageYOffset(int32_t *aPageYOffset);
1407     nsresult Scroll(int32_t xScroll, int32_t yScroll);
1408     nsresult ScrollTo(int32_t xScroll, int32_t yScroll);
1409     nsresult ScrollBy(int32_t xScrollDif, int32_t yScrollDif);
1410     nsresult GetScreenX(int32_t *aScreenX);
1411     nsresult SetScreenX(int32_t aScreenX);
1412     nsresult GetScreenY(int32_t *aScreenY);
1413     nsresult SetScreenY(int32_t aScreenY);
1414     nsresult GetOuterWidth(int32_t *aOuterWidth);
1415     nsresult SetOuterWidth(int32_t aOuterWidth);
1416     nsresult GetOuterHeight(int32_t *aOuterHeight);
1417     nsresult SetOuterHeight(int32_t aOuterHeight);
1418     nsresult GetComputedStyle(nsIDOMElement *elt, const nsAString *pseudoElt, nsIDOMCSSStyleDeclaration **_retval);
1419     nsresult GetWindowRoot(nsIDOMEventTarget **aWindowRoot);
1420     nsresult GetFrames(nsIDOMWindowCollection **aFrames);
1421     nsresult GetTextZoom(float *aTextZoom);
1422     nsresult SetTextZoom(float aTextZoom);
1423     nsresult ScrollByLines(int32_t numLines);
1424     nsresult ScrollByPages(int32_t numPages);
1425     nsresult SizeToContent();
1426     nsresult GetContent(nsIDOMWindow **aContent);
1427     nsresult GetPrompter(nsIPrompt **aPrompter);
1428     nsresult GetClosed(bool *aClosed);
1429     nsresult GetCrypto(nsIDOMCrypto **aCrypto);
1430     nsresult GetPkcs11(nsIDOMPkcs11 **aPkcs11);
1431     nsresult GetControllers(nsIControllers **aControllers);
1432     nsresult GetDefaultStatus(nsAString *aDefaultStatus);
1433     nsresult SetDefaultStatus(const nsAString *aDefaultStatus);
1434     nsresult GetMozInnerScreenX(float *aMozInnerScreenX);
1435     nsresult GetMozInnerScreenY(float *aMozInnerScreenY);
1436     nsresult GetDevicePixelRatio(float *aDevicePixelRatio);
1437     nsresult GetScrollMaxX(int32_t *aScrollMaxX);
1438     nsresult GetScrollMaxY(int32_t *aScrollMaxY);
1439     nsresult GetFullScreen(bool *aFullScreen);
1440     nsresult SetFullScreen(bool aFullScreen);
1441     nsresult Back();
1442     nsresult Forward();
1443     nsresult Home();
1444     nsresult MoveTo(int32_t xPos, int32_t yPos);
1445     nsresult MoveBy(int32_t xDif, int32_t yDif);
1446     nsresult ResizeTo(int32_t width, int32_t height);
1447     nsresult ResizeBy(int32_t widthDif, int32_t heightDif);
1448     nsresult Open(const nsAString *url, const nsAString *name, const nsAString *options, nsIDOMWindow **_retval);
1449     nsresult OpenDialog(const nsAString *url, const nsAString *name, const nsAString *options, nsISupports *aExtraArgument,
1450             nsIDOMWindow **_retval);
1451     nsresult UpdateCommands(const nsAString *action);
1452     nsresult Find(const nsAString *str, bool caseSensitive, bool backwards, bool wrapAround, bool wholeWord,
1453             bool searchInFrames, bool showDialog, bool *_retval);
1454     nsresult GetMozPaintCount(uint64_t *aMozPaintCount);
1455     nsresult MozRequestAnimationFrame(nsIFrameRequestCallback *aCallback, int32_t *_retval);
1456     nsresult MozCancelAnimationFrame(int32_t aHandle);
1457     nsresult MozCancelRequestAnimationFrame(int32_t aHandle);
1458     nsresult GetMozAnimationStartTime(int64_t *aMozAnimationStartTime);
1459     nsresult GetURL(nsIDOMMozURLProperty **aURL);
1460     nsresult GetOnafterprint(JSContext *cx, jsval *aOnafterprint);
1461     nsresult SetOnafterprint(JSContext *cx, const jsval *aOnafterprint);
1462     nsresult GetOnbeforeprint(JSContext *cx, jsval *aOnbeforeprint);
1463     nsresult SetOnbeforeprint(JSContext *cx, const jsval *aOnbeforeprint);
1464     nsresult GetOnbeforeunload(JSContext *cx, jsval *aOnbeforeunload);
1465     nsresult SetOnbeforeunload(JSContext *cx, const jsval *aOnbeforeunload);
1466     nsresult GetOnhashchange(JSContext *cx, jsval *aOnhashchange);
1467     nsresult SetOnhashchange(JSContext *cx, const jsval *aOnhashchange);
1468     nsresult GetOnmessage(JSContext *cx, jsval *aOnmessage);
1469     nsresult SetOnmessage(JSContext *cx, const jsval *aOnmessage);
1470     nsresult GetOnoffline(JSContext *cx, jsval *aOnoffline);
1471     nsresult SetOnoffline(JSContext *cx, const jsval *aOnoffline);
1472     nsresult GetOnonline(JSContext *cx, jsval *aOnonline);
1473     nsresult SetOnonline(JSContext *cx, const jsval *aOnonline);
1474     nsresult GetOnpopstate(JSContext *cx, jsval *aOnpopstate);
1475     nsresult SetOnpopstate(JSContext *cx, const jsval *aOnpopstate);
1476     nsresult GetOnpagehide(JSContext *cx, jsval *aOnpagehide);
1477     nsresult SetOnpagehide(JSContext *cx, const jsval *aOnpagehide);
1478     nsresult GetOnpageshow(JSContext *cx, jsval *aOnpageshow);
1479     nsresult SetOnpageshow(JSContext *cx, const jsval *aOnpageshow);
1480     nsresult GetOnresize(JSContext *cx, jsval *aOnresize);
1481     nsresult SetOnresize(JSContext *cx, const jsval *aOnresize);
1482     nsresult GetOnunload(JSContext *cx, jsval *aOnunload);
1483     nsresult SetOnunload(JSContext *cx, const jsval *aOnunload);
1484     nsresult GetOndevicemotion(JSContext *cx, jsval *aOndevicemotion);
1485     nsresult SetOndevicemotion(JSContext *cx, const jsval *aOndevicemotion);
1486     nsresult GetOndeviceorientation(JSContext *cx, jsval *aOndeviceorientation);
1487     nsresult SetOndeviceorientation(JSContext *cx, const jsval *aOndeviceorientation);
1488     nsresult GetOndeviceproximity(JSContext* cx, jsval *aOndeviceproximity);
1489     nsresult SetOndeviceproximity(JSContext* cx, const jsval *aOndeviceproximity);
1490     nsresult GetOnuserproximity(JSContext* cx, jsval *aOndeviceproximity);
1491     nsresult SetOnuserproximity(JSContext* cx, const jsval *aOndeviceproximity);
1492     nsresult GetOndevicelight(JSContext* cx, jsval *aOndevicelight);
1493     nsresult SetOndevicelight(JSContext* cx, const jsval *aOndevicelight);
1494     nsresult GetOnmouseenter(JSContext* cx, jsval *aOnmouseenter);
1495     nsresult SetOnmouseenter(JSContext* cx, const jsval *aOnmouseenter);
1496     nsresult GetOnmouseleave(JSContext* cx, jsval *aOnmouseleave);
1497     nsresult SetOnmouseleave(JSContext* cx, const jsval *aOnmouseleave);
1498 }
1499
1500 [
1501     object,
1502     uuid(d8f00c8b-d317-4df2-a9bf-4a1e6f19f945),
1503     local
1504 ]
1505 interface nsIDOMHTMLBodyElement : nsIDOMHTMLElement
1506 {
1507     nsresult GetALink(nsAString *aALink);
1508     nsresult SetALink(const nsAString *aALink);
1509     nsresult GetBackground(nsAString *aBackground);
1510     nsresult SetBackground(const nsAString *aBackground);
1511     nsresult GetBgColor(nsAString *aBgColor);
1512     nsresult SetBgColor(const nsAString *aBgColor);
1513     nsresult GetLink(nsAString *aLink);
1514     nsresult SetLink(const nsAString *aLink);
1515     nsresult GetText(nsAString *aText);
1516     nsresult SetText(const nsAString *aText);
1517     nsresult GetVLink(nsAString *aVLink);
1518     nsresult SetVLink(const nsAString *aVLink);
1519     nsresult GetOnafterprint(JSContext *cx, jsval *aOnafterprint);
1520     nsresult SetOnafterprint(JSContext *cx, const jsval *aOnafterprint);
1521     nsresult GetOnbeforeprint(JSContext *cx, jsval *aOnbeforeprint);
1522     nsresult SetOnbeforeprint(JSContext *cx, const jsval *aOnbeforeprint);
1523     nsresult GetOnbeforeunload(JSContext *cx, jsval *aOnbeforeunload);
1524     nsresult SetOnbeforeunload(JSContext *cx, const jsval *aOnbeforeunload);
1525     nsresult GetOnhashchange(JSContext *cx, jsval *aOnhashchange);
1526     nsresult SetOnhashchange(JSContext *cx, const jsval *aOnhashchange);
1527     nsresult GetOnmessage(JSContext *cx, jsval *aOnmessage);
1528     nsresult SetOnmessage(JSContext *cx, const jsval *aOnmessage);
1529     nsresult GetOnoffline(JSContext *cx, jsval *aOnoffline);
1530     nsresult SetOnoffline(JSContext *cx, const jsval *aOnoffline);
1531     nsresult GetOnonline(JSContext *cx, jsval *aOnonline);
1532     nsresult SetOnonline(JSContext *cx, const jsval *aOnonline);
1533     nsresult GetOnpagehide(JSContext *cx, jsval *aOnpagehide);
1534     nsresult SetOnpagehide(JSContext *cx, const jsval *aOnpagehide);
1535     nsresult GetOnpageshow(JSContext *cx, jsval *aOnpageshow);
1536     nsresult SetOnpageshow(JSContext *cx, const jsval *aOnpageshow);
1537     nsresult GetOnpopstate(JSContext *cx, jsval *aOnpopstate);
1538     nsresult SetOnpopstate(JSContext *cx, const jsval *aOnpopstate);
1539     nsresult GetOnresize(JSContext *cx, jsval *aOnresize);
1540     nsresult SetOnresize(JSContext *cx, const jsval *aOnresize);
1541     nsresult GetOnunload(JSContext *cx, jsval *aOnunload);
1542     nsresult SetOnunload(JSContext *cx, const jsval *aOnunload);
1543 }
1544
1545 [
1546     object,
1547     uuid(59c0dc07-d784-410b-8b5e-c26baf7cb8a6),
1548     local
1549 ]
1550 interface nsIDOMHTMLFormElement : nsIDOMHTMLElement
1551 {
1552     nsresult GetAcceptCharset(nsAString *aAcceptCharset);
1553     nsresult SetAcceptCharset(const nsAString *aAcceptCharset);
1554     nsresult GetAction(nsAString *aAction);
1555     nsresult SetAction(const nsAString *aAction);
1556     nsresult GetAutocomplete(nsAString *aAutocomplete);
1557     nsresult SetAutocomplete(const nsAString *aAutocomplete);
1558     nsresult GetEnctype(nsAString *aEnctype);
1559     nsresult SetEnctype(const nsAString *aEnctype);
1560     nsresult GetEncoding(nsAString *aEncoding);
1561     nsresult SetEncoding(const nsAString *aEncoding);
1562     nsresult GetMethod(nsAString *aMethod);
1563     nsresult SetMethod(const nsAString *aMethod);
1564     nsresult GetName(nsAString *aName);
1565     nsresult SetName(const nsAString *aName);
1566     nsresult GetNoValidate(bool *aNoValidate);
1567     nsresult SetNoValidate(bool aNoValidate);
1568     nsresult GetTarget(nsAString *aTarget);
1569     nsresult SetTarget(const nsAString *aTarget);
1570     nsresult GetElements(nsIDOMHTMLCollection **aElements);
1571     nsresult GetLength(int32_t *aLength);
1572     nsresult Submit();
1573     nsresult Reset();
1574     nsresult CheckValidity(bool *_retval);
1575 }
1576
1577 [
1578     object,
1579     uuid(e59a4df5-0904-414d-9203-9af2790698ea),
1580     local
1581 ]
1582 interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
1583 {
1584     nsresult GetAccept(nsAString *aAccept);
1585     nsresult SetAccept(const nsAString *aAccept);
1586     nsresult GetAlt(nsAString *aAlt);
1587     nsresult SetAlt(const nsAString *aAlt);
1588     nsresult GetAutocomplete(nsAString *aAutocomplete);
1589     nsresult SetAutocomplete(const nsAString *aAutocomplete);
1590     nsresult GetAutofocus(bool *aAutofocus);
1591     nsresult SetAutofocus(bool aAutofocus);
1592     nsresult GetDefaultChecked(bool *aDefaultChecked);
1593     nsresult SetDefaultChecked(bool aDefaultChecked);
1594     nsresult GetChecked(bool *aChecked);
1595     nsresult SetChecked(bool aChecked);
1596     nsresult GetDisabled(bool *aDisabled);
1597     nsresult SetDisabled(bool aDisabled);
1598     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1599     nsresult GetFormAction(nsAString *aFormAction);
1600     nsresult SetFormAction(const nsAString *aFormAction);
1601     nsresult GetFormEnctype(nsAString *aFormEnctype);
1602     nsresult SetFormEnctype(const nsAString *aFormEnctype);
1603     nsresult GetFormMethod(nsAString *aFormMethod);
1604     nsresult SetFormMethod(const nsAString *aFormMethod);
1605     nsresult GetFormNoValidate(bool *aFormNoValidate);
1606     nsresult SetFormNoValidate(bool aFormNoValidate);
1607     nsresult GetFormTarget(nsAString *aFormTarget);
1608     nsresult SetFormTarget(const nsAString *aFormTarget);
1609     nsresult GetFiles(nsIDOMFileList **aFiles);
1610     nsresult GetHeight(uint32_t *aHeight);
1611     nsresult SetHeight(uint32_t aHeight);
1612     nsresult GetIndeterminate(bool *aIndeterminate);
1613     nsresult SetIndeterminate(bool aIndeterminate);
1614     nsresult GetList(nsIDOMHTMLElement **aList);
1615     nsresult GetMax(nsAString *aMax);
1616     nsresult SetMax(const nsAString *aMax);
1617     nsresult GetMaxLength(int32_t *aMaxLength);
1618     nsresult SetMaxLength(int32_t aMaxLength);
1619     nsresult GetMin(nsAString *aMin);
1620     nsresult SetMin(const nsAString *aMin);
1621     nsresult GetMultiple(bool *aMultiple);
1622     nsresult SetMultiple(bool aMultiple);
1623     nsresult GetName(nsAString *aName);
1624     nsresult SetName(const nsAString *aName);
1625     nsresult GetPattern(nsAString *aPattern);
1626     nsresult SetPattern(const nsAString *aPattern);
1627     nsresult GetPlaceholder(nsAString *aPlaceholder);
1628     nsresult SetPlaceholder(const nsAString *aPlaceholder);
1629     nsresult GetReadOnly(bool *aReadOnly);
1630     nsresult SetReadOnly(bool aReadOnly);
1631     nsresult GetRequired(bool *aRequired);
1632     nsresult SetRequired(bool aRequired);
1633     nsresult GetStep(nsAString *aStep);
1634     nsresult SetStep(const nsAString *aStep);
1635     nsresult GetAlign(nsAString *aAlign);
1636     nsresult SetAlign(const nsAString *aAlign);
1637     nsresult GetSize(uint32_t *aSize);
1638     nsresult SetSize(uint32_t aSize);
1639     nsresult GetWidth(uint32_t *aWidth);
1640     nsresult SetWidth(uint32_t aWidth);
1641     nsresult GetSrc(nsAString *aSrc);
1642     nsresult SetSrc(const nsAString *aSrc);
1643     nsresult GetType(nsAString *aType);
1644     nsresult SetType(const nsAString *aType);
1645     nsresult GetDefaultValue(nsAString *aDefaultValue);
1646     nsresult SetDefaultValue(const nsAString *aDefaultValue);
1647     nsresult GetValue(nsAString *aValue);
1648     nsresult SetValue(const nsAString *aValue);
1649     nsresult GetValueAsNumber(double *aValueAsNumber);
1650     nsresult SetValueAsNumber(double aValueAsNumber);
1651     nsresult StepDown(int32_t n, uint8_t _argc);
1652     nsresult StepUp(int32_t n, uint8_t _argc);
1653     nsresult GetWillValidate(bool *aWillValidate);
1654     nsresult GetValidity(nsIDOMValidityState **aValidity);
1655     nsresult GetValidationMessage(nsAString *aValidationMessage);
1656     nsresult CheckValidity(bool *_retval);
1657     nsresult SetCustomValidity(const nsAString *error);
1658     nsresult Select();
1659     nsresult GetSelectionStart(int32_t *aSelectionStart);
1660     nsresult SetSelectionStart(int32_t aSelectionStart);
1661     nsresult GetSelectionEnd(int32_t *aSelectionEnd);
1662     nsresult SetSelectionEnd(int32_t aSelectionEnd);
1663     nsresult SetSelectionRange(int32_t selectionStart, int32_t selectionEnd, const nsAString *direction);
1664     nsresult GetSelectionDirection(nsAString *aSelectionDirection);
1665     nsresult SetSelectionDirection(const nsAString *aSelectionDirection);
1666     nsresult GetUseMap(nsAString *aUseMap);
1667     nsresult SetUseMap(const nsAString *aUseMap);
1668     nsresult GetControllers(nsIControllers **aControllers);
1669     nsresult GetTextLength(int32_t *aTextLength);
1670     nsresult MozGetFileNameArray(uint32_t *aLength, PRUnichar ***aFileNames);
1671     nsresult MozSetFileNameArray(const PRUnichar **aFileNames, uint32_t aLength);
1672     nsresult MozIsTextField(bool aExcludePassword, bool *_retval);
1673 }
1674
1675 [
1676     object,
1677     uuid(68a5d794-39bf-4b00-aefe-754b9e8f7ec6),
1678     local
1679 ]
1680 interface nsIDOMHTMLOptionElement : nsIDOMHTMLElement
1681 {
1682     nsresult GetDisabled(bool *aDisabled);
1683     nsresult SetDisabled(bool aDisabled);
1684     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1685     nsresult GetLabel(nsAString *aLabel);
1686     nsresult SetLabel(const nsAString *aLabel);
1687     nsresult GetDefaultSelected(bool *aDefaultSelected);
1688     nsresult SetDefaultSelected(bool aDefaultSelected);
1689     nsresult GetSelected(bool *aSelected);
1690     nsresult SetSelected(bool aSelected);
1691     nsresult GetValue(nsAString *aValue);
1692     nsresult SetValue(const nsAString *aValue);
1693     nsresult GetText(nsAString *aText);
1694     nsresult SetText(const nsAString *aText);
1695     nsresult GetIndex(int32_t *aIndex);
1696 }
1697
1698 [
1699     object,
1700     uuid(429b041b-06df-486c-9a3a-a1d901cc76a2),
1701     local
1702 ]
1703 interface nsIDOMHTMLOptionsCollection : nsISupports
1704 {
1705     typedef int nsWrapperCache;
1706
1707     nsresult GetLength(uint32_t *aLength);
1708     nsresult SetLength(uint32_t aLength);
1709     nsresult Item(uint32_t index, nsIDOMNode **_retval);
1710     nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval);
1711     nsISupports* __cdecl GetNamedItem(const nsAString *name, nsWrapperCache **cache);
1712     nsresult GetSelectedIndex(int32_t *aSelectedIndex);
1713     nsresult SetSelectedIndex(int32_t aSelectedIndex);
1714     nsresult SetOption(uint32_t index, nsIDOMHTMLOptionElement *option);
1715     nsresult GetSelect(nsIDOMHTMLSelectElement **aSelect);
1716     nsresult Add(nsIDOMHTMLOptionElement *option, nsIVariant *before);
1717     nsresult Remove(int32_t index);
1718 }
1719
1720 [
1721     object,
1722     uuid(e85194cf-56e6-44a6-92d9-0096c9d2536e),
1723     local
1724 ]
1725 interface nsIDOMHTMLSelectElement : nsIDOMHTMLElement
1726 {
1727     nsresult GetAutofocus(bool *aAutofocus);
1728     nsresult SetAutofocus(bool aAutofocus);
1729     nsresult GetDisabled(bool *aDisabled);
1730     nsresult SetDisabled(bool aDisabled);
1731     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1732     nsresult GetMultiple(bool *aMultiple);
1733     nsresult SetMultiple(bool aMultiple);
1734     nsresult GetName(nsAString *aName);
1735     nsresult SetName(const nsAString *aName);
1736     nsresult GetSize(uint32_t *aSize);
1737     nsresult SetSize(uint32_t aSize);
1738     nsresult GetType(nsAString *aType);
1739     nsresult GetOptions(nsIDOMHTMLOptionsCollection **aOptions);
1740     nsresult GetLength(uint32_t *aLength);
1741     nsresult SetLength(uint32_t aLength);
1742     nsresult Item(uint32_t index, nsIDOMNode **_retval);
1743     nsresult NamedItem(const nsAString *name, nsIDOMNode **_retval);
1744     nsresult Add(nsIDOMHTMLElement *element, nsIVariant *before);
1745     nsresult Remove(int32_t index);
1746     nsresult GetSelectedIndex(int32_t *aSelectedIndex);
1747     nsresult SetSelectedIndex(int32_t aSelectedIndex);
1748     nsresult GetValue(nsAString *aValue);
1749     nsresult SetValue(const nsAString *aValue);
1750     nsresult GetWillValidate(bool *aWillValidate);
1751     nsresult GetValidity(nsIDOMValidityState **aValidity);
1752     nsresult GetValidationMessage(nsAString *aValidationMessage);
1753     nsresult CheckValidity(bool *_retval);
1754     nsresult SetCustomValidity(const nsAString *error);
1755     nsresult GetRequired(bool *aRequired);
1756     nsresult SetRequired(bool aRequired);
1757 }
1758
1759 [
1760     object,
1761     uuid(2a395065-2d92-48c1-ac00-643de9ca681b),
1762     local
1763 ]
1764 interface nsIDOMHTMLTextAreaElement : nsIDOMHTMLElement
1765 {
1766     nsresult GetAutofocus(bool *aAutofocus);
1767     nsresult SetAutofocus(bool aAutofocus);
1768     nsresult GetCols(uint32_t *aCols);
1769     nsresult SetCols(uint32_t aCols);
1770     nsresult GetDisabled(bool *aDisabled);
1771     nsresult SetDisabled(bool aDisabled);
1772     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1773     nsresult GetMaxLength(int32_t *aMaxLength);
1774     nsresult SetMaxLength(int32_t aMaxLength);
1775     nsresult GetName(nsAString *aName);
1776     nsresult SetName(const nsAString *aName);
1777     nsresult GetPlaceholder(nsAString *aPlaceholder);
1778     nsresult SetPlaceholder(const nsAString *aPlaceholder);
1779     nsresult GetReadOnly(bool *aReadOnly);
1780     nsresult SetReadOnly(bool aReadOnly);
1781     nsresult GetRequired(bool *aRequired);
1782     nsresult SetRequired(bool aRequired);
1783     nsresult GetRows(uint32_t *aRows);
1784     nsresult SetRows(uint32_t aRows);
1785     nsresult GetWrap(nsAString *aWrap);
1786     nsresult SetWrap(const nsAString *aWrap);
1787     nsresult GetType(nsAString *aType);
1788     nsresult GetDefaultValue(nsAString *aDefaultValue);
1789     nsresult SetDefaultValue(const nsAString *aDefaultValue);
1790     nsresult GetValue(nsAString *aValue);
1791     nsresult SetValue(const nsAString *aValue);
1792     nsresult GetTextLength(int32_t *aTextLength);
1793     nsresult GetWillValidate(bool *aWillValidate);
1794     nsresult GetValidity(nsIDOMValidityState **aValidity);
1795     nsresult GetValidationMessage(nsAString *aValidationMessage);
1796     nsresult CheckValidity(bool *_retval);
1797     nsresult SetCustomValidity(const nsAString *error);
1798     nsresult Select();
1799     nsresult GetSelectionStart(int32_t *aSelectionStart);
1800     nsresult SetSelectionStart(int32_t aSelectionStart);
1801     nsresult GetSelectionEnd(int32_t *aSelectionEnd);
1802     nsresult SetSelectionEnd(int32_t aSelectionEnd);
1803     nsresult SetSelectionRange(int32_t selectionStart, int32_t selectionEnd, const nsAString *direction);
1804     nsresult GetSelectionDirection(nsAString *aSelectionDirection);
1805     nsresult SetSelectionDirection(const nsAString *aSelectionDirection);
1806     nsresult GetControllers(nsIControllers **aControllers);
1807 }
1808
1809 [
1810     object,
1811     uuid(e2f548f6-9955-4820-a9e6-3a9fd43c7111),
1812     local
1813 ]
1814 interface nsIDOMHTMLScriptElement : nsIDOMHTMLElement
1815 {
1816     nsresult GetSrc(nsAString *aSrc);
1817     nsresult SetSrc(const nsAString *aSrc);
1818     nsresult GetAsync(bool *aAsync);
1819     nsresult SetAsync(bool aAsync);
1820     nsresult GetDefer(bool *aDefer);
1821     nsresult SetDefer(bool aDefer);
1822     nsresult GetType(nsAString *aType);
1823     nsresult SetType(const nsAString *aType);
1824     nsresult GetCharset(nsAString *aCharset);
1825     nsresult SetCharset(const nsAString *aCharset);
1826     nsresult GetText(nsAString *aText);
1827     nsresult SetText(const nsAString *aText);
1828     nsresult GetHtmlFor(nsAString *aHtmlFor);
1829     nsresult SetHtmlFor(const nsAString *aHtmlFor);
1830     nsresult GetEvent(nsAString *aEvent);
1831     nsresult SetEvent(const nsAString *aEvent);
1832     nsresult GetCrossOrigin(nsAString *aCrossOrigin);
1833     nsresult SetCrossOrigin(const nsAString *aCrossOrigin);
1834 }
1835
1836 [
1837     object,
1838     uuid(76cf0381-19fd-442d-bb18-c794fd8b5c25),
1839     local
1840 ]
1841 interface nsIDOMHTMLImageElement : nsIDOMHTMLElement
1842 {
1843     nsresult GetAlt(nsAString *aAlt);
1844     nsresult SetAlt(const nsAString *aAlt);
1845     nsresult GetSrc(nsAString *aSrc);
1846     nsresult SetSrc(const nsAString *aSrc);
1847     nsresult GetCrossOrigin(nsAString *aCrossOrigin);
1848     nsresult SetCrossOrigin(const nsAString *aCrossOrigin);
1849     nsresult GetUseMap(nsAString *aUseMap);
1850     nsresult SetUseMap(const nsAString *aUseMap);
1851     nsresult GetIsMap(bool *aIsMap);
1852     nsresult SetIsMap(bool aIsMap);
1853     nsresult GetWidth(uint32_t *aWidth);
1854     nsresult SetWidth(uint32_t aWidth);
1855     nsresult GetHeight(uint32_t *aHeight);
1856     nsresult SetHeight(uint32_t aHeight);
1857     nsresult GetNaturalWidth(uint32_t *aNaturalWidth);
1858     nsresult GetNaturalHeight(uint32_t *aNaturalHeight);
1859     nsresult GetComplete(bool *aComplete);
1860     nsresult GetName(nsAString *aName);
1861     nsresult SetName(const nsAString *aName);
1862     nsresult GetAlign(nsAString *aAlign);
1863     nsresult SetAlign(const nsAString *aAlign);
1864     nsresult GetBorder(nsAString *aBorder);
1865     nsresult SetBorder(const nsAString *aBorder);
1866     nsresult GetHspace(int32_t *aHspace);
1867     nsresult SetHspace(int32_t aHspace);
1868     nsresult GetLongDesc(nsAString *aLongDesc);
1869     nsresult SetLongDesc(const nsAString *aLongDesc);
1870     nsresult GetVspace(int32_t *aVspace);
1871     nsresult SetVspace(int32_t aVspace);
1872     nsresult GetLowsrc(nsAString *aLowsrc);
1873     nsresult SetLowsrc(const nsAString *aLowsrc);
1874     nsresult GetX(int32_t *aX);
1875     nsresult GetY(int32_t *aY);
1876 }
1877
1878 [
1879     object,
1880     uuid(68f49f8f-5ffd-44eb-a59f-d2b3f4817299),
1881     local
1882 ]
1883 interface nsIDOMHTMLAnchorElement : nsIDOMHTMLElement
1884 {
1885     nsresult GetHref(nsAString *aHref);
1886     nsresult SetHref(const nsAString *aHref);
1887     nsresult GetTarget(nsAString *aTarget);
1888     nsresult SetTarget(const nsAString *aTarget);
1889     nsresult GetPing(nsAString *aPing);
1890     nsresult SetPing(const nsAString *aPing);
1891     nsresult GetRel(nsAString *aRel);
1892     nsresult SetRel(const nsAString *aRel);
1893     nsresult GetHreflang(nsAString *aHreflang);
1894     nsresult SetHreflang(const nsAString *aHreflang);
1895     nsresult GetType(nsAString *aType);
1896     nsresult SetType(const nsAString *aType);
1897     nsresult GetText(nsAString *aText);
1898     nsresult SetText(const nsAString *aText);
1899     nsresult GetProtocol(nsAString *aProtocol);
1900     nsresult SetProtocol(const nsAString *aProtocol);
1901     nsresult GetHost(nsAString *aHost);
1902     nsresult SetHost(const nsAString *aHost);
1903     nsresult GetHostname(nsAString *aHostname);
1904     nsresult SetHostname(const nsAString *aHostname);
1905     nsresult GetPort(nsAString *aPort);
1906     nsresult SetPort(const nsAString *aPort);
1907     nsresult GetPathname(nsAString *aPathname);
1908     nsresult SetPathname(const nsAString *aPathname);
1909     nsresult GetSearch(nsAString *aSearch);
1910     nsresult SetSearch(const nsAString *aSearch);
1911     nsresult GetHash(nsAString *aHash);
1912     nsresult SetHash(const nsAString *aHash);
1913     nsresult GetCharset(nsAString *aCharset);
1914     nsresult SetCharset(const nsAString *aCharset);
1915     nsresult GetCoords(nsAString *aCoords);
1916     nsresult SetCoords(const nsAString *aCoords);
1917     nsresult GetName(nsAString *aName);
1918     nsresult SetName(const nsAString *aName);
1919     nsresult GetRev(nsAString *aRev);
1920     nsresult SetRev(const nsAString *aRev);
1921     nsresult GetShape(nsAString *aShape);
1922     nsresult SetShape(const nsAString *aShape);
1923     nsresult ToString(nsAString *_retval);
1924 }
1925
1926 [
1927     object,
1928     uuid(5b639ece-7b49-4507-9d38-550beb71955b),
1929     local
1930 ]
1931 interface nsIDOMHTMLLinkElement : nsIDOMHTMLElement
1932 {
1933     nsresult GetDisabled(bool *aDisabled);
1934     nsresult SetDisabled(bool aDisabled);
1935     nsresult GetCharset(nsAString *aCharset);
1936     nsresult SetCharset(const nsAString *aCharset);
1937     nsresult GetHref(nsAString *aHref);
1938     nsresult SetHref(const nsAString *aHref);
1939     nsresult GetHreflang(nsAString *aHreflang);
1940     nsresult SetHreflang(const nsAString *aHreflang);
1941     nsresult GetMedia(nsAString *aMedia);
1942     nsresult SetMedia(const nsAString *aMedia);
1943     nsresult GetRel(nsAString *aRel);
1944     nsresult SetRel(const nsAString *aRel);
1945     nsresult GetRev(nsAString *aRev);
1946     nsresult SetRev(const nsAString *aRev);
1947     nsresult GetTarget(nsAString *aTarget);
1948     nsresult SetTarget(const nsAString *aTarget);
1949     nsresult GetType(nsAString *aType);
1950     nsresult SetType(const nsAString *aType);
1951     nsresult GetCrossOrigin(nsAString *aCrossOrigin);
1952     nsresult SetCrossOrigin(const nsAString *aCrossOrigin);
1953 }
1954
1955 [
1956     object,
1957     uuid(ae50de74-bc26-402e-85dc-a980f506b655),
1958     local
1959 ]
1960 interface nsIDOMHTMLTableElement : nsIDOMHTMLElement
1961 {
1962     nsresult GetCaption(nsIDOMHTMLTableCaptionElement **aCaption);
1963     nsresult SetCaption(nsIDOMHTMLTableCaptionElement *aCaption);
1964     nsresult GetTHead(nsIDOMHTMLTableSectionElement **aTHead);
1965     nsresult SetTHead(nsIDOMHTMLTableSectionElement *aTHead);
1966     nsresult GetTFoot(nsIDOMHTMLTableSectionElement **aTFoot);
1967     nsresult SetTFoot(nsIDOMHTMLTableSectionElement *aTFoot);
1968     nsresult GetRows(nsIDOMHTMLCollection **aRows);
1969     nsresult GetTBodies(nsIDOMHTMLCollection **aTBodies);
1970     nsresult GetAlign(nsAString *aAlign);
1971     nsresult SetAlign(const nsAString *aAlign);
1972     nsresult GetBgColor(nsAString *aBgColor);
1973     nsresult SetBgColor(const nsAString *aBgColor);
1974     nsresult GetBorder(nsAString *aBorder);
1975     nsresult SetBorder(const nsAString *aBorder);
1976     nsresult GetCellPadding(nsAString *aCellPadding);
1977     nsresult SetCellPadding(const nsAString *aCellPadding);
1978     nsresult GetCellSpacing(nsAString *aCellSpacing);
1979     nsresult SetCellSpacing(const nsAString *aCellSpacing);
1980     nsresult GetFrame(nsAString *aFrame);
1981     nsresult SetFrame(const nsAString *aFrame);
1982     nsresult GetRules(nsAString *aRules);
1983     nsresult SetRules(const nsAString *aRules);
1984     nsresult GetSummary(nsAString *aSummary);
1985     nsresult SetSummary(const nsAString *aSummary);
1986     nsresult GetWidth(nsAString *aWidth);
1987     nsresult SetWidth(const nsAString *aWidth);
1988     nsresult CreateTHead(nsIDOMHTMLElement **_retval);
1989     nsresult DeleteTHead();
1990     nsresult CreateTFoot(nsIDOMHTMLElement **_retval);
1991     nsresult DeleteTFoot();
1992     nsresult CreateCaption(nsIDOMHTMLElement **_retval);
1993     nsresult DeleteCaption();
1994     nsresult InsertRow(int32_t index, nsIDOMHTMLElement **_retval);
1995     nsresult DeleteRow(int32_t index);
1996 }
1997
1998 [
1999     object,
2000     uuid(0ac4a382-4f97-4143-a3b3-de0a54978c67),
2001     local
2002 ]
2003 interface nsIDOMHTMLTableRowElement : nsIDOMHTMLElement
2004 {
2005     nsresult GetRowIndex(int32_t *aRowIndex);
2006     nsresult GetSectionRowIndex(int32_t *aSectionRowIndex);
2007     nsresult GetCells(nsIDOMHTMLCollection **aCells);
2008     nsresult GetAlign(nsAString *aAlign);
2009     nsresult SetAlign(const nsAString *aAlign);
2010     nsresult GetBgColor(nsAString *aBgColor);
2011     nsresult SetBgColor(const nsAString *aBgColor);
2012     nsresult GetCh(nsAString *aCh);
2013     nsresult SetCh(const nsAString *aCh);
2014     nsresult GetChOff(nsAString *aChOff);
2015     nsresult SetChOff(const nsAString *aChOff);
2016     nsresult GetVAlign(nsAString *aVAlign);
2017     nsresult SetVAlign(const nsAString *aVAlign);
2018     nsresult InsertCell(int32_t index, nsIDOMHTMLElement **_retval);
2019     nsresult DeleteCell(int32_t index);
2020 }
2021
2022 [
2023     object,
2024     uuid(a7bd1e34-3969-47ae-8c1d-2970132ba925),
2025     local
2026 ]
2027 interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement
2028 {
2029     nsresult GetAlign(nsAString *aAlign);
2030     nsresult SetAlign(const nsAString *aAlign);
2031     nsresult GetFrameBorder(nsAString *aFrameBorder);
2032     nsresult SetFrameBorder(const nsAString *aFrameBorder);
2033     nsresult GetHeight(nsAString *aHeight);
2034     nsresult SetHeight(const nsAString *aHeight);
2035     nsresult GetLongDesc(nsAString *aLongDesc);
2036     nsresult SetLongDesc(const nsAString *aLongDesc);
2037     nsresult GetMarginHeight(nsAString *aMarginHeight);
2038     nsresult SetMarginHeight(const nsAString *aMarginHeight);
2039     nsresult GetMarginWidth(nsAString *aMarginWidth);
2040     nsresult SetMarginWidth(const nsAString *aMarginWidth);
2041     nsresult GetName(nsAString *aName);
2042     nsresult SetName(const nsAString *aName);
2043     nsresult GetScrolling(nsAString *aScrolling);
2044     nsresult SetScrolling(const nsAString *aScrolling);
2045     nsresult GetSrc(nsAString *aSrc);
2046     nsresult SetSrc(const nsAString *aSrc);
2047     nsresult GetWidth(nsAString *aWidth);
2048     nsresult SetWidth(const nsAString *aWidth);
2049     nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
2050     nsresult GetContentWindow(nsIDOMWindow **aContentWindow);
2051     nsresult GetSandbox(nsAString *aSandbox);
2052     nsresult SetSandbox(const nsAString *aSandbox);
2053     nsresult GetAllowFullScreen(bool *aAllowFullScreen);
2054     nsresult SetAllowFullScreen(bool aAllowFullScreen);
2055 }
2056
2057 [
2058     object,
2059     uuid(2aa7855a-0667-47c3-af1e-9101002816c1),
2060     local
2061 ]
2062 interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement
2063 {
2064     nsresult GetFrameBorder(nsAString *aFrameBorder);
2065     nsresult SetFrameBorder(const nsAString *aFrameBorder);
2066     nsresult GetLongDesc(nsAString *aLongDesc);
2067     nsresult SetLongDesc(const nsAString *aLongDesc);
2068     nsresult GetMarginHeight(nsAString *aMarginHeight);
2069     nsresult SetMarginHeight(const nsAString *aMarginHeight);
2070     nsresult GetMarginWidth(nsAString *aMarginWidth);
2071     nsresult SetMarginWidth(const nsAString *aMarginWidth);
2072     nsresult GetName(nsAString *aName);
2073     nsresult SetName(const nsAString *aName);
2074     nsresult GetNoResize(bool *aNoResize);
2075     nsresult SetNoResize(bool aNoResize);
2076     nsresult GetScrolling(nsAString *aScrolling);
2077     nsresult SetScrolling(const nsAString *aScrolling);
2078     nsresult GetSrc(nsAString *aSrc);
2079     nsresult SetSrc(const nsAString *aSrc);
2080     nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
2081     nsresult GetContentWindow(nsIDOMWindow **aContentWindow);
2082 }
2083
2084 [
2085     object,
2086     uuid(a70595dd-68a5-41f5-ab52-73a47d98bd78),
2087     local
2088 ]
2089 interface nsIDOMHTMLObjectElement : nsIDOMHTMLElement
2090 {
2091     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
2092     nsresult GetCode(nsAString *aCode);
2093     nsresult SetCode(const nsAString *aCode);
2094     nsresult GetAlign(nsAString *aAlign);
2095     nsresult SetAlign(const nsAString *aAlign);
2096     nsresult GetArchive(nsAString *aArchive);
2097     nsresult SetArchive(const nsAString *aArchive);
2098     nsresult GetBorder(nsAString *aBorder);
2099     nsresult SetBorder(const nsAString *aBorder);
2100     nsresult GetCodeBase(nsAString *aCodeBase);
2101     nsresult SetCodeBase(const nsAString *aCodeBase);
2102     nsresult GetCodeType(nsAString *aCodeType);
2103     nsresult SetCodeType(const nsAString *aCodeType);
2104     nsresult GetData(nsAString *aData);
2105     nsresult SetData(const nsAString *aData);
2106     nsresult GetDeclare(bool *aDeclare);
2107     nsresult SetDeclare(bool aDeclare);
2108     nsresult GetHeight(nsAString *aHeight);
2109     nsresult SetHeight(const nsAString *aHeight);
2110     nsresult GetHspace(int32_t *aHspace);
2111     nsresult SetHspace(int32_t aHspace);
2112     nsresult GetName(nsAString *aName);
2113     nsresult SetName(const nsAString *aName);
2114     nsresult GetStandby(nsAString *aStandby);
2115     nsresult SetStandby(const nsAString *aStandby);
2116     nsresult GetType(nsAString *aType);
2117     nsresult SetType(const nsAString *aType);
2118     nsresult GetUseMap(nsAString *aUseMap);
2119     nsresult SetUseMap(const nsAString *aUseMap);
2120     nsresult GetVspace(int32_t *aVspace);
2121     nsresult SetVspace(int32_t aVspace);
2122     nsresult GetWidth(nsAString *aWidth);
2123     nsresult SetWidth(const nsAString *aWidth);
2124     nsresult GetContentDocument(nsIDOMDocument **aContentDocument);
2125     nsresult GetWillValidate(bool *aWillValidate);
2126     nsresult GetValidity(nsIDOMValidityState **aValidity);
2127     nsresult GetValidationMessage(nsAString *aValidationMessage);
2128     nsresult CheckValidity(bool *_retval);
2129     nsresult SetCustomValidity(const nsAString *error);
2130 }
2131
2132 [
2133     object,
2134     uuid(1fbec0f8-c7cF-4dc8-84be-247985a65e07),
2135     local
2136 ]
2137 interface nsIDOMHTMLParamElement : nsIDOMHTMLElement
2138 {
2139     nsresult GetName(nsAString *aName);
2140     nsresult SetName(const nsAString *aName);
2141     nsresult GetType(nsAString *aType);
2142     nsresult SetType(const nsAString *aType);
2143     nsresult GetValue(nsAString *aValue);
2144     nsresult SetValue(const nsAString *aValue);
2145     nsresult GetValueType(nsAString *aValueType);
2146     nsresult SetValueType(const nsAString *aValueType);
2147 }
2148
2149 [
2150     object,
2151     uuid(830d9170-f8eb-4749-b721-16d60d6b0f1b),
2152     local
2153 ]
2154 interface nsIDOMHTMLStyleElement : nsIDOMHTMLElement
2155 {
2156     nsresult GetDisabled(bool *aDisabled);
2157     nsresult SetDisabled(bool aDisabled);
2158     nsresult GetMedia(nsAString *aMedia);
2159     nsresult SetMedia(const nsAString *aMedia);
2160     nsresult GetType(nsAString *aType);
2161     nsresult SetType(const nsAString *aType);
2162     nsresult GetDOMStyleSheet(nsIDOMStyleSheet **aDOMStyleSheet);
2163 }
2164
2165 [
2166     object,
2167     uuid(7cebc153-168a-416c-ba5a-56a8c2ddb2ec),
2168     local
2169 ]
2170 interface nsIDOMNodeSelector : nsISupports
2171 {
2172     nsresult QuerySelector(const nsAString *selectors, nsIDOMElement **_retval);
2173     nsresult QuerySelectorAll(const nsAString *selectors, nsIDOMNodeList **_retval);
2174 }
2175
2176 [
2177     object,
2178     uuid(94928ab3-8b63-11d3-989d-001083010e9b),
2179     local
2180 ]
2181 interface nsIURIContentListener : nsISupports
2182 {
2183     nsresult OnStartURIOpen(nsIURI *aURI, bool *_retval);
2184     nsresult DoContent(const char *aContentType, bool aIsContentPreferred, nsIRequest *aRequest,
2185         nsIStreamListener **aContentHandler, bool *_retval);
2186     nsresult IsPreferred(const char *aContentType, char **aDesiredContentType, bool *_retval);
2187     nsresult CanHandleContent(const char *aContentType, bool aIsContentPreferred,
2188         char **aDesiredContentType, bool *_retval);
2189     nsresult GetLoadCookie(nsISupports **aLoadCookie);
2190     nsresult SetLoadCookie(nsISupports *aLoadCookie);
2191     nsresult GetParentContentListener(nsIURIContentListener **aParentContentListener);
2192     nsresult SetParentContentListener(nsIURIContentListener *aParentContentListener);
2193 }
2194
2195 [
2196     object,
2197     uuid(44b78386-1dd2-11b2-9ad2-e4eee2ca1916),
2198     local
2199 ]
2200 interface nsITooltipListener : nsISupports
2201 {
2202     nsresult OnShowTooltip(int32_t aXCoords, int32_t aYCoords, const PRUnichar *aTipText);
2203     nsresult OnHideTooltip();
2204 }
2205
2206 [
2207     object,
2208     uuid(33e9d001-caab-4ba9-8961-54902f197202),
2209     local
2210 ]
2211 interface nsIWebBrowser : nsISupports
2212 {
2213     nsresult AddWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
2214     nsresult RemoveWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
2215     nsresult GetContainerWindow(nsIWebBrowserChrome **aContainerWindow);
2216     nsresult SetContainerWindow(nsIWebBrowserChrome *aContainerWindow);
2217     nsresult GetParentURIContentListener(nsIURIContentListener **aParentURIContentListener);
2218     nsresult SetParentURIContentListener(nsIURIContentListener *aParentURIContentListener);
2219     nsresult GetContentDOMWindow(nsIDOMWindow **aContentDOMWindow);
2220     nsresult GetIsActive(bool *aIsActive);
2221     nsresult SetIsActive(bool aIsActive);
2222 }
2223
2224 cpp_quote("#define SETUP_ALLOW_JAVASCRIPT  2")
2225 cpp_quote("#define SETUP_IS_CHROME_WRAPPER 7")
2226 cpp_quote("#define SETUP_DISABLE_NOSCRIPT  16")
2227
2228 [
2229     object,
2230     uuid(f15398a0-8018-11d3-af70-00a024ffc08c),
2231     local
2232 ]
2233 interface nsIWebBrowserSetup : nsISupports
2234 {
2235     nsresult SetProperty(uint32_t aId, uint32_t aValue);
2236 }
2237
2238 typedef void* nativeWindow;
2239
2240 [
2241     object,
2242     uuid(9da319f3-eee6-4504-81a5-6a19cf6215bf),
2243     local
2244 ]
2245 interface nsIBaseWindow : nsISupports
2246 {
2247     nsresult InitWindow(nativeWindow parentNativeWindow, nsIWidget *parentWidget, int32_t x,
2248             int32_t y, int32_t cx, int32_t cy);
2249     nsresult Create();
2250     nsresult Destroy();
2251     nsresult SetPosition(int32_t x, int32_t y);
2252     nsresult GetPosition(int32_t *x, int32_t *y);
2253     nsresult SetSize(int32_t cx, int32_t cy, bool fRepaint);
2254     nsresult GetSize(int32_t *cx, int32_t *cy);
2255     nsresult SetPositionAndSize(int32_t x, int32_t y, int32_t cx, int32_t cy, bool fRepaint);
2256     nsresult GetPositionAndSize(int32_t *x, int32_t *y, int32_t *cx, int32_t *cy);
2257     nsresult Repaint(bool force);
2258     nsresult GetParentWidget(nsIWidget **aParentWidget);
2259     nsresult SetParentWidget(nsIWidget *aParentWidget);
2260     nsresult GetParentNativeWindow(nativeWindow *aParentNativeWindow);
2261     nsresult SetParentNativeWindow(nativeWindow aParentNativeWindow);
2262     nsresult GetNativeHandle(nsAString *aNativeHandle);
2263     nsresult GetVisibility(bool *aVisibility);
2264     nsresult SetVisibility(bool aVisibility);
2265     nsresult GetEnabled(bool *aEnabled);
2266     nsresult SetEnabled(bool aEnabled);
2267     nsresult GetMainWidget(nsIWidget **aMainWidget);
2268     nsresult GetUnscaledDevicePixelsPerCSSPixel(double *aUnscaledDevicePixelsPerCSSPixel);
2269     nsresult SetFocus();
2270     nsresult GetTitle(PRUnichar **aTitle);
2271     nsresult SetTitle(const PRUnichar *aTitle);
2272 }
2273
2274 cpp_quote("#define LOAD_FLAGS_NONE           0x00000000")
2275 cpp_quote("#define LOAD_REPLACE              0x00040000")
2276 cpp_quote("#define LOAD_INITIAL_DOCUMENT_URI 0x00080000")
2277
2278 [
2279     object,
2280     uuid(f5d9e7b0-d930-11d3-b057-00a024ffc08c),
2281     local
2282 ]
2283 interface nsIWebNavigation : nsISupports
2284 {
2285     nsresult GetCanGoBack(bool *aCanGoBack);
2286     nsresult GetCanGoForward(bool *aCanGoForward);
2287     nsresult GoBack();
2288     nsresult GoForward();
2289     nsresult GotoIndex(int32_t index);
2290     nsresult LoadURI(const PRUnichar *aURI, uint32_t aLoadFlags, nsIURI *aReferrer,
2291             nsIInputStream *aPostData, nsIInputStream *aHeaders);
2292     nsresult Reload(uint32_t aReloadFlags);
2293     nsresult Stop(uint32_t aStopFlags);
2294     nsresult GetDocument(nsIDOMDocument **aDocument);
2295     nsresult GetCurrentURI(nsIURI **aCurrentURI);
2296     nsresult GetReferringURI(nsIURI **aReferringURI);
2297     nsresult GetSessionHistory(nsISHistory **aSessionHistory);
2298     nsresult SetSessionHistory(nsISHistory *aSessionHistory);
2299 }
2300
2301 [
2302     object,
2303     uuid(570f39d0-efd0-11d3-b093-00a024ffc08c),
2304     local
2305 ]
2306 interface nsIWebProgress : nsISupports
2307 {
2308     nsresult AddProgressListener(nsIWebProgressListener *aListener, uint32_t aNotifyMask);
2309     nsresult RemoveProgressListener(nsIWebProgressListener *aListener);
2310     nsresult GetDOMWindow(nsIDOMWindow **aDOMWindow);
2311     nsresult GetIsLoadingDocument(bool *aIsLoadingDocument);
2312 }
2313
2314 [
2315     object,
2316     uuid(4404c94b-0506-4255-9e3c-4582dba6cfbb),
2317     local
2318 ]
2319 interface nsIPrintSettings : nsISupports
2320 {
2321     typedef struct { char dummy; } nsIntMargin;
2322
2323     nsresult SetPrintOptions(int32_t aType, bool aTurnOnOff);
2324     nsresult GetPrintOptions(int32_t aType, bool *_retval);
2325     nsresult GetPrintOptionsBits(int32_t *_retval);
2326     nsresult GetEffectivePageSize(double *aWidth, double *aHeight);
2327     nsresult Clone(nsIPrintSettings **_retval);
2328     nsresult Assign(nsIPrintSettings *aPS);
2329     nsresult GetPrintSession(nsIPrintSession **aPrintSession);
2330     nsresult SetPrintSession(nsIPrintSession *aPrintSession);
2331     nsresult GetStartPageRange(int32_t *aStartPageRange);
2332     nsresult SetStartPageRange(int32_t aStartPageRange);
2333     nsresult GetEndPageRange(int32_t *aEndPageRange);
2334     nsresult SetEndPageRange(int32_t aEndPageRange);
2335     nsresult GetEdgeTop(double *aEdgeTop);
2336     nsresult SetEdgeTop(double aEdgeTop);
2337     nsresult GetEdgeLeft(double *aEdgeLeft);
2338     nsresult SetEdgeLeft(double aEdgeLeft);
2339     nsresult GetEdgeBottom(double *aEdgeBottom);
2340     nsresult SetEdgeBottom(double aEdgeBottom);
2341     nsresult GetEdgeRight(double *aEdgeRight);
2342     nsresult SetEdgeRight(double aEdgeRight);
2343     nsresult GetMarginTop(double *aMarginTop);
2344     nsresult SetMarginTop(double aMarginTop);
2345     nsresult GetMarginLeft(double *aMarginLeft);
2346     nsresult SetMarginLeft(double aMarginLeft);
2347     nsresult GetMarginBottom(double *aMarginBottom);
2348     nsresult SetMarginBottom(double aMarginBottom);
2349     nsresult GetMarginRight(double *aMarginRight);
2350     nsresult SetMarginRight(double aMarginRight);
2351     nsresult GetUnwriteableMarginTop(double *aUnwriteableMarginTop);
2352     nsresult SetUnwriteableMarginTop(double aUnwriteableMarginTop);
2353     nsresult GetUnwriteableMarginLeft(double *aUnwriteableMarginLeft);
2354     nsresult SetUnwriteableMarginLeft(double aUnwriteableMarginLeft);
2355     nsresult GetUnwriteableMarginBottom(double *aUnwriteableMarginBottom);
2356     nsresult SetUnwriteableMarginBottom(double aUnwriteableMarginBottom);
2357     nsresult GetUnwriteableMarginRight(double *aUnwriteableMarginRight);
2358     nsresult SetUnwriteableMarginRight(double aUnwriteableMarginRight);
2359     nsresult GetScaling(double *aScaling);
2360     nsresult SetScaling(double aScaling);
2361     nsresult GetPrintBGColors(bool *aPrintBGColors);
2362     nsresult SetPrintBGColors(bool aPrintBGColors);
2363     nsresult GetPrintBGImages(bool *aPrintBGImages);
2364     nsresult SetPrintBGImages(bool aPrintBGImages);
2365     nsresult GetPrintRange(int16_t *aPrintRange);
2366     nsresult SetPrintRange(int16_t aPrintRange);
2367     nsresult GetTitle(PRUnichar **aTitle);
2368     nsresult SetTitle(const PRUnichar *aTitle);
2369     nsresult GetDocURL(PRUnichar **aDocURL);
2370     nsresult SetDocURL(const PRUnichar *aDocURL);
2371     nsresult GetHeaderStrLeft(PRUnichar **aHeaderStrLeft);
2372     nsresult SetHeaderStrLeft(const PRUnichar *aHeaderStrLeft);
2373     nsresult GetHeaderStrCenter(PRUnichar **aHeaderStrCenter);
2374     nsresult SetHeaderStrCenter(const PRUnichar *aHeaderStrCenter);
2375     nsresult GetHeaderStrRight(PRUnichar **aHeaderStrRight);
2376     nsresult SetHeaderStrRight(const PRUnichar *aHeaderStrRight);
2377     nsresult GetFooterStrLeft(PRUnichar **aFooterStrLeft);
2378     nsresult SetFooterStrLeft(const PRUnichar *aFooterStrLeft);
2379     nsresult GetFooterStrCenter(PRUnichar **aFooterStrCenter);
2380     nsresult SetFooterStrCenter(const PRUnichar *aFooterStrCenter);
2381     nsresult GetFooterStrRight(PRUnichar **aFooterStrRight);
2382     nsresult SetFooterStrRight(const PRUnichar *aFooterStrRight);
2383     nsresult GetHowToEnableFrameUI(int16_t *aHowToEnableFrameUI);
2384     nsresult SetHowToEnableFrameUI(int16_t aHowToEnableFrameUI);
2385     nsresult GetIsCancelled(bool *aIsCancelled);
2386     nsresult SetIsCancelled(bool aIsCancelled);
2387     nsresult GetPrintFrameTypeUsage(int16_t *aPrintFrameTypeUsage);
2388     nsresult SetPrintFrameTypeUsage(int16_t aPrintFrameTypeUsage);
2389     nsresult GetPrintFrameType(int16_t *aPrintFrameType);
2390     nsresult SetPrintFrameType(int16_t aPrintFrameType);
2391     nsresult GetPrintSilent(bool *aPrintSilent);
2392     nsresult SetPrintSilent(bool aPrintSilent);
2393     nsresult GetShrinkToFit(bool *aShrinkToFit);
2394     nsresult SetShrinkToFit(bool aShrinkToFit);
2395     nsresult GetShowPrintProgress(bool *aShowPrintProgress);
2396     nsresult SetShowPrintProgress(bool aShowPrintProgress);
2397     nsresult GetPaperName(PRUnichar **aPaperName);
2398     nsresult SetPaperName(const PRUnichar *aPaperName);
2399     nsresult GetPaperSizeType(int16_t *aPaperSizeType);
2400     nsresult SetPaperSizeType(int16_t aPaperSizeType);
2401     nsresult GetPaperData(int16_t *aPaperData);
2402     nsresult SetPaperData(int16_t aPaperData);
2403     nsresult GetPaperWidth(double *aPaperWidth);
2404     nsresult SetPaperWidth(double aPaperWidth);
2405     nsresult GetPaperHeight(double *aPaperHeight);
2406     nsresult SetPaperHeight(double aPaperHeight);
2407     nsresult GetPaperSizeUnit(int16_t *aPaperSizeUnit);
2408     nsresult SetPaperSizeUnit(int16_t aPaperSizeUnit);
2409     nsresult GetPlexName(PRUnichar **aPlexName);
2410     nsresult SetPlexName(const PRUnichar *aPlexName);
2411     nsresult GetColorspace(PRUnichar **aColorspace);
2412     nsresult SetColorspace(const PRUnichar *aColorspace);
2413     nsresult GetResolutionName(PRUnichar **aResolutionName);
2414     nsresult SetResolutionName(const PRUnichar aResolutionName);
2415     nsresult GetDownloadFonts(bool *aDownloadFonts);
2416     nsresult SetDownloadFonts(bool aDownloadFonts);
2417     nsresult GetPrintReversed(bool *aPrintReversed);
2418     nsresult SetPrintReversed(bool aPrintReversed);
2419     nsresult GetPrintInColor(bool *aPrintInColor);
2420     nsresult SetPrintInColor(bool aPrintInColor);
2421     nsresult GetOrientation(int32_t *aOrientation);
2422     nsresult SetOrientation(int32_t aOrientation);
2423     nsresult GetPrintCommand(PRUnichar **aPrintCommand);
2424     nsresult SetPrintCommand(const PRUnichar *aPrintCommand);
2425     nsresult GetNumCopies(int32_t *aNumCopies);
2426     nsresult SetNumCopies(int32_t aNumCopies);
2427     nsresult GetPrinterName(PRUnichar **aPrinterName);
2428     nsresult SetPrinterName(const PRUnichar *aPrinterName);
2429     nsresult GetPrintToFile(bool *aPrintToFile);
2430     nsresult SetPrintToFile(bool aPrintToFile);
2431     nsresult GetToFileName(PRUnichar **aToFileName);
2432     nsresult SetToFileName(const PRUnichar *aToFileName);
2433     nsresult GetOutputFormat(int16_t *aOutputFormat);
2434     nsresult SetOutputFormat(int16_t aOutputFormat);
2435     nsresult GetPrintPageDelay(int32_t *aPrintPageDelay);
2436     nsresult SetPrintPageDelay(int32_t aPrintPageDelay);
2437     nsresult GetIsInitializedFromPrinter(bool *aIsInitializedFromPrinter);
2438     nsresult SetIsInitializedFromPrinter(bool aIsInitializedFromPrinter);
2439     nsresult GetIsInitializedFromPrefs(bool *aIsInitializedFromPrefs);
2440     nsresult SetIsInitializedFromPrefs(bool aIsInitializedFromPrefs);
2441     nsresult SetMarginInTwips(nsIntMargin *aMargin);
2442     nsresult SetEdgeInTwips(nsIntMargin *aEdge);
2443     nsresult GetMarginInTwips(nsIntMargin *aMargin);
2444     nsresult GetEdgeInTwips(nsIntMargin *aEdge);
2445     nsresult SetupSilentPrinting();
2446     nsresult SetUnwriteableMarginInTwips(nsIntMargin *aEdge);
2447     nsresult GetUnwriteableMarginInTwips(nsIntMargin *aEdge);
2448     nsresult GetPageRanges(void * /*nsTArray<int32_t>&*/ aPages);
2449 }
2450
2451 [
2452     object,
2453     uuid(9a7ca4b0-fbba-11d4-a869-00105a183419),
2454     local
2455 ]
2456 interface nsIWebBrowserPrint : nsISupports
2457 {
2458     nsresult GetGlobalPrintSettings(nsIPrintSettings **aGlobalPrintSettings);
2459     nsresult GetCurrentPrintSettings(nsIPrintSettings **aCurrentPrintSettings);
2460     nsresult GetCurrentChildDOMWindow(nsIDOMWindow **aCurrentChildDOMWindow);
2461     nsresult GetDoingPrint(bool *aDoingPrint);
2462     nsresult GetDoingPrintPreview(bool *aDoingPrintPreview);
2463     nsresult GetIsFramesetDocument(bool *aIsFramesetDocument);
2464     nsresult GetIsFramesetFrameSelected(bool *aIsFramesetFrameSelected);
2465     nsresult GetIsIFrameSelected(bool *aIsIFrameSelected);
2466     nsresult GetIsRangeSelection(bool *aIsRangeSelection);
2467     nsresult GetPrintPreviewNumPages(int32_t *aPrintPreviewNumPages);
2468     nsresult Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener);
2469     nsresult PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin,
2470                           nsIWebProgressListener *aWPListener);
2471     nsresult PrintPreviewNavigate(int16_t aNavType, int32_t aPageNum);
2472     nsresult Cancel();
2473     nsresult EnumerateDocumentNames(uint32_t *aCount, PRUnichar ***aResult);
2474     nsresult ExitPrintPreview();
2475 }
2476
2477 [
2478     object,
2479     uuid(919e792a-6490-40b8-bba5-f9e9ad5640c8),
2480     local
2481 ]
2482 interface nsIScrollable : nsISupports
2483 {
2484     enum {
2485         ScrollOrientation_X = 1,
2486         ScrollOrientation_Y = 2
2487     };
2488
2489     enum {
2490         Scrollbar_Auto   = 1,
2491         Scrollbar_Never  = 2,
2492         Scrollbar_Always = 3
2493     };
2494
2495     nsresult GetCurScrollPos(int32_t scrollOrientation, int32_t *curPos);
2496     nsresult SetCurScrollPos(int32_t scrollOrientation, int32_t curPos);
2497     nsresult SetCurScrollPosEx(int32_t curHorizontalPos, int32_t curVerticalPos);
2498     nsresult GetScrollRange(int32_t scrollOrientation, int32_t *minPos, int32_t *maxPos);
2499     nsresult SetScrollRange(int32_t scrollOrientation, int32_t minPos, int32_t maxPos);
2500     nsresult SetScrollRangeEx(int32_t minHorizontalPos, int32_t maxHorizontalPos,
2501             int32_t minVerticalPos, int32_t maxVerticalPos);
2502     nsresult GetDefaultScrollbarPreferences(int32_t scrollOrientation, int32_t *scrollbarPref);
2503     nsresult SetDefaultScrollbarPreferences(int32_t scrollOrientation, int32_t scrollbarPref);
2504     nsresult GetScrollbarVisibility(bool *verticalVisible, bool *horizontalVisible);
2505 }
2506
2507 [
2508     object,
2509     uuid(272a5020-64f5-485c-a8c4-44b2882ae0a2),
2510     local
2511 ]
2512 interface nsIFile : nsISupports
2513 {
2514     typedef struct {
2515         /* Currently not needed */
2516         char dummy;
2517     } PRFileDesc, PRLibrary, widl_FILE;
2518 #define FILE widl_FILE
2519
2520     nsresult Append(const nsAString *node);
2521     nsresult AppendNative(const nsAString *node);
2522     nsresult Normalize();
2523     nsresult Create(uint32_t type, uint32_t permission);
2524     nsresult GetLeafName(nsAString *aLeafName);
2525     nsresult SetLeafName(const nsAString *aLeafName);
2526     nsresult GetNativeLeafName(nsAString *aLeafName);
2527     nsresult SetNativeLeafName(const nsAString *aLeafName);
2528     nsresult CopyTo(nsIFile *newParentDir, const nsAString *newName);
2529     nsresult CopyToNative(nsIFile *newParentDir, const nsAString *newName);
2530     nsresult CopyToFollowingLinks(nsIFile *newParentDir, const nsAString *newName);
2531     nsresult CopyToFollowingLinksNative(nsIFile *newParentDir, const nsAString *newName);
2532     nsresult MoveTo(nsIFile *newParentDir, const nsAString *newName);
2533     nsresult MoveToNative(nsIFile *newParentDir, const nsAString *newName);
2534     nsresult Remove(bool recursive);
2535     nsresult GetPermissions(uint32_t *aPermissions);
2536     nsresult SetPermissions(uint32_t pPermissions);
2537     nsresult GetPermissionsOfLink(uint32_t *aPermissions);
2538     nsresult SetPermissionsOfLink(uint32_t pPermissions);
2539     nsresult GetLastModifiedTime(PRTime *aLastModifiedTime);
2540     nsresult SetLastModifiedTime(PRTime aLastModifiedTime);
2541     nsresult GetLastModifiedTimeOfLink(PRTime *aLastModifiedTimeOfLink);
2542     nsresult SetLastModifiedTimeOfLink(PRTime aLastModifiedTimeOfLink);
2543     nsresult GetFileSize(int64_t *aFileSize);
2544     nsresult SetFileSize(int64_t aFileSize);
2545     nsresult GetFileSizeOfLink(int64_t *aFileSizeOfLink);
2546     nsresult GetTarget(nsAString *aTarget);
2547     nsresult GetNativeTarget(nsACString *aNativeTarget);
2548     nsresult GetPath(nsAString *aPath);
2549     nsresult GetNativePath(nsACString *aNativePath);
2550     nsresult Exists(bool *_retval);
2551     nsresult IsWritable(bool *_retval);
2552     nsresult IsReadable(bool *_retval);
2553     nsresult IsExecutable(bool *_retval);
2554     nsresult IsHidden(bool *_retval);
2555     nsresult IsDirectory(bool *_retval);
2556     nsresult IsFile(bool *_retval);
2557     nsresult IsSymlink(bool *_retval);
2558     nsresult IsSpecial(bool *_retval);
2559     nsresult CreateUnique(uint32_t type, uint32_t permission);
2560     nsresult Clone(nsIFile **_retval);
2561     nsresult Equals(nsIFile *inFile, bool *_retval);
2562     nsresult Contains(nsIFile *inFile, bool recir, bool *_retval);
2563     nsresult GetParent(nsIFile **aParent);
2564     nsresult GetDirectoryEntries(nsISimpleEnumerator **aDirectoryEntries);
2565     nsresult InitWithPath(const nsAString *filePath);
2566     nsresult InitWithNativePath(const nsACString *filePath);
2567     nsresult InitWithFile(nsIFile *aFile);
2568     nsresult GetFollowLinks(bool *aFollowLinks);
2569     nsresult SetFollowLinks(bool aFollowLinks);
2570     nsresult OpenNSPRFileDesc(int32_t flags, int32_t mode, PRFileDesc **_retval);
2571     nsresult OpenANSIFileDesc(const char *mode, FILE **_retval);
2572     nsresult Load(PRLibrary **_retval);
2573     nsresult GetDiskSpaceAvailable(int64_t *aDiskSpaceAvailable);
2574     nsresult AppendRelativePath(const nsAString *relativeFilePath);
2575     nsresult AppendRelativeNativePath(const nsACString *relativeFilePath);
2576     nsresult GetPersistentDescriptor(nsACString *aPersistentDescriptor);
2577     nsresult SetPersistentDescriptor(const nsACString *aPersistentDescriptor);
2578     nsresult Reveal();
2579     nsresult Launch();
2580     nsresult GetRelativeDescriptor(nsIFile *fromFile, nsACString *_retval);
2581     nsresult SetRelativeDescriptor(nsIFile *fromFile, const nsACString *relativeDesc);
2582 }
2583
2584 [
2585     object,
2586     uuid(1d940426-5fe5-42c3-84ae-a300f2d9ebd5),
2587     local
2588 ]
2589 interface nsIComponentManager : nsISupports
2590 {
2591     nsresult GetClassObject(nsCIDRef aClass, nsIIDRef aIID, void **result);
2592     nsresult GetClassObjectByContractID(const char *aContractID, nsIIDRef aIID, void **result);
2593     nsresult CreateInstance(nsCIDRef aClass, nsISupports *aDelegate, nsIIDRef aIID,
2594             void **result);
2595     nsresult CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate,
2596             nsIIDRef aIID, void **result);
2597     nsresult AddBootstrappedManifestLocation(nsIFile *aLocation);
2598     nsresult RemoveBootstrappedManifestLocation(nsIFile *aLocation);
2599 }
2600
2601 [
2602     object,
2603     uuid(7df46a54-d8b0-448e-903c-4341a1b2499c),
2604     local
2605 ]
2606 interface nsIPrefBranch : nsISupports
2607 {
2608     nsresult GetRoot(char **aRoot);
2609     nsresult GetPrefType(const char *aPrefName, int32_t *_retval);
2610     nsresult GetBoolPref(const char *aPrefName, bool *_retval);
2611     nsresult SetBoolPref(const char *aPrefName, bool aValue);
2612     nsresult GetFloatPref(const char *aPrefName, float *_retval);
2613     nsresult GetCharPref(const char *aPrefName, char **_retval);
2614     nsresult SetCharPref(const char *aPrefName, const char *aValue);
2615     nsresult GetIntPref(const char *aPrefName, int32_t *_retval);
2616     nsresult SetIntPref(const char *aPrefName, int32_t aValue);
2617     nsresult GetComplexValue(const char *aPrefName, const nsIID *aType, void **aValue);
2618     nsresult SetComplexValue(const char *aPrefName, const nsIID *aType, nsISupports *aValue);
2619     nsresult ClearUserPref(const char *aPrefName);
2620     nsresult LockPref(const char *aPrefName);
2621     nsresult PrefHasUserValue(const char *aPrefName, bool *_retval);
2622     nsresult PrefIsLocked(const char *aPrefName, bool *_retval);
2623     nsresult UnlockPref(const char *aPrefName);
2624     nsresult DeleteBranch(const char *aStartingAt);
2625     nsresult GetChildList(const char *aStartingAt, uint32_t *aCount, char ***aChildArray);
2626     nsresult ResetBranch(const char *aStartingAt);
2627     nsresult AddObserver(const char *aDomain, nsIObserver *aObserver, bool aHoldWeak);
2628     nsresult RemoveObserver(const char *aDomain, nsIObserver *aObserver);
2629 }
2630
2631 [
2632     object,
2633     uuid(bbf8cab0-d43a-11d3-8cc2-00609792278c),
2634     local
2635 ]
2636 interface nsIDirectoryServiceProvider : nsISupports
2637 {
2638     nsresult GetFile(const char *prop, bool *persistent, nsIFile **_retval);
2639 }
2640
2641 [
2642     object,
2643     uuid(2f977d4b-5485-11d4-87e2-0010a4e75ef2),
2644     local
2645 ]
2646 interface nsIDirectoryServiceProvider2 : nsIDirectoryServiceProvider
2647 {
2648     nsresult GetFiles(const char *prop, nsISimpleEnumerator **_retval);
2649 }
2650
2651 [
2652     object,
2653     uuid(15fd6940-8ea7-11d3-93ad-00104ba0fd40),
2654     local
2655 ]
2656 interface nsIProtocolHandler : nsISupports
2657 {
2658     nsresult GetScheme(nsACString *aScheme);
2659     nsresult GetDefaultPort(int32_t *aDefaultPort);
2660     nsresult GetProtocolFlags(uint32_t *aProtocolFlags);
2661     nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset,
2662                     nsIURI *aBaseURI, nsIURI **_retval);
2663     nsresult NewChannel(nsIURI *aURI, nsIChannel **_retval);
2664     nsresult AllowPort(int32_t port, const char *scheme, bool *_retval);
2665 }
2666
2667 [
2668     object,
2669     uuid(0e61f3b2-34d7-4c79-bfdc-4860bc7341b7),
2670     local
2671 ]
2672 interface nsIExternalProtocolHandler : nsIProtocolHandler
2673 {
2674     nsresult ExternalAppExistsForScheme(const nsACString *scheme, bool *_retval);
2675 }
2676
2677 [
2678     object,
2679     uuid(bddeda3f-9020-4d12-8c70-984ee9f7935e),
2680     local
2681 ]
2682 interface nsIIOService : nsISupports
2683 {
2684     nsresult GetProtocolHandler(const char *aScheme, nsIProtocolHandler **_retval);
2685     nsresult GetProtocolFlags(const char *aScheme, uint32_t *_retval);
2686     nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
2687                     nsIURI **_retval);
2688     nsresult NewFileURI(nsIFile *aFile, nsIURI **_retval);
2689     nsresult NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval);
2690     nsresult NewChannel(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
2691                         nsIChannel **_retval);
2692     nsresult GetOffline(bool *aOffline);
2693     nsresult SetOffline(bool aOffline);
2694     nsresult AllowPort(int32_t aPort, const char *aScheme, bool *_retval);
2695     nsresult ExtractScheme(const nsACString *urlString, nsACString *_retval);
2696 }
2697
2698 [
2699     object,
2700     uuid(ca68c485-9db3-4c12-82a6-4fab7948e2d5),
2701     local,
2702 ]
2703 interface nsINetUtil : nsISupports
2704 {
2705     nsresult ParseContentType(const nsACString *aTypeHeader, nsACString *aCharset,
2706             bool *aHadCharset, nsACString *_retval);
2707     nsresult ProtocolHasFlags(nsIURI *aURI, uint32_t aFlag, bool *_retval);
2708     nsresult URIChainHasFlags(nsIURI *aURI, uint32_t aFlags, bool *_retval);
2709     nsresult ToImmutableURI(nsIURI *aURI, nsIURI **_retval);
2710     nsresult NewSimpleNestedURI(nsIURI *aURI, nsIURI **_retval);
2711     nsresult EscapeString(const nsACString *aString, uint32_t aEscapeType, nsACString *_retval);
2712     nsresult EscapeURL(const nsACString *aStr, uint32_t aFlags, nsACString *_retval);
2713     nsresult UnescapeString(const nsACString *aStr, uint32_t aFlags, nsACString *_retval);
2714     nsresult ExtractCharsetFromContentType(const nsACString *aTypeHeader, nsACString *aCharset,
2715             int32_t *aCharsetStart, int32_t *aCharsetEnd, bool *_retval);
2716 }
2717
2718 [
2719     object,
2720     uuid(9c5d3c58-1dd1-11b2-a1c9-f3699284657a),
2721     local
2722 ]
2723 interface nsIWebBrowserFocus : nsISupports
2724 {
2725     nsresult Activate();
2726     nsresult Deactivate();
2727     nsresult SetFocusAtFirstElement();
2728     nsresult SetFocusAtLastElement();
2729     nsresult GetFocusedWindow(nsIDOMWindow **aFocusedWindow);
2730     nsresult SetFocusedWindow(nsIDOMWindow *aFocusedWindow);
2731     nsresult GetFocusedElement(nsIDOMElement **aFocusedElement);
2732     nsresult SetFocusedElement(nsIDOMElement *aFocusedElement);
2733 }
2734
2735 [
2736     object,
2737     uuid(e8c414c4-dc38-4ba3-ab4e-ec4cbbe22907),
2738     local
2739 ]
2740 interface nsIWebBrowserChrome : nsISupports
2741 {
2742     nsresult SetStatus(uint32_t statusType, const PRUnichar *status);
2743     nsresult GetWebBrowser(nsIWebBrowser **aWebBrowser);
2744     nsresult SetWebBrowser(nsIWebBrowser *aWebBrowser);
2745     nsresult GetChromeFlags(uint32_t *aChromeFlags);
2746     nsresult SetChromeFlags(uint32_t aChromeFlags);
2747     nsresult DestroyBrowserWindow();
2748     nsresult SizeBrowserTo(int32_t aCX, int32_t aCY);
2749     nsresult ShowAsModal();
2750     nsresult IsWindowModal(bool *_retval);
2751     nsresult ExitModalEventLoop(nsresult aStatus);
2752 }
2753
2754 [
2755     object,
2756     uuid(df31c120-ded6-11d1-bd85-00805f8ae3f4),
2757     local
2758 ]
2759 interface nsIDOMEventListener : nsISupports
2760 {
2761     nsresult HandleEvent(nsIDOMEvent *event);
2762 }
2763
2764 [
2765     object,
2766     uuid(8e375931-298d-4d0a-9cb4-5668f0cdc5a8),
2767     local
2768 ]
2769 interface nsIDOMEventTarget : nsISupports
2770 {
2771     nsresult AddEventListener(const nsAString *type, nsIDOMEventListener *listener, bool useCapture, bool wantsUntrusted, uint8_t _argc);
2772     nsresult AddSystemEventListener(const nsAString *type, nsIDOMEventListener *listener, bool aUseCapture, bool aWantsUntrusted, uint8_t _argc);
2773     nsresult RemoveEventListener(const nsAString *type, nsIDOMEventListener *listener, bool useCapture);
2774     nsresult RemoveSystemEventListener(const nsAString *type, nsIDOMEventListener *listener, bool aUseCapture);
2775     nsresult DispatchEvent(nsIDOMEvent *evt, bool *_retval);
2776
2777     /* Followed by methods we should try to avoid using */
2778 }
2779
2780 [
2781     object,
2782     uuid(270c945b-8a65-4170-bc0b-4ec1443cd39f),
2783     local
2784 ]
2785 interface nsIDOMEvent : nsISupports
2786 {
2787     nsresult GetType(nsAString *aType);
2788     nsresult GetTarget(nsIDOMEventTarget **aTarget);
2789     nsresult GetCurrentTarget(nsIDOMEventTarget **aCurrentTarget);
2790     nsresult GetEventPhase(uint16_t *aEventPhase);
2791     nsresult GetBubbles(bool *aBubbles);
2792     nsresult GetCancelable(bool *aCancelable);
2793     nsresult GetTimeStamp(DOMTimeStamp *aTimeStamp);
2794     nsresult StopPropagation();
2795     nsresult PreventDefault();
2796     nsresult InitEvent(const nsAString *eventTypeArg, bool canBubbleArg, bool cancelableArg);
2797     nsresult GetDefaultPrevented(bool *aDefaultPrevented);
2798     nsresult StopImmediatePropagation();
2799     nsresult GetOriginalTarget(nsIDOMEventTarget **aOriginalTarget);
2800     nsresult GetExplicitOriginalTarget(nsIDOMEventTarget * *aExplicitOriginalTarget);
2801     nsresult PreventBubble();
2802     nsresult PreventCapture();
2803     nsresult GetPreventDefault(bool *_retval);
2804     nsresult GetIsTrusted(bool *aIsTrusted);
2805     nsresult DuplicatePrivateData();
2806     nsresult SetTarget(nsIDOMEventTarget *aTarget);
2807     bool IsDispatchStopped();
2808     /*nsEvent*/ void *GetInternalNSEvent();
2809     nsresult SetTrusted(bool aTrusted);
2810     void Serialize(/*IPC::Message*/ void *aMsg, bool aSerializeInterfaceType);
2811     bool Deserialize(const /*IPC::Message*/ void *aMsg, void **aIter);
2812 }
2813
2814 [
2815     object,
2816     uuid(ed36f965-173c-4101-a615-63b44f51ed90),
2817     local
2818 ]
2819 interface nsIDOMWindowUtils : nsISupports
2820 {
2821     nsresult GetImageAnimationMode(uint16_t *aImageAnimationMode);
2822     nsresult SetImageAnimationMode(uint16_t aImageAnimationMode);
2823     nsresult GetDocCharsetIsForced(bool *aDocCharsetIsForced);
2824     nsresult GetCursorType(int16_t *_retval);
2825     nsresult GetDocumentMetadata(const nsAString *aName, nsAString *_retval);
2826     nsresult Redraw(uint32_t aCount, uint32_t *_retval);
2827     nsresult SetCSSViewport(float aWidthPx, float aHeightPx);
2828     nsresult GetViewportInfo(uint32_t aDisplayWidth, uint32_t aDisplayHeight, double *aDefaultZoom, bool *aAllowZoom,
2829            double *aMinZoom, double *aMaxZoom, uint32_t *aWidth, uint32_t *aHeight, bool *aAutoSize);
2830     nsresult SetDisplayPortForElement(float aXPx, float aYPx, float aWidthPx, float aHeightPx, nsIDOMElement *aElement);
2831     nsresult SetResolution(float aXResolution, float aYResolution);
2832     nsresult GetIsFirstPaint(bool *aIsFirstPaint);
2833     nsresult SetIsFirstPaint(bool aIsFirstPaint);
2834     nsresult SendMouseEvent(const nsAString *aType, float aX, float aY, int32_t aButton, int32_t aClickCount,
2835            int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure, uint16_t aInputSourceArg);
2836     nsresult SendTouchEvent(const nsAString *aType, uint32_t *aIdentifiers, int32_t *aXs, int32_t *aYs,
2837            uint32_t *aRxs, uint32_t *aRys, float *aRotationAngles, float *aForces, uint32_t count, int32_t aModifiers,
2838            bool aIgnoreRootScrollFrame, bool *_retval);
2839     nsresult SendMouseEventToWindow(const nsAString *aType, float aX, float aY, int32_t aButton, int32_t aClickCount,
2840            int32_t aModifiers, bool aIgnoreRootScrollFrame, float aPressure, uint16_t aInputSourceArg);
2841     nsresult SendWheelEvent(float aX, float aY, double aDeltaX, double aDeltaY, double aDeltaZ, uint32_t aDeltaMode,
2842            int32_t aModifiers, int32_t aLineOrPageDeltaX, int32_t aLineOrPageDeltaY, uint32_t aOptions);
2843     nsresult SendKeyEvent(const nsAString *aType, int32_t aKeyCode, int32_t aCharCode, int32_t aModifiers,
2844            uint32_t aAdditionalFlags, bool *_retval);
2845     nsresult SendNativeKeyEvent(int32_t aNativeKeyboardLayout, int32_t aNativeKeyCode, int32_t aModifierFlags,
2846            const nsAString *aCharacters, const nsAString *aUnmodifiedCharacters);
2847     nsresult SendNativeMouseEvent(int32_t aScreenX, int32_t aScreenY, int32_t aNativeMessage, int32_t aModifierFlags,
2848            nsIDOMElement *aElement);
2849     nsresult SendNativeMouseScrollEvent(int32_t aScreenX, int32_t aScreenY, uint32_t aNativeMessage, double aDeltaX,
2850            double aDeltaY, double aDeltaZ, uint32_t aModifierFlags, uint32_t aAdditionalFlags, nsIDOMElement *aElement);
2851     nsresult ActivateNativeMenuItemAt(const nsAString *indexString);
2852     nsresult ForceUpdateNativeMenuAt(const nsAString *indexString);
2853     nsresult Focus(nsIDOMElement *aElement);
2854     nsresult GarbageCollect(nsICycleCollectorListener *aListener, int32_t aExtraForgetSkippableCalls);
2855     nsresult CycleCollect(nsICycleCollectorListener *aListener, int32_t aExtraForgetSkippableCalls);
2856     nsresult SendSimpleGestureEvent(const nsAString *aType, float aX, float aY, uint32_t aDirection, double aDelta,
2857            int32_t aModifiers, uint32_t aClickCount);
2858     nsresult ElementFromPoint(float aX, float aY, bool aIgnoreRootScrollFrame, bool aFlushLayout, nsIDOMElement **_retval);
2859     nsresult NodesFromRect(float aX, float aY, float aTopSize, float aRightSize, float aBottomSize, float aLeftSize,
2860            bool aIgnoreRootScrollFrame, bool aFlushLayout, nsIDOMNodeList **_retval);
2861     nsresult CompareCanvases(nsIDOMHTMLCanvasElement *aCanvas1, nsIDOMHTMLCanvasElement *aCanvas2,
2862            uint32_t *aMaxDifference, uint32_t *_retval);
2863     nsresult GetIsMozAfterPaintPending(bool *aIsMozAfterPaintPending);
2864     nsresult SuppressEventHandling(bool aSuppress);
2865     nsresult ClearMozAfterPaintEvents();
2866     nsresult DisableNonTestMouseEvents(bool aDisable);
2867     nsresult GetScrollXY(bool aFlushLayout, int32_t *aScrollX, int32_t *aScrollY);
2868     nsresult GetRootBounds(nsIDOMClientRect **_retval);
2869     nsresult GetIMEIsOpen(bool *aIMEIsOpen);
2870     nsresult GetIMEStatus(uint32_t *aIMEStatus);
2871     nsresult GetScreenPixelsPerCSSPixel(float *aScreenPixelsPerCSSPixel);
2872     nsresult GetFullZoom(float *aFullZoom);
2873     nsresult DispatchDOMEventViaPresShell(nsIDOMNode *aTarget, nsIDOMEvent *aEvent, bool aTrusted, bool *_retval);
2874     nsresult GetClassName(const /*JS::Value*/ void *aObject, JSContext *cx, char **_retval);
2875     nsresult SendContentCommandEvent(const nsAString *aType, nsITransferable *aTransferable);
2876     nsresult SendCompositionEvent(const nsAString *aType, const nsAString *aData, const nsAString *aLocale);
2877     nsresult SendTextEvent(const nsAString *aCompositionString, int32_t aFirstClauseLength, uint32_t aFirstClauseAttr,
2878            int32_t aSecondClauseLength, uint32_t aSecondClauseAttr, int32_t aThirdClauseLength, uint32_t aThirdClauseAttr,
2879            int32_t aCaretStart, int32_t aCaretLength);
2880     nsresult SendQueryContentEvent(uint32_t aType, uint32_t aOffset, uint32_t aLength, int32_t aX, int32_t aY,
2881            nsIQueryContentEventResult **_retval);
2882     nsresult RemoteFrameFullscreenChanged(nsIDOMElement *aFrameElement, const nsAString *aNewOrigin);
2883     nsresult RemoteFrameFullscreenReverted();
2884     nsresult ExitFullscreen();
2885     nsresult SendSelectionSetEvent(uint32_t aOffset, uint32_t aLength, bool aReverse, bool *_retval);
2886     nsresult SelectAtPoint(float aX, float aY, uint32_t aSelectBehavior, bool *_retval);
2887     nsresult GetVisitedDependentComputedStyle(nsIDOMElement *aElement, const nsAString *aPseudoElement,
2888            const nsAString *aPropertyName, nsAString *_retval);
2889     nsresult GetParent(const /*JS::Value*/ void *obj, JSContext *cx, /*JS::Value*/ void *_retval);
2890     nsresult GetOuterWindowID(uint64_t *aOuterWindowID);
2891     nsresult GetCurrentInnerWindowID(uint64_t *aCurrentInnerWindowID);
2892     nsresult EnterModalState();
2893     nsresult LeaveModalState();
2894     nsresult EnterModalStateWithWindow(nsIDOMWindow **_retval);
2895     nsresult LeaveModalStateWithWindow(nsIDOMWindow *aWindow);
2896     nsresult IsInModalState(bool *_retval);
2897     nsresult SuspendTimeouts();
2898     nsresult ResumeTimeouts();
2899     nsresult GetLayerManagerType(nsAString *aLayerManagerType);
2900     nsresult StartFrameTimeRecording();
2901     nsresult StopFrameTimeRecording(uint32_t *frameCount, float **frameTime);
2902     nsresult BeginTabSwitch();
2903     nsresult GetDisplayDPI(float *aDisplayDPI);
2904     nsresult GetOuterWindowWithId(uint64_t aOuterWindowID, nsIDOMWindow **_retval);
2905     nsresult RenderDocument(const void /*nsRect*/ *aRect, uint32_t aFlags, int /*nscolor*/ aBackgroundColor,
2906            void /*gfxContext*/ *aThebesContext);
2907     nsresult AdvanceTimeAndRefresh(int64_t aMilliseconds);
2908     nsresult RestoreNormalRefresh();
2909     nsresult ComputeAnimationDistance(nsIDOMElement *element, const nsAString *property, const nsAString *value1,
2910            const nsAString *value2, double *_retval);
2911     nsresult WrapDOMFile(nsIFile *aFile, nsIDOMFile **_retval);
2912     nsresult GetFocusedInputType(char **aFocusedInputType);
2913     nsresult FindElementWithViewId(long /*nsViewID*/ aId, nsIDOMElement **_retval);
2914     nsresult LeafLayersPartitionWindow(bool *_retval);
2915     nsresult GetMayHaveTouchEventListeners(bool *aMayHaveTouchEventListeners);
2916     nsresult CheckAndClearPaintedState(nsIDOMElement *aElement, bool *_retval);
2917     nsresult GetFile(const nsAString *aName, const /*JS::Value*/ void *aBlobParts, const /*JS::Value*/ void *aParameters,
2918            JSContext* cx, uint8_t _argc, nsIDOMFile **_retval);
2919     nsresult GetBlob(const /*JS::Value*/ void *aBlobParts, const /*JS::Value*/ void *aParameters, JSContext *cx,
2920            uint8_t _argc, nsIDOMBlob * _retval);
2921     nsresult GetFileId(const /*JS::Value*/ void *aFile, JSContext *cx, int64_t *_retval);
2922     nsresult GetFileReferences(const nsAString *aDatabaseName, int64_t aId, int32_t *aRefCnt, int32_t *aDBRefCnt,
2923            int32_t *aSliceRefCnt, bool *_retval);
2924     nsresult IsIncrementalGCEnabled(JSContext *cx, bool *_retval);
2925     nsresult StartPCCountProfiling(JSContext *cx);
2926     nsresult StopPCCountProfiling(JSContext *cx);
2927     nsresult PurgePCCounts(JSContext *cx);
2928     nsresult GetPCCountScriptCount(JSContext *cx, int32_t *_retval);
2929     nsresult GetPCCountScriptSummary(int32_t script, JSContext *cx, nsAString *_retval);
2930     nsresult GetPCCountScriptContents(int32_t script, JSContext *cx, nsAString *_retval);
2931     nsresult GetPaintingSuppressed(bool *aPaintingSuppressed);
2932     nsresult GetPlugins(JSContext *cx, /*JS::Value*/ void *aPlugins);
2933     nsresult SetScrollPositionClampingScrollPortSize(float aWidth, float aHeight);
2934     nsresult PreventFurtherDialogs();
2935     nsresult LoadSheet(nsIURI *sheetURI, uint32_t type);
2936     nsresult RemoveSheet(nsIURI *sheetURI, uint32_t type);
2937     nsresult GetIsHandlingUserInput(bool *aIsHandlingUserInput);
2938     nsresult AllowScriptsToClose();
2939 }
2940
2941 cpp_quote("#define CONTEXT_NONE              0x00")
2942 cpp_quote("#define CONTEXT_LINK              0x01")
2943 cpp_quote("#define CONTEXT_IMAGE             0x02")
2944 cpp_quote("#define CONTEXT_DOCUMENT          0x04")
2945 cpp_quote("#define CONTEXT_TEXT              0x08")
2946 cpp_quote("#define CONTEXT_INPUT             0x10")
2947 cpp_quote("#define CONTEXT_BACKGROUND_IMAGE  0x20")
2948
2949 [
2950     object,
2951     uuid(3478b6b0-3875-11d4-94ef-0020183bf181),
2952     local
2953 ]
2954 interface nsIContextMenuListener : nsISupports
2955 {
2956     nsresult OnShowContextMenu(uint32_t aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode);
2957 }
2958
2959 [
2960     object,
2961     uuid(415453e6-132a-4902-9a99-cc480f0311b6),
2962     local
2963 ]
2964 interface nsIDOMUIEvent : nsIDOMEvent
2965 {
2966     nsresult GetView(nsIDOMWindow **aView);
2967     nsresult GetDetail(int32_t *aDetail);
2968     nsresult InitUIEvent(const nsAString *typeArg, bool canBubbleArg, bool cancelableArg,
2969             nsIDOMWindow *viewArg, int32_t detailArg);
2970     nsresult GetLayerX(int32_t *aLayerX);
2971     nsresult GetLayerY(int32_t *aLayerY);
2972     nsresult GetPageX(int32_t *aPageX);
2973     nsresult GetPageY(int32_t *aPageY);
2974     nsresult GetWhich(uint32_t *aWhich);
2975     nsresult GetRangeParent(nsIDOMNode **aRangeParent);
2976     nsresult GetRangeOffset(int32_t *aRangeOffset);
2977     nsresult GetCancelBubble(bool *aCancelBubble);
2978     nsresult SetCancelBubble(bool aCancelBubble);
2979     nsresult GetIsChar(bool *aIsChar);
2980 }
2981
2982 [
2983     object,
2984     uuid(796c3436-5f89-4145-be3a-49808c09fdc6),
2985     local
2986 ]
2987 interface nsIDOMMouseEvent : nsIDOMUIEvent
2988 {
2989     nsresult GetScreenX(int32_t *aScreenX);
2990     nsresult GetScreenY(int32_t *aScreenY);
2991     nsresult GetMozMovementX(int32_t *aMozMovementX);
2992     nsresult GetMozMovementY(int32_t *aMozMovementY);
2993     nsresult GetClientX(int32_t *aClientX);
2994     nsresult GetClientY(int32_t *aClientY);
2995     nsresult GetCtrlKey(bool *aCtrlKey);
2996     nsresult GetShiftKey(bool *aShiftKey);
2997     nsresult GetAltKey(bool *aAltKey);
2998     nsresult GetMetaKey(bool *aMetaKey);
2999     nsresult GetButton(uint16_t *aButton);
3000     nsresult GetButtons(uint16_t *aButtons);
3001     nsresult GetRelatedTarget(nsIDOMEventTarget **aRelatedTarget);
3002     nsresult InitMouseEvent(const nsAString *typeArg, bool canBubbleArg, bool cancelableArg,
3003             nsIDOMWindow *viewArg, int32_t detailArg, int32_t screenXArg, int32_t screenYArg,
3004             int32_t clientXArg, int32_t clientYArg, bool ctrlKeyArg, bool altKeyArg,
3005             bool shiftKeyArg, bool metaKeyArg, uint16_t buttonArg,
3006             nsIDOMEventTarget *relatedTargetArg);
3007     nsresult GetMozPressure(float *aMozPressure);
3008     nsresult GetMozInputSource(uint16_t *aMozInputSource);
3009     nsresult InitNSMouseEvent(const nsAString *typeArg, bool canBubbleArg, bool cancelableArg,
3010             nsIDOMWindow *viewArg, int32_t detailArg, int32_t screenXArg, int32_t screenYArg,
3011             int32_t clientXArg, int32_t clientYArg, bool ctrlKeyArg, bool altKeyArg, bool shiftKeyArg,
3012             bool metaKeyArg, uint16_t buttonArg, nsIDOMEventTarget *relatedTargetArg, float pressure,
3013             uint16_t inputSourceArg);
3014     nsresult GetModifierState(const nsAString *keyArg, bool *_retval);
3015 }
3016
3017 [
3018     object,
3019     uuid(5d116380-8432-48cb-a717-200f04c39d2f),
3020     local
3021 ]
3022 interface nsIDOMKeyEvent : nsIDOMUIEvent
3023 {
3024     nsresult GetCharCode(uint32_t *aCharCode);
3025     nsresult GetKeyCode(uint32_t *aKeyCode);
3026     nsresult GetAltKey(bool *aAltKey);
3027     nsresult GetCtrlKey(bool *aCtrlKey);
3028     nsresult GetShiftKey(bool *aShiftKey);
3029     nsresult GetMetaKey(bool *aMetaKey);
3030     nsresult InitKeyEvent(const nsAString *typeArg, bool canBubbleArg,
3031             bool cancelableArg, nsIDOMWindow *viewArg, bool ctrlKeyArg,
3032             bool altKeyArg, bool shiftKeyArg, bool metaKeyArg, uint32_t keyCodeArg,
3033             uint32_t charCodeArg);
3034     nsresult GetModifierState(const nsAString *keyArg, bool *_retval);
3035     nsresult GetLocation(uint32_t *aLocation);
3036 }
3037
3038 [
3039     object,
3040     uuid(0b976267-4aaa-4f36-a2d4-27b5ca8d73bb),
3041     local
3042 ]
3043 interface nsIEmbeddingSiteWindow : nsISupports
3044 {
3045     nsresult SetDimensions(uint32_t flags, int32_t x, int32_t y, int32_t cx, int32_t cy);
3046     nsresult GetDimensions(uint32_t flags, int32_t *x, int32_t *y, int32_t *cx, int32_t *cy);
3047     nsresult SetFocus();
3048     nsresult GetVisibility(bool *aVisibility);
3049     nsresult SetVisibility(bool aVisibility);
3050     nsresult GetTitle(PRUnichar **aTitle);
3051     nsresult SetTitle(const PRUnichar *aTitle);
3052     nsresult GetSiteWindow(void **aSiteWindow);
3053     nsresult Blur();
3054 }
3055
3056 [
3057     object,
3058     uuid(2417cbfe-65ad-48a6-b4b6-eb84db174392),
3059     local
3060 ]
3061 interface nsIComponentRegistrar : nsISupports
3062 {
3063     nsresult AutoRegister(nsIFile *aSpec);
3064     nsresult AutoUnregister(nsIFile *aSpec);
3065     nsresult RegisterFactory(const nsCID *aClass, const char *aClassName,
3066             const char *aContractID, nsIFactory *aFactory);
3067     nsresult UnregisterFactory(const nsCID *aClass, nsIFactory *aFactory);
3068     nsresult RegisterFactoryLocation(const nsCID *aClass, const char *aClassName,
3069             const char *aContractID, nsIFile *aFile, const char *aLoaderStr,
3070             const char *aType);
3071     nsresult UnregisterFactoryLocation(const nsCID *aClass, nsIFile *aFile);
3072     nsresult IsCIDRegistered(const nsCID *aClass, bool *_retval);
3073     nsresult IsContractIDRegistered(const char *aContractID, bool *_retval);
3074     nsresult EnumerateCIDs(nsISimpleEnumerator **_retval);
3075     nsresult EnumerateContractIDs(nsISimpleEnumerator **_retval);
3076     nsresult CIDToContractID(const nsCID *aClass, char **_retval);
3077     nsresult ContractIDToCID(const char *aContractID, nsCID **_retval);
3078 }
3079
3080 [
3081     object,
3082     uuid(1630c61a-325e-49ca-8759-a31b16c47aa5),
3083     local
3084 ]
3085 interface nsIPromptService : nsISupports
3086 {
3087     nsresult Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3088             const PRUnichar *aText);
3089     nsresult AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3090             const PRUnichar *aText, const PRUnichar *aCheckMsg, bool *aCheckState);
3091     nsresult Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3092             const PRUnichar *aText, bool *_retval);
3093     nsresult ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3094             const PRUnichar *aText, const PRUnichar *aCheckMsg, bool *aCheckState,
3095             bool *_retval);
3096     nsresult ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3097             const PRUnichar *aText, uint32_t aButtonFlags, const PRUnichar *aButton0Title,
3098             const PRUnichar *aButton1Title, const PRUnichar *aButton2Title,
3099             const PRUnichar *aCheckMsg, bool *aCheckState, int32_t *_retval);
3100     nsresult Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3101             const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg,
3102             bool *aCheckState, bool *_retval);
3103     nsresult PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3104             const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword,
3105             const PRUnichar *aCheckMsg, bool *aCheckState, bool *_retval);
3106     nsresult PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3107             const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg,
3108             bool *aCheckState, bool *_retval);
3109     nsresult Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
3110             const PRUnichar *aText, uint32_t aCount, const PRUnichar **aSelectList,
3111             int32_t *aOutSelection, bool *_retval);
3112 }
3113
3114 [
3115     object,
3116     uuid(b128a1e6-44f3-4331-8fbe-5af360ff21ee),
3117     local
3118 ]
3119 interface nsITooltipTextProvider : nsISupports
3120 {
3121     nsresult GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, bool *_retval);
3122 }
3123
3124 [
3125     object,
3126     uuid(24f3f4da-18a4-448d-876d-7360fefac029),
3127     local
3128 ]
3129 interface nsIEditingSession : nsISupports
3130 {
3131     nsresult GetEditorStatus(uint32_t *aEditorStatus);
3132     nsresult MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType,
3133             bool doAfterUriLoad, bool aMakeWholeDocumentEditable, bool aInteractive);
3134     nsresult WindowIsEditable(nsIDOMWindow *window, bool *_retval);
3135     nsresult GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval);
3136     nsresult SetupEditorOnWindow(nsIDOMWindow *window);
3137     nsresult TearDownEditorOnWindow(nsIDOMWindow *window);
3138     nsresult SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor);
3139     nsresult DisableJSAndPlugins(nsIDOMWindow *aWindow);
3140     nsresult RestoreJSAndPlugins(nsIDOMWindow *aWindow);
3141     nsresult DetachFromWindow(nsIDOMWindow *aWindow);
3142     nsresult ReattachToWindow(nsIDOMWindow *aWindow);
3143     nsresult GetJsAndPluginsDisabled(bool *aJsAndPluginsDisabled);
3144 }
3145
3146 [
3147     object,
3148     uuid(83f892cf-7ed3-490e-967a-62640f3158e1),
3149     local
3150 ]
3151 interface nsICommandParams : nsISupports
3152 {
3153     nsresult GetValueType(const char *name, int16_t *_retval);
3154     nsresult GetBooleanValue(const char *name, bool *_retval);
3155     nsresult GetLongValue(const char *name, int32_t *_retval);
3156     nsresult GetDoubleValue(const char *name, double *_retval);
3157     nsresult GetStringValue(const char *name, nsAString *_retval);
3158     nsresult GetCStringValue(const char *name, char **_retval);
3159     nsresult GetISupportsValue(const char *name, nsISupports **_retval);
3160     nsresult SetBooleanValue(const char *name, bool value);
3161     nsresult SetLongValue(const char *name, int32_t value);
3162     nsresult SetDoubleValue(const char *name, double value);
3163     nsresult SetStringValue(const char *name, const nsAString *value);
3164     nsresult SetCStringValue(const char *name, const char *value);
3165     nsresult SetISupportsValue(const char *name, nsISupports *value);
3166     nsresult RemoveValue(const char *name);
3167     nsresult HasMoreElements(bool *_retval);
3168     nsresult First();
3169     nsresult GetNext(char **_retval);
3170 }
3171
3172 [
3173     object,
3174     uuid(080d2001-f91e-11d4-a73c-f9242928207c),
3175     local
3176 ]
3177 interface nsICommandManager : nsISupports
3178 {
3179     nsresult AddCommandObserver(nsIObserver *aCommandObserver, const char *aCommandToObserve);
3180     nsresult RemoveCommandObserver(nsIObserver *aCommandObserver, const char *aCommandObserved);
3181     nsresult IsCommandSupported(const char *aCommandName, nsIDOMWindow *aTargetWindow, bool *_retval);
3182     nsresult IsCommandEnabled(const char *aCommandName, nsIDOMWindow *aTargetWindow, bool *_retval);
3183     nsresult GetCommandState(const char *aCommandName, nsIDOMWindow *aTargetWindow,
3184             nsICommandParams *aCommandParams);
3185     nsresult DoCommand(const char *aCommandName, nsICommandParams *aCommandParams,
3186             nsIDOMWindow *aTargetWindow);
3187 }
3188
3189 [
3190     object,
3191     uuid(47b82b60-a36f-4167-8072-6f421151ed50),
3192     local
3193 ]
3194 interface nsIControllerContext : nsISupports
3195 {
3196     nsresult Init(nsIControllerCommandTable *aCommandTable);
3197     nsresult SetCommandContext(nsISupports *aCommandContext);
3198 }
3199
3200 [
3201     object,
3202     uuid(d5b61b82-1da4-11d3-bf87-00105a1b0627),
3203     local
3204 ]
3205 interface nsIController : nsISupports
3206 {
3207     nsresult IsCommandEnabled(const char *command, bool *_retval);
3208     nsresult SupportsCommand(const char *command, bool *_retval);
3209     nsresult DoCommand(const char *command);
3210     nsresult OnEvent(const char *eventName);
3211 }
3212
3213 [
3214     object,
3215     uuid(e2985850-81ca-4b5d-b0f3-e395d50d8564),
3216     local
3217 ]
3218 interface nsIContent : nsISupports
3219 {
3220     /* This is not a real interface declaration. It's too internal for us. */
3221 }
3222
3223 [
3224     object,
3225     uuid(0e1324c9-c997-447e-bcd9-a657802991e4),
3226     local
3227 ]
3228 interface nsIDocument : nsISupports
3229 {
3230     /* This is not a real interface declaration. It's too internal for us. */
3231 }
3232
3233 [
3234     object,
3235     uuid(b1ee32f2-b8c4-49b9-93df-b6fab5d54688),
3236     local
3237 ]
3238 interface nsIContentSerializer : nsISupports
3239 {
3240     nsresult Init(uint32_t flags, uint32_t aWrapColumn, const char *aCharSet, bool aIsCopying,
3241             bool aIsWholeDocument);
3242     nsresult AppendText(nsIContent *aText, int32_t aStartOffset, int32_t aEndOffset, nsAString *aStr);
3243     nsresult AppendCDATASection(nsIContent *aCDATASection, int32_t aStartOffset,
3244             int32_t aEndOffset, nsAString *aStr);
3245     nsresult AppendProcessingInstruction(nsIContent *aPI, int32_t aStartOffset,
3246             int32_t aEndOffset, nsAString *aStr);
3247     nsresult AppendComment(nsIContent *aComment, int32_t aStartOffset, int32_t aEndOffset,
3248             nsAString *aStr);
3249     nsresult AppendDoctype(nsIContent *aDoctype, nsAString *aStr);
3250     nsresult AppendElementStart(nsIContent *aElement, nsIContent *aOriginalElement,
3251                                 nsAString *aStr);
3252     nsresult AppendElementEnd(nsIContent *aElement, nsAString *aStr);
3253     nsresult Flush(nsAString *aStr);
3254     nsresult AppendDocumentStart(nsIDocument *aDocument, nsAString *aStr);
3255 }
3256
3257 [
3258     object,
3259     uuid(12efa18c-920a-47cd-94a1-4052f245f76c),
3260     local
3261 ]
3262 interface nsIEditor  : nsISupports
3263 {
3264     typedef void *nsIContentPtr;
3265
3266     nsresult GetSelection([out] nsISelection *_retval);
3267     nsresult Init([in] nsIDOMDocument *doc, [in] nsIContentPtr aRoot, [in] nsISelectionController *aSelCon, [in] uint32_t aFlags);
3268     nsresult SetAttributeOrEquivalent([in] nsIDOMElement *element, [in] const nsAString *sourceAttrName, [in] const nsAString *sourceAttrValue, [in] bool aSuppressTransaction);
3269     nsresult RemoveAttributeOrEquivalent([in] nsIDOMElement *element, [in] const nsAString *sourceAttrName, [in] bool aSuppressTransaction);
3270     nsresult PostCreate();
3271     nsresult PreDestroy();
3272     nsresult GetFlags([out] uint32_t *_retval);
3273     nsresult SetFlags([in] uint32_t val);
3274     nsresult GetContentsMIMEType([out] char **_retval);
3275     nsresult SetContentsMIMEType([in] const char *val);
3276     nsresult GetIsDocumentEditable([out] bool *_retval);
3277     nsresult GetIsSelectionEditable(bool *aIsSelectionEditable);
3278     nsresult GetDocument([out] nsIDOMDocument **_retval);
3279     nsresult GetRootElement([out] nsIDOMElement **_retval);
3280     nsresult GetSelectionController([out] nsISelectionController **_retval);
3281     nsresult DeleteSelection(int16_t action, int16_t aStripWrappers);
3282     nsresult GetDocumentIsEmpty([out] bool *_retval);
3283     nsresult GetDocumentModified([out] bool *_retval);
3284     nsresult GetDocumentCharacterSet([out] nsACString *_retval);
3285     nsresult SetDocumentCharacterSet([in] const nsACString *val);
3286     nsresult ResetModificationCount();
3287     nsresult GetModificationCount([out] int32_t *_retval);
3288     nsresult IncrementModificationCount([in] int32_t aModCount);
3289     nsresult GetTransactionManager([out] nsITransactionManager **_retval);
3290     nsresult SetTransactionManager(nsITransactionManager *aTransactionManager);
3291     nsresult DoTransaction([in] nsITransaction *txn);
3292     nsresult EnableUndo([in] bool enable);
3293     nsresult GetNumberOfUndoItems(int32_t *aNumberOfUndoItems);
3294     nsresult GetNumberOfRedoItems(int32_t *aNumberOfRedoItems);
3295     nsresult Undo([in] uint32_t count);
3296     nsresult CanUndo([out] bool *isEnabled, [out] bool *canUndo);
3297     nsresult Redo([in] uint32_t count);
3298     nsresult CanRedo([out] bool *isEnabled, [out] bool *canRedo);
3299     nsresult BeginTransaction();
3300     nsresult EndTransaction();
3301     nsresult BeginPlaceHolderTransaction([in] nsIAtom *name);
3302     nsresult EndPlaceHolderTransaction();
3303     nsresult ShouldTxnSetSelection([out] bool *_retval);
3304     nsresult SetShouldTxnSetSelection([in] bool should);
3305     nsresult GetInlineSpellChecker([out] nsIInlineSpellChecker **_retval);
3306     nsresult SyncRealTimeSpell();
3307     nsresult SetSpellcheckUserOverride(bool enable);
3308     nsresult Cut();
3309     nsresult CanCut([out] bool *_retval);
3310     nsresult Copy();
3311     nsresult CanCopy([out] bool *_retval);
3312     nsresult Paste([in] int32_t aSelectionType);
3313     nsresult PasteTransferable(nsITransferable *aTransferable);
3314     nsresult CanPaste([in] int32_t aSelectionType, [out] bool *_retval);
3315     nsresult CanPasteTransferable(nsITransferable *aTransferable, bool *_retval);
3316     nsresult SelectAll();
3317     nsresult BeginningOfDocument();
3318     nsresult EndOfDocument();
3319     nsresult SetAttribute([in] nsIDOMElement *aElement, [in] const nsAString *attributestr, [in] const nsAString *attvalue);
3320     nsresult GetAttributeValue([in] nsIDOMElement *aElement, [in] const nsAString *attributestr, [out] nsAString *resultValue, bool *_retval);
3321     nsresult RemoveAttribute([in] nsIDOMElement *aElement, [in] const nsAString *aAttribute);
3322     nsresult CloneAttribute([in] const nsAString *aAttribute, [in] nsIDOMNode *aDestNode, [in] nsIDOMNode *aSourceNode);
3323     nsresult CloneAttributes([in] nsIDOMNode *destNode, [in] nsIDOMNode *sourceNode);
3324     nsresult CreateNode([in] const nsAString *tag, [in] nsIDOMNode *parent, [in] int32_t position, [out] nsIDOMNode **_retval);
3325     nsresult InsertNode([in] nsIDOMNode *node, [in] nsIDOMNode *parent, [in] int32_t aPosition);
3326     nsresult SplitNode([in] nsIDOMNode *existingRightNode, [in] int32_t offset, [out] nsIDOMNode **newLeftNode);
3327     nsresult JoinNodes([in] nsIDOMNode *leftNode, [in] nsIDOMNode *rightNode, [in] nsIDOMNode *parent);
3328     nsresult DeleteNode([in] nsIDOMNode *child);
3329     bool OutputsMozDirty();
3330     nsresult MarkNodeDirty([in] nsIDOMNode *node);
3331     nsresult SwitchTextDirection();
3332     nsresult OutputToString([in] nsAString formatType, [in] uint32_t flags, [out] nsAString *_retval);
3333     nsresult OutputToStream([in] nsIOutputStream *aStream, [in] nsAString *formatType, [in] nsACString *charsetOverride, [in] uint32_t flags);
3334     nsresult SetEditorObserver(void /* EditActionListener*/ *observer);
3335     nsresult RemoveEditorObserver();
3336     nsresult AddEditActionListener([in] nsIEditActionListener *listener);
3337     nsresult RemoveEditActionListener([in] nsIEditActionListener *listener);
3338     nsresult AddDocumentStateListener([in] nsIDocumentStateListener *listener);
3339     nsresult RemoveDocumentStateListener([in] nsIDocumentStateListener *listener);
3340     nsresult DumpContentTree();
3341     nsresult DebugDumpContent();
3342     nsresult DebugUnitTests([out] int32_t *outNumTests, [out] int32_t *outNumTestsFailed);
3343     bool IsModifiableNode(nsIDOMNode *aNode);
3344     nsresult GetLastKeypressEventTrusted(bool *aLastKeypressEventTrusted);
3345     nsresult SetSuppressDispatchingInputEvent(bool aSuppressDispatchingInputEvent);
3346 }
3347
3348 [
3349     object,
3350     uuid(833f30de-94c7-4630-a852-2300ef329d7b),
3351     local
3352 ]
3353 interface nsIHTMLEditor : nsISupports
3354 {
3355     nsresult AddDefaultProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
3356     nsresult RemoveDefaultProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
3357     nsresult RemoveAllDefaultProperties();
3358     nsresult SetInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
3359     nsresult GetInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue, [out] bool *aFirst, [out] bool *aAny, [out] bool *aAll);
3360     nsresult GetInlinePropertyWithAttrValue([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue, [out] bool *aFirst, [out] bool *aAny, [out] bool *aAll, [out] nsAString *_retval);
3361     nsresult RemoveAllInlineProperties();
3362     nsresult RemoveInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute);
3363     nsresult IncreaseFontSize();
3364     nsresult DecreaseFontSize();
3365     nsresult NodeIsBlock([in] nsIDOMNode *node, bool *_retval);
3366     nsresult InsertHTML([in] nsAString *aInputString);
3367     nsresult PasteNoFormatting([in] int32_t aSelectionType);
3368     nsresult RebuildDocumentFromSource([in] nsAString *aSourceString);
3369     nsresult InsertHTMLWithContext([in] nsAString *aInputString, [in] nsAString *aContextStr, [in] nsAString *aInfoStr, [in] nsAString *aFlavor, [in] nsIDOMDocument *aSourceDoc, [in] nsIDOMNode *aDestinationNode, [in] int32_t aDestinationOffset, [in] bool aDeleteSelection);
3370     nsresult InsertElementAtSelection([in] nsIDOMElement *aElement, [in] bool aDeleteSelection);
3371     nsresult SetDocumentTitle([in] nsAString *aTitle);
3372     nsresult UpdateBaseURL();
3373     nsresult SelectElement([in] nsIDOMElement *aElement);
3374     nsresult SetCaretAfterElement([in] nsIDOMElement *aElement);
3375     nsresult SetParagraphFormat([in] nsAString *aParagraphFormat);
3376     nsresult GetParagraphState([out] bool *aMixed, [out] nsAString *_retval);
3377     nsresult GetFontFaceState([out] bool *aMixed, [out] nsAString *_retval);
3378     nsresult GetFontColorState([out] bool *aMixed, [out] nsAString *_retval);
3379     nsresult GetBackgroundColorState([out] bool *aMixed, [out] nsAString *_retval);
3380     nsresult GetHighlightColorState([out] bool *aMixed, [out] nsAString *_retval);
3381     nsresult GetListState([out] bool *aMixed, [out] bool *aOL, [out] bool *aUL, [out] bool *aDL);
3382     nsresult GetListItemState([out] bool *aMixed, [out] bool *aLI, [out] bool *aDT, [out] bool *aDD);
3383     nsresult GetAlignment([out] bool *aMixed, [out] int16_t *aAlign);
3384     nsresult GetIndentState([out] bool *aCanIndent, [out] bool *aCanOutdent);
3385     nsresult MakeOrChangeList([in] nsAString *aListType, [in] bool entireList, [in] nsAString *aBulletType);
3386     nsresult RemoveList([in] nsAString *aListType);
3387     nsresult Indent([in] nsAString *aIndent);
3388     nsresult Align([in] nsAString *aAlign);
3389     nsresult GetElementOrParentByTagName([in] nsAString *aTagName, [in] nsIDOMNode *aNode, [out] nsIDOMElement **_retval);
3390     nsresult GetSelectedElement([in] nsAString *aTagName, [out] nsIDOMElement **_retval);
3391     nsresult GetHeadContentsAsHTML([out] nsAString *_retval);
3392     nsresult ReplaceHeadContentsWithHTML([in] nsAString *aSourceToInsert);
3393     nsresult CreateElementWithDefaults([in] nsAString *aTagName, [out] nsIDOMElement **_retval);
3394     nsresult InsertLinkAroundSelection([in] nsIDOMElement *aAnchorElement);
3395     nsresult SetBackgroundColor([in] nsAString *aColor);
3396     nsresult SetBodyAttribute([in] nsAString *aAttr, [in] nsAString *aValue);
3397     nsresult GetLinkedObjects([out] nsISupportsArray **_retval);
3398     nsresult GetIsCSSEnabled([out] bool *_retval);
3399     nsresult SetIsCSSEnabled([in] bool prb);
3400     nsresult AddInsertionListener([in] nsIContentFilter *inFilter);
3401     nsresult RemoveInsertionListener([in] nsIContentFilter *inFilter);
3402     nsresult CreateAnonymousElement([in] nsAString *aTag, [in] nsIDOMNode *aParentNode, [in] nsAString *aAnonClass, [in] bool aIsCreatedHidden, [out] nsIDOMElement **_retval);
3403     nsresult GetSelectionContainer([out] nsIDOMElement **_retval);
3404     nsresult CheckSelectionStateForAnonymousButtons([in] nsISelection *aSelection);
3405     nsresult IsAnonymousElement([in] nsIDOMElement *aElement, [out] bool *_retval);
3406     nsresult GetReturnInParagraphCreatesNewParagraph([out] bool *_retval);
3407     nsresult SetReturnInParagraphCreatesNewParagraph([in] bool prb);
3408     nsresult BreakIsVisible(nsIDOMNode *aNode, bool *_retval);
3409     void /*Element*/ *GetActiveEditingHost();
3410 }
3411
3412 [
3413     object,
3414     uuid(318ce516-3f7a-41f6-8f3d-3661650f7a46),
3415     local
3416 ]
3417 interface nsIDocShell : nsISupports
3418 {
3419     nsresult LoadURI(nsIURI *uri, nsIDocShellLoadInfo *loadInfo, uint32_t aLoadFlags, bool firstParty);
3420     nsresult LoadStream(nsIInputStream *aStream, nsIURI *aURI, const nsACString *aContentType,
3421             const nsACString *aContentCharset, nsIDocShellLoadInfo *aLoadInfo);
3422     nsresult InternalLoad(nsIURI *aURI, nsIURI *aReferrer, nsISupports *aOwner, uint32_t aFlags, const PRUnichar *aWindowTarget,
3423             const char *aTypeHint, nsIInputStream *aPostDataStream, nsIInputStream *aHeadersStream, uint32_t aLoadFlags,
3424             nsISHEntry *aSHEntry, bool firstParty, nsIDocShell **aDocShell, nsIRequest **aRequest);
3425     nsresult AddState(nsIVariant *aData, const nsAString *aTitle, const nsAString *aURL, bool aReplace, JSContext *cx);
3426     nsresult CreateLoadInfo(nsIDocShellLoadInfo **loadInfo);
3427     nsresult PrepareForNewContentModel();
3428     nsresult SetCurrentURI(nsIURI *aURI);
3429     nsresult FirePageHideNotification(bool isUnload);
3430     nsresult GetPresContext(void /*nsPresContext*/ **aPresContext);
3431     nsresult GetPresShell(nsIPresShell **aPresShell);
3432     nsresult GetEldestPresShell(nsIPresShell **aEldestPresShell);
3433     nsresult GetContentViewer(nsIContentViewer **aContentViewer);
3434     nsresult GetChromeEventHandler(nsIDOMEventTarget **aChromeEventHandler);
3435     nsresult SetChromeEventHandler(nsIDOMEventTarget *aChromeEventHandler);
3436     nsresult GetAllowPlugins(bool *aAllowPlugins);
3437     nsresult SetAllowPlugins(bool aAllowPlugins);
3438     nsresult GetAllowJavascript(bool *aAllowJavascript);
3439     nsresult SetAllowJavascript(bool aAllowJavascript);
3440     nsresult GetDisableNoScript(bool *aDisableNoScript);
3441     nsresult SetDisableNoScript(bool aDisableNoScript);
3442     nsresult GetAllowMetaRedirects(bool *aAllowMetaRedirects);
3443     nsresult SetAllowMetaRedirects(bool aAllowMetaRedirects);
3444     nsresult GetAllowSubframes(bool *aAllowSubframes);
3445     nsresult SetAllowSubframes(bool aAllowSubframes);
3446     nsresult GetAllowImages(bool *aAllowImages);
3447     nsresult SetAllowImages(bool aAllowImages);
3448     nsresult GetAllowDNSPrefetch(bool *aAllowDNSPrefetch);
3449     nsresult SetAllowDNSPrefetch(bool aAllowDNSPrefetch);
3450     nsresult GetAllowWindowControl(bool *aAllowWindowControl);
3451     nsresult SetAllowWindowControl(bool aAllowWindowControl);
3452     nsresult GetDocShellEnumerator(int32_t aItemType, int32_t aDirection, nsISimpleEnumerator **_retval);
3453     nsresult GetAppType(uint32_t *aAppType);
3454     nsresult SetAppType(uint32_t aAppType);
3455     nsresult GetAllowAuth(bool *aAllowAuth);
3456     nsresult SetAllowAuth(bool aAllowAuth);
3457     nsresult GetZoom(float *aZoom);
3458     nsresult SetZoom(float aZoom);
3459     nsresult GetMarginWidth(int32_t *aMarginWidth);
3460     nsresult SetMarginWidth(int32_t aMarginWidth);
3461     nsresult GetMarginHeight(int32_t *aMarginHeight);
3462     nsresult SetMarginHeight(int32_t aMarginHeight);
3463     nsresult TabToTreeOwner(bool forward, bool *tookFocus);
3464     nsresult GetBusyFlags(uint32_t *aBusyFlags);
3465     nsresult GetLoadType(uint32_t *aLoadType);
3466     nsresult SetLoadType(uint32_t aLoadType);
3467     nsresult IsBeingDestroyed(bool *_retval);
3468     nsresult GetIsExecutingOnLoadHandler(bool *aIsExecutingOnLoadHandler);
3469     nsresult GetLayoutHistoryState(nsILayoutHistoryState **aLayoutHistoryState);
3470     nsresult SetLayoutHistoryState(nsILayoutHistoryState *aLayoutHistoryState);
3471     nsresult GetShouldSaveLayoutState(bool *aShouldSaveLayoutState);
3472     nsresult GetSecurityUI(nsISecureBrowserUI **aSecurityUI);
3473     nsresult SetSecurityUI(nsISecureBrowserUI *aSecurityUI);
3474     nsresult SuspendRefreshURIs();
3475     nsresult ResumeRefreshURIs();
3476     nsresult BeginRestore(nsIContentViewer *viewer, bool top);
3477     nsresult FinishRestore();
3478     nsresult GetRestoringDocument(bool *aRestoringDocument);
3479     nsresult GetUseErrorPages(bool *aUseErrorPages);
3480     nsresult SetUseErrorPages(bool aUseErrorPages);
3481     nsresult GetPreviousTransIndex(int32_t *aPreviousTransIndex);
3482     nsresult GetLoadedTransIndex(int32_t *aLoadedTransIndex);
3483     nsresult HistoryPurged(int32_t numEntries);
3484     nsresult GetSessionStorageForPrincipal(nsIPrincipal *principal, const nsAString *documentURI,
3485             bool create, nsIDOMStorage **_retval);
3486     nsresult AddSessionStorage(nsIPrincipal *principal, nsIDOMStorage *storage);
3487     nsresult CloneSessionStoragesTo(nsIDocShell *docShell);
3488     nsresult ClearSessionStorages();
3489     nsresult GetCurrentDocumentChannel(nsIChannel **aCurrentDocumentChannel);
3490     nsresult SetChildOffset(uint32_t offset);
3491     nsresult GetIsInUnload(bool *aIsInUnload);
3492     nsresult GetChannelIsUnsafe(bool *aChannelIsUnsafe);
3493     void DetachEditorFromWindow();
3494     nsresult GetIsOffScreenBrowser(bool *aIsOffScreenBrowser);
3495     nsresult SetIsOffScreenBrowser(bool aIsOffScreenBrowser);
3496     nsresult GetPrintPreview(nsIWebBrowserPrint **aPrintPreview);
3497     nsresult GetCanExecuteScripts(bool *aCanExecuteScripts);
3498     nsresult GetIsActive(bool *aIsActive);
3499     nsresult SetIsActive(bool aIsActive);
3500     nsresult GetHistoryID(uint64_t *aHistoryID);
3501     nsresult GetIsAppTab(bool *aIsAppTab);
3502     nsresult SetIsAppTab(bool aIsAppTab);
3503     nsresult CreateAboutBlankContentViewer(nsIPrincipal *aPrincipal);
3504     nsresult GetCharset(char **aCharset);
3505     nsresult SetCharset(const char * aCharset);
3506     nsresult GetForcedCharset(nsIAtom **aForcedCharset);
3507     nsresult SetForcedCharset(nsIAtom *aForcedCharset);
3508     nsresult GetParentCharset(nsIAtom **aParentCharset);
3509     nsresult SetParentCharset(nsIAtom *aParentCharset);
3510     nsresult GetParentCharsetSource(int32_t *aParentCharsetSource);
3511     nsresult SetParentCharsetSource(int32_t aParentCharsetSource);
3512     nsresult AddWeakPrivacyTransitionObserver(nsIPrivacyTransitionObserver *obs);
3513     nsresult GetIsBrowserElement(bool *aIsBrowserElement);
3514     nsresult GetIsApp(bool *aIsApp);
3515     nsresult GetIsBrowserOrApp(bool *aIsBrowserOrApp);
3516     nsresult GetIsInBrowserElement(bool *aIsInBrowserElement);
3517     nsresult GetIsInBrowserOrApp(bool *aIsInBrowserOrApp);
3518     nsresult SetIsApp(uint32_t ownAppId);
3519     nsresult SetIsBrowserInsideApp(uint32_t containingAppId);
3520     nsresult GetAppId(uint32_t *aAppId);
3521     nsresult GetSameTypeParentIgnoreBrowserAndAppBoundaries(nsIDocShell **_retval);
3522     nsresult GetAsyncPanZoomEnabled(bool *aAsyncPanZoomEnabled);
3523     nsresult GetSandboxFlags(uint32_t *aSandboxFlags);
3524     nsresult SetSandboxFlags(uint32_t aSandboxFlags);
3525     bool PluginsAllowedInCurrentDoc();
3526     nsresult GetFullscreenAllowed(bool *aFullscreenAllowed);
3527     nsresult SetFullscreenAllowed(bool allowed);
3528 }
3529
3530 [
3531     object,
3532     uuid(16fe5e3e-eadc-4312-9d44-b6bedd6b5474),
3533     local
3534 ]
3535 interface nsIMutationObserver : nsISupports
3536 {
3537     void CharacterDataWillChange(nsIDocument *aDocument, nsIContent *aContent,
3538                                  void /*CharacterDataChangeInfo*/ *aInfo);
3539     void CharacterDataChanged(nsIDocument *aDocument, nsIContent *aContent,
3540                               void /*CharacterDataChangeInfo*/ *aInfo);
3541     void AttributeWillChange(nsIDocument *aDocument, nsIContent *aContent, int32_t aNameSpaceID,
3542                              nsIAtom *aAttribute, int32_t aModType);
3543     void AttributeChanged(nsIDocument *aDocument, nsIContent *aContent, int32_t aNameSpaceID,
3544                           nsIAtom *aAttribute, int32_t aModType);
3545     void AttributeSetToCurrentValue(nsIDocument *aDocument, /*mozilla::dom::Element*/ void *aElement,
3546                                     int32_t aNameSpaceID, nsIAtom *aAttribute);
3547     void ContentAppended(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aFirstNewContent,
3548                          int32_t aNewIndexInContainer);
3549     void ContentInserted(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild,
3550                          int32_t aIndexInContainer);
3551     void ContentRemoved(nsIDocument *aDocument, nsIContent *aContainer, nsIContent *aChild,
3552                         int32_t aIndexInContainer, nsIContent *aPreviousSibling);
3553     void NodeWillBeDestroyed(const nsINode *aNode);
3554     void ParentChainChanged(nsIContent *aContent);
3555 }
3556
3557 [
3558     object,
3559     uuid(2c4ad90a-740e-4212-ba3f-feacda4b929e),
3560     local
3561 ]
3562 interface nsIParser : nsISupports
3563 {
3564     typedef int nsDTDMode;
3565     typedef int eParserCommands;
3566
3567     /* From nsParserBase: */
3568     bool IsParserEnabled();
3569     nsresult GetChannel(nsIChannel **aChannel);
3570
3571     void SetContentSink(nsIContentSink *aSink);
3572     nsIContentSink *GetContentSink();
3573     void GetCommand(nsACString *aCommand);
3574     void SetCommand2(const char *aCommand);
3575     void SetCommand(eParserCommands aParserCommand);
3576     void SetDocumentCharset(const nsACString *aCharset, int32_t aSource);
3577     void GetDocumentCharset(nsACString *oCharset, int32_t *oSource);
3578     nsresult GetDTD(nsIDTD **aDTD);
3579     nsIStreamListener *GetStreamListener();
3580     nsresult ContinueInterruptedParsing();
3581     void BlockParser();
3582     void UnblockParser();
3583     void ContinueInterruptedParsingAsync();
3584     bool IsComplete();
3585     nsresult Parse(nsIURI *aURL, nsIRequestObserver *aListener, void *aKey, nsDTDMode aMode);
3586     nsresult Terminate();
3587     nsresult ParseFragment(const nsAString *aSourceBuffer, void /*nsTArray<nsString>*/ *aTagStack);
3588     nsresult BuildModel();
3589     nsresult CancelParsingEvents();
3590     void Reset();
3591     bool IsInsertionPointDefined();
3592     void BeginEvaluatingParserInsertedScript();
3593     void EndEvaluatingParserInsertedScript();
3594     void MarkAsNotScriptCreated(const char *aCommand);
3595     bool IsScriptCreated();
3596 }
3597
3598 [
3599     object,
3600     uuid(900bc4bc-8b6c-4cba-82fa-568a80fffd3e),
3601     local
3602 ]
3603 interface nsIDocumentObserver : nsIMutationObserver
3604 {
3605     typedef uint32_t nsUpdateType;
3606
3607     typedef struct {
3608         uint64_t mStates;
3609     } nsEventStates;
3610
3611     void BeginUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType);
3612     void EndUpdate(nsIDocument *aDocument, nsUpdateType aUpdateType);
3613     void BeginLoad(nsIDocument *aDocument);
3614     void EndLoad(nsIDocument *aDocument);
3615     void ContentStatesChanged(nsIDocument *aDocument, nsIContent *aContent, nsEventStates *aStateMask);
3616     void DocumentStatesChanged(nsIDocument *aDocument, nsEventStates *aStateMask);
3617     void StyleSheetAdded(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, bool aDocumentSheet);
3618     void StyleSheetRemoved(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, bool aDocumentSheet);
3619     void StyleSheetApplicableStateChanged(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet,
3620                                           bool aApplicable);
3621     void StyleRuleChanged(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aOldStyleRule,
3622                           nsIStyleRule *aNewStyleRule);
3623     void StyleRuleAdded(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule);
3624     void StyleRuleRemoved(nsIDocument *aDocument, nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule);
3625     void BindToDocument(nsIDocument *aDocument, nsIContent *aContent);
3626     void AttemptToExecuteScript(nsIContent *aContent, nsIParser *aParser, bool *aBlock);
3627 }
3628
3629 [
3630     object,
3631     uuid(c61eac14-5f7a-4481-965e-7eaa6effa85f),
3632     local
3633 ]
3634 interface nsCycleCollectionISupports {}
3635
3636 [
3637     object,
3638     uuid(3682dd99-8560-44f4-9b8f-ccce9d7b96fb),
3639     local
3640 ]
3641 interface nsIContentUtils : nsISupports
3642 {
3643     bool IsSafeToRunScript();
3644     nsresult AddDocumentObserver(nsIDocument *aDocument, nsIDocumentObserver *aObserver);
3645     nsresult RemoveDocumentObserver(nsIDocument *aDocument, nsIDocumentObserver *aObserver);
3646     nsresult AddMutationObserver(nsINode *aNode, nsIMutationObserver *aObserver);
3647     nsresult RemoveMutationObserver(nsINode *aNode, nsIMutationObserver *aObserver);
3648     nsresult AddScriptRunner(nsIRunnable *aRunnable);
3649     JSContext *GetContextFromDocument(nsIDocument *aDocument);
3650 }
3651
3652 [
3653     object,
3654     uuid(8f672000-bab9-4c60-aaaf-2673c4e2a4c6),
3655     local
3656 ]
3657 interface nsIPluginInstance : nsISupports
3658 {
3659     nsresult GetDOMElement(nsIDOMElement **aDOMElement);
3660 }