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

/embedding/browser/webBrowser/nsIEmbeddingSiteWindow.idl

http://github.com/zpao/v8monkey
IDL | 153 lines | 14 code | 11 blank | 128 comment | 0 complexity | 684a42670341817a387e4305b6ddf558 MD5 | raw file
  1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2 *
  3 * ***** BEGIN LICENSE BLOCK *****
  4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5 *
  6 * The contents of this file are subject to the Mozilla Public License Version
  7 * 1.1 (the "License"); you may not use this file except in compliance with
  8 * the License. You may obtain a copy of the License at
  9 * http://www.mozilla.org/MPL/
 10 *
 11 * Software distributed under the License is distributed on an "AS IS" basis,
 12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 13 * for the specific language governing rights and limitations under the
 14 * License.
 15 *
 16 * The Original Code is the Mozilla browser.
 17 *
 18 * The Initial Developer of the Original Code is
 19 * Netscape Communications, Inc.
 20 * Portions created by the Initial Developer are Copyright (C) 1999
 21 * the Initial Developer. All Rights Reserved.
 22 *
 23 * Contributor(s):
 24 *   Adam Lock <adamlock@netscape.com>
 25 *
 26 * Alternatively, the contents of this file may be used under the terms of
 27 * either the GNU General Public License Version 2 or later (the "GPL"), or
 28 * 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 "nsISupports.idl"
 41
 42/* THIS IS A PUBLIC EMBEDDING API */
 43
 44/**
 45 * The nsIEmbeddingSiteWindow is implemented by the embedder to provide
 46 * Gecko with the means to call up to the host to resize the window,
 47 * hide or show it and set/get its title.
 48 */
 49[scriptable, uuid(3E5432CD-9568-4bd1-8CBE-D50ABA110743)]
 50interface nsIEmbeddingSiteWindow : nsISupports
 51{
 52    /**
 53     * Flag indicates that position of the top left corner of the outer area
 54     * is required/specified.
 55     *
 56     * @see setDimensions
 57     * @see getDimensions
 58     */
 59    const unsigned long DIM_FLAGS_POSITION   = 1;
 60    
 61    /**
 62     * Flag indicates that the size of the inner area is required/specified.
 63     *
 64     * @note The inner and outer flags are mutually exclusive and it is
 65     *       invalid to combine them.
 66     *
 67     * @see setDimensions
 68     * @see getDimensions
 69     * @see DIM_FLAGS_SIZE_OUTER
 70     */
 71    const unsigned long DIM_FLAGS_SIZE_INNER = 2;
 72
 73    /**
 74     * Flag indicates that the size of the outer area is required/specified.
 75     *
 76     * @see setDimensions
 77     * @see getDimensions
 78     * @see DIM_FLAGS_SIZE_INNER
 79     */
 80    const unsigned long DIM_FLAGS_SIZE_OUTER = 4;
 81
 82    /**
 83     * Sets the dimensions for the window; the position & size. The
 84     * flags to indicate what the caller wants to set and whether the size
 85     * refers to the inner or outer area. The inner area refers to just
 86     * the embedded area, wheras the outer area can also include any 
 87     * surrounding chrome, window frame, title bar, and so on.
 88     *
 89     * @param flags  Combination of position, inner and outer size flags.
 90     * @param x      Left hand corner of the outer area.
 91     * @param y      Top corner of the outer area.
 92     * @param cx     Width of the inner or outer area.
 93     * @param cy     Height of the inner or outer area.
 94     *
 95     * @return <code>NS_OK</code> if operation was performed correctly;
 96     *         <code>NS_ERROR_UNEXPECTED</code> if window could not be
 97     *           destroyed;
 98     *         <code>NS_ERROR_INVALID_ARG</code> for bad flag combination
 99     *           or illegal dimensions.
100     *
101     * @see getDimensions
102     * @see DIM_FLAGS_POSITION
103     * @see DIM_FLAGS_SIZE_OUTER
104     * @see DIM_FLAGS_SIZE_INNER
105     */
106    void setDimensions(in unsigned long flags, in long x, in long y, in long cx, in long cy);
107
108    /**
109     * Gets the dimensions of the window. The caller may pass
110     * <CODE>nsnull</CODE> for any value it is uninterested in receiving.
111     *
112     * @param flags  Combination of position, inner and outer size flag .
113     * @param x      Left hand corner of the outer area; or <CODE>nsnull</CODE>.
114     * @param y      Top corner of the outer area; or <CODE>nsnull</CODE>.
115     * @param cx     Width of the inner or outer area; or <CODE>nsnull</CODE>.
116     * @param cy     Height of the inner or outer area; or <CODE>nsnull</CODE>.
117     *
118     * @see setDimensions
119     * @see DIM_FLAGS_POSITION
120     * @see DIM_FLAGS_SIZE_OUTER
121     * @see DIM_FLAGS_SIZE_INNER
122     */
123    void getDimensions(in unsigned long flags, out long x, out long y, out long cx, out long cy);
124
125    /**
126     * Give the window focus.
127     */
128    void setFocus();
129
130    /**
131     * Visibility of the window.
132     */
133    attribute boolean visibility;
134
135    /**
136     * Title of the window.
137     */
138    attribute wstring title;
139
140    /**
141     * Native window for the site's window. The implementor should copy the
142     * native window object into the address supplied by the caller. The
143     * type of the native window that the address refers to is  platform
144     * and OS specific as follows:
145     *
146     * <ul>
147     *   <li>On Win32 it is an <CODE>HWND</CODE>.</li>
148     *   <li>On MacOS this is a <CODE>WindowPtr</CODE>.</li>
149     *   <li>On GTK this is a <CODE>GtkWidget*</CODE>.</li>
150     * </ul>
151     */
152    [noscript] readonly attribute voidPtr siteWindow;
153};