Back to index

lightning-sunbird  0.9+nobinonly
nsIDOMWindowInternal.idl
Go to the documentation of this file.
00001 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 2000
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   Vidur Apparao <vidur@netscape.com> (original author)
00024  *   Johnny Stenback <jst@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 "nsIDOMWindow2.idl"
00041 
00042 interface nsIPrompt;
00043 interface nsIControllers;
00044 interface nsIDOMLocation;
00045 
00046 [scriptable, uuid(f914492c-0138-4123-a634-6ef8e3f126f8)]
00047 interface nsIDOMWindowInternal : nsIDOMWindow2
00048 {
00049   readonly attribute nsIDOMWindowInternal        window;
00050 
00051   /* [replaceable] self */
00052   readonly attribute nsIDOMWindowInternal        self;
00053 
00054   readonly attribute nsIDOMNavigator             navigator;
00055   readonly attribute nsIDOMScreen                screen;
00056   readonly attribute nsIDOMHistory               history;
00057 
00058   /* [replaceable] content */
00059   readonly attribute nsIDOMWindow                content;
00060 
00061   /* [replaceable] prompter */
00062   [noscript] readonly attribute nsIPrompt        prompter;
00063 
00064   /* [replaceable] menubar */
00065   readonly attribute nsIDOMBarProp               menubar;
00066 
00067   /* [replaceable] toolbar */
00068   readonly attribute nsIDOMBarProp               toolbar;
00069 
00070   /* [replaceable] locationbar */
00071   readonly attribute nsIDOMBarProp               locationbar;
00072 
00073   /* [replaceable] personalbar */
00074   readonly attribute nsIDOMBarProp               personalbar;
00075 
00076   /* [replaceable] statusbar */
00077   readonly attribute nsIDOMBarProp               statusbar;
00078 
00079   /* [replaceable] directories */
00080   readonly attribute nsIDOMBarProp               directories;
00081   readonly attribute boolean                     closed;
00082   readonly attribute nsIDOMCrypto                crypto;
00083   readonly attribute nsIDOMPkcs11                pkcs11;
00084 
00085   // XXX Shouldn't this be in nsIDOMChromeWindow?
00086   /* [replaceable] controllers */
00087   readonly attribute nsIControllers              controllers;
00088 
00089            attribute nsIDOMWindowInternal        opener;
00090 
00091   /* [replaceable] */
00092            attribute DOMString                   status;
00093            attribute DOMString                   defaultStatus;
00094 
00095   // XXX: The setter that takes a string argument needs to be special
00096   // cased!
00097   readonly attribute nsIDOMLocation              location;
00098   
00099   /* [replaceable] */
00100            attribute long                        innerWidth;
00101            attribute long                        innerHeight;
00102            attribute long                        outerWidth;
00103            attribute long                        outerHeight;
00104            attribute long                        screenX;
00105            attribute long                        screenY;
00106 
00107   /* The offset in pixels by which the window is scrolled */
00108   readonly attribute long                        pageXOffset;
00109   readonly attribute long                        pageYOffset;
00110 
00111   /* The maximum offset that the window can be scrolled to
00112      (i.e., the document width/height minus the scrollport width/height) */
00113   readonly attribute long                        scrollMaxX;
00114   readonly attribute long                        scrollMaxY;
00115 
00116   /* [replaceable] length */
00117   readonly attribute unsigned long               length;
00118 
00119            attribute boolean                     fullScreen;
00120 
00121   void                      alert(in DOMString text);
00122   boolean                   confirm(in DOMString text);
00123 
00124   // prompt() should return a null string if cancel is pressed
00125   DOMString                 prompt(in DOMString aMessage,
00126                                    in DOMString aInitial,
00127                                    in DOMString aTitle,
00128                                    in unsigned long aSavePassword);
00129 
00130   void                      focus();
00131   void                      blur();
00132 
00133   void                      back();
00134   void                      forward();
00135   void                      home();
00136   void                      stop();
00137 
00138   void                      print();
00139 
00140   void                      moveTo(in long xPos, in long yPos);
00141   void                      moveBy(in long xDif, in long yDif);
00142   void                      resizeTo(in long width, in long height);
00143   void                      resizeBy(in long widthDif, in long heightDif);
00144   void                      scroll(in long xScroll, in long yScroll);
00145 
00146   //void                      clearTimeout(in long timerID);
00147   //void                      clearInterval(in long timerID);
00148   //[noscript] long           setTimeout(/* in function,
00149   //                                        in unsigned long timeout */);
00150   //[noscript] long           setInterval(/* in function,
00151   //                                        in unsigned long timeout */);
00152 
00160   [noscript] nsIDOMWindow   open(in DOMString url, in DOMString name,
00161                                  in DOMString options);
00162   // This method works like open except that aExtraArgument gets
00163   // converted into the array window.arguments in JS, if
00164   // aExtraArgument is a nsISupportsArray then the individual items in
00165   // the array are inserted into window.arguments, and primitive
00166   // nsISupports (nsISupportsPrimitives) types are converted to native
00167   // JS types when possible.
00168   [noscript] nsIDOMWindow   openDialog(in DOMString url, in DOMString name,
00169                                        in DOMString options,
00170                                        in nsISupports aExtraArgument);
00171   void                      close();
00172 
00173   // XXX Should this be in nsIDOMChromeWindow?
00174   void                      updateCommands(in DOMString action);
00175 
00176   /* See nsIDOMJSWindow for the scriptable version of find()
00177    * @param str: the search pattern
00178    * @param caseSensitive: is the search caseSensitive
00179    * @param backwards: should we search backwards
00180    * @param wrapAround: should we wrap the search
00181    * @param wholeWord: should we search only for whole words
00182    * @param searchInFrames: should we search through all frames
00183    * @param showDialog: should we show the Find dialog
00184    */
00185   [noscript] boolean        find(in DOMString str, 
00186                                  in boolean caseSensitive,
00187                                  in boolean backwards, 
00188                                  in boolean wrapAround,
00189                                  in boolean wholeWord, 
00190                                  in boolean searchInFrames, 
00191                                  in boolean showDialog);
00192 
00193   // Ascii base64 data to binary data and vice versa...
00194   DOMString                 atob(in DOMString aAsciiString);
00195   DOMString                 btoa(in DOMString aBase64Data);
00196 
00197   readonly attribute nsIDOMElement               frameElement;
00198 };