2 * Copyright 2005 Jacek Caban
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.
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.
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
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,
28 typedef HRESULT nsresult
;
29 typedef ULONG nsrefcnt
;
33 typedef REFIID nsIIDRef
;
34 typedef nsIIDRef nsCIDRef
;
36 typedef void** nsQIResult
;
37 typedef LPSTR nsstring
;
38 typedef WCHAR PRUnichar
;
39 typedef LPWSTR nswstring
;
40 typedef ULONG PRUint32
;
42 typedef WORD PRUint16
;
45 typedef LARGE_INTEGER PRInt64
;
46 typedef ULARGE_INTEGER PRUint64
;
48 typedef int nsAString
;
49 typedef struct nsACString nsACString
;
50 typedef PRUint64 DOMTimeStamp
;
52 interface nsIWebBrowserChrome
;
56 uuid(00000000-0000-0000-c000
-000000000046)
60 nsresult QueryInterface
(nsIIDRef riid
, nsQIResult result
);
65 /* Currently we don't need a full declaration of these interfaces */
66 typedef nsISupports nsIWeakReference
;
67 typedef nsISupports nsIDOMWindow
;
68 typedef nsISupports nsIInputStream
;
69 typedef nsISupports nsIDOMDocument
;
70 typedef nsISupports nsISHistory
;
71 typedef nsISupports nsISimpleEnumerator
;
72 typedef nsISupports nsIWidget
;
73 typedef nsISupports nsIProtocolHandler
;
74 typedef nsISupports nsIChannel
;
75 typedef nsISupports nsIDOMElement
;
76 typedef nsISupports nsIDOMNode
;
77 typedef nsISupports nsIDOMEventTarget
;
78 typedef nsISupports nsIDOMAbstractView
;
79 typedef nsISupports nsIRequest
;
80 typedef nsISupports nsIStreamListener
;
84 uuid(8bb35ed9
-e332
-462d
-9155-4a002ab5c958
)
86 interface nsIServiceManager
: nsISupports
88 nsresult GetService
(nsCIDRef aClass
, nsIIDRef aIID
, void **result
);
89 nsresult GetServiceByContactID
(nsstring aContactID
, nsIIDRef aIID
, void **result
);
90 nsresult IsServiceInstantiated
(nsCIDRef aClass
, nsIIDRef aIID
, BOOL
*_retval
);
91 nsresult IsServiceInstantiatedByContractID
(nsstring aContractID
, nsIIDRef aIID
, BOOL
*_retval
);
96 uuid(db242e01
-e4d9
-11d2
-9dde
-000064657374)
98 interface nsIObserver
: nsISupports
100 nsresult Observe
(nsISupports
*aSubject
, nsstring aTopic
, nswstring aData
);
105 uuid(a88e5a60
-205a
-4bb1
-94e1
-2628daf51eae
)
107 interface nsIComponentManager
: nsISupports
109 nsresult GetClassObject
(nsCIDRef aClass
, nsIIDRef aIID
, nsQIResult result
);
110 nsresult GetClassObjectByContractID
(nsstring aContractID
, nsIIDRef aIID
, nsQIResult result
);
111 nsresult CreateInstance
(nsCIDRef aClass
, nsISupports
*aDelegate
, nsIIDRef aIID
,
113 nsresult CreateInstanceByContractID
(nsstring aContractID
, nsISupports
*aDelegate
,
114 nsIIDRef aIID
, nsQIResult result
);
119 uuid(07a22cc0
-0ce5
-11d3
-9331-00104ba0fd40
)
121 interface nsIURI
: nsISupports
123 nsresult GetSpec
(nsACString
*aSpec
);
124 nsresult SetSpec
(const nsACString
*aSpec
);
125 nsresult GetPrePath
(nsACString
*aPrePath
);
126 nsresult GetScheme
(nsACString
*aScheme
);
127 nsresult SetScheme
(const nsACString
*aScheme
);
128 nsresult GetUserPass
(nsACString
*aUserPass
);
129 nsresult SetUserPass
(const nsACString
*aUserPass
);
130 nsresult GetUsername
(nsACString
*aUsername
);
131 nsresult SetUsername
(const nsACString
*aUsername
);
132 nsresult GetPassword
(nsACString
*aPassword
);
133 nsresult SetPassword
(const nsACString
*aPassword
);
134 nsresult GetHostPort
(nsACString
*aHostPort
);
135 nsresult SetHostPort
(const nsACString
*aHostPort
);
136 nsresult GetHost
(nsACString
*aHost
);
137 nsresult SetHost
(const nsACString
*aHost
);
138 nsresult GetPort
(PRInt32
*aPort
);
139 nsresult SetPort
(PRInt32 aPort
);
140 nsresult GetPath
(nsACString
*aPath
);
141 nsresult SetPath
(const nsACString
*aPath
);
142 nsresult Equals
(nsIURI
*other
, PRBool
*_retval
);
143 nsresult SchemeIs
(const char *scheme
, PRBool
*_retval
);
144 nsresult Clone
(nsIURI
**_retval
);
145 nsresult Resolve
(const nsACString
*relativePath
, nsACString
*_retval
);
146 nsresult GetAsciiSpec
(nsACString
*aAsciiSpec
);
147 nsresult GetAsciiHost
(nsACString
*aAsciiHost
);
148 nsresult GetOriginCharset
(nsACString
*aOriginCharset
);
153 uuid(94928ab3
-8b63
-11d3
-989d
-001083010e9b
)
155 interface nsIURIContentListener
: nsISupports
157 nsresult OnStartURIOpen
(nsIURI
*aURI
, PRBool
*_retval
);
158 nsresult DoContent
(const char *aContentType
, PRBool aIsContentPreferred
, nsIRequest
*aRequest
,
159 nsIStreamListener
**aContentHandler
, PRBool
*_retval
);
160 nsresult IsPreferred
(const char *aContentType
, char **aDesiredContentType
, PRBool
*_retval
);
161 nsresult CanHandleContent
(const char *aContentType
, PRBool aIsContentPreferred
,
162 char **aDesiredContentType
, PRBool
*_retval
);
163 nsresult GetLoadCookie
(nsISupports
**aLoadCookie
);
164 nsresult SetLoadCookie
(nsISupports
*aLoadCookie
);
165 nsresult GetParentContentListener
(nsIURIContentListener
**aParentContentListener
);
166 nsresult SetParentContentListener
(nsIURIContentListener
*aParentContentListener
);
171 uuid(69e5df00
-7b8b
-11d3
-af61
-00a024ffc08c
)
173 interface nsIWebBrowser
: nsISupports
175 nsresult AddWebBrowserListener
(nsIWeakReference
*aListener
, const nsIID
*aIID
);
176 nsresult RemoveWebBrowserListener
(nsIWeakReference
*aListener
, const nsIID
*aIID
);
177 nsresult GetContainerWindow
(nsIWebBrowserChrome
**aContainerWindow
);
178 nsresult SetContainerWindow
(nsIWebBrowserChrome
*aContainerWindow
);
179 nsresult GetParentURIContentListener
(nsIURIContentListener
**aParentURIContentListener
);
180 nsresult SetParentURIContentListener
(nsIURIContentListener
*aParentURIContentListener
);
181 nsresult GetContentDOMWindow
(nsIDOMWindow
**aContentDOMWindow
);
184 cpp_quote
("#define SETUP_IS_CHROME_WRAPPER 7");
188 uuid(f15398a0
-8018-11d3
-af70
-00a024ffc08c
)
190 interface nsIWebBrowserSetup
: nsISupports
192 nsresult SetProperty
(PRUint32 aId
, PRUint32 aValue
);
195 typedef void* nativeWindow
;
199 uuid(046bc8a0
-8015-11d3
-af70
-00a024ffc08c
)
201 interface nsIBaseWindow
: nsISupports
203 nsresult InitWindow
(nativeWindow parentNativeWindow
, nsIWidget
*parentWidget
, PRInt32 x
,
204 PRInt32 y
, PRInt32 cx
, PRInt32 cy
);
207 nsresult SetPosition
(PRInt32 x
, PRInt32 y
);
208 nsresult GetPosition
(PRInt32
*x
, PRInt32
*y
);
209 nsresult SetSize
(PRInt32 cx
, PRInt32 cy
, PRBool fRepaint
);
210 nsresult GetSize
(PRInt32
*cx
, PRInt32
*cy
);
211 nsresult SetPositionAndSize
(PRInt32 x
, PRInt32 y
, PRInt32 cx
, PRInt32 cy
, PRBool fRepaint
);
212 nsresult GetPositionAndSize
(PRInt32
*x
, PRInt32
*y
, PRInt32
*cx
, PRInt32
*cy
);
213 nsresult Repaint
(PRBool force
);
214 nsresult GetParentWidget
(nsIWidget
**aParentWidget
);
215 nsresult SetParentWidget
(nsIWidget
*aParentWidget
);
216 nsresult GetParentNativeWindow
(nativeWindow
*aParentNativeWindow
);
217 nsresult SetParentNativeWindow
(nativeWindow aParentNativeWindow
);
218 nsresult GetVisibility
(PRBool
*aVisibility
);
219 nsresult SetVisibility
(PRBool aVisibility
);
220 nsresult GetEnabled
(PRBool
*aEnabled
);
221 nsresult SetEnabled
(PRBool aEnabled
);
222 nsresult GetBlurSuppression
(PRBool
*aBlurSuppression
);
223 nsresult SetBlurSuppression
(PRBool aBlurSuppression
);
224 nsresult GetMainWidget
(nsIWidget
**aMainWidget
);
226 nsresult GetTitle
(PRUnichar
**aTitle
);
227 nsresult SetTitle
(const PRUnichar
*aTitle
);
230 cpp_quote
("#define LOAD_FLAGS_NONE 0");
234 uuid(f5d9e7b0
-d930
-11d3
-b057
-00a024ffc08c
)
236 interface nsIWebNavigation
: nsISupports
238 nsresult GetCanGoBack
(PRBool
*aCanGoBack
);
239 nsresult GetCanGoForward
(PRBool
*aCanGoForward
);
241 nsresult GoForward
();
242 nsresult GotoIndex
(PRInt32 index
);
243 nsresult LoadURI
(const PRUnichar
*aURI
, PRUint32 aLoadFlags
, nsIURI
*aReferrer
,
244 nsIInputStream
*aPostData
, nsIInputStream
*aHeaders
);
245 nsresult Reload
(PRUint32 aReloadFlags
);
246 nsresult Stop
(PRUint32 aStopFlags
);
247 nsresult GetDocument
(nsIDOMDocument
**aDocument
);
248 nsresult GetCurrentURI
(nsIURI
**aCurrentURI
);
249 nsresult GetReferringURI
(nsIURI
**aReferringURI
);
250 nsresult GetSessionHistory
(nsISHistory
**aSessionHistory
);
251 nsresult SetSessionHistory
(nsISHistory
*aSessionHistory
);
256 uuid(c8c0a080
-0868-11d3
-915f
-d9d889d48e3c
)
258 interface nsIFile
: nsISupports
260 nsresult Append
(const nsAString
*node
);
261 nsresult AppendNative
(const nsAString
*node
);
262 nsresult Normalize
();
263 nsresult Create
(PRUint32 type
, PRUint32 permission
);
264 nsresult GetLeafName
(nsAString
*aLeafName
);
265 nsresult SetLeafName
(const nsAString
*aLeafName
);
266 nsresult GetNativeLeafName
(nsAString
*aLeafName
);
267 nsresult SetNativeLeafName
(const nsAString
*aLeafName
);
268 nsresult CopyTo
(nsIFile
*newParentDir
, const nsAString
*newName
);
269 nsresult CopyToNative
(nsIFile
*newParentDir
, const nsAString
*newName
);
270 nsresult CopyToFollowingLinks
(nsIFile
*newParentDir
, const nsAString
*newName
);
271 nsresult CopyToFollowingLinksNative
(nsIFile
*newParentDir
, const nsAString
*newName
);
272 nsresult MoveTo
(nsIFile
*newParentDir
, const nsAString
*newName
);
273 nsresult MoveToNative
(nsIFile
*newParentDir
, const nsAString
*newName
);
274 nsresult Remove
(PRBool recursive
);
275 nsresult GetPermissions
(PRUint32
*aPermissions
);
276 nsresult SetPermissions
(PRUint32 pPermissions
);
277 nsresult GetPermissionsOfLink
(PRUint32
*aPermissions
);
278 nsresult SetPermissionsOfLink
(PRUint32 pPermissions
);
279 nsresult GetLastModifiedTime
(PRInt64
*aLastModifiedTime
);
280 nsresult SetLastModifiedTime
(PRInt64 aLastModifiedTime
);
281 nsresult GetFileSize
(PRInt64
*aFileSize
);
282 nsresult SetFileSize
(PRInt64 aFileSize
);
283 nsresult GetFileSizeOfLink
(PRInt64
*aFileSizeOfLink
);
284 nsresult GetTarget
(nsAString
*aTarget
);
285 nsresult GetNativeTarget
(nsACString
*aNativeTarget
);
286 nsresult GetPath
(nsAString
*aPath
);
287 nsresult GetNativePath
(nsACString
*aNativePath
);
288 nsresult Exists
(PRBool
*_retval
);
289 nsresult IsWritable
(PRBool
*_retval
);
290 nsresult IsReadable
(PRBool
*_retval
);
291 nsresult IsExecutable
(PRBool
*_retval
);
292 nsresult IsHidden
(PRBool
*_retval
);
293 nsresult IsDirectory
(PRBool
*_retval
);
294 nsresult IsFile
(PRBool
*_retval
);
295 nsresult IsSymlink
(PRBool
*_retval
);
296 nsresult IsSpecial
(PRBool
*_retval
);
297 nsresult CreateUnique
(PRUint32 type
, PRUint32 permission
);
298 nsresult Clone
(nsIFile
**_retval
);
299 nsresult Equals
(nsIFile
*inFile
, PRBool
*_retval
);
300 nsresult Contains
(nsIFile
*inFile
, PRBool recir
, PRBool
*_retval
);
301 nsresult GetParent
(nsIFile
**aParent
);
302 nsresult GetDirectoryEntries
(nsISimpleEnumerator
**aDirectoryEntries
);
307 uuid(86d02f0e
-219b
-4cfc
-9c88
-bd98d2cce0b8
)
309 interface nsIWebBrowserStream
: nsISupports
311 nsresult OpenStream
(nsIURI
*aBaseURI
, nsACString
*aContentType
);
312 nsresult AppendToStream
(PRUint8
*aData
, PRUint32 aLen
);
313 nsresult CloseStream
();
318 uuid(bddeda3f
-9020-4d12
-8c70
-984ee9f7935e
)
320 interface nsIIOService
: nsISupports
322 nsresult GetProtocolHandler
(const char *aScheme
, nsIProtocolHandler
**_retval
);
323 nsresult GetProtocolFlags
(const char *aScheme
, PRUint32
*_retval
);
324 nsresult NewURI
(const nsACString
*aSpec
, const char *aOriginCharset
, nsIURI
*aBaseURI
, nsIURI
**_retval
);
325 nsresult NewFileURI
(nsIFile
*aFile
, nsIURI
**_retval
);
326 nsresult NewChannelFromURI
(nsIURI
*aURI
, nsIChannel
**_retval
);
327 nsresult NewChannel
(const nsACString
*aSpec
, const char *aOriginCharset
, nsIURI
*aBaseURI
, nsIChannel
**_retval
);
328 nsresult GetOffline
(PRBool
*aOffline
);
329 nsresult SetOffline
(PRBool aOffline
);
330 nsresult AllowPort
(PRInt32 aPort
, const char *aScheme
, PRBool
*_retval
);
335 uuid(9c5d3c58
-1dd1
-11b2
-a1c9
-f3699284657a
)
337 interface nsIWebBrowserFocus
: nsISupports
340 nsresult Deactivate
();
341 nsresult SetFocusAtFirstElement
();
342 nsresult SetFocusAtLastElement
();
343 nsresult GetFocusedWindow
(nsIDOMWindow
**aFocusedWindow
);
344 nsresult SetFocusedWindow
(nsIDOMWindow
*aFocusedWindow
);
345 nsresult GetFocusedElement
(nsIDOMElement
**aFocusedElement
);
346 nsresult SetFocusedElement
(nsIDOMElement
*aFocusedElement
);
351 uuid(ba434c60
-9d52
-11d3
-afb0
-00a024ffc08c
)
353 interface nsIWebBrowserChrome
: nsISupports
355 nsresult SetStatus
(PRUint32 statusType
, const PRUnichar
*status
);
356 nsresult GetWebBrowser
(nsIWebBrowser
**aWebBrowser
);
357 nsresult SetWebBrowser
(nsIWebBrowser
*aWebBrowser
);
358 nsresult GetChromeFlags
(PRUint32
*aChromeFlags
);
359 nsresult SetChromeFlags
(PRUint32 aChromeFlags
);
360 nsresult DestroyBrowserWindow
();
361 nsresult SizeBrowserTo
(PRInt32 aCX
, PRInt32 aCY
);
362 nsresult ShowAsModal
();
363 nsresult IsWindowModal
(PRBool
*_retval
);
364 nsresult ExitModalEventLoop
(nsresult aStatus
);
369 uuid(a66b7b80
-ff46
-bd97
-0080-5f8ae38add32
)
371 interface nsIDOMEvent
: nsISupports
373 nsresult GetType
(nsAString
*aType
);
374 nsresult GetTarget
(nsIDOMEventTarget
**aTarget
);
375 nsresult GetCurrentTarget
(nsIDOMEventTarget
**aCurrentTarget
);
376 nsresult GetEventPhase
(PRUint16
*aEventPhase
);
377 nsresult GetBubbles
(PRBool
*aBubbles
);
378 nsresult GetCancelable
(PRBool
*aCancelable
);
379 nsresult GetTimeStamp
(DOMTimeStamp
*aTimeStamp
);
380 nsresult StopPropagation
();
381 nsresult PreventDefault
();
382 nsresult InitEvent
(const nsAString
*eventTypeArg
, PRBool canBubbleArg
, PRBool cancelableArg
);
385 cpp_quote
("#define CONTEXT_NONE 0x00");
386 cpp_quote
("#define CONTEXT_LINK 0x01");
387 cpp_quote
("#define CONTEXT_IMAGE 0x02");
388 cpp_quote
("#define CONTEXT_DOCUMENT 0x04");
389 cpp_quote
("#define CONTEXT_TEXT 0x08");
390 cpp_quote
("#define CONTEXT_INPUT 0x10");
391 cpp_quote
("#define CONTEXT_BACKGROUND_IMAGE 0x20");
395 uuid(3478b6b0
-3875-11d4
-94ef
-0020183bf181
)
397 interface nsIContextMenuListener
: nsISupports
399 nsresult OnShowContextMenu
(PRUint32 aContextFlags
, nsIDOMEvent
*aEvent
, nsIDOMNode
*aNode
);
404 uuid(a6cf90c3
-15b3
-11d2
-932e-00805f8add32
)
406 interface nsIDOMUIEvent
: nsIDOMEvent
408 nsresult GetView
(nsIDOMAbstractView
**aView
);
409 nsresult GetDetail
(PRInt32
*aDetail
);
410 nsresult InitUIEvent
(const nsAString
*typeArg
, PRBool canBubbleArg
, PRBool cancelableArg
,
411 nsIDOMAbstractView
*viewArg
, PRInt32 detailArg
);
416 uuid(ff751edc
-8b02
-aae7
-0010-8301838a3123
)
418 interface nsIDOMMouseEvent
: nsIDOMUIEvent
420 nsresult GetScreenX
(PRInt32
*aScreenX
);
421 nsresult GetScreenY
(PRInt32
*aScreenY
);
422 nsresult GetClientX
(PRInt32
*aClientX
);
423 nsresult GetClientY
(PRInt32
*aClientY
);
424 nsresult GetCtrlKey
(PRBool
*aCtrlKey
);
425 nsresult GetShiftKey
(PRBool
*aShiftKey
);
426 nsresult GetAltKey
(PRBool
*aAltKey
);
427 nsresult GetMetaKey
(PRBool
*aMetaKey
);
428 nsresult GetButton
(PRUint16
*aButton
);
429 nsresult GetRelatedTarget
(nsIDOMEventTarget
* *aRelatedTarget
);
430 nsresult InitMouseEvent
(const nsAString
*typeArg
, PRBool canBubbleArg
, PRBool cancelableArg
,
431 nsIDOMAbstractView
*viewArg
, PRInt32 detailArg
, PRInt32 screenXArg
, PRInt32 screenYArg
,
432 PRInt32 clientXArg
, PRInt32 clientYArg
, PRBool ctrlKeyArg
, PRBool altKeyArg
,
433 PRBool shiftKeyArg
, PRBool metaKeyArg
, PRUint16 buttonArg
,
434 nsIDOMEventTarget
*relatedTargetArg
);