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