gecko-dev/embedding/browser/webBrowser/nsIWebBrowserChrome.idl

113 строки
3.7 KiB
Plaintext
Исходник Обычный вид История

/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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):
* Travis Bogard <travis@netscape.com>
*/
#include "nsISupports.idl"
interface nsIWebBrowser;
/**
* The nsIWebBrowserChrome
*/
[scriptable, uuid(BA434C60-9D52-11d3-AFB0-00A024FFC08C)]
interface nsIWebBrowserChrome : nsISupports
{
/*
Called when the js status value changes. nsnull will be passed when
there is no longer any js Status.
*/
void setJSStatus(in wstring status);
/*
Called when the js default status value changes. nsnull will be passed
when there is no longer any js default status.
*/
void setJSDefaultStatus(in wstring status);
/*
Called when the current link the mouse is over changes. nsnull will
be passed when the mouse is no longer over a link.
*/
void setOverLink(in wstring link);
/*
This is the currently loaded webBrowser. The browser chrome may be
told to set the webBrowser object to a new object via setting of this
attribute. In this case the implementer is responsible for taking the
new webBrowser object and doing any necessary initialization or setup
as if it had created the webBrowser itself. This includes positioning
setting up listeners etc.
*/
attribute nsIWebBrowser webBrowser;
/*
Definitions for the chrome masks
*/
const unsigned long defaultChrome = 0x00000001;
const unsigned long windowBordersOn = 0x00000002;
const unsigned long windowCloseOn = 0x00000004;
const unsigned long windowResizeOn = 0x00000008;
const unsigned long menuBarOn = 0x00000010;
const unsigned long toolBarOn = 0x00000020;
const unsigned long locationBarOn = 0x00000040;
const unsigned long statusBarOn = 0x00000080;
const unsigned long personalToolBarOn = 0x00000100;
const unsigned long scrollbarsOn = 0x00000200;
const unsigned long titlebarOn = 0x00000400;
const unsigned long extraChromeOn = 0x00000800;
const unsigned long dependent = 0x10000000;
const unsigned long modal = 0x20000000;
const unsigned long openAsDialog = 0x40000000;
const unsigned long openAsChrome = 0x80000000;
const unsigned long allChrome = 0x00000ffe;
/*
The chrome mask for this browser chrome
*/
attribute unsigned long chromeMask;
/*
Tells the implementer of this interface to create a new webBrowserChrome
object for it. Typically this means the implemetor will create a new
top level window that is represented by nsIWebBrowserChrome. This
most often will be called when for instance there is a need for a new
JS window, etc. Soon after this new object is returned, the webBrowser
attribute will checked, if one does not exist, one will be created and
setWebBrowser will be called with the new widget to instantiate in this
new window.
*/
nsIWebBrowser getNewBrowser(in unsigned long chromeMask);
nsIWebBrowser findNamedBrowser(in wstring aName);
/*
Tells the chrome to size itself such that the browser will be the
specified size.
*/
void sizeBrowserTo(in long aCX, in long aCY);
/*
Shows the window as a modal window.
*/
void showAsModal();
};