Bug 460926 A11y hierachy is broken on Ubuntu 8.10 (GNOME 2.24), r=Evan.Yan sr=roc
[wine-gecko.git] / dom / public / idl / base / nsIBrowserDOMWindow.idl
blob34dc2b0dc51167138a2f14b0a15db2f440ce4fa5
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Mozilla.org.
19 * Portions created by the Initial Developer are Copyright (C) 2004
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #include "nsISupports.idl"
40 interface nsIDOMWindow;
41 interface nsIURI;
43 [scriptable, uuid(f9691a49-7fb3-4b54-bb11-a4f2e0b6eddb)]
45 /**
46 * The C++ source has access to the browser script source through
47 * nsIBrowserDOMWindow. It is intended to be attached to the chrome DOMWindow
48 * of a toplevel browser window (a XUL window). A DOMWindow that does not
49 * happen to be a browser chrome window will simply have no access to any such
50 * interface.
52 interface nsIBrowserDOMWindow : nsISupports
54 /**
55 * Values for openURI's aWhere parameter.
57 /**
58 * Do whatever the default is based on application state, user preferences,
59 * and the value of the aContext parameter to openURI.
61 const short OPEN_DEFAULTWINDOW = 0;
62 /**
63 * Open in the "current window". If aOpener is provided, this should be the
64 * top window in aOpener's window hierarchy, but exact behavior is
65 * application-dependent. If aOpener is not provided, it's up to the
66 * application to decide what constitutes a "current window".
68 const short OPEN_CURRENTWINDOW = 1;
69 /**
70 * Open in a new window.
72 const short OPEN_NEWWINDOW = 2;
73 /**
74 * Open in a new content tab in the toplevel browser window corresponding to
75 * this nsIBrowserDOMWindow.
77 const short OPEN_NEWTAB = 3;
79 /**
80 * Values for openURI's aContext parameter. These affect the behavior of
81 * OPEN_DEFAULTWINDOW.
83 /**
84 * external link (load request from another application, xremote, etc).
86 const short OPEN_EXTERNAL = 1;
87 /**
88 * internal open new window
90 const short OPEN_NEW = 2;
92 /**
93 * Load a URI
95 * @param aURI the URI to open. null is allowed. If null is passed in, no
96 * load will be done, though the window the load would have
97 * happened in will be returned.
98 * @param aWhere see possible values described above.
99 * @param aOpener window requesting the open (can be null).
100 * @param aContext the context in which the URI is being opened. This
101 * is used only when aWhere == OPEN_DEFAULTWINDOW.
102 * @return the window into which the URI was opened.
104 nsIDOMWindow openURI(in nsIURI aURI, in nsIDOMWindow aOpener,
105 in short aWhere, in short aContext);
108 * @param aWindow the window to test.
109 * @return whether the window is the main content window for any
110 * currently open tab in this toplevel browser window.
112 boolean isTabContentWindow(in nsIDOMWindow aWindow);