2000-01-14 07:23:38 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2004-04-17 20:52:41 +04:00
|
|
|
* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
2000-01-14 07:23:38 +03:00
|
|
|
* The Original Code is the Mozilla browser.
|
2004-04-17 20:52:41 +04:00
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications, Inc.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1999
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
2000-01-14 07:23:38 +03:00
|
|
|
* Contributor(s):
|
|
|
|
* Travis Bogard <travis@netscape.com>
|
2004-04-17 20:52:41 +04:00
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2000-01-14 07:23:38 +03:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The nsIXULWindow
|
2004-10-29 23:28:38 +04:00
|
|
|
*
|
|
|
|
* When the window is destroyed, it will fire a "xul-window-destroyed"
|
|
|
|
* notification through the global observer service.
|
2000-01-14 07:23:38 +03:00
|
|
|
*/
|
|
|
|
|
2000-01-22 06:13:20 +03:00
|
|
|
interface nsIDocShell;
|
|
|
|
interface nsIDocShellTreeItem;
|
2004-10-29 23:28:38 +04:00
|
|
|
interface nsIAppShell;
|
2004-08-21 18:47:51 +04:00
|
|
|
interface nsIXULBrowserWindow;
|
2000-01-22 06:13:20 +03:00
|
|
|
|
2005-02-02 12:39:30 +03:00
|
|
|
[scriptable, uuid(b6c2f9e1-53a0-45f2-a2b8-fe37861fe8a8)]
|
2000-01-14 07:23:38 +03:00
|
|
|
interface nsIXULWindow : nsISupports
|
|
|
|
{
|
2001-11-06 04:19:39 +03:00
|
|
|
/**
|
2004-10-29 23:28:38 +04:00
|
|
|
* The docshell owning the XUL for this window.
|
|
|
|
*/
|
2001-11-06 04:19:39 +03:00
|
|
|
readonly attribute nsIDocShell docShell;
|
2000-01-22 06:13:20 +03:00
|
|
|
|
2001-11-06 04:19:39 +03:00
|
|
|
/**
|
2004-10-29 23:28:38 +04:00
|
|
|
* Indicates if this window is instrinsically sized.
|
|
|
|
*/
|
2001-11-06 04:19:39 +03:00
|
|
|
attribute boolean intrinsicallySized;
|
2000-02-14 09:10:52 +03:00
|
|
|
|
2001-11-06 04:19:39 +03:00
|
|
|
/**
|
2004-10-29 23:28:38 +04:00
|
|
|
* The primary content shell.
|
|
|
|
*
|
|
|
|
* Note that this is a docshell tree item and therefore can not be assured of
|
|
|
|
* what object it is. It could be an editor, a docshell, or a browser object.
|
|
|
|
* Or down the road any other object that supports being a DocShellTreeItem
|
|
|
|
* Query accordingly to determine the capabilities.
|
|
|
|
*/
|
2001-11-06 04:19:39 +03:00
|
|
|
readonly attribute nsIDocShellTreeItem primaryContentShell;
|
2000-01-22 06:13:20 +03:00
|
|
|
|
2001-11-06 04:19:39 +03:00
|
|
|
/**
|
2004-10-29 23:28:38 +04:00
|
|
|
* The content shell specified by the supplied id.
|
|
|
|
*
|
|
|
|
* Note that this is a docshell tree item and therefore can not be assured of
|
|
|
|
* what object it is. It could be an editor, a docshell, or a browser object.
|
|
|
|
* Or down the road any other object that supports being a DocShellTreeItem
|
|
|
|
* Query accordingly to determine the capabilities.
|
|
|
|
*/
|
2001-11-06 04:19:39 +03:00
|
|
|
nsIDocShellTreeItem getContentShellById(in wstring ID);
|
2000-01-22 06:13:20 +03:00
|
|
|
|
2001-11-06 04:19:39 +03:00
|
|
|
/**
|
2004-10-29 23:28:38 +04:00
|
|
|
* Tell this window that it has picked up a child XUL window
|
|
|
|
* @param aChild the child window being added
|
|
|
|
*/
|
2001-11-06 04:19:39 +03:00
|
|
|
void addChildWindow(in nsIXULWindow aChild);
|
2004-10-29 23:28:38 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Tell this window that it has lost a child XUL window
|
|
|
|
* @param aChild the child window being removed
|
|
|
|
*/
|
2001-11-06 04:19:39 +03:00
|
|
|
void removeChildWindow(in nsIXULWindow aChild);
|
2001-03-30 06:27:50 +04:00
|
|
|
|
2001-11-06 04:19:39 +03:00
|
|
|
/**
|
2004-10-29 23:28:38 +04:00
|
|
|
* Move the window to a centered position.
|
|
|
|
* @param aRelative the window relative to which the window is moved.
|
|
|
|
* See screen parameter for details. if null, the
|
|
|
|
* window is centered relative to the main screen.
|
|
|
|
* @param aScreen PR_TRUE to center the window relative to the screen
|
|
|
|
* containing aRelative. PR_FALSE to center it relative
|
|
|
|
* to aRelative itself.
|
|
|
|
* @param aAlert PR_TRUE to move the window to an alert position,
|
|
|
|
* generally centered horizontally and 1/3 down from the top.
|
|
|
|
*/
|
2001-11-06 04:19:39 +03:00
|
|
|
void center(in nsIXULWindow aRelative, in boolean aScreen, in boolean aAlert);
|
2000-04-14 00:07:28 +04:00
|
|
|
|
2001-11-06 04:19:39 +03:00
|
|
|
/**
|
2004-10-29 23:28:38 +04:00
|
|
|
* Shows the window as a modal window. That is, ensures that it is visible
|
|
|
|
* and runs a local event loop, exiting only once the window has been closed.
|
|
|
|
*/
|
2001-11-06 04:19:39 +03:00
|
|
|
void showModal();
|
2000-04-02 02:03:28 +04:00
|
|
|
|
2001-11-06 04:19:39 +03:00
|
|
|
const unsigned long lowestZ = 0;
|
|
|
|
const unsigned long loweredZ = 4; /* "alwaysLowered" attribute */
|
|
|
|
const unsigned long normalZ = 5;
|
|
|
|
const unsigned long raisedZ = 6; /* "alwaysRaised" attribute */
|
|
|
|
const unsigned long highestZ = 9;
|
2000-04-02 02:03:28 +04:00
|
|
|
|
2004-10-29 23:28:38 +04:00
|
|
|
attribute unsigned long zLevel;
|
2001-11-06 04:19:39 +03:00
|
|
|
|
2002-09-11 06:27:14 +04:00
|
|
|
/**
|
|
|
|
* contextFlags are from nsIWindowCreator2
|
|
|
|
*/
|
2004-10-29 23:28:38 +04:00
|
|
|
attribute PRUint32 contextFlags;
|
2002-09-11 06:27:14 +04:00
|
|
|
|
2005-02-02 12:39:30 +03:00
|
|
|
attribute PRUint32 chromeFlags;
|
2001-11-06 04:19:39 +03:00
|
|
|
/**
|
2004-10-29 23:28:38 +04:00
|
|
|
* Create a new window.
|
|
|
|
* @param aChromeFlags see nsIWebBrowserChrome
|
|
|
|
* @return the newly minted window
|
|
|
|
*/
|
|
|
|
nsIXULWindow createNewWindow(in PRInt32 aChromeFlags,
|
|
|
|
in nsIAppShell aAppShell);
|
2004-08-21 18:47:51 +04:00
|
|
|
|
|
|
|
attribute nsIXULBrowserWindow XULBrowserWindow;
|
2000-01-14 07:23:38 +03:00
|
|
|
};
|