mshtml: Added nsIInterfaceRequestor implementation.
[wine] / dlls / mshtml / nsiface.idl
1 /*
2  * Copyright 2005 Jacek Caban
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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 nsCStringContainer nsCStringContainer;
51 typedef struct nsStringContainer nsStringContainer;
52 typedef nsCStringContainer nsACString;
53 typedef nsStringContainer nsAString;
54
55 interface nsIWebBrowserChrome;
56 interface nsILoadGroup;
57
58 [
59     object,
60     uuid(00000000-0000-0000-c000-000000000046)
61 ]
62 interface nsISupports
63 {
64     nsresult QueryInterface(nsIIDRef riid, nsQIResult result);
65     nsrefcnt AddRef();
66     nsrefcnt Release();
67 }
68
69 /* Currently we don't need a full declaration of these interfaces */
70 typedef nsISupports nsIWeakReference;
71 typedef nsISupports nsIDOMDocument;
72 typedef nsISupports nsISHistory;
73 typedef nsISupports nsISimpleEnumerator;
74 typedef nsISupports nsIWidget;
75 typedef nsISupports nsIProtocolHandler;
76 typedef nsISupports nsIDOMElement;
77 typedef nsISupports nsIDOMNode;
78 typedef nsISupports nsIDOMEventTarget;
79 typedef nsISupports nsIDOMAbstractView;
80 typedef nsISupports nsIStreamListener;
81 typedef nsISupports nsIHttpHeaderVisitor;
82 typedef nsISupports nsIRequestObserver;
83 typedef nsISupports nsIDOMBarProp;
84 typedef nsISupports nsIDOMWindowCollection;
85 typedef nsISupports nsISelection;
86
87 [
88     object,
89     uuid(8bb35ed9-e332-462d-9155-4a002ab5c958)
90 ]
91 interface nsIServiceManager : nsISupports
92 {
93     nsresult GetService(nsCIDRef aClass, nsIIDRef aIID, void **result);
94     nsresult GetServiceByContactID(nsstring aContactID, nsIIDRef aIID, void **result);
95     nsresult IsServiceInstantiated(nsCIDRef aClass, nsIIDRef aIID, BOOL *_retval);
96     nsresult IsServiceInstantiatedByContractID(nsstring aContractID, nsIIDRef aIID, BOOL *_retval);
97 }
98
99 [
100     object,
101     uuid(00000001-0000-0000-c000-000000000046)
102 ]
103 interface nsIFactory : nsISupports
104 {
105     nsresult CreateInstance(nsISupports *aOuter, const nsIID *iid, void **result);
106     nsresult LockFactory(PRBool lock);
107 }
108
109 [
110     object,
111     uuid(db242e01-e4d9-11d2-9dde-000064657374)
112 ]
113 interface nsIObserver : nsISupports
114 {
115     nsresult Observe(nsISupports *aSubject, nsstring aTopic, nswstring aData);
116 }
117
118 [
119     object,
120     uuid(a88e5a60-205a-4bb1-94e1-2628daf51eae)
121 ]
122 interface nsIComponentManager : nsISupports
123 {
124     nsresult GetClassObject(nsCIDRef aClass, nsIIDRef aIID, nsQIResult result);
125     nsresult GetClassObjectByContractID(nsstring aContractID, nsIIDRef aIID, nsQIResult result);
126     nsresult CreateInstance(nsCIDRef aClass, nsISupports *aDelegate, nsIIDRef aIID,
127             nsQIResult result);
128     nsresult CreateInstanceByContractID(nsstring aContractID, nsISupports *aDelegate,
129             nsIIDRef aIID, nsQIResult result);
130 }
131
132 [
133     object,
134     uuid(033a1470-8b2a-11d3-af88-00a024ffc08c)
135 ]
136 interface nsIInterfaceRequestor : nsISupports
137 {
138     nsresult GetInterface(const nsIID *riid, void **result);
139 }
140
141 [
142     object,
143     uuid(fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a)
144 ]
145 interface nsIInputStream : nsISupports
146 {
147     nsresult Close();
148     nsresult Available(PRUint32 *_retval);
149     nsresult Read(char *aBuf, PRUint32 aCount, PRUint32 *_retval);
150     nsresult ReadSegments(nsresult (*aWriter)(nsIInputStream *aInStream, 
151             void *aClosure, const char *aFromSegment, PRUint32 aToOffset,
152             PRUint32 aCount, PRUint32 *aWriteCount),
153             void *aClosure, PRUint32 aCount, PRUint32 *_retval);
154     nsresult IsNonBlocking(PRBool *_retval);
155 }
156
157 [
158     object,
159     uuid(450cd2d4-f0fd-424d-b365-b1251f80fd53)
160 ]
161 interface nsIStringInputStream : nsIInputStream
162 {
163     nsresult SetData(const char *data, PRInt32 dataLen);
164     nsresult AdoptData(char *data, PRInt32 dataLen);
165     nsresult ShareData(const char *data, PRInt32 dataLen);
166 }
167
168 [
169     object,
170     uuid(07a22cc0-0ce5-11d3-9331-00104ba0fd40)
171 ]
172 interface nsIURI : nsISupports
173 {
174     nsresult GetSpec(nsACString *aSpec);
175     nsresult SetSpec(const nsACString *aSpec);
176     nsresult GetPrePath(nsACString *aPrePath);
177     nsresult GetScheme(nsACString *aScheme);
178     nsresult SetScheme(const nsACString *aScheme);
179     nsresult GetUserPass(nsACString *aUserPass);
180     nsresult SetUserPass(const nsACString *aUserPass);
181     nsresult GetUsername(nsACString *aUsername);
182     nsresult SetUsername(const nsACString *aUsername);
183     nsresult GetPassword(nsACString *aPassword);
184     nsresult SetPassword(const nsACString *aPassword);
185     nsresult GetHostPort(nsACString *aHostPort);
186     nsresult SetHostPort(const nsACString *aHostPort);
187     nsresult GetHost(nsACString *aHost);
188     nsresult SetHost(const nsACString *aHost);
189     nsresult GetPort(PRInt32 *aPort);
190     nsresult SetPort(PRInt32 aPort);
191     nsresult GetPath(nsACString *aPath);
192     nsresult SetPath(const nsACString *aPath);
193     nsresult Equals(nsIURI *other, PRBool *_retval);
194     nsresult SchemeIs(const char *scheme, PRBool *_retval);
195     nsresult Clone(nsIURI **_retval);
196     nsresult Resolve(const nsACString *relativePath, nsACString *_retval);
197     nsresult GetAsciiSpec(nsACString *aAsciiSpec);
198     nsresult GetAsciiHost(nsACString *aAsciiHost);
199     nsresult GetOriginCharset(nsACString *aOriginCharset);
200 }
201
202 [
203     object,
204     uuid(ef6bfbd2-fd46-48d8-96b7-9f8f0fd387fe)
205 ]
206 interface nsIRequest : nsISupports
207 {
208     nsresult GetName(nsACString *aName);
209     nsresult IsPending(PRBool *_retval);
210     nsresult GetStatus(nsresult *aStatus);
211     nsresult Cancel(nsresult aStatus);
212     nsresult Suspend();
213     nsresult Resume();
214     nsresult GetLoadGroup(nsILoadGroup **aLoadGroup);
215     nsresult SetLoadGroup(nsILoadGroup *aLoadGroup);
216     nsresult GetLoadFlags(nsLoadFlags *aLoadFlags);
217     nsresult SetLoadFlags(nsLoadFlags aLoadFlags);
218 }
219
220 [
221     object,
222     uuid(3de0a31c-feaf-400f-9f1e-4ef71f8b20cc)
223 ]
224 interface nsILoadGroup : nsIRequest
225 {
226     nsresult GetGroupObserver(nsIRequestObserver **aGroupObserver);
227     nsresult SetGroupObserver(nsIRequestObserver *aGroupObserver);
228     nsresult GetDefaultLoadRequest(nsIRequest **aDefaultLoadRequest);
229     nsresult SetDefaultLoadRequest(nsIRequest *aDefaultLoadRequest);
230     nsresult AddRequest(nsIRequest *aRequest, nsISupports *aContext);
231     nsresult RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus);
232     nsresult GetRequests(nsISimpleEnumerator **aRequests);
233     nsresult GetActiveCount(PRUint32 *aActiveCount);
234     nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
235     nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
236 }
237
238 [
239     object,
240     uuid(c63a055a-a676-4e71-bf3c-6cfa11082018)
241 ]
242 interface nsIChannel : nsIRequest
243 {
244     nsresult GetOriginalURI(nsIURI **aOriginalURI);
245     nsresult SetOriginalURI(nsIURI *aOriginalURI);
246     nsresult GetURI(nsIURI **aURI);
247     nsresult GetOwner(nsISupports **aOwner);
248     nsresult SetOwner(nsISupports *aOwner);
249     nsresult GetNotificationCallbacks(nsIInterfaceRequestor **aNotificationCallbacks);
250     nsresult SetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
251     nsresult GetSecurityInfo(nsISupports **aSecurityInfo);
252     nsresult GetContentType(nsACString *aContentType);
253     nsresult SetContentType(const nsACString *aContentType);
254     nsresult GetContentCharset(nsACString *aContentCharset);
255     nsresult SetContentCharset(const nsACString *aContentCharset);
256     nsresult GetContentLength(PRInt32 *aContentLength);
257     nsresult SetContentLength(PRInt32 aContentLength);
258     nsresult Open(nsIInputStream **_retval);
259     nsresult AsyncOpen(nsIStreamListener *aListener, nsISupports *aContext);
260 }
261
262 [
263     object,
264     uuid(9277fe09-f0cc-4cd9-bbce-581dd94b0260)
265 ]
266 interface nsIHttpChannel : nsIChannel
267 {
268     nsresult GetRequestMethod(nsACString *aRequestMethod);
269     nsresult SetRequestMethod(const nsACString *aRequestMethod);
270     nsresult GetReferrer(nsIURI **aReferrer);
271     nsresult SetReferrer(nsIURI *aReferrer);
272     nsresult GetRequestHeader(const nsACString *aHeader, nsACString *_retval);
273     nsresult SetRequestHeader(const nsACString *aHeader, const nsACString *aValue, PRBool aMerge);
274     nsresult VisitRequestHeaders(nsIHttpHeaderVisitor *aVisitor);
275     nsresult GetAllowPipelining(PRBool *aAllowPipelining);
276     nsresult SetAllowPipelining(PRBool aAllowPipelining);
277     nsresult GetRedirectionLimit(PRUint32 *aRedirectionLimit);
278     nsresult SetRedirectionLimit(PRUint32 aRedirectionLimit);
279     nsresult GetResponseStatus(PRUint32 *aResponseStatus);
280     nsresult GetResponseStatusText(nsACString *aResponseStatusText);
281     nsresult GetRequestSucceeded(PRBool *aRequestSucceeded);
282     nsresult GetResponseHeader(const nsACString *header, nsACString *_retval);
283     nsresult SetResponseHeader(const nsACString *header, const nsACString *value, PRBool merge);
284     nsresult VisitResponseHeaders(nsIHttpHeaderVisitor *aVisitor);
285     nsresult IsNoStoreResponse(PRBool *_retval);
286     nsresult IsNoCacheResponse(PRBool *_retval);
287 }
288
289 [
290     object,
291     uuid(ddf633d8-e9a4-439d-ad88-de636fd9bb75)
292 ]
293 interface nsIUploadChannel : nsISupports
294 {
295     nsresult SetUploadStream(nsIInputStream *aStream, const nsACString *aContentType,
296                              PRInt32 aContentLength);
297     nsresult GetUploadStream(nsIInputStream **aUploadStream);
298 }
299
300 [
301     object,
302     uuid(a6cf906b-15b3-11d2-932e-00805f8add32)
303 ]
304 interface nsIDOMWindow : nsISupports
305 {
306     nsresult GetDocument(nsIDOMDocument **aDocument);
307     nsresult GetParent(nsIDOMWindow **aParent);
308     nsresult GetTop(nsIDOMWindow **aTop);
309     nsresult GetScrollbars(nsIDOMBarProp **aScrollbars);
310     nsresult GetFrames(nsIDOMWindowCollection **aFrames);
311     nsresult GetName(nsAString *aName);
312     nsresult SetName(const nsAString *aName);
313     nsresult GetTextZoom(float *aTextZoom);
314     nsresult SetTextZoom(float aTextZoom);
315     nsresult GetScrollX(PRInt32 *aScrollX);
316     nsresult GetScrollY(PRInt32 *aScrollY);
317     nsresult ScrollTo(PRInt32 xScroll, PRInt32 yScroll);
318     nsresult ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif);
319     nsresult GetSelection(nsISelection **_retval);
320     nsresult ScrollByLines(PRInt32 numLines);
321     nsresult ScrollByPages(PRInt32 numPages);
322     nsresult SizeToContent();
323 }
324
325 [
326     object,
327     uuid(94928ab3-8b63-11d3-989d-001083010e9b)
328 ]
329 interface nsIURIContentListener : nsISupports
330 {
331     nsresult OnStartURIOpen(nsIURI *aURI, PRBool *_retval);
332     nsresult DoContent(const char *aContentType, PRBool aIsContentPreferred, nsIRequest *aRequest,
333         nsIStreamListener **aContentHandler, PRBool *_retval);
334     nsresult IsPreferred(const char *aContentType, char **aDesiredContentType, PRBool *_retval);
335     nsresult CanHandleContent(const char *aContentType, PRBool aIsContentPreferred,
336         char **aDesiredContentType, PRBool *_retval);
337     nsresult GetLoadCookie(nsISupports **aLoadCookie);
338     nsresult SetLoadCookie(nsISupports *aLoadCookie);
339     nsresult GetParentContentListener(nsIURIContentListener **aParentContentListener);
340     nsresult SetParentContentListener(nsIURIContentListener *aParentContentListener);
341 }
342
343 [
344     object,
345     uuid(69e5df00-7b8b-11d3-af61-00a024ffc08c)
346 ]
347 interface nsIWebBrowser : nsISupports
348 {
349     nsresult AddWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
350     nsresult RemoveWebBrowserListener(nsIWeakReference *aListener, const nsIID *aIID);
351     nsresult GetContainerWindow(nsIWebBrowserChrome **aContainerWindow);
352     nsresult SetContainerWindow(nsIWebBrowserChrome *aContainerWindow);
353     nsresult GetParentURIContentListener(nsIURIContentListener **aParentURIContentListener);
354     nsresult SetParentURIContentListener(nsIURIContentListener *aParentURIContentListener);
355     nsresult GetContentDOMWindow(nsIDOMWindow **aContentDOMWindow);
356 }
357
358 cpp_quote("#define SETUP_IS_CHROME_WRAPPER 7");
359
360 [
361     object,
362     uuid(f15398a0-8018-11d3-af70-00a024ffc08c)
363 ]
364 interface nsIWebBrowserSetup : nsISupports
365 {
366     nsresult SetProperty(PRUint32 aId, PRUint32 aValue);
367 }
368
369 typedef void* nativeWindow;
370
371 [
372     object,
373     uuid(046bc8a0-8015-11d3-af70-00a024ffc08c)
374 ]
375 interface nsIBaseWindow : nsISupports
376 {
377     nsresult InitWindow(nativeWindow parentNativeWindow, nsIWidget *parentWidget, PRInt32 x,
378             PRInt32 y, PRInt32 cx, PRInt32 cy);
379     nsresult Create();
380     nsresult Destroy();
381     nsresult SetPosition(PRInt32 x, PRInt32 y);
382     nsresult GetPosition(PRInt32 *x, PRInt32 *y);
383     nsresult SetSize(PRInt32 cx, PRInt32 cy, PRBool fRepaint);
384     nsresult GetSize(PRInt32 *cx, PRInt32 *cy);
385     nsresult SetPositionAndSize(PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy, PRBool fRepaint);
386     nsresult GetPositionAndSize(PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy);
387     nsresult Repaint(PRBool force);
388     nsresult GetParentWidget(nsIWidget **aParentWidget); 
389     nsresult SetParentWidget(nsIWidget *aParentWidget);
390     nsresult GetParentNativeWindow(nativeWindow *aParentNativeWindow);
391     nsresult SetParentNativeWindow(nativeWindow aParentNativeWindow);
392     nsresult GetVisibility(PRBool *aVisibility);
393     nsresult SetVisibility(PRBool aVisibility);
394     nsresult GetEnabled(PRBool *aEnabled);
395     nsresult SetEnabled(PRBool aEnabled);
396     nsresult GetBlurSuppression(PRBool *aBlurSuppression);
397     nsresult SetBlurSuppression(PRBool aBlurSuppression);
398     nsresult GetMainWidget(nsIWidget **aMainWidget);
399     nsresult SetFocus();
400     nsresult GetTitle(PRUnichar **aTitle);
401     nsresult SetTitle(const PRUnichar *aTitle);
402 }
403
404 cpp_quote("#define LOAD_FLAGS_NONE 0");
405
406 [
407     object,
408     uuid(f5d9e7b0-d930-11d3-b057-00a024ffc08c)
409 ]
410 interface nsIWebNavigation : nsISupports
411 {
412     nsresult GetCanGoBack(PRBool *aCanGoBack);
413     nsresult GetCanGoForward(PRBool *aCanGoForward);
414     nsresult GoBack();
415     nsresult GoForward();
416     nsresult GotoIndex(PRInt32 index);
417     nsresult LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer,
418             nsIInputStream *aPostData, nsIInputStream *aHeaders);
419     nsresult Reload(PRUint32 aReloadFlags);
420     nsresult Stop(PRUint32 aStopFlags);
421     nsresult GetDocument(nsIDOMDocument **aDocument);
422     nsresult GetCurrentURI(nsIURI **aCurrentURI);
423     nsresult GetReferringURI(nsIURI **aReferringURI);
424     nsresult GetSessionHistory(nsISHistory **aSessionHistory);
425     nsresult SetSessionHistory(nsISHistory *aSessionHistory);
426 }
427
428 [
429     object,
430     uuid(c8c0a080-0868-11d3-915f-d9d889d48e3c)
431 ]
432 interface nsIFile : nsISupports
433 {
434     nsresult Append(const nsAString *node);
435     nsresult AppendNative(const nsAString *node);
436     nsresult Normalize();
437     nsresult Create(PRUint32 type, PRUint32 permission);
438     nsresult GetLeafName(nsAString *aLeafName);
439     nsresult SetLeafName(const nsAString *aLeafName);
440     nsresult GetNativeLeafName(nsAString *aLeafName);
441     nsresult SetNativeLeafName(const nsAString *aLeafName);
442     nsresult CopyTo(nsIFile *newParentDir, const nsAString *newName);
443     nsresult CopyToNative(nsIFile *newParentDir, const nsAString *newName);
444     nsresult CopyToFollowingLinks(nsIFile *newParentDir, const nsAString *newName);
445     nsresult CopyToFollowingLinksNative(nsIFile *newParentDir, const nsAString *newName);
446     nsresult MoveTo(nsIFile *newParentDir, const nsAString *newName);
447     nsresult MoveToNative(nsIFile *newParentDir, const nsAString *newName);
448     nsresult Remove(PRBool recursive);
449     nsresult GetPermissions(PRUint32 *aPermissions);
450     nsresult SetPermissions(PRUint32 pPermissions);
451     nsresult GetPermissionsOfLink(PRUint32 *aPermissions);
452     nsresult SetPermissionsOfLink(PRUint32 pPermissions);
453     nsresult GetLastModifiedTime(PRInt64 *aLastModifiedTime);
454     nsresult SetLastModifiedTime(PRInt64 aLastModifiedTime);
455     nsresult GetFileSize(PRInt64 *aFileSize);
456     nsresult SetFileSize(PRInt64 aFileSize);
457     nsresult GetFileSizeOfLink(PRInt64 *aFileSizeOfLink);
458     nsresult GetTarget(nsAString *aTarget);
459     nsresult GetNativeTarget(nsACString *aNativeTarget);
460     nsresult GetPath(nsAString *aPath);
461     nsresult GetNativePath(nsACString *aNativePath);
462     nsresult Exists(PRBool *_retval);
463     nsresult IsWritable(PRBool *_retval);
464     nsresult IsReadable(PRBool *_retval);
465     nsresult IsExecutable(PRBool *_retval);
466     nsresult IsHidden(PRBool *_retval);
467     nsresult IsDirectory(PRBool *_retval);
468     nsresult IsFile(PRBool *_retval);
469     nsresult IsSymlink(PRBool *_retval);
470     nsresult IsSpecial(PRBool *_retval);
471     nsresult CreateUnique(PRUint32 type, PRUint32 permission);
472     nsresult Clone(nsIFile **_retval);
473     nsresult Equals(nsIFile *inFile, PRBool *_retval);
474     nsresult Contains(nsIFile *inFile, PRBool recir, PRBool *_retval);
475     nsresult GetParent(nsIFile **aParent);
476     nsresult GetDirectoryEntries(nsISimpleEnumerator **aDirectoryEntries);
477 }
478
479 [
480     object,
481     uuid(86d02f0e-219b-4cfc-9c88-bd98d2cce0b8)
482 ]
483 interface nsIWebBrowserStream : nsISupports
484 {
485     nsresult OpenStream(nsIURI *aBaseURI, nsACString *aContentType);
486     nsresult AppendToStream(PRUint8 *aData, PRUint32 aLen);
487     nsresult CloseStream();
488 }
489
490 [
491     object,
492     uuid(bddeda3f-9020-4d12-8c70-984ee9f7935e)
493 ]
494 interface nsIIOService : nsISupports
495 {
496     nsresult GetProtocolHandler(const char *aScheme, nsIProtocolHandler **_retval);
497     nsresult GetProtocolFlags(const char *aScheme, PRUint32 *_retval);
498     nsresult NewURI(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
499                     nsIURI **_retval);
500     nsresult NewFileURI(nsIFile *aFile, nsIURI **_retval);
501     nsresult NewChannelFromURI(nsIURI *aURI, nsIChannel **_retval);
502     nsresult NewChannel(const nsACString *aSpec, const char *aOriginCharset, nsIURI *aBaseURI,
503                         nsIChannel **_retval);
504     nsresult GetOffline(PRBool *aOffline);
505     nsresult SetOffline(PRBool aOffline);
506     nsresult AllowPort(PRInt32 aPort, const char *aScheme, PRBool *_retval);
507     nsresult ExtractScheme(const nsACString *urlString, nsACString * _retval);
508 }
509
510 [
511     object,
512     uuid(9c5d3c58-1dd1-11b2-a1c9-f3699284657a)
513 ]
514 interface nsIWebBrowserFocus : nsISupports
515 {
516     nsresult Activate();
517     nsresult Deactivate();
518     nsresult SetFocusAtFirstElement();
519     nsresult SetFocusAtLastElement();
520     nsresult GetFocusedWindow(nsIDOMWindow **aFocusedWindow);
521     nsresult SetFocusedWindow(nsIDOMWindow *aFocusedWindow);
522     nsresult GetFocusedElement(nsIDOMElement **aFocusedElement);
523     nsresult SetFocusedElement(nsIDOMElement *aFocusedElement);
524 }
525
526 [
527     object,
528     uuid(ba434c60-9d52-11d3-afb0-00a024ffc08c)
529 ]
530 interface nsIWebBrowserChrome : nsISupports
531 {
532     nsresult SetStatus(PRUint32 statusType, const PRUnichar *status);
533     nsresult GetWebBrowser(nsIWebBrowser **aWebBrowser);
534     nsresult SetWebBrowser(nsIWebBrowser *aWebBrowser);
535     nsresult GetChromeFlags(PRUint32 *aChromeFlags);
536     nsresult SetChromeFlags(PRUint32 aChromeFlags);
537     nsresult DestroyBrowserWindow();
538     nsresult SizeBrowserTo(PRInt32 aCX, PRInt32 aCY);
539     nsresult ShowAsModal();
540     nsresult IsWindowModal(PRBool *_retval);
541     nsresult ExitModalEventLoop(nsresult aStatus);
542 }
543
544 [
545     object,
546     uuid(a66b7b80-ff46-bd97-0080-5f8ae38add32)
547 ]
548 interface nsIDOMEvent : nsISupports
549 {
550     nsresult GetType(nsAString *aType);
551     nsresult GetTarget(nsIDOMEventTarget **aTarget);
552     nsresult GetCurrentTarget(nsIDOMEventTarget **aCurrentTarget);
553     nsresult GetEventPhase(PRUint16 *aEventPhase);
554     nsresult GetBubbles(PRBool *aBubbles);
555     nsresult GetCancelable(PRBool *aCancelable);
556     nsresult GetTimeStamp(DOMTimeStamp *aTimeStamp);
557     nsresult StopPropagation();
558     nsresult PreventDefault();
559     nsresult InitEvent(const nsAString *eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg);
560 }
561
562 cpp_quote("#define CONTEXT_NONE              0x00");
563 cpp_quote("#define CONTEXT_LINK              0x01");
564 cpp_quote("#define CONTEXT_IMAGE             0x02");
565 cpp_quote("#define CONTEXT_DOCUMENT          0x04");
566 cpp_quote("#define CONTEXT_TEXT              0x08");
567 cpp_quote("#define CONTEXT_INPUT             0x10");
568 cpp_quote("#define CONTEXT_BACKGROUND_IMAGE  0x20");
569
570 [
571     object,
572     uuid(3478b6b0-3875-11d4-94ef-0020183bf181)
573 ]
574 interface nsIContextMenuListener : nsISupports
575 {
576     nsresult OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode);
577 }
578
579 [
580     object,
581     uuid(a6cf90c3-15b3-11d2-932e-00805f8add32)
582 ]
583 interface nsIDOMUIEvent : nsIDOMEvent
584 {
585     nsresult GetView(nsIDOMAbstractView **aView);
586     nsresult GetDetail(PRInt32 *aDetail);
587     nsresult InitUIEvent(const nsAString *typeArg, PRBool canBubbleArg, PRBool cancelableArg,
588             nsIDOMAbstractView *viewArg, PRInt32 detailArg);
589 }
590
591 [
592     object,
593     uuid(ff751edc-8b02-aae7-0010-8301838a3123)
594 ]
595 interface nsIDOMMouseEvent : nsIDOMUIEvent
596 {
597     nsresult GetScreenX(PRInt32 *aScreenX);
598     nsresult GetScreenY(PRInt32 *aScreenY);
599     nsresult GetClientX(PRInt32 *aClientX);
600     nsresult GetClientY(PRInt32 *aClientY);
601     nsresult GetCtrlKey(PRBool *aCtrlKey);
602     nsresult GetShiftKey(PRBool *aShiftKey);
603     nsresult GetAltKey(PRBool *aAltKey);
604     nsresult GetMetaKey(PRBool *aMetaKey);
605     nsresult GetButton(PRUint16 *aButton);
606     nsresult GetRelatedTarget(nsIDOMEventTarget * *aRelatedTarget);
607     nsresult InitMouseEvent(const nsAString *typeArg, PRBool canBubbleArg, PRBool cancelableArg,
608             nsIDOMAbstractView *viewArg, PRInt32 detailArg, PRInt32 screenXArg, PRInt32 screenYArg,
609             PRInt32 clientXArg, PRInt32 clientYArg, PRBool ctrlKeyArg, PRBool altKeyArg,
610             PRBool shiftKeyArg, PRBool metaKeyArg, PRUint16 buttonArg,
611             nsIDOMEventTarget *relatedTargetArg);
612 }
613
614 [
615      object,
616      uuid(3e5432cd-9568-4bd1-8cbe-d50aba110743)
617 ]
618 interface nsIEmbeddingSiteWindow : nsISupports
619 {
620     nsresult SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy);
621     nsresult GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt32 *cx, PRInt32 *cy);
622     nsresult SetFocus();
623     nsresult GetVisibility(PRBool *aVisibility);
624     nsresult SetVisibility(PRBool aVisibility);
625     nsresult GetTitle(PRUnichar **aTitle);
626     nsresult SetTitle(const PRUnichar *aTitle);
627     nsresult GetSiteWindow(void **aSiteWindow);
628 }
629
630 [
631      object,
632      uuid(2417cbfe-65ad-48a6-b4b6-eb84db174392)
633 ]
634 interface nsIComponentRegistrar : nsISupports
635 {
636     nsresult AutoRegister(nsIFile *aSpec);
637     nsresult AutoUnregister(nsIFile *aSpec);
638     nsresult RegisterFactory(const nsCID *aClass, const char *aClassName,
639             const char *aContractID, nsIFactory *aFactory);
640     nsresult UnregisterFactory(const nsCID *aClass, nsIFactory *aFactory);
641     nsresult RegisterFactoryLocation(const nsCID *aClass, const char *aClassName,
642             const char *aContractID, nsIFile *aFile, const char *aLoaderStr,
643             const char *aType);
644     nsresult UnregisterFactoryLocation(const nsCID *aClass, nsIFile *aFile);
645     nsresult IsCIDRegistered(const nsCID *aClass, PRBool *_retval);
646     nsresult IsContractIDRegistered(const char *aContractID, PRBool *_retval);
647     nsresult EnumerateCIDs(nsISimpleEnumerator **_retval);
648     nsresult EnumerateContractIDs(nsISimpleEnumerator **_retval);
649     nsresult CIDToContractID(const nsCID *aClass, char **_retval);
650     nsresult ContractIDToCID(const char *aContractID, nsCID **_retval);
651 }
652
653 [
654     object,
655     uuid(1630c61a-325e-49ca-8759-a31b16c47aa5)
656 ]
657 interface nsIPromptService : nsISupports
658 {
659     nsresult Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
660             const PRUnichar *aText);
661     nsresult AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
662             const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState);
663     nsresult Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
664             const PRUnichar *aText, PRBool *_retval);
665     nsresult ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
666             const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState,
667             PRBool *_retval);
668     nsresult ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
669             const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title,
670             const PRUnichar *aButton1Title, const PRUnichar *aButton2Title,
671             const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval);
672     nsresult Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
673             const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg,
674             PRBool *aCheckState, PRBool *_retval);
675     nsresult PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
676             const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword,
677             const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval);
678     nsresult PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
679             const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg,
680             PRBool *aCheckState, PRBool *_retval);
681     nsresult Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle,
682             const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList,
683             PRInt32 *aOutSelection, PRBool *_retval);
684 }
685
686 [
687     object,
688     uuid(02b0625a-e7f3-11d2-9f5a-006008a6efe9)
689 ]
690 interface nsIProfile : nsISupports
691 {
692     nsresult GetProfileCount(PRInt32 *aProfileCount);
693     nsresult GetProfileList(PRUint32 *length, PRUnichar ***profileNames);
694     nsresult ProfileExists(const PRUnichar *profileName, PRBool *_retval);
695     nsresult GetCurrentProfile(PRUnichar * *aCurrentProfile);
696     nsresult SetCurrentProfile(const PRUnichar * aCurrentProfile);
697     nsresult ShutDownCurrentProfile(PRUint32 shutDownType);
698     nsresult CreateNewProfile(const PRUnichar *profileName,
699             const PRUnichar *nativeProfileDir, const PRUnichar *langcode,
700             PRBool useExistingDir);
701     nsresult RenameProfile(const PRUnichar *oldName, const PRUnichar *newName);
702     nsresult DeleteProfile(const PRUnichar *name, PRBool canDeleteFiles);
703     nsresult CloneProfile(const PRUnichar *profileName);
704 }
705
706 /*
707  * NOTE:
708  * This is a private Wine interface that is implemented by our implementation
709  * of nsIURI to store its owner.
710  */
711 [
712     object,
713     uuid(5088272e-900b-11da-c687-000fea57f21a)
714 ]
715 interface nsIWineURI : nsIURI
716 {
717     typedef struct NSContainer NSContainer;
718
719     nsresult GetNSContainer(NSContainer **aNSContainer);
720     nsresult SetNSContainer(NSContainer *aNSContainer);
721 }