Back to index

lightning-sunbird  0.9+nobinonly
nsIDocShellTreeOwner.idl
Go to the documentation of this file.
00001 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00002  *
00003  * ***** BEGIN LICENSE BLOCK *****
00004  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00005  *
00006  * The contents of this file are subject to the Mozilla Public License Version
00007  * 1.1 (the "License"); you may not use this file except in compliance with
00008  * the License. You may obtain a copy of the License at
00009  * http://www.mozilla.org/MPL/
00010  *
00011  * Software distributed under the License is distributed on an "AS IS" basis,
00012  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00013  * for the specific language governing rights and limitations under the
00014  * License.
00015  *
00016  * The Original Code is the Mozilla browser.
00017  *
00018  * The Initial Developer of the Original Code is
00019  * Netscape Communications, Inc.
00020  * Portions created by the Initial Developer are Copyright (C) 1999
00021  * the Initial Developer. All Rights Reserved.
00022  *
00023  * Contributor(s):
00024  *   Travis Bogard <travis@netscape.com>
00025  *
00026  * Alternatively, the contents of this file may be used under the terms of
00027  * either of the GNU General Public License Version 2 or later (the "GPL"),
00028  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00029  * in which case the provisions of the GPL or the LGPL are applicable instead
00030  * of those above. If you wish to allow use of your version of this file only
00031  * under the terms of either the GPL or the LGPL, and not to allow others to
00032  * use your version of this file under the terms of the MPL, indicate your
00033  * decision by deleting the provisions above and replace them with the notice
00034  * and other provisions required by the GPL or the LGPL. If you do not delete
00035  * the provisions above, a recipient may use your version of this file under
00036  * the terms of any one of the MPL, the GPL or the LGPL.
00037  *
00038  * ***** END LICENSE BLOCK ***** */
00039 
00040 #include "nsISupports.idl"
00041 
00046 interface nsIDocShellTreeItem;
00047 
00048 [scriptable, uuid(9e508466-5ebb-4618-abfa-9ad47bed0b2e)]
00049 interface nsIDocShellTreeOwner : nsISupports
00050 {
00051        /*
00052        Return the child DocShellTreeItem with the specified name.
00053        name - This is the name of the item that is trying to be found.
00054        aRequestor - This is the docshellTreeItem that is requesting the find.  This
00055        parameter is used to identify when the child is asking its parent to find
00056        a child with the specific name.  The parent uses this parameter to ensure
00057        a resursive state does not occur by not again asking the requestor for find
00058        a shell by the specified name.  Inversely the child uses it to ensure it
00059        does not ask its parent to do the search if its parent is the one that
00060        asked it to search.
00061        aOriginalRequestor - The original treeitem that made the request, if any.
00062        This is used to ensure that we don't run into cross-site issues.
00063 
00064        */
00065        nsIDocShellTreeItem findItemWithName(in wstring name, 
00066               in nsIDocShellTreeItem aRequestor,
00067               in nsIDocShellTreeItem aOriginalRequestor);
00068 
00069        /*
00070        Called when a content shell is added to the the docShell Tree.
00071        aContentShell - the docShell that has been added.
00072        aPrimary - true if this is the primary content shell
00073        aID - the ID of the docShell that has been added.
00074        */
00075        void contentShellAdded(in nsIDocShellTreeItem aContentShell, 
00076               in boolean aPrimary, in wstring aID);
00077 
00078        /*
00079        Returns the Primary Content Shell
00080        */
00081        readonly attribute nsIDocShellTreeItem primaryContentShell;
00082 
00083        /*
00084        Tells the tree owner to size its window or parent window in such a way
00085        that the shell passed along will be the size specified.
00086        */
00087        void sizeShellTo(in nsIDocShellTreeItem shell, in long cx, in long cy);
00088 
00089        /*
00090        Sets the persistence of different attributes of the window.
00091        */
00092        void setPersistence(in boolean aPersistPosition,
00093                             in boolean aPersistSize,
00094                             in boolean aPersistSizeMode);
00095 
00096        /*
00097        Gets the current persistence states of the window.
00098        */
00099        void getPersistence(out boolean aPersistPosition,
00100                             out boolean aPersistSize,
00101                             out boolean aPersistSizeMode);
00102 };
00103 
00114 [scriptable, uuid(3c2a6927-e923-4ea8-bbda-a335c768ce4e)]
00115 interface nsIDocShellTreeOwner_MOZILLA_1_8_BRANCH : nsIDocShellTreeOwner
00116 {
00129   void contentShellAdded2(in nsIDocShellTreeItem aContentShell,
00130                        in boolean aPrimary, in boolean aTargetable,
00131                        in AString aID);
00132 
00141   void contentShellRemoved(in nsIDocShellTreeItem aContentShell);
00142 };