1999-10-15 11:23:53 +04: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 07:01:33 +04:00
|
|
|
* Steve Clark <buster@netscape.com>
|
1999-10-15 11:23:53 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "domstubs.idl"
|
1999-11-06 07:48:21 +03:00
|
|
|
#include "nsIURIContentListener.idl"
|
1999-11-07 12:57:56 +03:00
|
|
|
#include "nsIURI.idl"
|
2000-11-09 23:30:35 +03:00
|
|
|
#include "nsIContentViewer.idl"
|
1999-10-15 11:23:53 +04:00
|
|
|
|
1999-10-22 06:26:35 +04:00
|
|
|
%{ C++
|
|
|
|
#include "nsIPresContext.h"
|
1999-11-11 03:35:36 +03:00
|
|
|
#include "nsIDocumentLoaderObserver.h"
|
1999-10-22 06:26:35 +04:00
|
|
|
%}
|
|
|
|
|
1999-10-15 11:23:53 +04:00
|
|
|
/**
|
|
|
|
* The nsIDocShell
|
|
|
|
*/
|
|
|
|
|
1999-10-21 07:01:33 +04:00
|
|
|
[ptr] native nsIPresContext(nsIPresContext);
|
1999-11-29 21:40:06 +03:00
|
|
|
[ptr] native nsIPresShell(nsIPresShell);
|
1999-10-21 07:01:33 +04:00
|
|
|
|
1999-12-18 05:20:35 +03:00
|
|
|
interface nsIChromeEventHandler;
|
2000-03-15 11:41:52 +03:00
|
|
|
interface nsIDocumentLoaderObserver;
|
2000-03-30 16:52:02 +04:00
|
|
|
interface nsIDocShellLoadInfo;
|
2000-04-12 04:07:04 +04:00
|
|
|
interface nsIDocumentCharsetInfo;
|
2000-09-20 16:23:53 +04:00
|
|
|
interface nsIWebNavigation;
|
1999-12-18 05:20:35 +03:00
|
|
|
|
1999-10-15 11:23:53 +04:00
|
|
|
[scriptable, uuid(69E5DE00-7B8B-11d3-AF61-00A024FFC08C)]
|
|
|
|
interface nsIDocShell : nsISupports
|
|
|
|
{
|
1999-10-21 07:01:33 +04: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.
|
2000-09-20 16:23:53 +04:00
|
|
|
@param loadInfo - This is the extended load info for this load. This
|
|
|
|
most often will be null, but if you need to do additional setup for
|
|
|
|
this load you can get a loadInfo object by calling createLoadInfo.
|
|
|
|
Once you have this object you can set the needed properties on it and
|
|
|
|
then pass it to loadURI.
|
|
|
|
@param aLoadFlags - Flags to modify load behaviour. Flags are defined
|
|
|
|
in nsIWebNavigation.
|
1999-10-21 07:01:33 +04:00
|
|
|
*/
|
2000-09-20 16:23:53 +04:00
|
|
|
[noscript]void loadURI(in nsIURI uri, in nsIDocShellLoadInfo loadInfo, in unsigned long aLoadFlags);
|
1999-10-15 11:23:53 +04:00
|
|
|
|
2000-07-01 03:39:30 +04:00
|
|
|
/*
|
|
|
|
Loads a given stream. This will give priority to loading the requested stream
|
|
|
|
in the object implementing this interface. If it can't be loaded here however,
|
|
|
|
the URL dispatched will go through its normal process of content loading.
|
|
|
|
|
|
|
|
@param aStream - The input stream that provides access to the data to be loaded.
|
|
|
|
@param aURI - The URI representing the stream, or null.
|
|
|
|
@param aContentType - The type (MIME) of data being loaded.
|
2000-08-03 19:02:42 +04:00
|
|
|
@param aContentLen - The length (in bytes) of the stream. If you don't know
|
|
|
|
the length of the stream this can be -1.
|
2000-07-01 03:39:30 +04:00
|
|
|
@param aLoadInfo - This is the extended load info for this load. This most
|
|
|
|
most often will be null, but if you need to do additional setup for this
|
|
|
|
load you can get a loadInfo object by calling createLoadInfo. Once you have
|
|
|
|
this object you can set the needed properties on it and then pass it to
|
|
|
|
loadURI.
|
|
|
|
*/
|
|
|
|
[noscript]void loadStream(in nsIInputStream aStream, in nsIURI aURI,
|
|
|
|
in string aContentType, in long aContentLen,
|
|
|
|
in nsIDocShellLoadInfo aLoadInfo);
|
|
|
|
|
2000-03-30 16:52:02 +04:00
|
|
|
/*
|
|
|
|
Creates a DocShellLoadInfo object that you can manipulate and then pass to
|
|
|
|
loadURI.
|
|
|
|
*/
|
|
|
|
void createLoadInfo(out nsIDocShellLoadInfo loadInfo);
|
|
|
|
|
2000-02-24 07:14:13 +03:00
|
|
|
/*
|
|
|
|
Stops a current load. This simply stops the network portion of the load.
|
|
|
|
If you wish to do a complete stop, then you should us the
|
|
|
|
nsIWebNavigation::Stop() method.
|
|
|
|
*/
|
|
|
|
void stopLoad();
|
1999-11-07 12:57:56 +03:00
|
|
|
|
1999-11-11 03:35:36 +03:00
|
|
|
/* clients may get and set an nsIDocumentLoaderObserver, which will be notified
|
|
|
|
* during loadURI, loadURIVia, and setDocument
|
|
|
|
*/
|
1999-12-03 13:29:08 +03:00
|
|
|
attribute nsIDocumentLoaderObserver docLoaderObserver;
|
1999-10-21 07:01:33 +04:00
|
|
|
|
|
|
|
/*
|
1999-10-30 06:30:13 +04:00
|
|
|
Presentation context for the currently loaded document. This may be null.
|
1999-10-21 07:01:33 +04:00
|
|
|
*/
|
2000-03-18 02:47:48 +03:00
|
|
|
[noscript] readonly attribute nsIPresContext presContext;
|
1999-10-21 07:01:33 +04:00
|
|
|
|
1999-11-29 21:40:06 +03:00
|
|
|
/*
|
|
|
|
Presentation context for the currently loaded document. This may be null.
|
|
|
|
*/
|
2000-03-18 02:47:48 +03:00
|
|
|
[noscript] readonly attribute nsIPresShell presShell;
|
1999-11-29 21:40:06 +03:00
|
|
|
|
1999-11-16 01:54:47 +03:00
|
|
|
/*
|
|
|
|
Content Viewer that is currently loaded for this DocShell. This may change
|
|
|
|
as the underlying content changes.
|
|
|
|
*/
|
2000-11-09 23:30:35 +03:00
|
|
|
readonly attribute nsIContentViewer contentViewer;
|
1999-11-16 01:54:47 +03:00
|
|
|
|
1999-12-18 05:20:35 +03:00
|
|
|
/*
|
|
|
|
This attribute allows chrome to tie in to handle DOM events that may be of
|
|
|
|
interest to chrome.
|
|
|
|
*/
|
|
|
|
attribute nsIChromeEventHandler chromeEventHandler;
|
|
|
|
|
1999-11-06 07:48:21 +03:00
|
|
|
/*
|
2000-04-03 00:31:12 +04:00
|
|
|
URI content listener parent. This is not refcounted and is assumed to be
|
|
|
|
nulled out by the parent when the parent is going away.
|
1999-11-06 07:48:21 +03:00
|
|
|
*/
|
|
|
|
attribute nsIURIContentListener parentURIContentListener;
|
|
|
|
|
2000-04-12 04:07:04 +04:00
|
|
|
/*
|
|
|
|
The document charset info. This is used by a load to determine priorities for
|
|
|
|
charset detection etc.
|
|
|
|
*/
|
|
|
|
attribute nsIDocumentCharsetInfo documentCharsetInfo;
|
|
|
|
|
2000-03-11 03:47:59 +03:00
|
|
|
/*
|
|
|
|
Attribute stating if it should allow plugins or not.
|
|
|
|
*/
|
|
|
|
attribute boolean allowPlugins;
|
|
|
|
|
2000-03-14 07:35:37 +03:00
|
|
|
/*
|
|
|
|
Definitions for the viewModes the docShell can be in.
|
|
|
|
*/
|
|
|
|
const long viewNormal=0;
|
|
|
|
const long viewSource=1;
|
|
|
|
|
|
|
|
/*
|
|
|
|
This is the mode that the docShell is in for viewing when a load occurs.
|
|
|
|
*/
|
|
|
|
attribute long viewMode;
|
|
|
|
|
1999-10-30 04:52:57 +04: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-11-12 10:28:25 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
XXX Comment here!
|
|
|
|
*/
|
|
|
|
attribute long marginWidth;
|
|
|
|
|
|
|
|
/*
|
|
|
|
XXX Comment here!
|
|
|
|
*/
|
|
|
|
attribute long marginHeight;
|
|
|
|
};
|
1999-11-19 10:35:27 +03:00
|
|
|
|