pjs/docshell/base/nsIDocShell.idl

153 строки
4.4 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>
* Steve Clark <buster@netscape.com>
*/
#include "nsISupports.idl"
#include "domstubs.idl"
#include "nsIPref.idl"
#include "nsIURIContentListener.idl"
#include "nsIURI.idl"
%{ C++
#include "nsIPresContext.h"
#include "nsIContentViewer.h"
#include "nsIDocumentLoaderObserver.h"
%}
/**
* The nsIDocShell
*/
[ptr] native nsIPresContext(nsIPresContext);
[ptr] native nsIPresShell(nsIPresShell);
[ptr] native nsIDocumentLoaderObserver(nsIDocumentLoaderObserver);
[ptr] native nsIContentViewer(nsIContentViewer);
interface nsIChromeEventHandler;
[scriptable, uuid(69E5DE00-7B8B-11d3-AF61-00A024FFC08C)]
interface nsIDocShell : nsISupports
{
/*
Loads a given URI. This will give priority to loading the requested URI
in the object implementing this interface. If it can't be loaded here
however, the URL dispatcher will go through its normal process of content
loading.
@param uri - The URI to load.
@param presContext - Presentation Context to use for the new URL. This
may be null.
*/
[noscript]void loadURI(in nsIURI uri, in nsIPresContext presContext);
/*
Loads a given URI through the specified adapter. This will give priority
to loading the requested URI in the object implementing this interface.
If it can't be loaded here however, the URL dispatcher will go through its
normal process of content loading.
@param uri - The URI to load.
@param presContext - Presentation Context to use for the new URL. This
may be null.
@param adapterBinding - The local IP address of the adapter to bind to.
*/
[noscript]void loadURIVia(in nsIURI uri, in nsIPresContext presContext,
in unsigned long adapterBinding);
/*
Sets the current document to the one being passed in. This will simulate
a load.
@param document - The document to load.
@param rootNode - The root of the document content, to be hooked up
*/
[noscript]void setDocument(in nsIDOMDocument document, in nsIDOMElement rootNode);
/*
The current document that is loaded in the DocShell.
*/
readonly attribute nsIDOMDocument document;
/*
The current URI that is loaded.
*/
readonly attribute nsIURI currentURI;
/* clients may get and set an nsIDocumentLoaderObserver, which will be notified
* during loadURI, loadURIVia, and setDocument
*/
attribute nsIDocumentLoaderObserver docLoaderObserver;
/*
Presentation context for the currently loaded document. This may be null.
*/
readonly attribute nsIPresContext presContext;
/*
Presentation context for the currently loaded document. This may be null.
*/
readonly attribute nsIPresShell presShell;
/*
Content Viewer that is currently loaded for this DocShell. This may change
as the underlying content changes.
*/
readonly attribute nsIContentViewer contentViewer;
/*
This attribute allows chrome to tie in to handle DOM events that may be of
interest to chrome.
*/
attribute nsIChromeEventHandler chromeEventHandler;
/*
URI content listener parent
*/
attribute nsIURIContentListener parentURIContentListener;
/*
Prefs to use for the DocShell.
*/
attribute nsIPref prefs;
/**
* Set/Get the document scale factor. When setting this attribute, a
* NS_ERROR_NOT_IMPLEMENTED error may be returned by implementations
* not supporting zoom. Implementations not supporting zoom should return
* 1.0 all the time for the Get operation. 1.0 by the way is the default
* of zoom. This means 100% of normal scaling or in other words normal size
* no zoom.
*/
attribute float zoom;
/*
XXX Comment here!
*/
attribute long marginWidth;
/*
XXX Comment here!
*/
attribute long marginHeight;
};