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