gecko-dev/xpfe/appshell/public/nsISessionHistory.idl

135 строки
3.2 KiB
Plaintext

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#include "nsISupports.idl"
#include "nsIChannel.idl"
#include "nsIFactory.idl"
[ptr] native nsIWebShell(nsIWebShell);
%{C++
#include "nscore.h"
class nsIWebShell;
#define NS_ISESSIONHISTORY_PROGID "component://netscape/appshell/component/browser/sessionhistory"
%}
[scriptable, uuid(68e73d51-12eb-11d3-bdc0-0050040a9b44)]
interface nsISessionHistory: nsISupports
{
/**
* Go forward in history
*/
[noscript] void goForward(in nsIWebShell aContainer);
/**
* Go Back in History
*/
[noscript] void goBack(in nsIWebShell aContainer);
/**
* Reload the current history entry
*/
[noscript] void reload(in nsIWebShell aContainer, in nsLoadFlags aReloadFlags);
/**
* Can I go forward in History
*/
boolean canGoForward();
/**
* Can I go back in History
*/
boolean canGoBack();
/**
* Add a new URL to the History List
*/
[noscript] void add(in string url, in nsIWebShell aContainer);
/**
* Goto to a particular point in history
*/
[noscript] void goto(in long aHistoryIndex, in nsIWebShell aContainer, in boolean aIsReloading);
/**
* Get the length of the History list
*/
long getHistoryLength();
/**
* Get the index of the current document in the history list
*/
long getCurrentIndex();
/**
* Set the flag whether a history entry is in the middle of loading a
* doc. See comments below for details
*/
void setLoadingFlag(in boolean aFlag);
/**
* Get the flag whether a history entry is in the middle of loading a
* doc. See comments below for details
*/
boolean getLoadingFlag();
/**
* Get the URL of the index
*/
string getURLForIndex(in long aIndex);
/**
* Set the URL of the index
*/
void setURLForIndex(in long aIndex, in string aURL);
/**
* Get the title of the index
*/
wstring getTitleForIndex(in long aIndex);
/**
* Set the Title of the index
*/
void setTitleForIndex(in long aIndex, in wstring aTitle);
/**
* Get the History object of the index
*/
nsISupports getHistoryObjectForIndex(in PRInt32 aIndex);
/**
* Set the History state of the index
*/
void setHistoryObjectForIndex(in long aIndex, in nsISupports aState);
/**
* Reconcile history status with the actual page load status
*/
[noscript] void updateStatus(in nsIWebShell aContainer, in long aStatus);
const unsigned long LOAD_HISTORY = 10;
};