PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_sdk/idl/nsIDOMWindow.idl

http://firefox-mac-pdf.googlecode.com/
IDL | 155 lines | 21 code | 17 blank | 117 comment | 0 complexity | ea78a4b3df3abf5e523b3a549da83efb MD5 | raw file
  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
  4 *
  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/
  9 *
 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.
 14 *
 15 * The Original Code is mozilla.org code.
 16 *
 17 * The Initial Developer of the Original Code is
 18 * Netscape Communications Corporation.
 19 * Portions created by the Initial Developer are Copyright (C) 2000
 20 * the Initial Developer. All Rights Reserved.
 21 *
 22 * Contributor(s):
 23 *   Vidur Apparao <vidur@netscape.com> (original author)
 24 *   Johnny Stenback <jst@netscape.com>
 25 *
 26 * Alternatively, the contents of this file may be used under the terms of
 27 * either of the GNU General Public License Version 2 or later (the "GPL"),
 28 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 29 * in which case the provisions of the GPL or the LGPL are applicable instead
 30 * of those above. If you wish to allow use of your version of this file only
 31 * under the terms of either the GPL or the LGPL, and not to allow others to
 32 * use your version of this file under the terms of the MPL, indicate your
 33 * decision by deleting the provisions above and replace them with the notice
 34 * and other provisions required by the GPL or the LGPL. If you do not delete
 35 * the provisions above, a recipient may use your version of this file under
 36 * the terms of any one of the MPL, the GPL or the LGPL.
 37 *
 38 * ***** END LICENSE BLOCK ***** */
 39
 40#include "domstubs.idl"
 41
 42interface nsISelection;
 43
 44/**
 45 * The nsIDOMWindow interface is the primary interface for a DOM
 46 * window object. It represents a single window object that may
 47 * contain child windows if the document in the window contains a
 48 * HTML frameset document or if the document contains iframe elements.
 49 *
 50 * This interface is not officially defined by any standard bodies, it
 51 * originates from the defacto DOM Level 0 standard.
 52 *
 53 * @status FROZEN
 54 */
 55
 56[scriptable, uuid(a6cf906b-15b3-11d2-932e-00805f8add32)]
 57interface nsIDOMWindow : nsISupports
 58{
 59  /**
 60   * Accessor for the document in this window.
 61   */
 62  readonly attribute nsIDOMDocument                     document;
 63
 64  /**
 65   * Accessor for this window's parent window, or the window itself if
 66   * there is no parent, or if the parent is of different type
 67   * (i.e. this does not cross chrome-content boundaries).
 68   */
 69  readonly attribute nsIDOMWindow                       parent;
 70
 71  /**
 72   * Accessor for the root of this hierarchy of windows. This root may
 73   * be the window itself if there is no parent, or if the parent is
 74   * of different type (i.e. this does not cross chrome-content
 75   * boundaries).
 76   *
 77   * This property is "replaceable" in JavaScript */
 78  readonly attribute nsIDOMWindow                       top;
 79
 80  /**
 81   * Accessor for the object that controls whether or not scrollbars
 82   * are shown in this window.
 83   *
 84   * This attribute is "replaceable" in JavaScript
 85   */
 86  readonly attribute nsIDOMBarProp                      scrollbars;
 87
 88  /**
 89   * Accessor for the child windows in this window.
 90   */
 91  [noscript] readonly attribute nsIDOMWindowCollection  frames;
 92
 93  /**
 94   * Set/Get the name of this window.
 95   *
 96   * This attribute is "replaceable" in JavaScript
 97   */
 98           attribute DOMString                          name;
 99  /**
100   * Set/Get the document scale factor as a multiplier on the default
101   * size. When setting this attribute, a NS_ERROR_NOT_IMPLEMENTED
102   * error may be returned by implementations not supporting
103   * zoom. Implementations not supporting zoom should return 1.0 all
104   * the time for the Get operation. 1.0 is equals normal size,
105   * i.e. no zoom.
106   */
107  [noscript] attribute float                            textZoom;
108
109  /**
110   * Accessor for the current x scroll position in this window in
111   * pixels.
112   *
113   * This attribute is "replaceable" in JavaScript
114   */
115  readonly attribute long                               scrollX;
116
117  /**
118   * Accessor for the current y scroll position in this window in
119   * pixels.
120   *
121   * This attribute is "replaceable" in JavaScript
122   */
123  readonly attribute long                               scrollY;
124
125  /**
126   * Method for scrolling this window to an absolute pixel offset.
127   */
128  void                      scrollTo(in long xScroll, in long yScroll);
129
130  /**
131   * Method for scrolling this window to a pixel offset relative to
132   * the current scroll position.
133   */
134  void                      scrollBy(in long xScrollDif, in long yScrollDif);
135
136  /**
137   * Method for accessing this window's selection object.
138   */
139  nsISelection              getSelection();
140
141  /**
142   * Method for scrolling this window by a number of lines.
143   */
144  void                      scrollByLines(in long numLines);
145
146  /**
147   * Method for scrolling this window by a number of pages.
148   */
149  void                      scrollByPages(in long numPages);
150
151  /**
152   * Method for sizing this window to the content in the window.
153   */
154  void                      sizeToContent();
155};