зеркало из https://github.com/mozilla/pjs.git
117 строки
4.0 KiB
Plaintext
117 строки
4.0 KiB
Plaintext
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||
|
*
|
||
|
* 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.
|
||
|
*
|
||
|
* The Original Code is the Mozilla browser.
|
||
|
*
|
||
|
* The Initial Developer of the Original Code is Netscape
|
||
|
* Communications, Inc. Portions created by Netscape are
|
||
|
* Copyright (C) 1999, Mozilla. All Rights Reserved.
|
||
|
*
|
||
|
* Contributor(s):
|
||
|
* Adam Lock <adamlock@netscape.com>
|
||
|
*/
|
||
|
|
||
|
#include "nsISupports.idl"
|
||
|
|
||
|
/* THIS IS A PUBLIC EMBEDDING API */
|
||
|
|
||
|
/**
|
||
|
* The nsIWebBrowserSiteWindow is implemented by the embedder to provide
|
||
|
* Gecko with the means to call up to the host to resize the window,
|
||
|
* hide or show it and change/query various other properties.
|
||
|
*/
|
||
|
[scriptable, uuid(3E5432CD-9568-4bd1-8CBE-D50ABA110743)]
|
||
|
interface nsIWebBrowserSiteWindow : nsISupports
|
||
|
{
|
||
|
/**
|
||
|
* Tell the window that it should destroy itself. This call should not be
|
||
|
* necessary as it will happen implictly when final release occurs on the
|
||
|
* object. If for some reaons you want the window destroyed prior to
|
||
|
* release due to cycle or ordering issues, then this call provides that
|
||
|
* ability.
|
||
|
*
|
||
|
* @return <code>NS_OK</code> if everything destroyed is properly.
|
||
|
* <code>NS_ERROR_UNEXPECTED</code> if window could not be destroyed.
|
||
|
*/
|
||
|
void destroy();
|
||
|
|
||
|
/*
|
||
|
Window dimension flags for controlling what you are getting and setting.
|
||
|
Note that the inner and outer flags are mutually exclusive and it
|
||
|
is invalid to combine them.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* Position of the top left corner of the outer area.
|
||
|
*/
|
||
|
const unsigned long DIM_FLAGS_POSITION = 1;
|
||
|
/**
|
||
|
* Size of the inner area.
|
||
|
*/
|
||
|
const unsigned long DIM_FLAGS_SIZE_INNER = 2;
|
||
|
/**
|
||
|
* Size of the outer area.
|
||
|
*/
|
||
|
const unsigned long DIM_FLAGS_SIZE_OUTER = 4;
|
||
|
|
||
|
/**
|
||
|
* Sets the dimensions for the window; the width and size. Use the
|
||
|
* flags to indicate what you want to set and whether the size
|
||
|
* refers to the inner or outer area. The inner area refers to just
|
||
|
* the embedded area, wheras the outer area includes the embedded
|
||
|
* area any surrounding chrome, window frame, title bar etc.
|
||
|
*
|
||
|
* @param flags Combination of position, inner and outer size bits.
|
||
|
* Note that the inner and outer size bits are mutually
|
||
|
* exclusive.
|
||
|
* @param x Left hand corner of the outer area
|
||
|
* @param y Top corner of the outer area
|
||
|
* @param cx Width of the inner or outer area
|
||
|
* @param cy Height of the inner or outer area
|
||
|
*
|
||
|
* @return <code>NS_OK</code> if operation was performed correctly.
|
||
|
* <code>NS_ERROR_UNEXPECTED</code> if window could not be
|
||
|
* destroyed.
|
||
|
* <code>NS_ERROR_INVALID_ARG</code> for bad flag combination
|
||
|
* or illegal dimensions.
|
||
|
*/
|
||
|
void setDimensions(in unsigned long flags, in long x, in long y, in long cx, in long cy);
|
||
|
|
||
|
/**
|
||
|
* Gets the dimensions of the window. Use flags and pass nsnull if you
|
||
|
* are uninterested in certain values.
|
||
|
*
|
||
|
* @see #setDimensions
|
||
|
*/
|
||
|
void getDimensions(in unsigned long flags, out long x, out long y, out long cx, out long cy);
|
||
|
|
||
|
/**
|
||
|
* Give the window focus.
|
||
|
*/
|
||
|
void setFocus();
|
||
|
|
||
|
/**
|
||
|
* Visibility of the window.
|
||
|
*/
|
||
|
attribute boolean visibility;
|
||
|
|
||
|
/**
|
||
|
* Title of the window.
|
||
|
*/
|
||
|
attribute wstring title;
|
||
|
|
||
|
/**
|
||
|
* Native window handle returned in a void pointer
|
||
|
*/
|
||
|
[noscript] readonly attribute voidPtr siteWindow;
|
||
|
};
|