1999-10-15 07:23:53 +00:00
|
|
|
/* -*- 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>
|
1999-10-21 03:01:33 +00:00
|
|
|
* Steve Clark <buster@netscape.com>
|
1999-10-15 07:23:53 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "domstubs.idl"
|
1999-10-21 03:01:33 +00:00
|
|
|
#include "nsIPref.idl"
|
1999-11-06 04:48:21 +00:00
|
|
|
#include "nsIURIContentListener.idl"
|
1999-11-07 09:57:56 +00:00
|
|
|
#include "nsIURI.idl"
|
1999-10-15 07:23:53 +00:00
|
|
|
|
1999-10-22 02:26:35 +00:00
|
|
|
%{ C++
|
|
|
|
#include "nsIPresContext.h"
|
1999-11-11 00:35:36 +00:00
|
|
|
#include "nsIDocumentLoaderObserver.h"
|
1999-10-22 02:26:35 +00:00
|
|
|
%}
|
|
|
|
|
1999-10-15 07:23:53 +00:00
|
|
|
/**
|
|
|
|
* The nsIDocShell
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
{69E5DE00-7B8B-11d3-AF61-00A024FFC08C} -
|
|
|
|
{69E5DE99-7B8B-11d3-AF61-00A024FFC08C} have been reserved for DocShell
|
|
|
|
Interfaces.
|
|
|
|
|
|
|
|
Currently Used:
|
|
|
|
{69E5DE00-7B8B-11d3-AF61-00A024FFC08C} - nsIDocShell
|
|
|
|
{69E5DE01-7B8B-11d3-AF61-00A024FFC08C} - nsIDocShellFile
|
|
|
|
{69E5DE02-7B8B-11d3-AF61-00A024FFC08C} - nsIDocShellEdit
|
|
|
|
{69E5DE03-7B8B-11d3-AF61-00A024FFC08C} - nsIHTMLDocShell
|
1999-10-21 03:01:33 +00:00
|
|
|
{69E5DE04-7B8B-11d3-AF61-00A024FFC08C} - nsIDocShellContainer
|
1999-10-15 07:23:53 +00:00
|
|
|
*/
|
|
|
|
|
1999-10-21 03:01:33 +00:00
|
|
|
[ptr] native nsIPresContext(nsIPresContext);
|
1999-11-11 00:35:36 +00:00
|
|
|
[ptr] native nsIDocumentLoaderObserver(nsIDocumentLoaderObserver);
|
1999-10-21 03:01:33 +00:00
|
|
|
|
1999-10-15 07:23:53 +00:00
|
|
|
[scriptable, uuid(69E5DE00-7B8B-11d3-AF61-00A024FFC08C)]
|
|
|
|
interface nsIDocShell : nsISupports
|
|
|
|
{
|
1999-10-21 03:01:33 +00:00
|
|
|
/*
|
|
|
|
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.
|
1999-10-30 02:30:13 +00:00
|
|
|
@param presContext - Presentation Context to use for the new URL. This
|
|
|
|
may be null.
|
1999-10-21 03:01:33 +00:00
|
|
|
*/
|
1999-11-07 09:57:56 +00:00
|
|
|
[noscript]void loadURI(in nsIURI uri, in nsIPresContext presContext);
|
1999-10-21 03:01:33 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
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.
|
1999-10-30 02:30:13 +00:00
|
|
|
@param presContext - Presentation Context to use for the new URL. This
|
|
|
|
may be null.
|
1999-10-21 03:01:33 +00:00
|
|
|
@param adapterBinding - The local IP address of the adapter to bind to.
|
|
|
|
*/
|
1999-11-07 09:57:56 +00:00
|
|
|
[noscript]void loadURIVia(in nsIURI uri, in nsIPresContext presContext,
|
1999-10-30 02:30:13 +00:00
|
|
|
in unsigned long adapterBinding);
|
1999-10-15 07:23:53 +00:00
|
|
|
|
1999-10-21 03:01:33 +00:00
|
|
|
/*
|
1999-10-30 02:30:13 +00:00
|
|
|
Sets the current document to the one being passed in. This will simulate
|
|
|
|
a load.
|
|
|
|
|
|
|
|
@param document - The document to load.
|
1999-11-11 00:35:36 +00:00
|
|
|
@param rootNode - The root of the document content, to be hooked up
|
1999-10-30 02:30:13 +00:00
|
|
|
*/
|
1999-11-11 00:35:36 +00:00
|
|
|
[noscript]void setDocument(in nsIDOMDocument document, in nsIDOMElement rootNode);
|
1999-10-30 02:30:13 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
The current document that is loaded in the DocShell.
|
1999-10-21 03:01:33 +00:00
|
|
|
*/
|
1999-10-30 02:30:13 +00:00
|
|
|
readonly attribute nsIDOMDocument document;
|
1999-10-21 03:01:33 +00:00
|
|
|
|
1999-11-07 09:57:56 +00:00
|
|
|
/*
|
|
|
|
The current URI that is loaded.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIURI currentURI;
|
|
|
|
|
1999-11-11 00:35:36 +00:00
|
|
|
/* clients may get and set an nsIDocumentLoaderObserver, which will be notified
|
|
|
|
* during loadURI, loadURIVia, and setDocument
|
|
|
|
*/
|
|
|
|
attribute nsIDocumentLoaderObserver docLoaderObserver;
|
|
|
|
|
1999-10-21 03:01:33 +00:00
|
|
|
/*
|
|
|
|
name of the DocShell
|
|
|
|
*/
|
|
|
|
attribute wstring name;
|
|
|
|
|
|
|
|
/*
|
1999-10-30 02:30:13 +00:00
|
|
|
Presentation context for the currently loaded document. This may be null.
|
1999-10-21 03:01:33 +00:00
|
|
|
*/
|
1999-10-30 02:30:13 +00:00
|
|
|
readonly attribute nsIPresContext presContext;
|
1999-10-21 03:01:33 +00:00
|
|
|
|
|
|
|
/*
|
1999-11-06 04:48:21 +00:00
|
|
|
Parent DocShell.. Note Implementers of this interface should NOT effect
|
|
|
|
the lifetime of the parent DocShell by holding this reference as it creates
|
|
|
|
a cycle. Parents when releasing this interface should set the parent to
|
|
|
|
nsnull. Implementers of this interface are guaranteed that when parent is
|
|
|
|
set that the pointer is valid without having to addref.
|
|
|
|
|
|
|
|
Further note however when others try to Get the interface you should add
|
|
|
|
ref it before handing it to them.
|
1999-10-21 03:01:33 +00:00
|
|
|
*/
|
|
|
|
attribute nsIDocShell parent;
|
|
|
|
|
1999-11-06 04:48:21 +00:00
|
|
|
/*
|
|
|
|
URI content listener parent
|
|
|
|
*/
|
|
|
|
attribute nsIURIContentListener parentURIContentListener;
|
|
|
|
|
1999-10-21 03:01:33 +00:00
|
|
|
/*
|
|
|
|
Prefs to use for the DocShell.
|
|
|
|
*/
|
1999-10-25 04:51:15 +00:00
|
|
|
attribute nsIPref prefs;
|
1999-10-21 03:01:33 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Returns the root DocShell instance. Since DocShells can be nested
|
|
|
|
(when frames are present for example) this instance represents the
|
|
|
|
outermost DocShell.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIDocShell rootDocShell;
|
1999-10-30 00:52:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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;
|
1999-10-15 07:23:53 +00:00
|
|
|
};
|
1999-11-12 07:28:25 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The nsIHTMLDocShell - XXX This is going away.
|
|
|
|
*/
|
|
|
|
|
|
|
|
[scriptable, uuid(69E5DE03-7B8B-11d3-AF61-00A024FFC08C)]
|
|
|
|
interface nsIHTMLDocShell : nsISupports
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
Scrolls to a given DOM content node.
|
|
|
|
*/
|
|
|
|
void scrollToNode(in nsIDOMNode node);
|
|
|
|
|
|
|
|
/** if true, plugins are allowed within the doc shell. default = true */
|
|
|
|
attribute boolean allowPlugins;
|
|
|
|
|
|
|
|
/*
|
|
|
|
XXX Comment here!
|
|
|
|
*/
|
|
|
|
attribute long marginWidth;
|
|
|
|
|
|
|
|
/*
|
|
|
|
XXX Comment here!
|
|
|
|
*/
|
|
|
|
attribute long marginHeight;
|
|
|
|
|
|
|
|
/*
|
|
|
|
XXX Comment here!
|
|
|
|
*/
|
|
|
|
attribute boolean isFrame;
|
|
|
|
|
|
|
|
/*
|
|
|
|
XXX Comment here!
|
|
|
|
*/
|
|
|
|
attribute wstring defaultCharacterSet;
|
|
|
|
|
|
|
|
/*
|
|
|
|
XXX Comment here!
|
|
|
|
*/
|
|
|
|
attribute wstring forceCharacterSet;
|
|
|
|
|
|
|
|
/*
|
|
|
|
XXX Comment here!
|
|
|
|
*/
|
|
|
|
readonly attribute wstring hintCharacterSet;
|
|
|
|
|
|
|
|
/*
|
|
|
|
XXX Comment here!
|
|
|
|
*/
|
|
|
|
readonly attribute PRInt32 hintCharacterSetSource;
|
|
|
|
|
|
|
|
/* the following is the hacky access method
|
|
|
|
Commented out as nsCharsetSource should be something IDL like
|
|
|
|
void GetCharacterSetHint(in wstring hintCharset, in nsCharsetSource charsetSource);
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tell the window to shrink-to-fit or grow-to-fit its contents
|
|
|
|
*/
|
|
|
|
void sizeToContent();
|
|
|
|
};
|