Mercurial > projects > dwt-mac
comparison dwt/internal/mozilla/nsIWindowWatcher.d @ 125:5583f8eeee6c
Synced mozilla with dwt-linux
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Fri, 16 Jan 2009 12:49:08 +0100 |
parents | d8635bb48c7c |
children |
comparison
equal
deleted
inserted
replaced
124:540fa4e9974a | 125:5583f8eeee6c |
---|---|
1 /* ***** BEGIN LICENSE BLOCK ***** | |
2 * Version: MPL 1.1 | |
3 * | |
4 * The contents of this file are subject to the Mozilla Public License Version | |
5 * 1.1 (the "License"); you may not use this file except in compliance with | |
6 * the License. You may obtain a copy of the License at | |
7 * http://www.mozilla.org/MPL/ | |
8 * | |
9 * Software distributed under the License is distributed on an "AS IS" basis, | |
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
11 * for the specific language governing rights and limitations under the | |
12 * License. | |
13 * | |
14 * The Original Code is Mozilla Communicator client code, released March 31, 1998. | |
15 * | |
16 * The Initial Developer of the Original Code is | |
17 * Netscape Communications Corporation. | |
18 * Portions created by Netscape are Copyright (C) 1998-1999 | |
19 * Netscape Communications Corporation. All Rights Reserved. | |
20 * | |
21 * Contributor(s): | |
22 * | |
23 * IBM | |
24 * - Binding to permit interfacing between Mozilla and DWT | |
25 * - Copyright (C) 2003, 2005 IBM Corp. All Rights Reserved. | |
26 * | |
27 * ***** END LICENSE BLOCK ***** */ | |
28 module dwt.internal.mozilla.nsIWindowWatcher; | 1 module dwt.internal.mozilla.nsIWindowWatcher; |
29 | 2 |
30 import dwt.dwthelper.utils; | 3 import dwt.internal.mozilla.Common; |
4 import dwt.internal.mozilla.nsID; | |
5 import dwt.internal.mozilla.nsISupports; | |
31 | 6 |
32 public class nsIWindowWatcher extends nsISupports { | 7 import dwt.internal.mozilla.nsIDOMWindow; |
8 import dwt.internal.mozilla.nsIObserver; | |
9 import dwt.internal.mozilla.nsIPrompt; | |
10 import dwt.internal.mozilla.nsIAuthPrompt; | |
11 import dwt.internal.mozilla.nsISimpleEnumerator; | |
12 import dwt.internal.mozilla.nsIWebBrowserChrome; | |
13 import dwt.internal.mozilla.nsIWindowCreator; | |
33 | 14 |
34 static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 11; | 15 const char[] NS_IWINDOWWATCHER_IID_STR = "002286a8-494b-43b3-8ddd-49e3fc50622b"; |
35 | 16 |
36 public static final String NS_IWINDOWWATCHER_IID_STR = | 17 const nsIID NS_IWINDOWWATCHER_IID= |
37 "002286a8-494b-43b3-8ddd-49e3fc50622b"; | 18 {0x002286a8, 0x494b, 0x43b3, |
19 [ 0x8d, 0xdd, 0x49, 0xe3, 0xfc, 0x50, 0x62, 0x2b ]}; | |
38 | 20 |
39 public static final nsID NS_IWINDOWWATCHER_IID = | 21 interface nsIWindowWatcher : nsISupports { |
40 new nsID(NS_IWINDOWWATCHER_IID_STR); | |
41 | 22 |
42 public nsIWindowWatcher(int /*long*/ address) { | 23 static const char[] IID_STR = NS_IWINDOWWATCHER_IID_STR; |
43 super(address); | 24 static const nsIID IID = NS_IWINDOWWATCHER_IID; |
44 } | |
45 | 25 |
46 public int OpenWindow(int /*long*/ aParent, byte[] aUrl, byte[] aName, byte[] aFeatures, int /*long*/ aArguments, int /*long*/[] _retval) { | 26 extern(System): |
47 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aParent, aUrl, aName, aFeatures, aArguments, _retval); | 27 nsresult OpenWindow(nsIDOMWindow aParent, char *aUrl, char *aName, char *aFeatures, nsISupports aArguments, nsIDOMWindow *_retval); |
48 } | 28 nsresult RegisterNotification(nsIObserver aObserver); |
29 nsresult UnregisterNotification(nsIObserver aObserver); | |
30 nsresult GetWindowEnumerator(nsISimpleEnumerator *_retval); | |
31 nsresult GetNewPrompter(nsIDOMWindow aParent, nsIPrompt *_retval); | |
32 nsresult GetNewAuthPrompter(nsIDOMWindow aParent, nsIAuthPrompt *_retval); | |
33 nsresult SetWindowCreator(nsIWindowCreator creator); | |
34 nsresult GetChromeForWindow(nsIDOMWindow aWindow, nsIWebBrowserChrome *_retval); | |
35 nsresult GetWindowByName(PRUnichar *aTargetName, nsIDOMWindow aCurrentWindow, nsIDOMWindow *_retval); | |
36 nsresult GetActiveWindow(nsIDOMWindow *aActiveWindow); | |
37 nsresult SetActiveWindow(nsIDOMWindow aActiveWindow); | |
49 | 38 |
50 public int RegisterNotification(int /*long*/ aObserver) { | 39 } |
51 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aObserver); | |
52 } | |
53 | 40 |
54 public int UnregisterNotification(int /*long*/ aObserver) { | |
55 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aObserver); | |
56 } | |
57 | |
58 public int GetWindowEnumerator(int /*long*/[] _retval) { | |
59 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), _retval); | |
60 } | |
61 | |
62 public int GetNewPrompter(int /*long*/ aParent, int /*long*/[] _retval) { | |
63 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aParent, _retval); | |
64 } | |
65 | |
66 public int GetNewAuthPrompter(int /*long*/ aParent, int /*long*/[] _retval) { | |
67 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aParent, _retval); | |
68 } | |
69 | |
70 public int SetWindowCreator(int /*long*/ creator) { | |
71 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), creator); | |
72 } | |
73 | |
74 public int GetChromeForWindow(int /*long*/ aWindow, int /*long*/[] _retval) { | |
75 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aWindow, _retval); | |
76 } | |
77 | |
78 public int GetWindowByName(char[] aTargetName, int /*long*/ aCurrentWindow, int /*long*/[] _retval) { | |
79 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aTargetName, aCurrentWindow, _retval); | |
80 } | |
81 | |
82 public int GetActiveWindow(int /*long*/[] aActiveWindow) { | |
83 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aActiveWindow); | |
84 } | |
85 | |
86 public int SetActiveWindow(int /*long*/ aActiveWindow) { | |
87 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aActiveWindow); | |
88 } | |
89 } |