msi: Write-strings warnings fix.
[wine] / dlls / mshtml / nsiface.idl
1 /*
2  * Copyright 2005-2006 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 /* 
20  * NOTE:
21  * This file is not an usual idl file. Interfaces in this file are XPCOM interfaces
22  * (NOT MSCOM!), but we generate the header file with WIDL compatibile with XPCOM,
23  * useable in C code.
24  */
25
26 import "wtypes.idl";
27
28 typedef HRESULT nsresult;
29 typedef ULONG nsrefcnt;
30
31 typedef IID nsIID;
32 typedef nsIID nsCID;
33 typedef REFIID nsIIDRef;
34 typedef nsIIDRef nsCIDRef;
35
36 typedef void** nsQIResult;
37 typedef LPSTR nsstring;
38 typedef WCHAR PRUnichar;
39 typedef LPWSTR nswstring;
40 typedef ULONG PRUint32;
41 typedef LONG PRInt32;
42 typedef WORD PRUint16;
43 typedef BYTE PRUint8;
44 typedef BOOL PRBool;
45 typedef LARGE_INTEGER PRInt64;
46 typedef ULARGE_INTEGER PRUint64;
47 typedef PRUint64 DOMTimeStamp;
48 typedef PRUint32 nsLoadFlags;
49
50 typedef struct {
51     void *v;
52     void *d1;
53     PRUint32 d2;
54     void *d3;
55 } nsCStringContainer;
56
57 typedef struct {
58     void *v;
59     void *d1;
60     PRUint32 d2;
61     void *d3;
62 } nsStringContainer;
63
64 typedef nsCStringContainer nsACString;
65 typedef nsStringContainer nsAString;
66
67 interface nsIWebBrowserChrome;
68 interface nsILoadGroup;
69 interface nsIDOMNode;
70 interface nsIDOMDocument;
71
72 [
73     object,
74     uuid(00000000-0000-0000-c000-000000000046)
75 ]
76 interface nsISupports
77 {
78     nsresult QueryInterface(nsIIDRef riid, nsQIResult result);
79     nsrefcnt AddRef();
80     nsrefcnt Release();
81 }
82
83 /* Currently we don't need a full declaration of these interfaces */
84 typedef nsISupports nsISHistory;
85 typedef nsISupports nsISimpleEnumerator;
86 typedef nsISupports nsIWidget;
87 typedef nsISupports nsIProtocolHandler;
88 typedef nsISupports nsIDOMEventTarget;
89 typedef nsISupports nsIDOMAbstractView;
90 typedef nsISupports nsIHttpHeaderVisitor;
91 typedef nsISupports nsIDOMBarProp;
92 typedef nsISupports nsIDOMWindowCollection;
93 typedef nsISupports nsIPrompt;
94 typedef nsISupports nsIAuthPrompt;
95 typedef nsISupports nsIDOMNamedNodeMap;
96 typedef nsISupports nsIDOMAttr;
97 typedef nsISupports nsIDOMDocumentType;
98 typedef nsISupports nsIDOMDOMImplementation;
99 typedef nsISupports nsIDOMDocumentFragment;
100 typedef nsISupports nsIDOMText;
101 typedef nsISupports nsIDOMComment;
102 typedef nsISupports nsIDOMCDATASection;
103 typedef nsISupports nsIDOMProcessingInstruction;
104 typedef nsISupports nsIDOMEntityReference;
105 typedef nsISupports nsIDOMHTMLFormElement;
106 typedef nsISupports nsIDOMHTMLOptionsCollection;
107 typedef nsISupports nsIDOMHTMLCollection;
108 typedef nsISupports nsIDOMRange;
109
110 [
111     object,
112     uuid(8bb35ed9-e332-462d-9155-4a002ab5c958)
113 ]
114 interface nsIServiceManager : nsISupports
115 {
116     nsresult GetService(nsCIDRef aClass, nsIIDRef aIID, void **result);
117     nsresult GetServiceByContactID(nsstring aContactID, nsIIDRef aIID, void **result);
118     nsresult IsServiceInstantiated(nsCIDRef aClass, nsIIDRef aIID, BOOL *_retval);
119     nsresult IsServiceInstantiatedByContractID(nsstring aContractID, nsIIDRef aIID, BOOL *_retval);
120 }
121
122 [
123     object,
124     uuid(00000001-0000-0000-c000-000000000046)
125 ]
126 interface nsIFactory : nsISupports
127 {
128     nsresult CreateInstance(nsISupports *aOuter, const nsIID *iid, void **result);
129     nsresult LockFactory(PRBool lock);
130 }
131
132 [
133     object,
134     uuid(db242e01-e4d9-11d2-9dde-000064657374)
135 ]
136 interface nsIObserver : nsISupports
137 {
138     nsresult Observe(nsISupports *aSubject, nsstring aTopic, nswstring aData);
139 }
140
141 [
142     object,
143     uuid(a88e5a60-205a-4bb1-94e1-2628daf51eae)
144 ]
145 interface nsIComponentManager : nsISupports
146 {
147     nsresult GetClassObject(nsCIDRef aClass, nsIIDRef aIID, nsQIResult result);
148     nsresult GetClassObjectByContractID(nsstring aContractID, nsIIDRef aIID, nsQIResult result);
149     nsresult CreateInstance(nsCIDRef aClass, nsISupports *aDelegate, nsIIDRef aIID,
150             nsQIResult result);
151     nsresult CreateInstanceByContractID(nsstring aContractID, nsISupports *aDelegate,
152             nsIIDRef aIID, nsQIResult result);
153 }
154
155 [
156     object,
157     uuid(59e7e77a-38e4-11d4-8cf5-0060b0fc14a3)
158 ]
159 interface nsIMemory : nsISupports
160 {
161     void *Alloc(/*size_t*/ int size);
162     void *Realloc(void *_ptr, /*size_t*/ int newSize);
163     void Free(void *_ptr);
164     nsresult HeapMinimize(PRBool immediate);
165     nsresult IsLowMemory(PRBool *_retval);
166 }
167
168 [
169     object,
170     uuid(9188bc85-f92e-11d2-81ef-0060083a0bcf)
171 ]
172 interface nsIWeakReference : nsISupports
173 {
174     nsresult QueryReferent(const nsIID *riid, void **result);
175 }
176
177 [
178     object,
179     uuid(9188bc86-f92e-11d2-81ef-0060083a0bcf)
180 ]
181 interface nsISupportsWeakReference : nsISupports
182 {
183     nsresult GetWeakReference(nsIWeakReference **_retval);
184 }
185
186 [
187     object,
188     uuid(033a1470-8b2a-11d3-af88-00a024ffc08c)
189 ]
190 interface nsIInterfaceRequestor : nsISupports
191 {
192     nsresult GetInterface(const nsIID *riid, void **result);
193 }
194
195 [
196     object,
197     uuid(fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a)
198 ]
199 interface nsIInputStream : nsISupports
200 {
201     nsresult Close();
202     nsresult Available(PRUint32 *_retval);
203     nsresult Read(char *aBuf, PRUint32 aCount, PRUint32 *_retval);
204     nsresult ReadSegments(nsresult (*aWriter)(nsIInputStream *aInStream, 
205             void *aClosure, const char *aFromSegment, PRUint32 aToOffset,
206             PRUint32 aCount, PRUint32 *aWriteCount),
207             void *aClosure, PRUint32 aCount, PRUint32 *_retval);
208     nsresult IsNonBlocking(PRBool *_retval);
209 }
210
211 [
212     object,
213     uuid(450cd2d4-f0fd-424d-b365-b1251f80fd53)
214 ]
215 interface nsIStringInputStream : nsIInputStream
216 {
217     nsresult SetData(const char *data, PRInt32 dataLen);
218     nsresult AdoptData(char *data, PRInt32 dataLen);
219     nsresult ShareData(const char *data, PRInt32 dataLen);
220 }
221
222 [
223     object,
224     uuid(07a22cc0-0ce5-11d3-9331-00104ba0fd40)
225 ]
226 interface nsIURI : nsISupports
227 {
228     nsresult GetSpec(nsACString *aSpec);
229     nsresult SetSpec(const nsACString *aSpec);
230     nsresult GetPrePath(nsACString *aPrePath);
231     nsresult GetScheme(nsACString *aScheme);
232     nsresult SetScheme(const nsACString *aScheme);
233     nsresult GetUserPass(nsACString *aUserPass);
234     nsresult SetUserPass(const nsACString *aUserPass);
235     nsresult GetUsername(nsACString *aUsername);
236     nsresult SetUsername(const nsACString *aUsername);
237     nsresult GetPassword(nsACString *aPassword);
238     nsresult SetPassword(const nsACString *aPassword);
239     nsresult GetHostPort(nsACString *aHostPort);
240     nsresult SetHostPort(const nsACString *aHostPort);
241     nsresult GetHost(nsACString *aHost);
242     nsresult SetHost(const nsACString *aHost);
243     nsresult GetPort(PRInt32 *aPort);
244     nsresult SetPort(PRInt32 aPort);
245     nsresult GetPath(nsACString *aPath);
246     nsresult SetPath(const nsACString *aPath);
247     nsresult Equals(nsIURI *other, PRBool *_retval);
248     nsresult SchemeIs(const char *scheme, PRBool *_retval);
249     nsresult Clone(nsIURI **_retval);
250     nsresult Resolve(const nsACString *relativePath, nsACString *_retval);
251     nsresult GetAsciiSpec(nsACString *aAsciiSpec);
252     nsresult GetAsciiHost(nsACString *aAsciiHost);
253     nsresult GetOriginCharset(nsACString *aOriginCharset);
254 }
255
256 [
257     object,
258     uuid(ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe)
259 ]
260 interface nsIRequest : nsISupports
261 {
262     nsresult GetName(nsACString *aName);
263     nsresult IsPending(PRBool *_retval);
264     nsresult GetStatus(nsresult *aStatus);
265     nsresult Cancel(nsresult aStatus);
266     nsresult Suspend();
267     nsresult Resume();
268     nsresult GetLoadGroup(nsILoadGroup **aLoadGroup);
269     nsresult SetLoadGroup(nsILoadGroup *aLoadGroup);
270     nsresult GetLoadFlags(nsLoadFlags *aLoadFlags);
271     nsresult SetLoadFlags(nsLoadFlags aLoadFlags);
272 }
273
274 [
275     object,
276     uuid(fd91e2e0-1481-11d3-9333-00104ba0fd40)
277 ]
278 interface nsIRequestObserver : nsISupports
279 {
280     nsresult OnStartRequest(nsIRequest *aRequest, nsISupports *aContext);
281     nsresult OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode);
282 }
283
284 [
285     object,
286     uuid(1a637020-1482-11d3-9333-00104ba0fd40)
287
288 interface nsIStreamListener : nsIRequestObserver
289 {
290     nsresult OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
291                              nsIInputStream *aInputStream, PRUint32 aOffset, PRUint32 aCount);
292 }
293
294 [
295     object,
296     uuid(3de0a31c-feaf-400f-9f1e-4ef71f8b20cc)
297 ]
298 interface nsILoadGroup : nsIRequest
299 {
300     nsresult GetGroupObserver(nsIRequestObserver **aGroupObserver);
301     nsresult SetGroupObserver(nsIRequestObserver *aGroupObserver);
302     nsresult GetDefaultLoadRequest(nsIRequest **aDefaultLoadRequest);
303     nsresult SetDefaultLoadRequest(nsIRequest *aDefaultLoadRequest);
304     nsresult AddRequest(nsIRequest *aRequest, nsISupports *aContext);
305     nsresult RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus);
306     nsresult GetRequests(nsISimpleEnumerator **aRequests);
307     nsresult GetActiveCount(PRUint32 *aActiveCount);
308     nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
309     nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
310 }
311
312 [
313     object,
314     uuid(c63a055a-a676-4e71-bf3c-6cfa11082018)
315 ]
316 interface nsIChannel : nsIRequest
317 {
318     nsresult GetOriginalURI(nsIURI **aOriginalURI);
319     nsresult SetOriginalURI(nsIURI *aOriginalURI);
320     nsresult GetURI(nsIURI **aURI);
321     nsresult GetOwner(nsISupports **aOwner);
322     nsresult SetOwner(nsISupports *aOwner);
323     nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
324     nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
325     nsresult GetSecurityInfo(nsISupports **aSecurityInfo);
326     nsresult GetContentType(nsACString *aContentType);
327     nsresult SetContentType(const nsACString *aContentType);
328     nsresult GetContentCharset(nsACString *aContentCharset);
329     nsresult SetContentCharset(const nsACString *aContentCharset);
330     nsresult GetContentLength(PRInt32 *aContentLength);
331     nsresult SetContentLength(PRInt32 aContentLength);
332     nsresult Open(nsIInputStream **_retval);
333     nsresult AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext);
334 }
335
336 [
337     object,
338     uuid(9277fe09-f0cc-4cd9-bbce-581dd94b0260)
339 ]
340 interface nsIHttpChannel : nsIChannel
341 {
342     nsresult GetRequestMethod(nsACString *aRequestMethod);
343     nsresult SetRequestMethod(const nsACString *aRequestMethod);
344     nsresult GetReferrer(nsIURI **aReferrer);
345     nsresult SetReferrer(nsIURI *aReferrer);
346     nsresult GetRequestHeader(const nsACString *aHeader, nsACString *_retval);
347     nsresult SetRequestHeader(const nsACString *aHeader, const nsACString *aValue, PRBool aMerge);
348     nsresult VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor);
349     nsresult GetAllowPipelining(PRBool *aAllowPipelining);
350     nsresult SetAllowPipelining(PRBool aAllowPipelining);
351     nsresult GetRedirectionLimit(PRUint32 *aRedirectionLimit);
352     nsresult SetRedirectionLimit(PRUint32 aRedirectionLimit);
353     nsresult GetResponseStatus(PRUint32 *aResponseStatus);
354     nsresult GetResponseStatusText(nsACString *aResponseStatusText);
355     nsresult GetRequestSucceeded(PRBool *aRequestSucceeded);
356     nsresult GetResponseHeader(const nsACString *header, nsACString *_retval);
357     nsresult SetResponseHeader(const nsACString *header, const nsACString *value, PRBool merge);
358     nsresult VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor);
359     nsresult IsNoStoreResponse(PRBool *_retval);
360     nsresult IsNoCacheResponse(PRBool *_retval);
361 }
362
363 [
364     object,
365     uuid(ddf633d8-e9a4-439d-ad88-de636fd9bb75)
366 ]
367 interface nsIUploadChannel : nsISupports
368 {
369     nsresult SetUploadStream(nsIInputStream *aStream, const nsACString *aContentType,
370                              PRInt32 aContentLength);
371     nsresult GetUploadStream(nsIInputStream **aUploadStream);
372 }
373
374 [
375     object,
376     uuid(a6cf907d-15b3-11d2-932e-00805f8add32)
377 ]
378 interface nsIDOMNodeList : nsISupports
379 {
380     nsresult Item(PRUint32 index, nsIDOMNode **_retval);
381     nsresult GetLength(PRUint32 *aLength);
382 }
383
384 [
385     object,
386     uuid(a6cf907c-15b3-11d2-932e-00805f8add32)
387 ]
388 interface nsIDOMNode : nsISupports
389 {
390     nsresult GetNodeName(nsAString *aNodeName);
391     nsresult GetNodeValue(nsAString *aNodeValue);
392     nsresult SetNodeValue(const nsAString *aNodeValue);
393     nsresult GetNodeType(PRUint16 *aNodeType);
394     nsresult GetParentNode(nsIDOMNode **aParentNode);
395     nsresult GetChildNodes(nsIDOMNodeList **aChildNodes);
396     nsresult GetFirstChild(nsIDOMNode **aFirstChild);
397     nsresult GetLastChild(nsIDOMNode **aLastChild);
398     nsresult GetPreviousSibling(nsIDOMNode **aPreviousSibling);
399     nsresult GetNextSibling(nsIDOMNode **aNextSibling);
400     nsresult GetAttributes(nsIDOMNamedNodeMap **aAttributes);
401     nsresult GetOwnerDocument(nsIDOMDocument **aOwnerDocument);
402     nsresult InsertBefore(nsIDOMNode *newChild, nsIDOMNode *refChild, nsIDOMNode **_retval);
403     nsresult ReplaceChild(nsIDOMNode *newChild, nsIDOMNode *oldChild, nsIDOMNode **_retval);
404     nsresult RemoveChild(nsIDOMNode *oldChild, nsIDOMNode **_retval);
405     nsresult AppendChild(nsIDOMNode *newChild, nsIDOMNode **_retval);
406     nsresult HasChildNodes(PRBool *_retval);
407     nsresult CloneNode(PRBool deep, nsIDOMNode **_retval);
408     nsresult Normalize();
409     nsresult IsSupported(const nsAString *feature, const nsAString *version, PRBool *_retval);
410     nsresult GetNamespaceURI(nsAString *aNamespaceURI);
411     nsresult GetPrefix(nsAString *aPrefix);
412     nsresult SetPrefix(const nsAString *aPrefix);
413     nsresult GetLocalName(nsAString *aLocalName);
414     nsresult HasAttributes(PRBool *_retval);
415 }
416
417 [
418     object,
419     uuid(a6cf9078-15b3-11d2-932e-00805f8add32)
420 ]
421 interface nsIDOMElement : nsIDOMNode
422 {
423     nsresult GetTagName(nsAString *aTagName);
424     nsresult GetAttribute(const nsAString *name, nsAString *_retval);
425     nsresult SetAttribute(const nsAString *name, const nsAString *value);
426     nsresult RemoveAttribute(const nsAString *name);
427     nsresult GetAttributeNode(const nsAString *name, nsIDOMAttr **_retval);
428     nsresult SetAttributeNode(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
429     nsresult RemoveAttributeNode(nsIDOMAttr *oldAttr, nsIDOMAttr **_retval);
430     nsresult GetElementsByTagName(const nsAString *name, nsIDOMNodeList **_retval);
431     nsresult GetAttributeNS(const nsAString *namespaceURI, const nsAString *localName,
432                             nsAString *_retval);
433     nsresult SetAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName,
434                             const nsAString *value);
435     nsresult RemoveAttributeNS(const nsAString *namespaceURI, const nsAString *localName);
436     nsresult GetAttributeNodeNS(const nsAString *namespaceURI, const nsAString *localName,
437                                 nsIDOMAttr **_retval);
438     nsresult SetAttributeNodeNS(nsIDOMAttr *newAttr, nsIDOMAttr **_retval);
439     nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName,
440                                     nsIDOMNodeList **_retval);
441     nsresult HasAttribute(const nsAString *name, PRBool *_retval);
442     nsresult HasAttributeNS(const nsAString *namespaceURI, const nsAString *localName,
443                             PRBool *_retval);
444 }
445
446 cpp_quote("#undef GetClassName");
447
448 [
449     object,
450     uuid(a6cf9085-15b3-11d2-932e-00805f8add32)
451 ]
452 interface nsIDOMHTMLElement : nsIDOMElement
453 {
454     nsresult GetId(nsAString *aId);
455     nsresult SetId(const nsAString *aId);
456     nsresult GetTitle(nsAString *aTitle);
457     nsresult SetTitle(const nsAString *aTitle);
458     nsresult GetLang(nsAString *aLang);
459     nsresult SetLang(const nsAString *aLang);
460     nsresult GetDir(nsAString *aDir);
461     nsresult SetDir(const nsAString *aDir);
462     nsresult GetClassName(nsAString *aClassName);
463     nsresult SetClassName(const nsAString *aClassName);
464 }
465
466 [
467     object,
468     uuid(da83b2ec-8264-4410-8496-ada3acd2ae42)
469 ]
470 interface nsIDOMNSHTMLElement : nsISupports
471 {
472     nsresult GetOffsetTop(PRInt32 *aOffsetTop);
473     nsresult GetOffsetLeft(PRInt32 *aOffsetLeft);
474     nsresult GetOffsetWidth(PRInt32 *aOffsetWidth);
475     nsresult GetOffsetHeight(PRInt32 *aOffsetHeight);
476     nsresult GetOffsetParent(nsIDOMElement **aOffsetParent);
477     nsresult GetInnerHTML(nsAString *aInnerHTML);
478     nsresult SetInnerHTML(const nsAString *aInnerHTML);
479     nsresult GetScrollTop(PRInt32 *aScrollTop);
480     nsresult SetScrollTop(PRInt32 aScrollTop);
481     nsresult GetScrollLeft(PRInt32 *aScrollLeft);
482     nsresult SetScrollLeft(PRInt32 aScrollLeft);
483     nsresult GetScrollHeight(PRInt32 *aScrollHeight);
484     nsresult GetScrollWidth(PRInt32 *aScrollWidth);
485     nsresult GetClientHeight(PRInt32 *aClientHeight);
486     nsresult GetClientWidth(PRInt32 *aClientWidth);
487     nsresult ScrollIntoView(PRBool top);
488 }
489
490 [
491     object,
492     uuid(a6cf9075-15b3-11d2-932e-00805f8add32)
493 ]
494 interface nsIDOMDocument : nsIDOMNode
495 {
496     nsresult GetDoctype(nsIDOMDocumentType **aDoctype);
497     nsresult GetImplementation(nsIDOMDOMImplementation **aImplementation);
498     nsresult GetDocumentElement(nsIDOMElement **aDocumentElement);
499     nsresult CreateElement(const nsAString *tagName, nsIDOMElement **_retval);
500     nsresult CreateDocumentFragment(nsIDOMDocumentFragment **_retval);
501     nsresult CreateTextNode(const nsAString *data, nsIDOMText **_retval);
502     nsresult CreateComment(const nsAString *data, nsIDOMComment **_retval);
503     nsresult CreateCDATASection(const nsAString *data, nsIDOMCDATASection **_retval);
504     nsresult CreateProcessingInstruction(const nsAString *target, const nsAString *data,
505                                          nsIDOMProcessingInstruction **_retval);
506     nsresult CreateAttribute(const nsAString *name, nsIDOMAttr **_retval);
507     nsresult CreateEntityReference(const nsAString *name, nsIDOMEntityReference **_retval);
508     nsresult GetElementsByTagName(const nsAString *tagname, nsIDOMNodeList **_retval);
509     nsresult ImportNode(nsIDOMNode *importedNode, PRBool deep, nsIDOMNode **_retval);
510     nsresult CreateElementNS(const nsAString *namespaceURI, const nsAString *qualifiedName,
511                              nsIDOMElement **_retval);
512     nsresult CreateAttributeNS(const nsAString *namespaceURI, const nsAString *qualifiedName,
513                                nsIDOMAttr **_retval);
514     nsresult GetElementsByTagNameNS(const nsAString *namespaceURI, const nsAString *localName,
515                                     nsIDOMNodeList **_retval);
516     nsresult GetElementById(const nsAString *elementId, nsIDOMElement **_retval);
517 }
518
519 [
520     object,
521     uuid(a6cf9084-15b3-11d2-932e-00805f8add32)
522 ]
523 interface nsIDOMHTMLDocument : nsIDOMDocument
524 {
525     nsresult GetTitle(nsAString *aTitle);
526     nsresult SetTitle(const nsAString *aTitle);
527     nsresult GetReferrer(nsAString *aReferrer);
528     nsresult GetDomain(nsAString *aDomain);
529     nsresult GetURL(nsAString *aURL);
530     nsresult GetBody(nsIDOMHTMLElement **aBody);
531     nsresult SetBody(nsIDOMHTMLElement *aBody);
532     nsresult GetImages(nsIDOMHTMLCollection **aImages);
533     nsresult GetApplets(nsIDOMHTMLCollection **aApplets);
534     nsresult GetLinks(nsIDOMHTMLCollection **aLinks);
535     nsresult GetForms(nsIDOMHTMLCollection **aForms);
536     nsresult GetAnchors(nsIDOMHTMLCollection **aAnchors);
537     nsresult GetCookie(nsAString *aCookie);
538     nsresult SetCookie(const nsAString *aCookie);
539     nsresult Open(void);
540     nsresult Close(void);
541     nsresult Write(const nsAString *text);
542     nsresult Writeln(const nsAString *text);
543     nsresult GetElementsByName(const nsAString *elementName, nsIDOMNodeList **_retval);
544 }
545
546 [
547     object,
548     uuid(b2c7ed59-8634-4352-9e37-5484c8b6e4e1)
549 ]
550 interface nsISelection : nsISupports
551 {
552     nsresult GetAnchorNode(nsIDOMNode **aAnchorNode);
553     nsresult GetAnchorOffset(PRInt32 *aAnchorOffset);
554     nsresult GetFocusNode(nsIDOMNode **aFocusNode);
555     nsresult GetFocusOffset(PRInt32 *aFocusOffset);
556     nsresult GetIsCollapsed(PRBool *aIsCollapsed);
557     nsresult GetRangeCount(PRInt32 *aRangeCount);
558     nsresult GetRangeAt(PRInt32 index, nsIDOMRange **_retval);
559     nsresult Collapse(nsIDOMNode *parentNode, PRInt32 offset);
560     nsresult Extend(nsIDOMNode *parentNode, PRInt32 offset);
561     nsresult CollapseToStart();
562     nsresult CollapseToEnd();
563     nsresult ContainsNode(nsIDOMNode *node, PRBool entirelyContained, PRBool *_retval);
564     nsresult SelectAllChildren(nsIDOMNode *parentNode);
565     nsresult AddRange(nsIDOMRange *range);
566     nsresult RemoveRange(nsIDOMRange *range);
567     nsresult RemoveAllRanges();
568     nsresult DeleteFromDocument();
569     nsresult SelectionLanguageChange(PRBool langRTL);
570     nsresult ToString(PRUnichar **_retval);
571 }
572
573 [
574     object,
575     uuid(a6cf906b-15b3-11d2-932e-00805f8add32)
576 ]
577 interface nsIDOMWindow : nsISupports
578 {
579     nsresult GetDocument(nsIDOMDocument **aDocument);
580     nsresult GetParent(nsIDOMWindow **aParent);
581     nsresult GetTop(nsIDOMWindow **aTop);
582     nsresult GetScrollbars(nsIDOMBarProp **aScrollbars);
583     nsresult GetFrames(nsIDOMWindowCollection **aFrames);
584     nsresult GetName(nsAString *aName);
585     nsresult SetName(const nsAString *aName);
586     nsresult GetTextZoom(float *aTextZoom);
587     nsresult SetTextZoom(float aTextZoom);
588     nsresult GetScrollX(PRInt32 *aScrollX);
589     nsresult GetScrollY(PRInt32 *aScrollY);
590     nsresult ScrollTo(PRInt32 xScroll, PRInt32 yScroll);
591     nsresult ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif);
592     nsresult GetSelection(nsISelection **_retval);
593     nsresult ScrollByLines(PRInt32 numLines);
594     nsresult ScrollByPages(PRInt32 numPages);
595     nsresult SizeToContent();
596 }
597
598 [
599     object,
600     uuid(a6cf908e-15b3-11d2-932e-00805f8add32)
601 ]
602 interface nsIDOMHTMLBodyElement : nsIDOMHTMLElement
603 {
604     nsresult GetALink(nsAString *aALink);
605     nsresult SetALink(const nsAString *aALink);
606     nsresult GetBackground(nsAString *aBackground);
607     nsresult SetBackground(const nsAString *aBackground);
608     nsresult GetBgColor(nsAString *aBgColor);
609     nsresult SetBgColor(const nsAString *aBgColor);
610     nsresult GetLink(nsAString *aLink);
611     nsresult SetLink(const nsAString *aLink);
612     nsresult GetText(nsAString *aText);
613     nsresult SetText(const nsAString *aText);
614     nsresult GetVLink(nsAString *aVLink);
615     nsresult SetVLink(const nsAString *aVLink);
616 }
617
618 [
619     object,
620     uuid(a6cf9093-15b3-11d2-932e-00805f8add32)
621 ]
622 interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
623 {
624     nsresult GetDefaultValue(nsAString *aDefaultValue);
625     nsresult SetDefaultValue(const nsAString *aDefaultValue);
626     nsresult GetDefaultChecked(PRBool *aDefaultChecked);
627     nsresult SetDefaultChecked(PRBool aDefaultChecked);
628     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
629     nsresult GetAccept(nsAString *aAccept);
630     nsresult SetAccept(const nsAString *aAccept);
631     nsresult GetAccessKey(nsAString *aAccessKey);
632     nsresult SetAccessKey(const nsAString *aAccessKey);
633     nsresult GetAlign(nsAString *aAlign);
634     nsresult SetAlign(const nsAString *aAlign);
635     nsresult GetAlt(nsAString *aAlt);
636     nsresult SetAlt(const nsAString *aAlt);
637     nsresult GetChecked(PRBool *aChecked);
638     nsresult SetChecked(PRBool aChecked);
639     nsresult GetDisabled(PRBool *aDisabled);
640     nsresult SetDisabled(PRBool aDisabled);
641     nsresult GetMaxLength(PRInt32 *aMaxLength);
642     nsresult SetMaxLength(PRInt32 aMaxLength);
643     nsresult GetName(nsAString *aName);
644     nsresult SetName(const nsAString *aName);
645     nsresult GetReadOnly(PRBool *aReadOnly);
646     nsresult SetReadOnly(PRBool aReadOnly);
647     nsresult GetSize(PRUint32 *aSize);
648     nsresult SetSize(PRUint32 aSize);
649     nsresult GetSrc(nsAString *aSrc);
650     nsresult SetSrc(const nsAString *aSrc);
651     nsresult GetTabIndex(PRInt32 *aTabIndex);
652     nsresult SetTabIndex(PRInt32 aTabIndex);
653     nsresult GetType(nsAString *aType);
654     nsresult SetType(const nsAString *aType);
655     nsresult GetUseMap(nsAString *aUseMap);
656     nsresult SetUseMap(const nsAString *aUseMap);
657     nsresult GetValue(nsAString *aValue);
658     nsresult SetValue(const nsAString *aValue);
659     nsresult Blur();
660     nsresult Focus();
661     nsresult Select();
662     nsresult Click();
663 }
664
665 [
666     object,
667     uuid(a6cf9090-15b3-11d2-932e-00805f8add32)
668 ]
669 interface nsIDOMHTMLSelectElement : nsIDOMHTMLElement
670 {
671     nsresult GetType(nsAString *aType);
672     nsresult GetSelectedIndex(PRInt32 *aSelectedIndex);
673     nsresult SetSelectedIndex(PRInt32 aSelectedIndex);
674     nsresult GetValue(nsAString *aValue);
675     nsresult SetValue(const nsAString *aValue);
676     nsresult GetLength(PRUint32 *aLength);
677     nsresult SetLength(PRUint32 aLength);
678     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
679     nsresult GetOptions(nsIDOMHTMLOptionsCollection **aOptions);
680     nsresult GetDisabled(PRBool *aDisabled);
681     nsresult SetDisabled(PRBool aDisabled);
682     nsresult GetMultiple(PRBool *aMultiple);
683     nsresult SetMultiple(PRBool aMultiple);
684     nsresult GetName(nsAString *aName);
685     nsresult SetName(const nsAString *aName);
686     nsresult GetSize(PRInt32 *aSize);
687     nsresult SetSize(PRInt32 aSize);
688     nsresult GetTabIndex(PRInt32 *aTabIndex);
689     nsresult SetTabIndex(PRInt32 aTabIndex);
690     nsresult Add(nsIDOMHTMLElement *element, nsIDOMHTMLElement *before);
691     nsresult Remove(PRInt32 index);
692     nsresult Blur();
693     nsresult Focus();
694 }
695
696 [
697     object,
698     uuid(a6cf9094-15b3-11d2-932e-00805f8add32)
699 ]
700 interface nsIDOMHTMLTextAreaElement : nsIDOMHTMLElement
701 {
702     nsresult GetDefaultValue(nsAString *aDefaultValue);
703     nsresult SetDefaultValue(const nsAString *aDefaultValue);
704     nsresult GetForm(nsIDOMHTMLFormElement **aForm);
705     nsresult GetAccessKey(nsAString *aAccessKey);
706     nsresult SetAccessKey(const nsAString *aAccessKey);
707     nsresult GetCols(PRInt32 *aCols);
708     nsresult SetCols(PRInt32 aCols);
709     nsresult GetDisabled(PRBool *aDisabled);
710     nsresult SetDisabled(PRBool aDisabled);
711     nsresult GetName(nsAString *aName);
712     nsresult SetName(const nsAString *aName);
713     nsresult GetReadOnly(PRBool *aReadOnly);
714     nsresult SetReadOnly(PRBool aReadOnly);
715     nsresult GetRows(PRInt32 *aRows);
716     nsresult SetRows(PRInt32 aRows);
717     nsresult GetTabIndex(PRInt32 *aTabIndex);
718     nsresult SetTabIndex(PRInt32 aTabIndex);
719     nsresult GetType(nsAString *aType);
720     nsresult GetValue(nsAString *aValue);
721     nsresult SetValue(const nsAString *aValue);
722     nsresult Blur();
723     nsresult Focus();
724     nsresult Select();
725 }
726
727 [
728     object,
729     uuid(94928ab3-8b63-11d3-989d-001083010e9b)
730 ]
731 interface nsIURIContentListener : nsISupports
732 {
733     nsresult OnStartURIOpen(nsIURI *aURI, PRBool *_retval);
734     nsresult DoContent(const char *aContentType, PRBool aIsContentPreferred, nsIRequest *aRequest,
735         nsIStreamListener **aContentHandler, PRBool *_retval);
736     nsresult IsPreferred(const char *aContentType, char **aDesiredContentType, PRBool *_retval);
737     nsresult CanHandleContent(const char *aContentType, PRBool aIsContentPreferred,
738         char **aDesiredContentType, PRBool *_retval);
739     nsresult GetLoadCookie(nsISupports **aLoadCookie);
740     nsresult SetLoadCookie(nsISupports *aLoadCookie);
741     nsresult GetParentContentListener(nsIURIContentListener **aParentContentListener);
742     nsresult SetParentContentListener(nsIURIContentListener *aParentContentListener);
743 }
744
745 [
746     object,
747     uuid(44b78386-1dd2-11b2-9ad2-e4eee2ca1916)
748 ]
749 interface nsITooltipListener : nsISupports
750 {
751     nsresult OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText);
752     nsresult OnHideTooltip();
753 }
754
755 [
756     object,
757     uuid(69e5df00-7b8b-11d3-af61-00a024ffc08c)
758 ]
759 interface nsIWebBrowser : nsISupports
760 {
761     nsresult AddWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
762     nsresult RemoveWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
763     nsresult GetContainerWindow(nsIWebBrowserChrome **aContainerWindow);
764     nsresult SetContainerWindow(nsIWebBrowserChrome *aContainerWindow);
765     nsresult GetParentURIContentListener(nsIURIContentListener **aParentURIContentListener);
766     nsresult SetParentURIContentListener(nsIURIContentListener *aParentURIContentListener);
767     nsresult GetContentDOMWindow(nsIDOMWindow **aContentDOMWindow);
768 }
769
770 cpp_quote("#define SETUP_IS_CHROME_WRAPPER 7");
771
772 [
773     object,
774     uuid(f15398a0-8018-11d3-af70-00a024ffc08c)
775 ]
776 interface nsIWebBrowserSetup : nsISupports
777 {
778     nsresult SetProperty(PRUint32 aId, PRUint32 aValue);
779 }
780
781 typedef void* nativeWindow;
782
783 [
784     object,
785     uuid(046bc8a0-8015-11d3-af70-00a024ffc08c)
786 ]
787 interface nsIBaseWindow : nsISupports
788 {
789     nsresult InitWindow(nativeWindow parentNativeWindow, nsIWidget *parentWidget, PRInt32 x,
790             PRInt32 y, PRInt32 cx, PRInt32 cy);
791     nsresult Create();
792     nsresult Destroy();
793     nsresult SetPosition(PRInt32 x, PRInt32 y);
794     nsresult GetPosition(PRInt32 *x, PRInt32 *y);
795     nsresult SetSize(PRInt32 cx, PRInt32 cy, PRBool fRepaint);
796     nsresult GetSize(PRInt32 *cx, PRInt32 *cy);
797     nsresult SetPositionAndSize(PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy, PRBool fRepaint);
798     nsresult GetPositionAndSize(PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy);
799     nsresult Repaint(PRBool force);
800     nsresult GetParentWidget(nsIWidget **aParentWidget); 
801     nsresult SetParentWidget(nsIWidget *aParentWidget);
802     nsresult GetParentNativeWindow(nativeWindow *aParentNativeWindow);
803     nsresult SetParentNativeWindow(nativeWindow aParentNativeWindow);
804     nsresult GetVisibility(PRBool *aVisibility);
805     nsresult SetVisibility(PRBool aVisibility);
806     nsresult GetEnabled(PRBool *aEnabled);
807     nsresult SetEnabled(PRBool aEnabled);
808     nsresult GetBlurSuppression(PRBool *aBlurSuppression);
809     nsresult SetBlurSuppression(PRBool aBlurSuppression);
810     nsresult GetMainWidget(nsIWidget **aMainWidget);
811     nsresult SetFocus();
812     nsresult GetTitle(PRUnichar **aTitle);
813     nsresult SetTitle(const PRUnichar *aTitle);
814 }
815
816 cpp_quote("#define LOAD_FLAGS_NONE 0");
817
818 [
819     object,
820     uuid(f5d9e7b0-d930-11d3-b057-00a024ffc08c)
821 ]
822 interface nsIWebNavigation : nsISupports
823 {
824     nsresult GetCanGoBack(PRBool *aCanGoBack);
825     nsresult GetCanGoForward(PRBool *aCanGoForward);
826     nsresult GoBack();
827     nsresult GoForward();
828     nsresult GotoIndex(PRInt32 index);
829     nsresult LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer,
830             nsIInputStream *aPostData, nsIInputStream *aHeaders);
831     nsresult Reload(PRUint32 aReloadFlags);
832     nsresult Stop(PRUint32 aStopFlags);
833     nsresult GetDocument(nsIDOMDocument **aDocument);
834     nsresult GetCurrentURI(nsIURI **aCurrentURI);
835     nsresult GetReferringURI(nsIURI **aReferringURI);
836     nsresult GetSessionHistory(nsISHistory **aSessionHistory);
837     nsresult SetSessionHistory(nsISHistory *aSessionHistory);
838 }
839
840 [
841     object,
842     uuid(c8c0a080-0868-11d3-915f-d9d889d48e3c)
843 ]
844 interface nsIFile : nsISupports
845 {
846     nsresult Append(const nsAString *node);
847     nsresult AppendNative(const nsAString *node);
848     nsresult Normalize();
849     nsresult Create(PRUint32 type, PRUint32 permission);
850     nsresult GetLeafName(nsAString *aLeafName);
851     nsresult SetLeafName(const nsAString *aLeafName);
852     nsresult GetNativeLeafName(nsAString *aLeafName);
853     nsresult SetNativeLeafName(const nsAString *aLeafName);
854     nsresult CopyTo(nsIFile *newParentDir, const nsAString *newName);
855     nsresult CopyToNative(nsIFile *newParentDir, const nsAString *newName);
856     nsresult CopyToFollowingLinks(nsIFile *newParentDir, const nsAString *newName);
857     nsresult CopyToFollowingLinksNative(nsIFile *newParentDir, const nsAString *newName);
858     nsresult MoveTo(nsIFile *newParentDir, const nsAString *newName);
859     nsresult MoveToNative(nsIFile *newParentDir, const nsAString *newName);
860     nsresult Remove(PRBool recursive);
861     nsresult GetPermissions(PRUint32 *aPermissions);
862     nsresult SetPermissions(PRUint32 pPermissions);
863     nsresult GetPermissionsOfLink(PRUint32 *aPermissions);
864     nsresult SetPermissionsOfLink(PRUint32 pPermissions);
865     nsresult GetLastModifiedTime(PRInt64 *aLastModifiedTime);
866     nsresult SetLastModifiedTime(PRInt64 aLastModifiedTime);
867     nsresult GetFileSize(PRInt64 *aFileSize);
868     nsresult SetFileSize(PRInt64 aFileSize);
869     nsresult GetFileSizeOfLink(PRInt64 *aFileSizeOfLink);
870     nsresult GetTarget(nsAString *aTarget);
871     nsresult GetNativeTarget(nsACString *aNativeTarget);
872     nsresult GetPath(nsAString *aPath);
873     nsresult GetNativePath(nsACString *aNativePath);
874     nsresult Exists(PRBool *_retval);
875     nsresult IsWritable(PRBool *_retval);
876     nsresult IsReadable(PRBool *_retval);
877     nsresult IsExecutable(PRBool *_retval);
878     nsresult IsHidden(PRBool *_retval);
879     nsresult IsDirectory(PRBool *_retval);
880     nsresult IsFile(PRBool *_retval);
881     nsresult IsSymlink(PRBool *_retval);
882     nsresult IsSpecial(PRBool *_retval);
883     nsresult CreateUnique(PRUint32 type, PRUint32 permission);
884     nsresult Clone(nsIFile **_retval);
885     nsresult Equals(nsIFile *inFile, PRBool *_retval);
886     nsresult Contains(nsIFile *inFile, PRBool recir, PRBool *_retval);
887     nsresult GetParent(nsIFile **aParent);
888     nsresult GetDirectoryEntries(nsISimpleEnumerator **aDirectoryEntries);
889 }
890
891 [
892     object,
893     uuid(bddeda3f-9020-4d12-8c70-984ee9f7935e)
894 ]
895 interface nsIIOService : nsISupports
896 {
897     nsresult GetProtocolHandler(const char *aScheme, nsIProtocolHandler **_retval);
898     nsresult GetProtocolFlags(const char *aScheme, PRUint32 *_retval);
899     nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
900                     nsIURI **_retval);
901     nsresult NewFileURI(nsIFile *aFile, nsIURI **_retval);
902     nsresult NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval);
903     nsresult NewChannel(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
904                         nsIChannel **_retval);
905     nsresult GetOffline(PRBool *aOffline);
906     nsresult SetOffline(PRBool aOffline);
907     nsresult AllowPort(PRInt32 aPort, const char *aScheme, PRBool *_retval);
908     nsresult ExtractScheme(const nsACString *urlString, nsACString * _retval);
909 }
910
911 [
912     object,
913     uuid(9c5d3c58-1dd1-11b2-a1c9-f3699284657a)
914 ]
915 interface nsIWebBrowserFocus : nsISupports
916 {
917     nsresult Activate();
918     nsresult Deactivate();
919     nsresult SetFocusAtFirstElement();
920     nsresult SetFocusAtLastElement();
921     nsresult GetFocusedWindow(nsIDOMWindow **aFocusedWindow);
922     nsresult SetFocusedWindow(nsIDOMWindow *aFocusedWindow);
923     nsresult GetFocusedElement(nsIDOMElement **aFocusedElement);
924     nsresult SetFocusedElement(nsIDOMElement *aFocusedElement);
925 }
926
927 [
928     object,
929     uuid(ba434c60-9d52-11d3-afb0-00a024ffc08c)
930 ]
931 interface nsIWebBrowserChrome : nsISupports
932 {
933     nsresult SetStatus(PRUint32 statusType, const PRUnichar *status);
934     nsresult GetWebBrowser(nsIWebBrowser **aWebBrowser);
935     nsresult SetWebBrowser(nsIWebBrowser *aWebBrowser);
936     nsresult GetChromeFlags(PRUint32 *aChromeFlags);
937     nsresult SetChromeFlags(PRUint32 aChromeFlags);
938     nsresult DestroyBrowserWindow();
939     nsresult SizeBrowserTo(PRInt32 aCX, PRInt32 aCY);
940     nsresult ShowAsModal();
941     nsresult IsWindowModal(PRBool *_retval);
942     nsresult ExitModalEventLoop(nsresult aStatus);
943 }
944
945 [
946     object,
947     uuid(a66b7b80-ff46-bd97-0080-5f8ae38add32)
948 ]
949 interface nsIDOMEvent : nsISupports
950 {
951     nsresult GetType(nsAString *aType);
952     nsresult GetTarget(nsIDOMEventTarget **aTarget);
953     nsresult GetCurrentTarget(nsIDOMEventTarget **aCurrentTarget);
954     nsresult GetEventPhase(PRUint16 *aEventPhase);
955     nsresult GetBubbles(PRBool *aBubbles);
956     nsresult GetCancelable(PRBool *aCancelable);
957     nsresult GetTimeStamp(DOMTimeStamp *aTimeStamp);
958     nsresult StopPropagation();
959     nsresult PreventDefault();
960     nsresult InitEvent(const nsAString *eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg);
961 }
962
963 cpp_quote("#define CONTEXT_NONE              0x00");
964 cpp_quote("#define CONTEXT_LINK              0x01");
965 cpp_quote("#define CONTEXT_IMAGE             0x02");
966 cpp_quote("#define CONTEXT_DOCUMENT          0x04");
967 cpp_quote("#define CONTEXT_TEXT              0x08");
968 cpp_quote("#define CONTEXT_INPUT             0x10");
969 cpp_quote("#define CONTEXT_BACKGROUND_IMAGE  0x20");
970
971 [
972     object,
973     uuid(3478b6b0-3875-11d4-94ef-0020183bf181)
974 ]
975 interface nsIContextMenuListener : nsISupports
976 {
977     nsresult OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode);
978 }
979
980 [
981     object,
982     uuid(a6cf90c3-15b3-11d2-932e-00805f8add32)
983 ]
984 interface nsIDOMUIEvent : nsIDOMEvent
985 {
986     nsresult GetView(nsIDOMAbstractView **aView);
987     nsresult GetDetail(PRInt32 *aDetail);
988     nsresult InitUIEvent(const nsAString *typeArg, PRBool canBubbleArg, PRBool cancelableArg,
989             nsIDOMAbstractView *viewArg, PRInt32 detailArg);
990 }
991
992 [
993     object,
994     uuid(ff751edc-8b02-aae7-0010-8301838a3123)
995 ]
996 interface nsIDOMMouseEvent : nsIDOMUIEvent
997 {
998     nsresult GetScreenX(PRInt32 *aScreenX);
999     nsresult GetScreenY(PRInt32 *aScreenY);
1000     nsresult GetClientX(PRInt32 *aClientX);
1001     nsresult GetClientY(PRInt32 *aClientY);
1002     nsresult GetCtrlKey(PRBool *aCtrlKey);
1003     nsresult GetShiftKey(PRBool *aShiftKey);
1004     nsresult GetAltKey(PRBool *aAltKey);
1005     nsresult GetMetaKey(PRBool *aMetaKey);
1006     nsresult GetButton(PRUint16 *aButton);
1007     nsresult GetRelatedTarget(nsIDOMEventTarget * *aRelatedTarget);
1008     nsresult InitMouseEvent(const nsAString *typeArg, PRBool canBubbleArg, PRBool cancelableArg,
1009             nsIDOMAbstractView *viewArg, PRInt32 detailArg, PRInt32 screenXArg, PRInt32 screenYArg,
1010             PRInt32 clientXArg, PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg,
1011             PRBool shiftKeyArg, PRBool metaKeyArg, PRUint16 buttonArg,
1012             nsIDOMEventTarget *relatedTargetArg);
1013 }
1014
1015 [
1016      object,
1017      uuid(3e5432cd-9568-4bd1-8cbe-d50aba110743)
1018 ]
1019 interface nsIEmbeddingSiteWindow : nsISupports
1020 {
1021     nsresult SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy);
1022     nsresult GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy);
1023     nsresult SetFocus();
1024     nsresult GetVisibility(PRBool *aVisibility);
1025     nsresult SetVisibility(PRBool aVisibility);
1026     nsresult GetTitle(PRUnichar **aTitle);
1027     nsresult SetTitle(const PRUnichar *aTitle);
1028     nsresult GetSiteWindow(void **aSiteWindow);
1029 }
1030
1031 [
1032      object,
1033      uuid(2417cbfe-65ad-48a6-b4b6-eb84db174392)
1034 ]
1035 interface nsIComponentRegistrar : nsISupports
1036 {
1037     nsresult AutoRegister(nsIFile *aSpec);
1038     nsresult AutoUnregister(nsIFile *aSpec);
1039     nsresult RegisterFactory(const nsCID *aClass, const char *aClassName,
1040             const char *aContractID, nsIFactory *aFactory);
1041     nsresult UnregisterFactory(const nsCID *aClass, nsIFactory *aFactory);
1042     nsresult RegisterFactoryLocation(const nsCID *aClass, const char *aClassName,
1043             const char *aContractID, nsIFile *aFile, const char *aLoaderStr,
1044             const char *aType);
1045     nsresult UnregisterFactoryLocation(const nsCID *aClass, nsIFile *aFile);
1046     nsresult IsCIDRegistered(const nsCID *aClass, PRBool *_retval);
1047     nsresult IsContractIDRegistered(const char *aContractID, PRBool *_retval);
1048     nsresult EnumerateCIDs(nsISimpleEnumerator **_retval);
1049     nsresult EnumerateContractIDs(nsISimpleEnumerator **_retval);
1050     nsresult CIDToContractID(const nsCID *aClass, char **_retval);
1051     nsresult ContractIDToCID(const char *aContractID, nsCID **_retval);
1052 }
1053
1054 [
1055     object,
1056     uuid(1630c61a-325e-49ca-8759-a31b16c47aa5)
1057 ]
1058 interface nsIPromptService : nsISupports
1059 {
1060     nsresult Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1061             const PRUnichar *aText);
1062     nsresult AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1063             const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState);
1064     nsresult Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1065             const PRUnichar *aText, PRBool *_retval);
1066     nsresult ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1067             const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState,
1068             PRBool *_retval);
1069     nsresult ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1070             const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title,
1071             const PRUnichar *aButton1Title, const PRUnichar *aButton2Title,
1072             const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval);
1073     nsresult Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1074             const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg,
1075             PRBool *aCheckState, PRBool *_retval);
1076     nsresult PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1077             const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword,
1078             const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval);
1079     nsresult PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1080             const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg,
1081             PRBool *aCheckState, PRBool *_retval);
1082     nsresult Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
1083             const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList,
1084             PRInt32 *aOutSelection, PRBool *_retval);
1085 }
1086
1087 [
1088     object,
1089     uuid(b128a1e6-44f3-4331-8fbe-5af360ff21ee)
1090 ]
1091 interface nsITooltipTextProvider : nsISupports
1092 {
1093     nsresult GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval);
1094 }
1095
1096 [
1097     object,
1098     uuid(02b0625a-e7f3-11d2-9f5a-006008a6efe9)
1099 ]
1100 interface nsIProfile : nsISupports
1101 {
1102     nsresult GetProfileCount(PRInt32 *aProfileCount);
1103     nsresult GetProfileList(PRUint32 *length, PRUnichar ***profileNames);
1104     nsresult ProfileExists(const PRUnichar *profileName, PRBool *_retval);
1105     nsresult GetCurrentProfile(PRUnichar * *aCurrentProfile);
1106     nsresult SetCurrentProfile(const PRUnichar * aCurrentProfile);
1107     nsresult ShutDownCurrentProfile(PRUint32 shutDownType);
1108     nsresult CreateNewProfile(const PRUnichar *profileName,
1109             const PRUnichar *nativeProfileDir, const PRUnichar *langcode,
1110             PRBool useExistingDir);
1111     nsresult RenameProfile(const PRUnichar *oldName, const PRUnichar *newName);
1112     nsresult DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles);
1113     nsresult CloneProfile(const PRUnichar *profileName);
1114 }
1115
1116 [
1117     object,
1118     uuid(30465632-a777-44cc-90f9-8145475ef999)
1119 ]
1120 interface nsIWindowCreator : nsISupports
1121 {
1122     nsresult CreateChromeWindow(nsIWebBrowserChrome *parent, PRUint32 chromeFlags,
1123                                    nsIWebBrowserChrome **_retval);
1124 }
1125
1126 [
1127     object,
1128     uuid(f673ec81-a4b0-11d6-964b-eb5a2bf216fc)
1129 ]
1130 interface nsIWindowCreator2 : nsIWindowCreator
1131 {
1132     nsresult CreateChromeWindow2(nsIWebBrowserChrome *parent, PRUint32 chromeFlags,
1133                                  PRUint32 contextFlags, nsIURI *uri, PRBool *cancel,
1134                                  nsIWebBrowserChrome **_retval);
1135 }
1136
1137 [
1138     object,
1139     uuid(002286a8-494b-43b3-8ddd-49e3fc50622b)
1140 ]
1141 interface nsIWindowWatcher : nsISupports
1142 {
1143     nsresult OpenWindow(nsIDOMWindow *aParent, const char *aUrl, const char *aName,
1144                         const char *aFeatures, nsISupports *aArguments, nsIDOMWindow **_retval);
1145     nsresult RegisterNotification(nsIObserver *aObserver);
1146     nsresult UnregisterNotification(nsIObserver *aObserver);
1147     nsresult GetWindowEnumerator(nsISimpleEnumerator **_retval);
1148     nsresult GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt **_retval);
1149     nsresult GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuthPrompt **_retval);
1150     nsresult SetWindowCreator(nsIWindowCreator *creator);
1151     nsresult GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome **_retval);
1152     nsresult GetWindowByName(const PRUnichar *aTargetName, nsIDOMWindow *aCurrentWindow,
1153                              nsIDOMWindow **_retval);
1154     nsresult GetActiveWindow(nsIDOMWindow **aActiveWindow);
1155     nsresult SetActiveWindow(nsIDOMWindow *aActiveWindow);
1156 }
1157
1158 /*
1159  * NOTE:
1160  * This is a private Wine interface that is implemented by our implementation
1161  * of nsIURI to store its owner.
1162  */
1163 [
1164     object,
1165     uuid(5088272e-900b-11da-c687-000fea57f21a)
1166 ]
1167 interface nsIWineURI : nsIURI
1168 {
1169     typedef struct NSContainer NSContainer;
1170
1171     nsresult GetNSContainer(NSContainer **aNSContainer);
1172     nsresult SetNSContainer(NSContainer *aNSContainer);
1173 }