user32: Change the desktop colour and pattern to match win2k.
[wine] / dlls / mshtml / nsiface.idl
1 /*
2  * Copyright 2005-2007 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 /* 
20  * NOTE:
21  * This file is not an usual idl file. Interfaces in this file are XPCOM interfaces
22  * (NOT MSCOM!), but we generate the header file with WIDL compatibile with XPCOM,
23  * useable in C code.
24  */
25
26 cpp_quote("#define GECKO_VERSION \"0.1.0\"");
27 cpp_quote("#define GECKO_VERSION_STRING \"Wine Gecko \" GECKO_VERSION");
28
29 import "wtypes.idl";
30
31 typedef HRESULT nsresult;
32 typedef ULONG nsrefcnt;
33
34 typedef IID nsID;
35 typedef IID nsIID;
36 typedef nsIID nsCID;
37 typedef REFIID nsIIDRef;
38 typedef nsIIDRef nsCIDRef;
39
40 typedef void** nsQIResult;
41 typedef WCHAR PRUnichar;
42 typedef ULONG PRUint32;
43 typedef LONG PRInt32;
44 typedef WORD PRUint16;
45 typedef INT16 PRInt16;
46 typedef BYTE PRUint8;
47 typedef BOOL PRBool;
48 typedef LARGE_INTEGER PRInt64;
49 typedef ULARGE_INTEGER PRUint64;
50 typedef PRUint64 DOMTimeStamp;
51 typedef PRUint32 nsLoadFlags;
52
53 typedef struct {
54     void *v;
55     void *d1;
56     PRUint32 d2;
57     void *d3;
58 } nsCStringContainer;
59
60 typedef struct {
61     void *v;
62     void *d1;
63     PRUint32 d2;
64     void *d3;
65 } nsStringContainer;
66
67 typedef nsCStringContainer nsACString;
68 typedef nsStringContainer nsAString;
69
70 interface nsIWebBrowserChrome;
71 interface nsILoadGroup;
72 interface nsIDOMNode;
73 interface nsIDOMDocument;
74 interface nsIDOMEvent;
75 interface nsIEditor;
76 interface nsISelectionController;
77 interface nsITransactionManager;
78 interface nsITransaction;
79 interface nsIInlineSpellChecker;
80 interface nsIOutputStream;
81 interface nsIEditorObserver;
82 interface nsIEditActionListener;
83 interface nsIDocumentStateListener;
84
85 interface IMoniker;
86
87 [
88     object,
89     uuid(00000000-0000-0000-c000-000000000046)
90 ]
91 interface nsISupports
92 {
93     nsresult QueryInterface(nsIIDRef riid, nsQIResult result);
94     nsrefcnt AddRef();
95     nsrefcnt Release();
96 }
97
98 /* Currently we don't need a full declaration of these interfaces */
99 typedef nsISupports nsISHistory;
100 typedef nsISupports nsIWidget;
101 typedef nsISupports nsIDOMAbstractView;
102 typedef nsISupports nsIHttpHeaderVisitor;
103 typedef nsISupports nsIDOMBarProp;
104 typedef nsISupports nsIDOMWindowCollection;
105 typedef nsISupports nsIPrompt;
106 typedef nsISupports nsIAuthPrompt;
107 typedef nsISupports nsIDOMNamedNodeMap;
108 typedef nsISupports nsIDOMAttr;
109 typedef nsISupports nsIDOMDocumentType;
110 typedef nsISupports nsIDOMDOMImplementation;
111 typedef nsISupports nsIDOMCDATASection;
112 typedef nsISupports nsIDOMProcessingInstruction;
113 typedef nsISupports nsIDOMEntityReference;
114 typedef nsISupports nsIDOMHTMLFormElement;
115 typedef nsISupports nsIDOMHTMLOptionsCollection;
116 typedef nsISupports nsIDOMHTMLCollection;
117 typedef nsISupports nsIWebProgressListener;
118 typedef nsISupports nsIDOMCSSValue;
119 typedef nsISupports nsIDOMCSSRule;
120 typedef nsISupports nsIPrintSession;
121 typedef nsISupports nsIControllerCommandTable;
122 typedef nsISupports nsIPrincipal;
123 typedef nsISupports nsIAtom;
124 typedef nsISupports nsISupportsArray;
125 typedef nsISupports nsIContentFilter;
126 typedef nsISupports nsIDOMStyleSheet;
127
128 [
129     object,
130     uuid(8bb35ed9-e332-462d-9155-4a002ab5c958)
131     /* FROZEN */
132 ]
133 interface nsIServiceManager : nsISupports
134 {
135     nsresult GetService(nsCIDRef aClass, nsIIDRef aIID, void **result);
136     nsresult GetServiceByContractID(const char *aContractID, nsIIDRef aIID, void **result);
137     nsresult IsServiceInstantiated(nsCIDRef aClass, nsIIDRef aIID, BOOL *_retval);
138     nsresult IsServiceInstantiatedByContractID(const char *aContractID, nsIIDRef aIID, BOOL *_retval);
139 }
140
141 [
142     object,
143     uuid(00000001-0000-0000-c000-000000000046)
144     /* FROZEN */
145 ]
146 interface nsIFactory : nsISupports
147 {
148     nsresult CreateInstance(nsISupports *aOuter, const nsIID *iid, void **result);
149     nsresult LockFactory(PRBool lock);
150 }
151
152 [
153     object,
154     uuid(db242e01-e4d9-11d2-9dde-000064657374)
155     /* FROZEN */
156 ]
157 interface nsIObserver : nsISupports
158 {
159     nsresult Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData);
160 }
161
162 [
163     object,
164     uuid(a88e5a60-205a-4bb1-94e1-2628daf51eae)
165     /* FROZEN */
166 ]
167 interface nsIComponentManager : nsISupports
168 {
169     nsresult GetClassObject(nsCIDRef aClass, nsIIDRef aIID, nsQIResult result);
170     nsresult GetClassObjectByContractID(const char *aContractID, nsIIDRef aIID, nsQIResult result);
171     nsresult CreateInstance(nsCIDRef aClass, nsISupports *aDelegate, nsIIDRef aIID,
172             nsQIResult result);
173     nsresult CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate,
174             nsIIDRef aIID, nsQIResult result);
175 }
176
177 [
178     object,
179     uuid(59e7e77a-38e4-11d4-8cf5-0060b0fc14a3)
180     /* FROZEN */
181 ]
182 interface nsIMemory : nsISupports
183 {
184     void *Alloc(/*size_t*/ int size);
185     void *Realloc(void *_ptr, /*size_t*/ int newSize);
186     void Free(void *_ptr);
187     nsresult HeapMinimize(PRBool immediate);
188     nsresult IsLowMemory(PRBool *_retval);
189 }
190
191 [
192     object,
193     uuid(9188bc85-f92e-11d2-81ef-0060083a0bcf)
194     /* FROZEN */
195 ]
196 interface nsIWeakReference : nsISupports
197 {
198     nsresult QueryReferent(const nsIID *riid, void **result);
199 }
200
201 [
202     object,
203     uuid(9188bc86-f92e-11d2-81ef-0060083a0bcf)
204     /* FROZEN */
205 ]
206 interface nsISupportsWeakReference : nsISupports
207 {
208     nsresult GetWeakReference(nsIWeakReference **_retval);
209 }
210
211 [
212     object,
213     uuid(033a1470-8b2a-11d3-af88-00a024ffc08c)
214     /* FROZEN */
215 ]
216 interface nsIInterfaceRequestor : nsISupports
217 {
218     nsresult GetInterface(const nsIID *riid, void **result);
219 }
220
221 [
222     object,
223     uuid(d1899240-f9d2-11d2-bdd6-000064657374)
224     /* FROZEN */
225 ]
226 interface nsISimpleEnumerator : nsISupports
227 {
228     nsresult HasMoreElements(PRBool *_retval);
229     nsresult GetNext(nsISupports **_retval);
230 }
231
232 [
233     object,
234     uuid(114744d9-c369-456e-b55a-52fe52880d2d)
235     /* NOT_FROZEN */
236 ]
237 interface nsIArray : nsISupports
238 {
239     nsresult GetLength(PRUint32 *aLength);
240     nsresult QueryElementAt(PRUint32 index, const nsIID *uuid, void **result);
241     nsresult IndexOf(PRUint32 startIndex, nsISupports *element, PRUint32 *_retval);
242     nsresult Enumerate(nsISimpleEnumerator **_retval);
243 }
244
245 [
246     object,
247     uuid(af059da0-c85b-40ec-af07-ae4bfdc192cc)
248     /* NOT_FROZEN */
249 ]
250 interface nsIMutableArray : nsIArray
251 {
252     nsresult AppendElement(nsISupports *element, PRBool weak);
253     nsresult RemoveElementAt(PRUint32 index);
254     nsresult InsertElementAt(nsISupports *element, PRUint32 index, PRBool weak);
255     nsresult Clear();
256 }
257
258 [
259     object,
260     uuid(4d12e540-83d7-11d5-90ed-0010a4e73d9a)
261     /* NOT_FROZEN */
262 ]
263 interface nsIVariant : nsISupports
264 {
265     enum nsDataType {
266         TYPE_INT8,
267         TYPE_INT16,
268         TYPE_INT32,
269         TYPE_INT64,
270         TYPE_UINT8,
271         TYPE_UINT16,
272         TYPE_UINT32,
273         TYPE_UINT64,
274         TYPE_FLOAT,
275         TYPE_DOUBLE,
276         TYPE_BOOL,
277         TYPE_CHAR,
278         TYPE_WCHAR,
279         TYPE_VOID,
280         TYPE_ID,
281         TYPE_DOMSTRING,
282         TYPE_CHAR_STR,
283         TYPE_WCHAR_STR,
284         TYPE_INTERFACE,
285         TYPE_INTERFACE_IS,
286         TYPE_ARRAY,
287         TYPE_STRING_SIZE_IS,
288         TYPE_WSTRING_SIZE_IS,
289         TYPE_UTF8STRING,
290         TYPE_CSTRING,
291         TYPE_ASTRING,
292         TYPE_AMPTY_ARRAY,
293         TYPE_EMPTY
294     };
295
296     nsresult GetDataType(PRUint16 *aDataType);
297     nsresult GetAsInt8(PRUint8 *_retval);
298     nsresult GetAsInt16(PRInt16 *_retval);
299     nsresult GetAsInt32(PRInt32 *_retval);
300     nsresult GetAsInt64(PRInt64 *_retval);
301     nsresult GetAsUint8(PRUint8 *_retval);
302     nsresult GetAsUint16(PRUint16 *_retval);
303     nsresult GetAsUint32(PRUint32 *_retval);
304     nsresult GetAsUint64(PRUint64 *_retval);
305     nsresult GetAsFloat(float *_retval);
306     nsresult GetAsDouble(double *_retval);
307     nsresult GetAsBool(PRBool *_retval);
308     nsresult GetAsChar(char *_retval);
309     nsresult GetAsWChar(PRUnichar *_retval);
310     nsresult GetAsID(nsID *retval);
311     nsresult GetAsAString(nsAString *_retval);
312     nsresult GetAsDOMString(nsAString *_retval);
313     nsresult GetAsACString(nsACString *_retval);
314     nsresult GetAsAUTF8String(nsACString *_retval);
315     nsresult GetAsString(char **_retval);
316     nsresult GetAsWString(PRUnichar **_retval);
317     nsresult GetAsISupports(nsISupports **_retval);
318     nsresult GetAsInterface(nsIID * *iid, void **iface);
319     nsresult GetAsArray(PRUint16 *type, nsIID *iid, PRUint32 *count, void **ptr);
320     nsresult GetAsStringWithSize(PRUint32 *size, char **str);
321     nsresult GetAsWStringWithSize(PRUint32 *size, PRUnichar **str);
322 }
323
324 [
325     object,
326     uuid(5586a590-8c82-11d5-90f3-0010a4e73d9a)
327     /* NOT_FROZEN */
328 ]
329 interface nsIWritableVariant : nsIVariant
330 {
331     nsresult GetWritable(PRBool *aWritable);
332     nsresult SetWritable(PRBool aWritable);
333     nsresult SetAsInt8(PRUint8 aValue);
334     nsresult SetAsInt16(PRInt16 aValue);
335     nsresult SetAsInt32(PRInt32 aValue);
336     nsresult SetAsInt64(PRInt64 aValue);
337     nsresult SetAsUint8(PRUint8 aValue);
338     nsresult SetAsUint16(PRUint16 aValue);
339     nsresult SetAsUint32(PRUint32 aValue);
340     nsresult SetAsUint64(PRUint64 aValue);
341     nsresult SetAsFloat(float aValue);
342     nsresult SetAsDouble(double aValue);
343     nsresult SetAsBool(PRBool aValue);
344     nsresult SetAsChar(char aValue);
345     nsresult SetAsWChar(PRUnichar aValue);
346     nsresult SetAsID(const nsID *aValue);
347     nsresult SetAsAString(const nsAString *aValue);
348     nsresult SetAsDOMString(const nsAString *aValue);
349     nsresult SetAsACString(const nsACString *aValue);
350     nsresult SetAsAUTF8String(const nsACString *aValue);
351     nsresult SetAsString(const char *aValue);
352     nsresult SetAsWString(const PRUnichar *aValue);
353     nsresult SetAsISupports(nsISupports *aValue);
354     nsresult SetAsInterface(const nsIID *iid, void *iface);
355     nsresult SetAsArray(PRUint16 type, const nsIID *iid, PRUint32 count, void *ptr);
356     nsresult SetAsStringWithSize(PRUint32 size, const char *str);
357     nsresult SetAsWStringWithSize(PRUint32 size, const PRUnichar *str);
358     nsresult SetAsVoid();
359     nsresult SetAsEmpty();
360     nsresult SetAsEmptyArray();
361     nsresult SetFromVariant(nsIVariant *aValue);
362 }
363
364 [
365     object,
366     uuid(fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a)
367     /* FROZEN */
368 ]
369 interface nsIInputStream : nsISupports
370 {
371     nsresult Close();
372     nsresult Available(PRUint32 *_retval);
373     nsresult Read(char *aBuf, PRUint32 aCount, PRUint32 *_retval);
374     nsresult ReadSegments(nsresult (*aWriter)(nsIInputStream *aInStream, 
375             void *aClosure, const char *aFromSegment, PRUint32 aToOffset,
376             PRUint32 aCount, PRUint32 *aWriteCount),
377             void *aClosure, PRUint32 aCount, PRUint32 *_retval);
378     nsresult IsNonBlocking(PRBool *_retval);
379 }
380
381 [
382     object,
383     uuid(450cd2d4-f0fd-424d-b365-b1251f80fd53)
384     /* NOT_FROZEN */
385 ]
386 interface nsIStringInputStream : nsIInputStream
387 {
388     nsresult SetData(const char *data, PRInt32 dataLen);
389     nsresult AdoptData(char *data, PRInt32 dataLen);
390     nsresult ShareData(const char *data, PRInt32 dataLen);
391 }
392
393 [
394     object,
395     uuid(07a22cc0-0ce5-11d3-9331-00104ba0fd40)
396     /* FROZEN */
397 ]
398 interface nsIURI : nsISupports
399 {
400     nsresult GetSpec(nsACString *aSpec);
401     nsresult SetSpec(const nsACString *aSpec);
402     nsresult GetPrePath(nsACString *aPrePath);
403     nsresult GetScheme(nsACString *aScheme);
404     nsresult SetScheme(const nsACString *aScheme);
405     nsresult GetUserPass(nsACString *aUserPass);
406     nsresult SetUserPass(const nsACString *aUserPass);
407     nsresult GetUsername(nsACString *aUsername);
408     nsresult SetUsername(const nsACString *aUsername);
409     nsresult GetPassword(nsACString *aPassword);
410     nsresult SetPassword(const nsACString *aPassword);
411     nsresult GetHostPort(nsACString *aHostPort);
412     nsresult SetHostPort(const nsACString *aHostPort);
413     nsresult GetHost(nsACString *aHost);
414     nsresult SetHost(const nsACString *aHost);
415     nsresult GetPort(PRInt32 *aPort);
416     nsresult SetPort(PRInt32 aPort);
417     nsresult GetPath(nsACString *aPath);
418     nsresult SetPath(const nsACString *aPath);
419     nsresult Equals(nsIURI *other, PRBool *_retval);
420     nsresult SchemeIs(const char *scheme, PRBool *_retval);
421     nsresult Clone(nsIURI **_retval);
422     nsresult Resolve(const nsACString *relativePath, nsACString *_retval);
423     nsresult GetAsciiSpec(nsACString *aAsciiSpec);
424     nsresult GetAsciiHost(nsACString *aAsciiHost);
425     nsresult GetOriginCharset(nsACString *aOriginCharset);
426 }
427
428 [
429     object,
430     uuid(ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe)
431     /* FROZEN */
432 ]
433 interface nsIRequest : nsISupports
434 {
435     nsresult GetName(nsACString *aName);
436     nsresult IsPending(PRBool *_retval);
437     nsresult GetStatus(nsresult *aStatus);
438     nsresult Cancel(nsresult aStatus);
439     nsresult Suspend();
440     nsresult Resume();
441     nsresult GetLoadGroup(nsILoadGroup **aLoadGroup);
442     nsresult SetLoadGroup(nsILoadGroup *aLoadGroup);
443     nsresult GetLoadFlags(nsLoadFlags *aLoadFlags);
444     nsresult SetLoadFlags(nsLoadFlags aLoadFlags);
445 }
446
447 [
448     object,
449     uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40)
450     /* FROZEN */
451 ]
452 interface nsIRequestObserver : nsISupports
453 {
454     nsresult OnStartRequest(nsIRequest *aRequest, nsISupports *aContext);
455     nsresult OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode);
456 }
457
458 [
459     object,
460     uuid(1a637020-1482-11d3-9333-00104ba0fd40)
461     /* FROZEN */
462
463 interface nsIStreamListener : nsIRequestObserver
464 {
465     nsresult OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
466                              nsIInputStream *aInputStream, PRUint32 aOffset, PRUint32 aCount);
467 }
468
469 [
470     object,
471     uuid(3de0a31c-feaf-400f-9f1e-4ef71f8b20cc)
472     /* FROZEN */
473 ]
474 interface nsILoadGroup : nsIRequest
475 {
476     nsresult GetGroupObserver(nsIRequestObserver **aGroupObserver);
477     nsresult SetGroupObserver(nsIRequestObserver *aGroupObserver);
478     nsresult GetDefaultLoadRequest(nsIRequest **aDefaultLoadRequest);
479     nsresult SetDefaultLoadRequest(nsIRequest *aDefaultLoadRequest);
480     nsresult AddRequest(nsIRequest *aRequest, nsISupports *aContext);
481     nsresult RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus);
482     nsresult GetRequests(nsISimpleEnumerator **aRequests);
483     nsresult GetActiveCount(PRUint32 *aActiveCount);
484     nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
485     nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
486 }
487
488 [
489     object,
490     uuid(c63a055a-a676-4e71-bf3c-6cfa11082018)
491     /* FROZEN */
492 ]
493 interface nsIChannel : nsIRequest
494 {
495     nsresult GetOriginalURI(nsIURI **aOriginalURI);
496     nsresult SetOriginalURI(nsIURI *aOriginalURI);
497     nsresult GetURI(nsIURI **aURI);
498     nsresult GetOwner(nsISupports **aOwner);
499     nsresult SetOwner(nsISupports *aOwner);
500     nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
501     nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
502     nsresult GetSecurityInfo(nsISupports **aSecurityInfo);
503     nsresult GetContentType(nsACString *aContentType);
504     nsresult SetContentType(const nsACString *aContentType);
505     nsresult GetContentCharset(nsACString *aContentCharset);
506     nsresult SetContentCharset(const nsACString *aContentCharset);
507     nsresult GetContentLength(PRInt32 *aContentLength);
508     nsresult SetContentLength(PRInt32 aContentLength);
509     nsresult Open(nsIInputStream **_retval);
510     nsresult AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext);
511 }
512
513 [
514     object,
515     uuid(9277fe09-f0cc-4cd9-bbce-581dd94b0260)
516     /* FROZEN */
517 ]
518 interface nsIHttpChannel : nsIChannel
519 {
520     nsresult GetRequestMethod(nsACString *aRequestMethod);
521     nsresult SetRequestMethod(const nsACString *aRequestMethod);
522     nsresult GetReferrer(nsIURI **aReferrer);
523     nsresult SetReferrer(nsIURI *aReferrer);
524     nsresult GetRequestHeader(const nsACString *aHeader, nsACString *_retval);
525     nsresult SetRequestHeader(const nsACString *aHeader, const nsACString *aValue, PRBool aMerge);
526     nsresult VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor);
527     nsresult GetAllowPipelining(PRBool *aAllowPipelining);
528     nsresult SetAllowPipelining(PRBool aAllowPipelining);
529     nsresult GetRedirectionLimit(PRUint32 *aRedirectionLimit);
530     nsresult SetRedirectionLimit(PRUint32 aRedirectionLimit);
531     nsresult GetResponseStatus(PRUint32 *aResponseStatus);
532     nsresult GetResponseStatusText(nsACString *aResponseStatusText);
533     nsresult GetRequestSucceeded(PRBool *aRequestSucceeded);
534     nsresult GetResponseHeader(const nsACString *header, nsACString *_retval);
535     nsresult SetResponseHeader(const nsACString *header, const nsACString *value, PRBool merge);
536     nsresult VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor);
537     nsresult IsNoStoreResponse(PRBool *_retval);
538     nsresult IsNoCacheResponse(PRBool *_retval);
539 }
540
541 [
542     object,
543     uuid(ddf633d8-e9a4-439d-ad88-de636fd9bb75)
544     /* FROZEN */
545 ]
546 interface nsIUploadChannel : nsISupports
547 {
548     nsresult SetUploadStream(nsIInputStream *aStream, const nsACString *aContentType,
549                              PRInt32 aContentLength);
550     nsresult GetUploadStream(nsIInputStream **aUploadStream);
551 }
552
553 [
554     object,
555     uuid(a6cf90be-15b3-11d2-932e-00805f8add32)
556     /* FROZEN */
557 ]
558 interface nsIDOMCSSStyleDeclaration : nsISupports
559 {
560     nsresult GetCssText(nsAString *aCssText);
561     nsresult SetCssText(const nsAString *aCssText);
562     nsresult GetPropertyValue(const nsAString *propertyName, nsAString *_retval);
563     nsresult GetPropertyCSSValue(const nsAString *propertyName, nsIDOMCSSValue **_retval);
564     nsresult RemoveProperty(const nsAString *propertyName, nsAString *_retval);
565     nsresult GetPropertyPriority(const nsAString *propertyName, nsAString *_retval);
566     nsresult SetProperty(const nsAString *propertyName, const nsAString *value,
567                          const nsAString *priority);
568     nsresult GetLength(PRUint32 *aLength);
569     nsresult Item(PRUint32 index, nsAString *_retval);
570     nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
571 }
572
573 [
574     object,
575     uuid(a6cf9081-15b3-11d2-932e-00805f8add32)
576     /* FROZEN */
577 ]
578 interface nsIDOMStyleSheetList : nsISupports
579 {
580     nsresult GetLength(PRUint32 *aLength);
581     nsresult Item(PRUint32 index, nsIDOMStyleSheet **_retval);
582 }
583
584 [
585     object,
586     uuid(a6cf907d-15b3-11d2-932e-00805f8add32)
587     /* FROZEN */
588 ]
589 interface nsIDOMNodeList : nsISupports
590 {
591     nsresult Item(PRUint32 index, nsIDOMNode **_retval);
592     nsresult GetLength(PRUint32 *aLength);
593 }
594
595 [
596     object,
597     uuid(a6cf907c-15b3-11d2-932e-00805f8add32)
598     /* FROZEN */
599 ]
600 interface nsIDOMNode : nsISupports
601 {
602     enum NSNODETYPE {
603         ELEMENT_NODE = 1,
604         ATTRIBUTE_NODE = 2,
605         TEXT_NODE = 3,
606         CDATA_SELECTION_NODE = 4,
607         ENTITY_REFERENCE_NODE = 5,
608         ENTITY_NODE = 6,
609         PROCESSING_INSTRUCTION_NODE = 7,
610         COMMENT_NODE = 8,
611         DOCUMENT_NODE = 9,
612         DOCUMENT_TYPE_NODE = 10,
613         DOCUMENT_FRAGMENT_NODE = 11,
614         NOTATION_NODE = 12
615     };
616
617     nsresult GetNodeName(nsAString *aNodeName);
618     nsresult GetNodeValue(nsAString *aNodeValue);
619     nsresult SetNodeValue(const nsAString *aNodeValue);
620     nsresult GetNodeType(PRUint16 *aNodeType);
621     nsresult GetParentNode(nsIDOMNode **aParentNode);
622     nsresult GetChildNodes(nsIDOMNodeList **aChildNodes);
623     nsresult GetFirstChild(nsIDOMNode **aFirstChild);
624     nsresult GetLastChild(nsIDOMNode **aLastChild);
625     nsresult GetPreviousSibling(nsIDOMNode **aPreviousSibling);
626     nsresult GetNextSibling(nsIDOMNode **aNextSibling);
627     nsresult GetAttributes(nsIDOMNamedNodeMap **aAttributes);
628     nsresult GetOwnerDocument(nsIDOMDocument **aOwnerDocument);
629     nsresult InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild, nsIDOMNode **_retval);
630     nsresult ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild, nsIDOMNode **_retval);
631     nsresult RemoveChild(nsIDOMNode *oldChild, nsIDOMNode **_retval);
632     nsresult AppendChild(nsIDOMNode *newChild, nsIDOMNode **_retval);
633     nsresult HasChildNodes(PRBool *_retval);
634     nsresult CloneNode(PRBool deep, nsIDOMNode **_retval);
635     nsresult Normalize();
636     nsresult IsSupported(const nsAString *feature, const nsAString *version, PRBool *_retval);
637     nsresult GetNamespaceURI(nsAString *aNamespaceURI);
638     nsresult GetPrefix(nsAString *aPrefix);
639     nsresult SetPrefix(const nsAString *aPrefix);
640     nsresult GetLocalName(nsAString *aLocalName);
641     nsresult HasAttributes(PRBool *_retval);
642 }
643
644 [
645     object,
646     uuid(a6cf9078-15b3-11d2-932e-00805f8add32)
647     /* FROZEN */
648 ]
649 interface nsIDOMElement : nsIDOMNode
650 {
651     nsresult GetTagName(nsAString *aTagName);
652     nsresult GetAttribute(const nsAString *name, nsAString *_retval);
653     nsresult SetAttribute(const nsAString *name, const nsAString *value);
654     nsresult RemoveAttribute(const nsAString *name);
655     nsresult GetAttributeNode(const nsAString *name, nsIDOMAttr **_retval);
656     nsresult SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
657     nsresult RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval);
658     nsresult GetElementsByTagName(const nsAString *name, nsIDOMNodeList **_retval);
659     nsresult GetAttributeNS(const nsAString *namespaceURI, const nsAString *localName,
660                             nsAString *_retval);
661     nsresult SetAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName,
662                             const nsAString *value);
663     nsresult RemoveAttributeNS(const nsAString *namespaceURI, const nsAString *localName);
664     nsresult GetAttributeNodeNS(const nsAString *namespaceURI, const nsAString *localName,
665                                 nsIDOMAttr **_retval);
666     nsresult SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
667     nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName,
668                                     nsIDOMNodeList **_retval);
669     nsresult HasAttribute(const nsAString *name, PRBool *_retval);
670     nsresult HasAttributeNS(const nsAString *namespaceURI, const nsAString *localName,
671                             PRBool *_retval);
672 }
673
674 [
675     object,
676     uuid(99715845-95fc-4a56-aa53-214b65c26e22)
677     /* FROZEN */
678 ]
679 interface nsIDOMElementCSSInlineStyle : nsISupports
680 {
681     nsresult GetStyle(nsIDOMCSSStyleDeclaration **aStyle);
682 }
683
684 cpp_quote("#undef GetClassName");
685
686 [
687     object,
688     uuid(a6cf9085-15b3-11d2-932e-00805f8add32)
689     /* FROZEN */
690 ]
691 interface nsIDOMHTMLElement : nsIDOMElement
692 {
693     nsresult GetId(nsAString *aId);
694     nsresult SetId(const nsAString *aId);
695     nsresult GetTitle(nsAString *aTitle);
696     nsresult SetTitle(const nsAString *aTitle);
697     nsresult GetLang(nsAString *aLang);
698     nsresult SetLang(const nsAString *aLang);
699     nsresult GetDir(nsAString *aDir);
700     nsresult SetDir(const nsAString *aDir);
701     nsresult GetClassName(nsAString *aClassName);
702     nsresult SetClassName(const nsAString *aClassName);
703 }
704
705 [
706     object,
707     uuid(da83b2ec-8264-4410-8496-ada3acd2ae42)
708     /* NOT_FROZEN */
709 ]
710 interface nsIDOMNSHTMLElement : nsISupports
711 {
712     nsresult GetOffsetTop(PRInt32 *aOffsetTop);
713     nsresult GetOffsetLeft(PRInt32 *aOffsetLeft);
714     nsresult GetOffsetWidth(PRInt32 *aOffsetWidth);
715     nsresult GetOffsetHeight(PRInt32 *aOffsetHeight);
716     nsresult GetOffsetParent(nsIDOMElement **aOffsetParent);
717     nsresult GetInnerHTML(nsAString *aInnerHTML);
718     nsresult SetInnerHTML(const nsAString *aInnerHTML);
719     nsresult GetScrollTop(PRInt32 *aScrollTop);
720     nsresult SetScrollTop(PRInt32 aScrollTop);
721     nsresult GetScrollLeft(PRInt32 *aScrollLeft);
722     nsresult SetScrollLeft(PRInt32 aScrollLeft);
723     nsresult GetScrollHeight(PRInt32 *aScrollHeight);
724     nsresult GetScrollWidth(PRInt32 *aScrollWidth);
725     nsresult GetClientHeight(PRInt32 *aClientHeight);
726     nsresult GetClientWidth(PRInt32 *aClientWidth);
727     nsresult GetTabIndex(PRInt32 *aTabIndex);
728     nsresult SetTabIndex(PRInt32 aTabIndex);
729     nsresult blur();
730     nsresult focus();
731     nsresult ScrollIntoView(PRBool top);
732 }
733
734 [
735     object,
736     uuid(a6cf9072-15b3-11d2-932e-00805f8add32)
737     /* FROZEN */
738 ]
739 interface nsIDOMCharacterData : nsIDOMNode
740 {
741     nsresult GetData(nsAString *aData);
742     nsresult SetData(const nsAString *aData);
743     nsresult GetLength(PRUint32 *aLength);
744     nsresult SubstringData(PRUint32 offset, PRUint32 count, nsAString *_retval);
745     nsresult AppendData(const nsAString *arg);
746     nsresult InsertData(PRUint32 offset, const nsAString *arg);
747     nsresult DeleteData(PRUint32 offset, PRUint32 count);
748     nsresult ReplaceData(PRUint32 offset, PRUint32 count, const nsAString *arg);
749 }
750
751 [
752     object,
753     uuid(a6cf9082-15b3-11d2-932e-00805f8add32)
754     /* FROZEN */
755 ]
756 interface nsIDOMText : nsIDOMCharacterData
757 {
758     nsresult SplitText(PRUint32 offset, nsIDOMText **_retval);
759 }
760
761 [
762     object,
763     uuid(a6cf9073-15b3-11d2-932e-00805f8add32)
764     /* FROZEN */
765 ]
766 interface nsIDOMComment : nsIDOMCharacterData
767 {
768 }
769
770 [
771     object,
772     uuid(a6cf9076-15b3-11d2-932e-00805f8add32)
773     /* FROZEN */
774 ]
775 interface nsIDOMDocumentFragment : nsIDOMNode
776 {
777 }
778
779 [
780     object,
781     uuid(a6cf9075-15b3-11d2-932e-00805f8add32)
782     /* FROZEN */
783 ]
784 interface nsIDOMDocument : nsIDOMNode
785 {
786     nsresult GetDoctype(nsIDOMDocumentType **aDoctype);
787     nsresult GetImplementation(nsIDOMDOMImplementation **aImplementation);
788     nsresult GetDocumentElement(nsIDOMElement **aDocumentElement);
789     nsresult CreateElement(const nsAString *tagName, nsIDOMElement **_retval);
790     nsresult CreateDocumentFragment(nsIDOMDocumentFragment **_retval);
791     nsresult CreateTextNode(const nsAString *data, nsIDOMText **_retval);
792     nsresult CreateComment(const nsAString *data, nsIDOMComment **_retval);
793     nsresult CreateCDATASection(const nsAString *data, nsIDOMCDATASection **_retval);
794     nsresult CreateProcessingInstruction(const nsAString *target, const nsAString *data,
795                                          nsIDOMProcessingInstruction **_retval);
796     nsresult CreateAttribute(const nsAString *name, nsIDOMAttr **_retval);
797     nsresult CreateEntityReference(const nsAString *name, nsIDOMEntityReference **_retval);
798     nsresult GetElementsByTagName(const nsAString *tagname, nsIDOMNodeList **_retval);
799     nsresult ImportNode(nsIDOMNode *importedNode, PRBool deep, nsIDOMNode **_retval);
800     nsresult CreateElementNS(const nsAString *namespaceURI, const nsAString *qualifiedName,
801                              nsIDOMElement **_retval);
802     nsresult CreateAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName,
803                                nsIDOMAttr **_retval);
804     nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName,
805                                     nsIDOMNodeList **_retval);
806     nsresult GetElementById(const nsAString *elementId, nsIDOMElement **_retval);
807 }
808
809 [
810     object,
811     uuid(a6cf9084-15b3-11d2-932e-00805f8add32)
812     /* FROZEN */
813 ]
814 interface nsIDOMHTMLDocument : nsIDOMDocument
815 {
816     nsresult GetTitle(nsAString *aTitle);
817     nsresult SetTitle(const nsAString *aTitle);
818     nsresult GetReferrer(nsAString *aReferrer);
819     nsresult GetDomain(nsAString *aDomain);
820     nsresult GetURL(nsAString *aURL);
821     nsresult GetBody(nsIDOMHTMLElement **aBody);
822     nsresult SetBody(nsIDOMHTMLElement *aBody);
823     nsresult GetImages(nsIDOMHTMLCollection **aImages);
824     nsresult GetApplets(nsIDOMHTMLCollection **aApplets);
825     nsresult GetLinks(nsIDOMHTMLCollection **aLinks);
826     nsresult GetForms(nsIDOMHTMLCollection **aForms);
827     nsresult GetAnchors(nsIDOMHTMLCollection **aAnchors);
828     nsresult GetCookie(nsAString *aCookie);
829     nsresult SetCookie(const nsAString *aCookie);
830     nsresult Open();
831     nsresult Close();
832     nsresult Write(const nsAString *text);
833     nsresult Writeln(const nsAString *text);
834     nsresult GetElementsByName(const nsAString *elementName, nsIDOMNodeList **_retval);
835 }
836
837 [
838     object,
839     uuid(79beb289-3644-4b54-9432-9fb993945629)
840     /* NOT_FROZEN */
841 ]
842 interface nsIDOMNSHTMLDocument : nsISupports
843 {
844     nsresult GetWidth(PRInt32 *aWidth);
845     nsresult GetHeight(PRInt32 *aHeight);
846     nsresult GetAlinkColor(nsAString *aAlinkColor);
847     nsresult SetAlinkColor(const nsAString *aAlinkColor);
848     nsresult GetLinkColor(nsAString *aLinkColor);
849     nsresult SetLinkColor(const nsAString *aLinkColor);
850     nsresult GetVlinkColor(nsAString *aVlinkColor);
851     nsresult SetVlinkColor(const nsAString *aVlinkColor);
852     nsresult GetBgColor(nsAString *aBgColor);
853     nsresult SetBgColor(const nsAString *aBgColor);
854     nsresult GetFgColor(nsAString *aFgColor);
855     nsresult SetFgColor(const nsAString *aFgColor);
856     nsresult GetDomain(nsAString *aDomain);
857     nsresult SetDomain(const nsAString *aDomain);
858     nsresult GetEmbeds(nsIDOMHTMLCollection **aEmbeds);
859     nsresult GetSelection(nsAString *_retval);
860     nsresult Open(nsIDOMDocument **_retval);
861     nsresult Write();
862     nsresult Writeln();
863     nsresult Clear();
864     nsresult CaptureEvents(PRInt32 eventFlags);
865     nsresult ReleaseEvents(PRInt32 eventFlags);
866     nsresult RouteEvent(nsIDOMEvent *evt);
867     nsresult GetCompatMode(nsAString *aCompatMode);
868     nsresult GetPlugins(nsIDOMHTMLCollection **aPlugins);
869     nsresult GetDesignMode(nsAString *aDesignMode);
870     nsresult SetDesignMode(const nsAString *aDesignMode);
871     nsresult ExecCommand(const nsAString *commandID, PRBool doShowUI, const nsAString *value, PRBool *_retval);
872     nsresult ExecCommandShowHelp(const nsAString *commandID, PRBool *_retval);
873     nsresult QueryCommandEnabled(const nsAString *commandID, PRBool *_retval);
874     nsresult QueryCommandIndeterm(const nsAString *commandID, PRBool *_retval);
875     nsresult QueryCommandState(const nsAString *commandID, PRBool *_retval);
876     nsresult QueryCommandSupported(const nsAString *commandID, PRBool *_retval);
877     nsresult QueryCommandText(const nsAString *commandID, nsAString *_retval);
878     nsresult QueryCommandValue(const nsAString *commandID, nsAString *_retval);
879 }
880
881 [
882     object,
883     uuid(3d9f4973-dd2e-48f5-b5f7-2634e09eadd9)
884     /* FROZEN */
885 ]
886 interface nsIDOMDocumentStyle : nsISupports
887 {
888     nsresult GetStyleSheets(nsIDOMStyleSheetList **aStyleSheets);
889 }
890
891 [
892     object,
893     uuid(a6cf90ce-15b3-11d2-932e-00805f8add32)
894     /* FROZEN */
895 ]
896 interface nsIDOMRange : nsISupports
897 {
898     enum {
899         NS_START_TO_START,
900         NS_START_TO_END,
901         NS_END_TO_END,
902         NS_END_TO_START
903     };
904
905     nsresult GetStartContainer(nsIDOMNode **aStartContainer);
906     nsresult GetStartOffset(PRInt32 *aStartOffset);
907     nsresult GetEndContainer(nsIDOMNode **aEndContainer);
908     nsresult GetEndOffset(PRInt32 *aEndOffset);
909     nsresult GetCollapsed(PRBool *aCollapsed);
910     nsresult GetCommonAncestorContainer(nsIDOMNode **aCommonAncestorContainer);
911     nsresult SetStart(nsIDOMNode *refNode, PRInt32 offset);
912     nsresult SetEnd(nsIDOMNode *refNode, PRInt32 offset);
913     nsresult SetStartBefore(nsIDOMNode *refNode);
914     nsresult SetStartAfter(nsIDOMNode *refNode);
915     nsresult SetEndBefore(nsIDOMNode *refNode);
916     nsresult SetEndAfter(nsIDOMNode *refNode);
917     nsresult Collapse(PRBool toStart);
918     nsresult SelectNode(nsIDOMNode *refNode);
919     nsresult SelectNodeContents(nsIDOMNode *refNode);
920     nsresult CompareBoundaryPoints(PRUint16 how, nsIDOMRange *sourceRange, PRInt16 *_retval);
921     nsresult DeleteContents();
922     nsresult ExtractContents(nsIDOMDocumentFragment **_retval);
923     nsresult CloneContents(nsIDOMDocumentFragment **_retval);
924     nsresult InsertNode(nsIDOMNode *newNode);
925     nsresult SurroundContents(nsIDOMNode *newParent);
926     nsresult CloneRange(nsIDOMRange **_retval);
927     nsresult ToString(nsAString *_retval);
928     nsresult Detach();
929 }
930
931 [
932     object,
933     uuid(a6cf90f2-15b3-11d2-932e-00805f8add32)
934 ]
935 interface nsIDOMNSRange : nsISupports
936 {
937     nsresult CreateContextualFragment([in] const nsAString *fragment, [out] nsIDOMDocumentFragment **_retval);
938     nsresult IsPointInRange([in] nsIDOMNode *parent, [in] PRInt32 offset, [out] PRBool *_retval);
939     nsresult ComparePoint([in] nsIDOMNode *parent, [in] PRInt32 offset, [out] PRInt16 *_retval);
940     nsresult IntersectsNode([in] nsIDOMNode *n, [out] PRBool *_retval);
941     nsresult CompareNode([in] nsIDOMNode *n, [out] PRUint16 *_retval);
942     nsresult nSDetach();
943 }
944
945
946 [
947     object,
948     uuid(7b9badc6-c9bc-447a-8670-dbd195aed24b)
949     /* FROZEN */
950 ]
951 interface nsIDOMDocumentRange : nsISupports
952 {
953     nsresult CreateRange(nsIDOMRange **_retval);
954 }
955
956 [
957     object,
958     uuid(b2c7ed59-8634-4352-9e37-5484c8b6e4e1)
959     /* FROZEN */
960 ]
961 interface nsISelection : nsISupports
962 {
963     nsresult GetAnchorNode(nsIDOMNode **aAnchorNode);
964     nsresult GetAnchorOffset(PRInt32 *aAnchorOffset);
965     nsresult GetFocusNode(nsIDOMNode **aFocusNode);
966     nsresult GetFocusOffset(PRInt32 *aFocusOffset);
967     nsresult GetIsCollapsed(PRBool *aIsCollapsed);
968     nsresult GetRangeCount(PRInt32 *aRangeCount);
969     nsresult GetRangeAt(PRInt32 index, nsIDOMRange **_retval);
970     nsresult Collapse(nsIDOMNode *parentNode, PRInt32 offset);
971     nsresult Extend(nsIDOMNode *parentNode, PRInt32 offset);
972     nsresult CollapseToStart();
973     nsresult CollapseToEnd();
974     nsresult ContainsNode(nsIDOMNode *node, PRBool entirelyContained, PRBool *_retval);
975     nsresult SelectAllChildren(nsIDOMNode *parentNode);
976     nsresult AddRange(nsIDOMRange *range);
977     nsresult RemoveRange(nsIDOMRange *range);
978     nsresult RemoveAllRanges();
979     nsresult DeleteFromDocument();
980     nsresult SelectionLanguageChange(PRBool langRTL);
981     nsresult ToString(PRUnichar **_retval);
982 }
983
984 [
985     object,
986     uuid(a6cf906b-15b3-11d2-932e-00805f8add32)
987     /* FROZEN */
988 ]
989 interface nsIDOMWindow : nsISupports
990 {
991     nsresult GetDocument(nsIDOMDocument **aDocument);
992     nsresult GetParent(nsIDOMWindow **aParent);
993     nsresult GetTop(nsIDOMWindow **aTop);
994     nsresult GetScrollbars(nsIDOMBarProp **aScrollbars);
995     nsresult GetFrames(nsIDOMWindowCollection **aFrames);
996     nsresult GetName(nsAString *aName);
997     nsresult SetName(const nsAString *aName);
998     nsresult GetTextZoom(float *aTextZoom);
999     nsresult SetTextZoom(float aTextZoom);
1000     nsresult GetScrollX(PRInt32 *aScrollX);
1001     nsresult GetScrollY(PRInt32 *aScrollY);
1002     nsresult ScrollTo(PRInt32 xScroll, PRInt32 yScroll);
1003     nsresult ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif);
1004     nsresult GetSelection(nsISelection **_retval);
1005     nsresult ScrollByLines(PRInt32 numLines);
1006     nsresult ScrollByPages(PRInt32 numPages);
1007     nsresult SizeToContent();
1008 }
1009
1010 [
1011     object,
1012     uuid(a6cf908e-15b3-11d2-932e-00805f8add32)
1013     /* FROZEN */
1014 ]
1015 interface nsIDOMHTMLBodyElement : nsIDOMHTMLElement
1016 {
1017     nsresult GetALink(nsAString *aALink);
1018     nsresult SetALink(const nsAString *aALink);
1019     nsresult GetBackground(nsAString *aBackground);
1020     nsresult SetBackground(const nsAString *aBackground);
1021     nsresult GetBgColor(nsAString *aBgColor);
1022     nsresult SetBgColor(const nsAString *aBgColor);
1023     nsresult GetLink(nsAString *aLink);
1024     nsresult SetLink(const nsAString *aLink);
1025     nsresult GetText(nsAString *aText);
1026     nsresult SetText(const nsAString *aText);
1027     nsresult GetVLink(nsAString *aVLink);
1028     nsresult SetVLink(const nsAString *aVLink);
1029 }
1030
1031 [
1032     object,
1033     uuid(a6cf9093-15b3-11d2-932e-00805f8add32)
1034     /* FROZEN */
1035 ]
1036 interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
1037 {
1038     nsresult GetDefaultValue(nsAString *aDefaultValue);
1039     nsresult SetDefaultValue(const nsAString *aDefaultValue);
1040     nsresult GetDefaultChecked(PRBool *aDefaultChecked);
1041     nsresult SetDefaultChecked(PRBool aDefaultChecked);
1042     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1043     nsresult GetAccept(nsAString *aAccept);
1044     nsresult SetAccept(const nsAString *aAccept);
1045     nsresult GetAccessKey(nsAString *aAccessKey);
1046     nsresult SetAccessKey(const nsAString *aAccessKey);
1047     nsresult GetAlign(nsAString *aAlign);
1048     nsresult SetAlign(const nsAString *aAlign);
1049     nsresult GetAlt(nsAString *aAlt);
1050     nsresult SetAlt(const nsAString *aAlt);
1051     nsresult GetChecked(PRBool *aChecked);
1052     nsresult SetChecked(PRBool aChecked);
1053     nsresult GetDisabled(PRBool *aDisabled);
1054     nsresult SetDisabled(PRBool aDisabled);
1055     nsresult GetMaxLength(PRInt32 *aMaxLength);
1056     nsresult SetMaxLength(PRInt32 aMaxLength);
1057     nsresult GetName(nsAString *aName);
1058     nsresult SetName(const nsAString *aName);
1059     nsresult GetReadOnly(PRBool *aReadOnly);
1060     nsresult SetReadOnly(PRBool aReadOnly);
1061     nsresult GetSize(PRUint32 *aSize);
1062     nsresult SetSize(PRUint32 aSize);
1063     nsresult GetSrc(nsAString *aSrc);
1064     nsresult SetSrc(const nsAString *aSrc);
1065     nsresult GetTabIndex(PRInt32 *aTabIndex);
1066     nsresult SetTabIndex(PRInt32 aTabIndex);
1067     nsresult GetType(nsAString *aType);
1068     nsresult SetType(const nsAString *aType);
1069     nsresult GetUseMap(nsAString *aUseMap);
1070     nsresult SetUseMap(const nsAString *aUseMap);
1071     nsresult GetValue(nsAString *aValue);
1072     nsresult SetValue(const nsAString *aValue);
1073     nsresult Blur();
1074     nsresult Focus();
1075     nsresult Select();
1076     nsresult Click();
1077 }
1078
1079 [
1080     object,
1081     uuid(a6cf9092-15b3-11d2-932e-00805f8add32)
1082     /* FROZEN */
1083 ]
1084 interface nsIDOMHTMLOptionElement : nsIDOMHTMLElement
1085 {
1086     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1087     nsresult GetDefaultSelected(PRBool *aDefaultSelected);
1088     nsresult SetDefaultSelected(PRBool aDefaultSelected);
1089     nsresult GetText(nsAString *aText);
1090     nsresult GetIndex(PRInt32 *aIndex);
1091     nsresult GetDisabled(PRBool *aDisabled);
1092     nsresult SetDisabled(PRBool aDisabled);
1093     nsresult GetLabel(nsAString *aLabel);
1094     nsresult SetLabel(const nsAString *aLabel);
1095     nsresult GetSelected(PRBool *aSelected);
1096     nsresult SetSelected(PRBool aSelected);
1097     nsresult GetValue(nsAString *aValue);
1098     nsresult SetValue(const nsAString *aValue);
1099 }
1100
1101 [
1102     object,
1103     uuid(a6cf9090-15b3-11d2-932e-00805f8add32)
1104     /* FROZEN */
1105 ]
1106 interface nsIDOMHTMLSelectElement : nsIDOMHTMLElement
1107 {
1108     nsresult GetType(nsAString *aType);
1109     nsresult GetSelectedIndex(PRInt32 *aSelectedIndex);
1110     nsresult SetSelectedIndex(PRInt32 aSelectedIndex);
1111     nsresult GetValue(nsAString *aValue);
1112     nsresult SetValue(const nsAString *aValue);
1113     nsresult GetLength(PRUint32 *aLength);
1114     nsresult SetLength(PRUint32 aLength);
1115     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1116     nsresult GetOptions(nsIDOMHTMLOptionsCollection **aOptions);
1117     nsresult GetDisabled(PRBool *aDisabled);
1118     nsresult SetDisabled(PRBool aDisabled);
1119     nsresult GetMultiple(PRBool *aMultiple);
1120     nsresult SetMultiple(PRBool aMultiple);
1121     nsresult GetName(nsAString *aName);
1122     nsresult SetName(const nsAString *aName);
1123     nsresult GetSize(PRInt32 *aSize);
1124     nsresult SetSize(PRInt32 aSize);
1125     nsresult GetTabIndex(PRInt32 *aTabIndex);
1126     nsresult SetTabIndex(PRInt32 aTabIndex);
1127     nsresult Add(nsIDOMHTMLElement *element, nsIDOMHTMLElement *before);
1128     nsresult Remove(PRInt32 index);
1129     nsresult Blur();
1130     nsresult Focus();
1131 }
1132
1133 [
1134     object,
1135     uuid(a6cf9094-15b3-11d2-932e-00805f8add32)
1136     /* FROZEN */
1137 ]
1138 interface nsIDOMHTMLTextAreaElement : nsIDOMHTMLElement
1139 {
1140     nsresult GetDefaultValue(nsAString *aDefaultValue);
1141     nsresult SetDefaultValue(const nsAString *aDefaultValue);
1142     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
1143     nsresult GetAccessKey(nsAString *aAccessKey);
1144     nsresult SetAccessKey(const nsAString *aAccessKey);
1145     nsresult GetCols(PRInt32 *aCols);
1146     nsresult SetCols(PRInt32 aCols);
1147     nsresult GetDisabled(PRBool *aDisabled);
1148     nsresult SetDisabled(PRBool aDisabled);
1149     nsresult GetName(nsAString *aName);
1150     nsresult SetName(const nsAString *aName);
1151     nsresult GetReadOnly(PRBool *aReadOnly);
1152     nsresult SetReadOnly(PRBool aReadOnly);
1153     nsresult GetRows(PRInt32 *aRows);
1154     nsresult SetRows(PRInt32 aRows);
1155     nsresult GetTabIndex(PRInt32 *aTabIndex);
1156     nsresult SetTabIndex(PRInt32 aTabIndex);
1157     nsresult GetType(nsAString *aType);
1158     nsresult GetValue(nsAString *aValue);
1159     nsresult SetValue(const nsAString *aValue);
1160     nsresult Blur();
1161     nsresult Focus();
1162     nsresult Select();
1163 }
1164
1165 [
1166     object,
1167     uuid(94928ab3-8b63-11d3-989d-001083010e9b)
1168     /* FROZEN */
1169 ]
1170 interface nsIURIContentListener : nsISupports
1171 {
1172     nsresult OnStartURIOpen(nsIURI *aURI, PRBool *_retval);
1173     nsresult DoContent(const char *aContentType, PRBool aIsContentPreferred, nsIRequest *aRequest,
1174         nsIStreamListener **aContentHandler, PRBool *_retval);
1175     nsresult IsPreferred(const char *aContentType, char **aDesiredContentType, PRBool *_retval);
1176     nsresult CanHandleContent(const char *aContentType, PRBool aIsContentPreferred,
1177         char **aDesiredContentType, PRBool *_retval);
1178     nsresult GetLoadCookie(nsISupports **aLoadCookie);
1179     nsresult SetLoadCookie(nsISupports *aLoadCookie);
1180     nsresult GetParentContentListener(nsIURIContentListener **aParentContentListener);
1181     nsresult SetParentContentListener(nsIURIContentListener *aParentContentListener);
1182 }
1183
1184 [
1185     object,
1186     uuid(44b78386-1dd2-11b2-9ad2-e4eee2ca1916)
1187     /* FROZEN */
1188 ]
1189 interface nsITooltipListener : nsISupports
1190 {
1191     nsresult OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText);
1192     nsresult OnHideTooltip();
1193 }
1194
1195 [
1196     object,
1197     uuid(69e5df00-7b8b-11d3-af61-00a024ffc08c)
1198     /* FROZEN */
1199 ]
1200 interface nsIWebBrowser : nsISupports
1201 {
1202     nsresult AddWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
1203     nsresult RemoveWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
1204     nsresult GetContainerWindow(nsIWebBrowserChrome **aContainerWindow);
1205     nsresult SetContainerWindow(nsIWebBrowserChrome *aContainerWindow);
1206     nsresult GetParentURIContentListener(nsIURIContentListener **aParentURIContentListener);
1207     nsresult SetParentURIContentListener(nsIURIContentListener *aParentURIContentListener);
1208     nsresult GetContentDOMWindow(nsIDOMWindow **aContentDOMWindow);
1209 }
1210
1211 cpp_quote("#define SETUP_IS_CHROME_WRAPPER 7");
1212
1213 [
1214     object,
1215     uuid(f15398a0-8018-11d3-af70-00a024ffc08c)
1216     /* FROZEN */
1217 ]
1218 interface nsIWebBrowserSetup : nsISupports
1219 {
1220     nsresult SetProperty(PRUint32 aId, PRUint32 aValue);
1221 }
1222
1223 typedef void* nativeWindow;
1224
1225 [
1226     object,
1227     uuid(046bc8a0-8015-11d3-af70-00a024ffc08c)
1228     /* NOT_FROZEN */
1229 ]
1230 interface nsIBaseWindow : nsISupports
1231 {
1232     nsresult InitWindow(nativeWindow parentNativeWindow, nsIWidget *parentWidget, PRInt32 x,
1233             PRInt32 y, PRInt32 cx, PRInt32 cy);
1234     nsresult Create();
1235     nsresult Destroy();
1236     nsresult SetPosition(PRInt32 x, PRInt32 y);
1237     nsresult GetPosition(PRInt32 *x, PRInt32 *y);
1238     nsresult SetSize(PRInt32 cx, PRInt32 cy, PRBool fRepaint);
1239     nsresult GetSize(PRInt32 *cx, PRInt32 *cy);
1240     nsresult SetPositionAndSize(PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy, PRBool fRepaint);
1241     nsresult GetPositionAndSize(PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy);
1242     nsresult Repaint(PRBool force);
1243     nsresult GetParentWidget(nsIWidget **aParentWidget); 
1244     nsresult SetParentWidget(nsIWidget *aParentWidget);
1245     nsresult GetParentNativeWindow(nativeWindow *aParentNativeWindow);
1246     nsresult SetParentNativeWindow(nativeWindow aParentNativeWindow);
1247     nsresult GetVisibility(PRBool *aVisibility);
1248     nsresult SetVisibility(PRBool aVisibility);
1249     nsresult GetEnabled(PRBool *aEnabled);
1250     nsresult SetEnabled(PRBool aEnabled);
1251     nsresult GetBlurSuppression(PRBool *aBlurSuppression);
1252     nsresult SetBlurSuppression(PRBool aBlurSuppression);
1253     nsresult GetMainWidget(nsIWidget **aMainWidget);
1254     nsresult SetFocus();
1255     nsresult GetTitle(PRUnichar **aTitle);
1256     nsresult SetTitle(const PRUnichar *aTitle);
1257 }
1258
1259 cpp_quote("#define LOAD_FLAGS_NONE 0");
1260
1261 [
1262     object,
1263     uuid(f5d9e7b0-d930-11d3-b057-00a024ffc08c)
1264     /* NOT_FROZEN */
1265 ]
1266 interface nsIWebNavigation : nsISupports
1267 {
1268     nsresult GetCanGoBack(PRBool *aCanGoBack);
1269     nsresult GetCanGoForward(PRBool *aCanGoForward);
1270     nsresult GoBack();
1271     nsresult GoForward();
1272     nsresult GotoIndex(PRInt32 index);
1273     nsresult LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer,
1274             nsIInputStream *aPostData, nsIInputStream *aHeaders);
1275     nsresult Reload(PRUint32 aReloadFlags);
1276     nsresult Stop(PRUint32 aStopFlags);
1277     nsresult GetDocument(nsIDOMDocument **aDocument);
1278     nsresult GetCurrentURI(nsIURI **aCurrentURI);
1279     nsresult GetReferringURI(nsIURI **aReferringURI);
1280     nsresult GetSessionHistory(nsISHistory **aSessionHistory);
1281     nsresult SetSessionHistory(nsISHistory *aSessionHistory);
1282 }
1283
1284 [
1285     object,
1286     uuid(f1094df6-ce0e-42c9-9847-2f663172c38d)
1287     /* NOT_FROZEN */
1288 ]
1289 interface nsIPrintSettings : nsISupports
1290 {
1291     typedef struct {} nsMargin;
1292
1293     nsresult SetPrintOptions(PRInt32 aType, PRBool aTurnOnOff);
1294     nsresult GetPrintOptions(PRInt32 aType, PRBool *_retval);
1295     nsresult GetPrintOptionsBits(PRInt32 *_retval);
1296     nsresult GetPageSizeInTwips(PRInt32 *aWidth, PRInt32 *aHeight);
1297     nsresult Clone(nsIPrintSettings **_retval);
1298     nsresult Assign(nsIPrintSettings *aPS);
1299     nsresult GetPrintSession(nsIPrintSession **aPrintSession);
1300     nsresult SetPrintSession(nsIPrintSession *aPrintSession);
1301     nsresult GetStartPageRange(PRInt32 *aStartPageRange);
1302     nsresult SetStartPageRange(PRInt32 aStartPageRange);
1303     nsresult GetEndPageRange(PRInt32 *aEndPageRange);
1304     nsresult SetEndPageRange(PRInt32 aEndPageRange);
1305     nsresult GetMarginTop(double *aMarginTop);
1306     nsresult SetMarginTop(double aMarginTop);
1307     nsresult GetMarginLeft(double *aMarginLeft);
1308     nsresult SetMarginLeft(double aMarginLeft);
1309     nsresult GetMarginBottom(double *aMarginBottom);
1310     nsresult SetMarginBottom(double aMarginBottom);
1311     nsresult GetMarginRight(double *aMarginRight);
1312     nsresult SetMarginRight(double aMarginRight);
1313     nsresult GetScaling(double *aScaling);
1314     nsresult SetScaling(double aScaling);
1315     nsresult GetPrintBGColors(PRBool *aPrintBGColors);
1316     nsresult SetPrintBGColors(PRBool aPrintBGColors);
1317     nsresult GetPrintBGImages(PRBool *aPrintBGImages);
1318     nsresult SetPrintBGImages(PRBool aPrintBGImages);
1319     nsresult GetPrintRange(PRInt16 *aPrintRange);
1320     nsresult SetPrintRange(PRInt16 aPrintRange);
1321     nsresult GetTitle(PRUnichar **aTitle);
1322     nsresult SetTitle(const PRUnichar *aTitle);
1323     nsresult GetDocURL(PRUnichar **aDocURL);
1324     nsresult SetDocURL(const PRUnichar *aDocURL);
1325     nsresult GetHeaderStrLeft(PRUnichar **aHeaderStrLeft);
1326     nsresult SetHeaderStrLeft(const PRUnichar *aHeaderStrLeft);
1327     nsresult GetHeaderStrCenter(PRUnichar **aHeaderStrCenter);
1328     nsresult SetHeaderStrCenter(const PRUnichar *aHeaderStrCenter);
1329     nsresult GetHeaderStrRight(PRUnichar **aHeaderStrRight);
1330     nsresult SetHeaderStrRight(const PRUnichar *aHeaderStrRight);
1331     nsresult GetFooterStrLeft(PRUnichar **aFooterStrLeft);
1332     nsresult SetFooterStrLeft(const PRUnichar *aFooterStrLeft);
1333     nsresult GetFooterStrCenter(PRUnichar **aFooterStrCenter);
1334     nsresult SetFooterStrCenter(const PRUnichar *aFooterStrCenter);
1335     nsresult GetFooterStrRight(PRUnichar **aFooterStrRight);
1336     nsresult SetFooterStrRight(const PRUnichar *aFooterStrRight);
1337     nsresult GetHowToEnableFrameUI(PRInt16 *aHowToEnableFrameUI);
1338     nsresult SetHowToEnableFrameUI(PRInt16 aHowToEnableFrameUI);
1339     nsresult GetIsCancelled(PRBool *aIsCancelled);
1340     nsresult SetIsCancelled(PRBool aIsCancelled);
1341     nsresult GetPrintFrameTypeUsage(PRInt16 *aPrintFrameTypeUsage);
1342     nsresult SetPrintFrameTypeUsage(PRInt16 aPrintFrameTypeUsage);
1343     nsresult GetPrintFrameType(PRInt16 *aPrintFrameType);
1344     nsresult SetPrintFrameType(PRInt16 aPrintFrameType);
1345     nsresult GetPrintSilent(PRBool *aPrintSilent);
1346     nsresult SetPrintSilent(PRBool aPrintSilent);
1347     nsresult GetShrinkToFit(PRBool *aShrinkToFit);
1348     nsresult SetShrinkToFit(PRBool aShrinkToFit);
1349     nsresult GetShowPrintProgress(PRBool *aShowPrintProgress);
1350     nsresult SetShowPrintProgress(PRBool aShowPrintProgress);
1351     nsresult GetPaperName(PRUnichar **aPaperName);
1352     nsresult SetPaperName(const PRUnichar *aPaperName);
1353     nsresult GetPaperSizeType(PRInt16 *aPaperSizeType);
1354     nsresult SetPaperSizeType(PRInt16 aPaperSizeType);
1355     nsresult GetPaperData(PRInt16 *aPaperData);
1356     nsresult SetPaperData(PRInt16 aPaperData);
1357     nsresult GetPaperWidth(double *aPaperWidth);
1358     nsresult SetPaperWidth(double aPaperWidth);
1359     nsresult GetPaperHeight(double *aPaperHeight);
1360     nsresult SetPaperHeight(double aPaperHeight);
1361     nsresult GetPaperSizeUnit(PRInt16 *aPaperSizeUnit);
1362     nsresult SetPaperSizeUnit(PRInt16 aPaperSizeUnit);
1363     nsresult GetPlexName(PRUnichar **aPlexName);
1364     nsresult SetPlexName(const PRUnichar *aPlexName);
1365     nsresult GetColorspace(PRUnichar **aColorspace);
1366     nsresult SetColorspace(const PRUnichar *aColorspace);
1367     nsresult GetResolutionName(PRUnichar **aResolutionName);
1368     nsresult SetResolutionName(const PRUnichar aResolutionName);
1369     nsresult GetDownloadFonts(PRBool *aDownloadFonts);
1370     nsresult SetDownloadFonts(PRBool aDownloadFonts);
1371     nsresult GetPrintReversed(PRBool *aPrintReversed);
1372     nsresult SetPrintReversed(PRBool aPrintReversed);
1373     nsresult GetPrintInColor(PRBool *aPrintInColor);
1374     nsresult SetPrintInColor(PRBool aPrintInColor);
1375     nsresult GetPaperSize(PRInt32 *aPaperSize);
1376     nsresult SetPaperSize(PRInt32 aPaperSize);
1377     nsresult GetOrientation(PRInt32 *aOrientation);
1378     nsresult SetOrientation(PRInt32 aOrientation);
1379     nsresult GetPrintCommand(PRUnichar **aPrintCommand);
1380     nsresult SetPrintCommand(const PRUnichar *aPrintCommand);
1381     nsresult GetNumCopies(PRInt32 *aNumCopies);
1382     nsresult SetNumCopies(PRInt32 aNumCopies);
1383     nsresult GetPrinterName(PRUnichar **aPrinterName);
1384     nsresult SetPrinterName(const PRUnichar *aPrinterName);
1385     nsresult GetPrintToFile(PRBool *aPrintToFile);
1386     nsresult SetPrintToFile(PRBool aPrintToFile);
1387     nsresult GetToFileName(PRUnichar **aToFileName);
1388     nsresult SetToFileName(const PRUnichar *aToFileName);
1389     nsresult GetPrintPageDelay(PRInt32 *aPrintPageDelay);
1390     nsresult SetPrintPageDelay(PRInt32 aPrintPageDelay);
1391     nsresult GetIsInitializedFromPrinter(PRBool *aIsInitializedFromPrinter);
1392     nsresult SetIsInitializedFromPrinter(PRBool aIsInitializedFromPrinter);
1393     nsresult GetIsInitializedFromPrefs(PRBool *aIsInitializedFromPrefs);
1394     nsresult SetIsInitializedFromPrefs(PRBool aIsInitializedFromPrefs);
1395     nsresult SetMarginInTwips(nsMargin *aMargin);
1396     nsresult GetMarginInTwips(nsMargin *aMargin);
1397 }
1398
1399 [
1400     object,
1401     uuid(9a7ca4b0-fbba-11d4-a869-00105a183419)
1402     /* FROZEN */
1403 ]
1404 interface nsIWebBrowserPrint : nsISupports
1405 {
1406     nsresult GetGlobalPrintSettings(nsIPrintSettings **aGlobalPrintSettings);
1407     nsresult GetCurrentPrintSettings(nsIPrintSettings **aCurrentPrintSettings);
1408     nsresult GetCurrentChildDOMWindow(nsIDOMWindow **aCurrentChildDOMWindow);
1409     nsresult GetDoingPrint(PRBool *aDoingPrint);
1410     nsresult GetDoingPrintPreview(PRBool *aDoingPrintPreview);
1411     nsresult GetIsFramesetDocument(PRBool *aIsFramesetDocument);
1412     nsresult GetIsFramesetFrameSelected(PRBool *aIsFramesetFrameSelected);
1413     nsresult GetIsIFrameSelected(PRBool *aIsIFrameSelected);
1414     nsresult GetIsRangeSelection(PRBool *aIsRangeSelection);
1415     nsresult GetPrintPreviewNumPages(PRInt32 *aPrintPreviewNumPages);
1416     nsresult Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener);
1417     nsresult PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin,
1418                           nsIWebProgressListener *aWPListener);
1419     nsresult PrintPreviewNavigate(PRInt16 aNavType, PRInt32 aPageNum);
1420     nsresult Cancel();
1421     nsresult EnumerateDocumentNames(PRUint32 *aCount, PRUnichar ***aResult);
1422     nsresult ExitPrintPreview();
1423 }
1424
1425 [
1426     object,
1427     uuid(919e792a-6490-40b8-bba5-f9e9ad5640c8)
1428     /* NOT_FROZEN */
1429 ]
1430 interface nsIScrollable : nsISupports
1431 {
1432     enum {
1433         ScrollOrientation_X = 1,
1434         ScrollOrientation_Y = 2
1435     };
1436
1437     enum {
1438         Scrollbar_Auto   = 1,
1439         Scrollbar_Never  = 2,
1440         Scrollbar_Always = 3
1441     };
1442
1443     nsresult GetCurScrollPos(PRInt32 scrollOrientation, PRInt32 *curPos);
1444     nsresult SetCurScrollPos(PRInt32 scrollOrientation, PRInt32 curPos);
1445     nsresult SetCurScrollPosEx(PRInt32 curHorizontalPos, PRInt32 curVerticalPos);
1446     nsresult GetScrollRange(PRInt32 scrollOrientation, PRInt32 *minPos, PRInt32 *maxPos);
1447     nsresult SetScrollRange(PRInt32 scrollOrientation, PRInt32 minPos, PRInt32 maxPos);
1448     nsresult SetScrollRangeEx(PRInt32 minHorizontalPos, PRInt32 maxHorizontalPos,
1449             PRInt32 minVerticalPos, PRInt32 maxVerticalPos);
1450     nsresult GetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 *scrollbarPref);
1451     nsresult SetDefaultScrollbarPreferences(PRInt32 scrollOrientation, PRInt32 scrollbarPref);
1452     nsresult GetScrollbarVisibility(PRBool *verticalVisible, PRBool *horizontalVisible);
1453 }
1454
1455 [
1456     object,
1457     uuid(c8c0a080-0868-11d3-915f-d9d889d48e3c)
1458     /* FROZEN */
1459 ]
1460 interface nsIFile : nsISupports
1461 {
1462     nsresult Append(const nsAString *node);
1463     nsresult AppendNative(const nsAString *node);
1464     nsresult Normalize();
1465     nsresult Create(PRUint32 type, PRUint32 permission);
1466     nsresult GetLeafName(nsAString *aLeafName);
1467     nsresult SetLeafName(const nsAString *aLeafName);
1468     nsresult GetNativeLeafName(nsAString *aLeafName);
1469     nsresult SetNativeLeafName(const nsAString *aLeafName);
1470     nsresult CopyTo(nsIFile *newParentDir, const nsAString *newName);
1471     nsresult CopyToNative(nsIFile *newParentDir, const nsAString *newName);
1472     nsresult CopyToFollowingLinks(nsIFile *newParentDir, const nsAString *newName);
1473     nsresult CopyToFollowingLinksNative(nsIFile *newParentDir, const nsAString *newName);
1474     nsresult MoveTo(nsIFile *newParentDir, const nsAString *newName);
1475     nsresult MoveToNative(nsIFile *newParentDir, const nsAString *newName);
1476     nsresult Remove(PRBool recursive);
1477     nsresult GetPermissions(PRUint32 *aPermissions);
1478     nsresult SetPermissions(PRUint32 pPermissions);
1479     nsresult GetPermissionsOfLink(PRUint32 *aPermissions);
1480     nsresult SetPermissionsOfLink(PRUint32 pPermissions);
1481     nsresult GetLastModifiedTime(PRInt64 *aLastModifiedTime);
1482     nsresult SetLastModifiedTime(PRInt64 aLastModifiedTime);
1483     nsresult GetFileSize(PRInt64 *aFileSize);
1484     nsresult SetFileSize(PRInt64 aFileSize);
1485     nsresult GetFileSizeOfLink(PRInt64 *aFileSizeOfLink);
1486     nsresult GetTarget(nsAString *aTarget);
1487     nsresult GetNativeTarget(nsACString *aNativeTarget);
1488     nsresult GetPath(nsAString *aPath);
1489     nsresult GetNativePath(nsACString *aNativePath);
1490     nsresult Exists(PRBool *_retval);
1491     nsresult IsWritable(PRBool *_retval);
1492     nsresult IsReadable(PRBool *_retval);
1493     nsresult IsExecutable(PRBool *_retval);
1494     nsresult IsHidden(PRBool *_retval);
1495     nsresult IsDirectory(PRBool *_retval);
1496     nsresult IsFile(PRBool *_retval);
1497     nsresult IsSymlink(PRBool *_retval);
1498     nsresult IsSpecial(PRBool *_retval);
1499     nsresult CreateUnique(PRUint32 type, PRUint32 permission);
1500     nsresult Clone(nsIFile **_retval);
1501     nsresult Equals(nsIFile *inFile, PRBool *_retval);
1502     nsresult Contains(nsIFile *inFile, PRBool recir, PRBool *_retval);
1503     nsresult GetParent(nsIFile **aParent);
1504     nsresult GetDirectoryEntries(nsISimpleEnumerator **aDirectoryEntries);
1505 }
1506
1507 [
1508     object,
1509     uuid(56c35506-f14b-11d3-99d3-ddbfac2ccf65)
1510     /* FROZEN */
1511 ]
1512 interface nsIPrefBranch : nsISupports
1513 {
1514     nsresult GetRoot(char **aRoot);
1515     nsresult GetPrefType(const char *aPrefName, PRInt32 *_retval);
1516     nsresult GetBoolPref(const char *aPrefName, PRBool *_retval);
1517     nsresult SetBoolPref(const char *aPrefName, PRInt32 aValue);
1518     nsresult GetCharPref(const char *aPrefName, char **_retval);
1519     nsresult SetCharPref(const char *aPrefName, const char *aValue);
1520     nsresult GetIntPref(const char *aPrefName, PRInt32 *_retval);
1521     nsresult SetIntPref(const char *aPrefName, PRInt32 aValue);
1522     nsresult GetComplexValue(const char *aPrefName, const nsIID *aType, void **aValue);
1523     nsresult SetComplexValue(const char *aPrefName, const nsIID *aType, nsISupports *aValue);
1524     nsresult ClearUserPref(const char *aPrefName);
1525     nsresult LockPref(const char *aPrefName);
1526     nsresult PrefHasUserValue(const char *aPrefName, PRBool *_retval);
1527     nsresult PrefIsLocked(const char *aPrefName, PRBool *_retval);
1528     nsresult UnlockPref(const char *aPrefName);
1529     nsresult DeleteBranch(const char *aStartingAt);
1530     nsresult GetChildList(const char *aStartingAt, PRUint32 *aCount, char ***aChildArray);
1531     nsresult ResetBranch(const char *aStartingAt);
1532 }
1533
1534 [
1535     object,
1536     uuid(15fd6940-8ea7-11d3-93ad-00104ba0fd40)
1537     /* FROZEN */
1538 ]
1539 interface nsIProtocolHandler : nsISupports
1540 {
1541     nsresult GetScheme(nsACString *aScheme);
1542     nsresult GetDefaultPort(PRInt32 *aDefaultPort);
1543     nsresult GetProtocolFlags(PRUint32 *aProtocolFlags);
1544     nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset,
1545                     nsIURI *aBaseURI, nsIURI **_retval);
1546     nsresult NewChannel(nsIURI *aURI, nsIChannel **_retval);
1547     nsresult AllowPort(PRInt32 port, const char *scheme, PRBool *_retval);
1548 }
1549
1550 [
1551     object,
1552     uuid(0e61f3b2-34d7-4c79-bfdc-4860bc7341b7)
1553     /* NOT_FROZEN */
1554 ]
1555 interface nsIExternalProtocolHandler : nsIProtocolHandler
1556 {
1557     nsresult ExternalAppExistsForScheme(const nsACString *scheme, PRBool *_retval);
1558 }
1559
1560 [
1561     object,
1562     uuid(bddeda3f-9020-4d12-8c70-984ee9f7935e)
1563     /* FROZEN */
1564 ]
1565 interface nsIIOService : nsISupports
1566 {
1567     nsresult GetProtocolHandler(const char *aScheme, nsIProtocolHandler **_retval);
1568     nsresult GetProtocolFlags(const char *aScheme, PRUint32 *_retval);
1569     nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
1570                     nsIURI **_retval);
1571     nsresult NewFileURI(nsIFile *aFile, nsIURI **_retval);
1572     nsresult NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval);
1573     nsresult NewChannel(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
1574                         nsIChannel **_retval);
1575     nsresult GetOffline(PRBool *aOffline);
1576     nsresult SetOffline(PRBool aOffline);
1577     nsresult AllowPort(PRInt32 aPort, const char *aScheme, PRBool *_retval);
1578     nsresult ExtractScheme(const nsACString *urlString, nsACString * _retval);
1579 }
1580
1581 [
1582     object,
1583     uuid(9c5d3c58-1dd1-11b2-a1c9-f3699284657a)
1584     /* FROZEN */
1585 ]
1586 interface nsIWebBrowserFocus : nsISupports
1587 {
1588     nsresult Activate();
1589     nsresult Deactivate();
1590     nsresult SetFocusAtFirstElement();
1591     nsresult SetFocusAtLastElement();
1592     nsresult GetFocusedWindow(nsIDOMWindow **aFocusedWindow);
1593     nsresult SetFocusedWindow(nsIDOMWindow *aFocusedWindow);
1594     nsresult GetFocusedElement(nsIDOMElement **aFocusedElement);
1595     nsresult SetFocusedElement(nsIDOMElement *aFocusedElement);
1596 }
1597
1598 [
1599     object,
1600     uuid(ba434c60-9d52-11d3-afb0-00a024ffc08c)
1601     /* FROZEN */
1602 ]
1603 interface nsIWebBrowserChrome : nsISupports
1604 {
1605     nsresult SetStatus(PRUint32 statusType, const PRUnichar *status);
1606     nsresult GetWebBrowser(nsIWebBrowser **aWebBrowser);
1607     nsresult SetWebBrowser(nsIWebBrowser *aWebBrowser);
1608     nsresult GetChromeFlags(PRUint32 *aChromeFlags);
1609     nsresult SetChromeFlags(PRUint32 aChromeFlags);
1610     nsresult DestroyBrowserWindow();
1611     nsresult SizeBrowserTo(PRInt32 aCX, PRInt32 aCY);
1612     nsresult ShowAsModal();
1613     nsresult IsWindowModal(PRBool *_retval);
1614     nsresult ExitModalEventLoop(nsresult aStatus);
1615 }
1616
1617 [
1618     object,
1619     uuid(df31c120-ded6-11d1-bd85-00805f8ae3f4)
1620     /* FROZEN */
1621 ]
1622 interface nsIDOMEventListener : nsISupports
1623 {
1624     nsresult HandleEvent(nsIDOMEvent *event);
1625 }
1626
1627 [
1628     object,
1629     uuid(1c773b30-d1cf-11d2-bd95-00805f8ae3f4)
1630     /* FROZEN */
1631 ]
1632 interface nsIDOMEventTarget : nsISupports
1633 {
1634     nsresult AddEventListener(const nsAString *type, nsIDOMEventListener *listener, PRBool useCapture);
1635     nsresult RemoveEventListener(const nsAString *type, nsIDOMEventListener *listener, PRBool useCapture);
1636     nsresult DispatchEvent(nsIDOMEvent *evt, PRBool *_retval);
1637 }
1638
1639 [
1640     object,
1641     uuid(a66b7b80-ff46-bd97-0080-5f8ae38add32)
1642     /* FROZEN */
1643 ]
1644 interface nsIDOMEvent : nsISupports
1645 {
1646     nsresult GetType(nsAString *aType);
1647     nsresult GetTarget(nsIDOMEventTarget **aTarget);
1648     nsresult GetCurrentTarget(nsIDOMEventTarget **aCurrentTarget);
1649     nsresult GetEventPhase(PRUint16 *aEventPhase);
1650     nsresult GetBubbles(PRBool *aBubbles);
1651     nsresult GetCancelable(PRBool *aCancelable);
1652     nsresult GetTimeStamp(DOMTimeStamp *aTimeStamp);
1653     nsresult StopPropagation();
1654     nsresult PreventDefault();
1655     nsresult InitEvent(const nsAString *eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg);
1656 }
1657
1658 cpp_quote("#define CONTEXT_NONE              0x00");
1659 cpp_quote("#define CONTEXT_LINK              0x01");
1660 cpp_quote("#define CONTEXT_IMAGE             0x02");
1661 cpp_quote("#define CONTEXT_DOCUMENT          0x04");
1662 cpp_quote("#define CONTEXT_TEXT              0x08");
1663 cpp_quote("#define CONTEXT_INPUT             0x10");
1664 cpp_quote("#define CONTEXT_BACKGROUND_IMAGE  0x20");
1665
1666 [
1667     object,
1668     uuid(3478b6b0-3875-11d4-94ef-0020183bf181)
1669     /* FROZEN */
1670 ]
1671 interface nsIContextMenuListener : nsISupports
1672 {
1673     nsresult OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode);
1674 }
1675
1676 [
1677     object,
1678     uuid(a6cf90c3-15b3-11d2-932e-00805f8add32)
1679     /* FROZEN */
1680 ]
1681 interface nsIDOMUIEvent : nsIDOMEvent
1682 {
1683     nsresult GetView(nsIDOMAbstractView **aView);
1684     nsresult GetDetail(PRInt32 *aDetail);
1685     nsresult InitUIEvent(const nsAString *typeArg, PRBool canBubbleArg, PRBool cancelableArg,
1686             nsIDOMAbstractView *viewArg, PRInt32 detailArg);
1687 }
1688
1689 [
1690     object,
1691     uuid(ff751edc-8b02-aae7-0010-8301838a3123)
1692     /* FROZEN */
1693 ]
1694 interface nsIDOMMouseEvent : nsIDOMUIEvent
1695 {
1696     nsresult GetScreenX(PRInt32 *aScreenX);
1697     nsresult GetScreenY(PRInt32 *aScreenY);
1698     nsresult GetClientX(PRInt32 *aClientX);
1699     nsresult GetClientY(PRInt32 *aClientY);
1700     nsresult GetCtrlKey(PRBool *aCtrlKey);
1701     nsresult GetShiftKey(PRBool *aShiftKey);
1702     nsresult GetAltKey(PRBool *aAltKey);
1703     nsresult GetMetaKey(PRBool *aMetaKey);
1704     nsresult GetButton(PRUint16 *aButton);
1705     nsresult GetRelatedTarget(nsIDOMEventTarget * *aRelatedTarget);
1706     nsresult InitMouseEvent(const nsAString *typeArg, PRBool canBubbleArg, PRBool cancelableArg,
1707             nsIDOMAbstractView *viewArg, PRInt32 detailArg, PRInt32 screenXArg, PRInt32 screenYArg,
1708             PRInt32 clientXArg, PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg,
1709             PRBool shiftKeyArg, PRBool metaKeyArg, PRUint16 buttonArg,
1710             nsIDOMEventTarget *relatedTargetArg);
1711 }
1712
1713 [
1714     object,
1715     uuid(028e0e6e-8b01-11d3-aae7-0010838a3123)
1716     /* NOT_FROZEN */
1717 ]
1718 interface nsIDOMKeyEvent : nsIDOMUIEvent
1719 {
1720     nsresult GetCharCode(PRUint32 *aCharCode);
1721     nsresult GetKeyCode(PRUint32 *aKeyCode);
1722     nsresult GetAltKey(PRBool *aAltKey);
1723     nsresult GetCtrlKey(PRBool *aCtrlKey);
1724     nsresult GetShiftKey(PRBool *aShiftKey);
1725     nsresult GetMetaKey(PRBool *aMetaKey);
1726     nsresult InitKeyEvent(const nsAString *typeArg, PRBool canBubbleArg,
1727             PRBool cancelableArg, nsIDOMAbstractView *viewArg, PRBool ctrlKeyArg,
1728             PRBool altKeyArg, PRBool shiftKeyArg, PRBool metaKeyArg, PRUint32 keyCodeArg,
1729             PRUint32 charCodeArg);
1730 }
1731
1732 [
1733      object,
1734      uuid(3e5432cd-9568-4bd1-8cbe-d50aba110743)
1735      /* FROZEN */
1736 ]
1737 interface nsIEmbeddingSiteWindow : nsISupports
1738 {
1739     nsresult SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy);
1740     nsresult GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy);
1741     nsresult SetFocus();
1742     nsresult GetVisibility(PRBool *aVisibility);
1743     nsresult SetVisibility(PRBool aVisibility);
1744     nsresult GetTitle(PRUnichar **aTitle);
1745     nsresult SetTitle(const PRUnichar *aTitle);
1746     nsresult GetSiteWindow(void **aSiteWindow);
1747 }
1748
1749 [
1750      object,
1751      uuid(2417cbfe-65ad-48a6-b4b6-eb84db174392)
1752      /* FROZEN */
1753 ]
1754 interface nsIComponentRegistrar : nsISupports
1755 {
1756     nsresult AutoRegister(nsIFile *aSpec);
1757     nsresult AutoUnregister(nsIFile *aSpec);
1758     nsresult RegisterFactory(const nsCID *aClass, const char *aClassName,
1759             const char *aContractID, nsIFactory *aFactory);
1760     nsresult UnregisterFactory(const nsCID *aClass, nsIFactory *aFactory);
1761     nsresult RegisterFactoryLocation(const nsCID *aClass, const char *aClassName,
1762             const char *aContractID, nsIFile *aFile, const char *aLoaderStr,
1763             const char *aType);
1764     nsresult UnregisterFactoryLocation(const nsCID *aClass, nsIFile *aFile);
1765     nsresult IsCIDRegistered(const nsCID *aClass, PRBool *_retval);
1766     nsresult IsContractIDRegistered(const char *aContractID, PRBool *_retval);
1767     nsresult EnumerateCIDs(nsISimpleEnumerator **_retval);
1768     nsresult EnumerateContractIDs(nsISimpleEnumerator **_retval);
1769     nsresult CIDToContractID(const nsCID *aClass, char **_retval);
1770     nsresult ContractIDToCID(const char *aContractID, nsCID **_retval);
1771 }
1772
1773 [
1774     object,
1775     uuid(1630c61a-325e-49ca-8759-a31b16c47aa5)
1776     /* FROZEN */
1777 ]
1778 interface nsIPromptService : nsISupports
1779 {
1780     nsresult Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1781             const PRUnichar *aText);
1782     nsresult AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1783             const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState);
1784     nsresult Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1785             const PRUnichar *aText, PRBool *_retval);
1786     nsresult ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1787             const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState,
1788             PRBool *_retval);
1789     nsresult ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1790             const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title,
1791             const PRUnichar *aButton1Title, const PRUnichar *aButton2Title,
1792             const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval);
1793     nsresult Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1794             const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg,
1795             PRBool *aCheckState, PRBool *_retval);
1796     nsresult PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1797             const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword,
1798             const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval);
1799     nsresult PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1800             const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg,
1801             PRBool *aCheckState, PRBool *_retval);
1802     nsresult Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1803             const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList,
1804             PRInt32 *aOutSelection, PRBool *_retval);
1805 }
1806
1807 [
1808     object,
1809     uuid(b128a1e6-44f3-4331-8fbe-5af360ff21ee)
1810     /* FROZEN */
1811 ]
1812 interface nsITooltipTextProvider : nsISupports
1813 {
1814     nsresult GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval);
1815 }
1816
1817 [
1818     object,
1819     uuid(02b0625a-e7f3-11d2-9f5a-006008a6efe9)
1820     /* FROZEN */
1821 ]
1822 interface nsIProfile : nsISupports
1823 {
1824     nsresult GetProfileCount(PRInt32 *aProfileCount);
1825     nsresult GetProfileList(PRUint32 *length, PRUnichar ***profileNames);
1826     nsresult ProfileExists(const PRUnichar *profileName, PRBool *_retval);
1827     nsresult GetCurrentProfile(PRUnichar * *aCurrentProfile);
1828     nsresult SetCurrentProfile(const PRUnichar * aCurrentProfile);
1829     nsresult ShutDownCurrentProfile(PRUint32 shutDownType);
1830     nsresult CreateNewProfile(const PRUnichar *profileName,
1831             const PRUnichar *nativeProfileDir, const PRUnichar *langcode,
1832             PRBool useExistingDir);
1833     nsresult RenameProfile(const PRUnichar *oldName, const PRUnichar *newName);
1834     nsresult DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles);
1835     nsresult CloneProfile(const PRUnichar *profileName);
1836 }
1837
1838 [
1839     object,
1840     uuid(30465632-a777-44cc-90f9-8145475ef999)
1841     /* FROZEN */
1842 ]
1843 interface nsIWindowCreator : nsISupports
1844 {
1845     nsresult CreateChromeWindow(nsIWebBrowserChrome *parent, PRUint32 chromeFlags,
1846                                    nsIWebBrowserChrome **_retval);
1847 }
1848
1849 [
1850     object,
1851     uuid(f673ec81-a4b0-11d6-964b-eb5a2bf216fc)
1852     /* NOT_FROZEN */
1853 ]
1854 interface nsIWindowCreator2 : nsIWindowCreator
1855 {
1856     nsresult CreateChromeWindow2(nsIWebBrowserChrome *parent, PRUint32 chromeFlags,
1857                                  PRUint32 contextFlags, nsIURI *uri, PRBool *cancel,
1858                                  nsIWebBrowserChrome **_retval);
1859 }
1860
1861 [
1862     object,
1863     uuid(002286a8-494b-43b3-8ddd-49e3fc50622b)
1864     /* FROZEN */
1865 ]
1866 interface nsIWindowWatcher : nsISupports
1867 {
1868     nsresult OpenWindow(nsIDOMWindow *aParent, const char *aUrl, const char *aName,
1869                         const char *aFeatures, nsISupports *aArguments, nsIDOMWindow **_retval);
1870     nsresult RegisterNotification(nsIObserver *aObserver);
1871     nsresult UnregisterNotification(nsIObserver *aObserver);
1872     nsresult GetWindowEnumerator(nsISimpleEnumerator **_retval);
1873     nsresult GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt **_retval);
1874     nsresult GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuthPrompt **_retval);
1875     nsresult SetWindowCreator(nsIWindowCreator *creator);
1876     nsresult GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome **_retval);
1877     nsresult GetWindowByName(const PRUnichar *aTargetName, nsIDOMWindow *aCurrentWindow,
1878                              nsIDOMWindow **_retval);
1879     nsresult GetActiveWindow(nsIDOMWindow **aActiveWindow);
1880     nsresult SetActiveWindow(nsIDOMWindow *aActiveWindow);
1881 }
1882
1883 [
1884     object,
1885     uuid(d39fd2b4-3978-45d2-a4be-ba448171b61b)
1886     /* NOT_FROZEN */
1887 ]
1888 interface nsIEditingSession : nsISupports
1889 {
1890     nsresult GetEditorStatus(PRUint32 *aEditorStatus);
1891     nsresult MakeWindowEditable(nsIDOMWindow *window, const char *aEditorType,
1892                                 PRBool doAfterUriLoad);
1893     nsresult WindowIsEditable(nsIDOMWindow *window, PRBool *_retval);
1894     nsresult GetEditorForWindow(nsIDOMWindow *window, nsIEditor **_retval);
1895     nsresult SetupEditorOnWindow(nsIDOMWindow *window);
1896     nsresult TearDownEditorOnWindow(nsIDOMWindow *window);
1897     nsresult SetEditorOnControllers(nsIDOMWindow *aWindow, nsIEditor *aEditor);
1898 }
1899
1900 [
1901     object,
1902     uuid(83f892cf-7ed3-490e-967a-62640f3158e1)
1903     /* NOT_FROZEN */
1904 ]
1905 interface nsICommandParams : nsISupports
1906 {
1907     nsresult GetValueType(const char *name, PRInt16 *_retval);
1908     nsresult GetBooleanValue(const char *name, PRBool *_retval);
1909     nsresult GetLongValue(const char *name, PRInt32 *_retval);
1910     nsresult GetDoubleValue(const char *name, double *_retval);
1911     nsresult GetStringValue(const char *name, nsAString *_retval);
1912     nsresult GetCStringValue(const char *name, char **_retval);
1913     nsresult GetISupportsValue(const char *name, nsISupports **_retval);
1914     nsresult SetBooleanValue(const char *name, PRBool value);
1915     nsresult SetLongValue(const char *name, PRInt32 value);
1916     nsresult SetDoubleValue(const char *name, double value);
1917     nsresult SetStringValue(const char *name, const nsAString *value);
1918     nsresult SetCStringValue(const char *name, const char *value);
1919     nsresult SetISupportsValue(const char *name, nsISupports *value);
1920     nsresult RemoveValue(const char *name);
1921     nsresult HasMoreElements(PRBool *_retval);
1922     nsresult First();
1923     nsresult GetNext(char **_retval);
1924 }
1925
1926 [
1927     object,
1928     uuid(080d2001-f91e-11d4-a73c-f9242928207c)
1929     /* NOT_FROZEN */
1930 ]
1931 interface nsICommandManager : nsISupports
1932 {
1933     nsresult AddCommandObserver(nsIObserver *aCommandObserver, const char *aCommandToObserve);
1934     nsresult RemoveCommandObserver(nsIObserver *aCommandObserver, const char *aCommandObserved);
1935     nsresult IsCommandSupported(const char *aCommandName, nsIDOMWindow *aTargetWindow, PRBool *_retval);
1936     nsresult IsCommandEnabled(const char *aCommandName, nsIDOMWindow *aTargetWindow, PRBool *_retval);
1937     nsresult GetCommandState(const char *aCommandName, nsIDOMWindow *aTargetWindow,
1938             nsICommandParams *aCommandParams);
1939     nsresult DoCommand(const char *aCommandName, nsICommandParams *aCommandParams,
1940             nsIDOMWindow *aTargetWindow);
1941 }
1942
1943 [
1944     object,
1945     uuid(47b82b60-a36f-4167-8072-6f421151ed50)
1946     /* NOT_FROZEN */
1947 ]
1948 interface nsIControllerContext : nsISupports
1949 {
1950     nsresult Init(nsIControllerCommandTable *aCommandTable);
1951     nsresult SetCommandContext(nsISupports *aCommandContext);
1952 }
1953
1954 [
1955     object,
1956     uuid(d5b61b82-1da4-11d3-bf87-00105a1b0627)
1957     /* NOT_FROZEN */
1958 ]
1959 interface nsIController : nsISupports
1960 {
1961     nsresult IsCommandEnabled(const char *command, PRBool *_retval);
1962     nsresult SupportsCommand(const char *command, PRBool *_retval);
1963     nsresult DoCommand(const char *command);
1964     nsresult OnEvent(const char *eventName);
1965 }
1966
1967 [
1968     object,
1969     uuid(d650439a-ca29-410d-a906-b0557fb62fcd)
1970     /* NOT_FROZEN */
1971 ]
1972 interface nsIContentSerializer : nsISupports
1973 {
1974     nsresult Init(PRUint32 flags, PRUint32 aWrapColumn, const char* aCharSet, PRBool aIsCopying);
1975     nsresult AppendText(nsIDOMText *aText, PRInt32 aStartOffset, PRInt32 aEndOffset, nsAString *aStr);
1976     nsresult AppendCDATASection(nsIDOMCDATASection *aCDATASection, PRInt32 aStartOffset,
1977             PRInt32 aEndOffset, nsAString *aStr);
1978     nsresult AppendProcessingInstruction(nsIDOMProcessingInstruction* aPI, PRInt32 aStartOffset,
1979             PRInt32 aEndOffset, nsAString *aStr);
1980     nsresult AppendComment(nsIDOMComment *aComment, PRInt32 aStartOffset, PRInt32 aEndOffset,
1981             nsAString *aStr);
1982     nsresult AppendDoctype(nsIDOMDocumentType *aDoctype, nsAString *aStr);
1983     nsresult AppendElementStart(nsIDOMElement *aElement, PRBool aHasChildren, nsAString *aStr);
1984     nsresult AppendElementEnd(nsIDOMElement *aElement, nsAString *aStr);
1985     nsresult Flush(nsAString *aStr);
1986     nsresult AppendDocumentStart(nsIDOMDocument *aDocument, nsAString *aStr);
1987 }
1988
1989 [
1990     object,
1991     uuid(68b97c56-2289-48ac-a9e1-72c30fd3dba2)
1992 ]
1993 interface nsIScriptContainer : nsISupports
1994 {
1995     typedef void *JSObject;
1996
1997     nsresult GetContext(void **aContext);
1998     nsresult GetGlobalObject(void **aGlobalObject);
1999     nsresult CompileScript(const PRUnichar *aText, PRInt32 aTextLength, void *aScopeObject,
2000             nsIPrincipal *aPrincipal, const char *aURL, PRUint32 aLineNo, PRUint32 aVersion, void **_retval);
2001     nsresult ExecuteScript(void *aScriptObject, void *aScopeObject, nsAString *aRetVal, PRBool *aIsUndefined);
2002     nsresult CompileFunction(void *aTarget, const nsACString *aName, PRUint32 aArgCount,
2003             const char **aArgArray, const nsAString *aBody, const char *aURL, PRInt32 aLineNo,
2004             PRBool aShared, void* *_retval);
2005     nsresult CallFunction(nsISupports *aTarget, void *aScope, void *aHandler, nsIArray *argv,
2006             nsIVariant **_retval);
2007     nsresult BindEventHandler(nsISupports *aTarget, void *aScope, nsIAtom *aName, void *aHandler);
2008     nsresult HoldScriptObject(void *aObject);
2009     nsresult DropScriptObject(void *aObject);
2010 }
2011
2012 [
2013     object,
2014     uuid(D4882FFB-E927-408b-96BE-D4391B456FA9)
2015 ]
2016 interface nsIEditor  : nsISupports
2017 {
2018     typedef void *nsIPresShellPtr;
2019     typedef void *nsIContentPtr;
2020
2021     nsresult GetSelection([out] nsISelection *_retval);
2022     nsresult Init([in] nsIDOMDocument *doc, [in] nsIPresShellPtr shell, [in] nsIContentPtr aRoot, [in] nsISelectionController *aSelCon, [in] PRUint32 aFlags);
2023     nsresult SetAttributeOrEquivalent([in] nsIDOMElement *element, [in] const nsAString *sourceAttrName, [in] const nsAString *sourceAttrValue, [in] PRBool aSuppressTransaction);
2024     nsresult RemoveAttributeOrEquivalent([in] nsIDOMElement *element, [in] const nsAString *sourceAttrName, [in] PRBool aSuppressTransaction);
2025     nsresult PostCreate();
2026     nsresult PreDestroy();
2027     nsresult GetFlags([out] PRUint32 *_retval);
2028     nsresult SetFlags([in] PRUint32 val);
2029     nsresult GetContentsMIMEType([out] char **_retval);
2030     nsresult SetContentsMIMEType([in] const char *val);
2031     nsresult GetIsDocumentEditable([out] PRBool *_retval);
2032     nsresult GetDocument([out] nsIDOMDocument **_retval);
2033     nsresult GetRootElement([out] nsIDOMElement **_retval);
2034     nsresult GetSelectionController([out] nsISelectionController **_retval);
2035     nsresult DeleteSelection([in] PRInt16 action);
2036     nsresult GetDocumentIsEmpty([out] PRBool *_retval);
2037     nsresult GetDocumentModified([out] PRBool *_retval);
2038     nsresult GetDocumentCharacterSet([out] nsACString *_retval);
2039     nsresult SetDocumentCharacterSet([in] const nsACString *val);
2040     nsresult ResetModificationCount();
2041     nsresult GetModificationCount([out] PRInt32 *_retval);
2042     nsresult IncrementModificationCount([in] long aModCount);
2043     nsresult GetTransactionManager([out] nsITransactionManager **_retval);
2044     nsresult DoTransaction([in] nsITransaction *txn);
2045     nsresult EnableUndo([in] PRBool enable);
2046     nsresult Undo([in] PRUint32 count);
2047     nsresult CanUndo([out] PRBool *isEnabled, [out] PRBool *canUndo);
2048     nsresult Redo([in] PRUint32 count);
2049     nsresult CanRedo([out] PRBool *isEnabled, [out] PRBool *canRedo);
2050     nsresult BeginTransaction();
2051     nsresult EndTransaction();
2052     nsresult BeginPlaceHolderTransaction([in] nsIAtom *name);
2053     nsresult EndPlaceHolderTransaction();
2054     nsresult ShouldTxnSetSelection([out] PRBool *_retval);
2055     nsresult SetShouldTxnSetSelection([in] PRBool should);
2056     nsresult GetInlineSpellChecker([out] nsIInlineSpellChecker **_retval);
2057     nsresult Cut();
2058     nsresult CanCut([out] PRBool *_retval);
2059     nsresult Copy();
2060     nsresult CanCopy([out] PRBool *_retval);
2061     nsresult Paste([in] PRInt32 aSelectionType);
2062     nsresult CanPaste([in] PRInt32 aSelectionType, [out] PRBool *_retval);
2063     nsresult SelectAll();
2064     nsresult BeginningOfDocument();
2065     nsresult EndOfDocument();
2066     nsresult CanDrag([in] nsIDOMEvent *aEvent, [out] PRBool *_retval);
2067     nsresult DoDrag([in] nsIDOMEvent *aEvent);
2068     nsresult InsertFromDrop([in] nsIDOMEvent *aEvent);
2069     nsresult SetAttribute([in] nsIDOMElement *aElement, [in] const nsAString *attributestr, [in] const nsAString *attvalue);
2070     nsresult GetAttributeValue([in] nsIDOMElement *aElement, [in] const nsAString *attributestr, [out] nsAString *resultValue, PRBool *_retval);
2071     nsresult RemoveAttribute([in] nsIDOMElement *aElement, [in] const nsAString *aAttribute);
2072     nsresult CloneAttribute([in] const nsAString *aAttribute, [in] nsIDOMNode *aDestNode, [in] nsIDOMNode *aSourceNode);
2073     nsresult CloneAttributes([in] nsIDOMNode *destNode, [in] nsIDOMNode *sourceNode);
2074     nsresult CreateNode([in] const nsAString *tag, [in] nsIDOMNode parent, [in] PRInt32 position, [out] nsIDOMNode **_retval);
2075     nsresult InsertNode([in] nsIDOMNode *node, [in] nsIDOMNode *parent, [in] PRInt32 aPosition);
2076     nsresult SplitNode([in] nsIDOMNode *existingRightNode, [in] PRInt32 offset, [out] nsIDOMNode **newLeftNode);
2077     nsresult JoinNodes([in] nsIDOMNode *leftNode, [in] nsIDOMNode *rightNode, [in] nsIDOMNode *parent);
2078     nsresult DeleteNode([in] nsIDOMNode *child);
2079     nsresult MarkNodeDirty([in] nsIDOMNode *node);
2080     nsresult SwitchTextDirection();
2081     nsresult OutputToString([in] nsAString formatType, [in] PRUint32 flags, [out] nsAString *_retval);
2082     nsresult OutputToStream([in] nsIOutputStream *aStream, [in] nsAString *formatType, [in] nsACString *charsetOverride, [in] PRUint32 flags);
2083     nsresult AddEditorObserver([in] nsIEditorObserver *observer);
2084     nsresult RemoveEditorObserver([in] nsIEditorObserver *observer);
2085     nsresult AddEditActionListener([in] nsIEditActionListener *listener);
2086     nsresult RemoveEditActionListener([in] nsIEditActionListener *listener);
2087     nsresult AddDocumentStateListener([in] nsIDocumentStateListener *listener);
2088     nsresult RemoveDocumentStateListener([in] nsIDocumentStateListener *listener);
2089     nsresult DumpContentTree();
2090     nsresult DebugDumpContent();
2091     nsresult DebugUnitTests([out] PRInt32 *outNumTests, [out] PRInt32 *outNumTestsFailed);
2092 }
2093
2094 [
2095     object,
2096     uuid(afc36593-5787-4420-93d9-b2c0ccbf0cad)
2097 ]
2098 interface nsIHTMLEditor : nsISupports
2099 {
2100     nsresult AddDefaultProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
2101     nsresult RemoveDefaultProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
2102     nsresult RemoveAllDefaultProperties();
2103     nsresult SetCSSInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
2104     nsresult SetInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue);
2105     nsresult GetInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue, [out] PRBool *aFirst, [out] PRBool *aAny, [out] PRBool *aAll);
2106     nsresult GetInlinePropertyWithAttrValue([in] nsIAtom *aProperty, [in] nsAString *aAttribute, [in] nsAString *aValue, [out] PRBool *aFirst, [out] PRBool *aAny, [out] PRBool *aAll, [out] nsAString *_retval);
2107     nsresult RemoveAllInlineProperties();
2108     nsresult RemoveInlineProperty([in] nsIAtom *aProperty, [in] nsAString *aAttribute);
2109     nsresult IncreaseFontSize();
2110     nsresult DecreaseFontSize();
2111     nsresult CanDrag([in] nsIDOMEvent *aEvent, [out] PRBool *_retval);
2112     nsresult DoDrag([in] nsIDOMEvent *aEvent);
2113     nsresult InsertFromDrop([in] nsIDOMEvent *aEvent);
2114     nsresult NodeIsBlock([in] nsIDOMNode *node, PRBool *_retval);
2115     nsresult InsertHTML([in] nsAString *aInputString);
2116     nsresult PasteNoFormatting([in] PRInt32 aSelectionType);
2117     nsresult RebuildDocumentFromSource([in] nsAString *aSourceString);
2118     nsresult InsertHTMLWithContext([in] nsAString *aInputString, [in] nsAString *aContextStr, [in] nsAString *aInfoStr, [in] nsAString *aFlavor, [in] nsIDOMDocument *aSourceDoc, [in] nsIDOMNode *aDestinationNode, [in] PRInt32 aDestinationOffset, [in] PRBool aDeleteSelection);
2119     nsresult InsertElementAtSelection([in] nsIDOMElement *aElement, [in] PRBool aDeleteSelection);
2120     nsresult SetDocumentTitle([in] nsAString *aTitle);
2121     nsresult UpdateBaseURL();
2122     nsresult SelectElement([in] nsIDOMElement *aElement);
2123     nsresult SetCaretAfterElement([in] nsIDOMElement *aElement);
2124     nsresult SetParagraphFormat([in] nsAString *aParagraphFormat);
2125     nsresult GetParagraphState([out] PRBool *aMixed, [out] nsAString *_retval);
2126     nsresult GetFontFaceState([out] PRBool *aMixed, [out] nsAString *_retval);
2127     nsresult GetFontColorState([out] PRBool *aMixed, [out] nsAString *_retval);
2128     nsresult GetBackgroundColorState([out] PRBool *aMixed, [out] nsAString *_retval);
2129     nsresult GetHighlightColorState([out] PRBool *aMixed, [out] nsAString *_retval);
2130     nsresult GetListState([out] PRBool *aMixed, [out] PRBool *aOL, [out] PRBool *aUL, [out] PRBool *aDL);
2131     nsresult GetListItemState([out] PRBool *aMixed, [out] PRBool *aLI, [out] PRBool *aDT, [out] PRBool *aDD);
2132     nsresult GetAlignment([out] PRBool *aMixed, [out] PRInt16 *aAlign);
2133     nsresult GetIndentState([out] PRBool *aCanIndent, [out] PRBool *aCanOutdent);
2134     nsresult MakeOrChangeList([in] nsAString *aListType, [in] PRBool entireList, [in] nsAString *aBulletType);
2135     nsresult RemoveList([in] nsAString *aListType);
2136     nsresult Indent([in] nsAString *aIndent);
2137     nsresult Align([in] nsAString *aAlign);
2138     nsresult GetElementOrParentByTagName([in] nsAString *aTagName, [in] nsIDOMNode *aNode, [out] nsIDOMElement **_retval);
2139     nsresult GetSelectedElement([in] nsAString *aTagName, [out] nsIDOMElement **_retval);
2140     nsresult GetHeadContentsAsHTML([out] nsAString *_retval);
2141     nsresult ReplaceHeadContentsWithHTML([in] nsAString *aSourceToInsert);
2142     nsresult CreateElementWithDefaults([in] nsAString *aTagName, [out] nsIDOMElement **_retval);
2143     nsresult InsertLinkAroundSelection([in] nsIDOMElement *aAnchorElement);
2144     nsresult SetBackgroundColor([in] nsAString *aColor);
2145     nsresult SetBodyAttribute([in] nsAString *aAttr, [in] nsAString *aValue);
2146     nsresult IgnoreSpuriousDragEvent([in] PRBool aIgnoreSpuriousDragEvent);
2147     nsresult GetLinkedObjects([out] nsISupportsArray **_retval);
2148     nsresult GetIsCSSEnabled([out] PRBool *_retval);
2149     nsresult SetIsCSSEnabled([in] PRBool prb);
2150     nsresult AddInsertionListener([in] nsIContentFilter *inFilter);
2151     nsresult RemoveInsertionListener([in] nsIContentFilter *inFilter);
2152     nsresult CreateAnonymousElement([in] nsAString *aTag, [in] nsIDOMNode *aParentNode, [in] nsAString *aAnonClass, [in] PRBool aIsCreatedHidden, [out] nsIDOMElement **_retval);
2153     nsresult GetSelectionContainer([out] nsIDOMElement **_retval);
2154     nsresult CheckSelectionStateForAnonymousButtons([in] nsISelection *aSelection);
2155     nsresult IsAnonymousElement([in] nsIDOMElement *aElement, [out] PRBool *_retval);
2156     nsresult GetReturnInParagraphCreatesNewParagraph([out] PRBool *_retval);
2157     nsresult SetReturnInParagraphCreatesNewParagraph([in] PRBool prb);
2158 }
2159
2160 /*
2161  * NOTE:
2162  * This is a private Wine interface that is implemented by our implementation
2163  * of nsIURI to store its owner.
2164  */
2165 [
2166     object,
2167     uuid(5088272e-900b-11da-c687-000fea57f21a)
2168     /* INTERNAL */
2169 ]
2170 interface nsIWineURI : nsIURI
2171 {
2172     typedef struct NSContainer NSContainer;
2173
2174     nsresult GetNSContainer(NSContainer **aNSContainer);
2175     nsresult SetNSContainer(NSContainer *aNSContainer);
2176     nsresult GetIsDocumentURI(PRBool *aIsDocumentURI);
2177     nsresult SetIsDocumentURI(PRBool aIsDocumentURI);
2178     nsresult GetWineURL(LPCWSTR *aURL);
2179     nsresult SetWineURL(LPCWSTR aURL);
2180 }