2005-01-28 01:52:53 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2005-01-28 01:52:53 +03:00
|
|
|
|
2006-03-30 09:56:38 +04:00
|
|
|
/*
|
|
|
|
* interface for container for information saved in session history when
|
|
|
|
* the document is not
|
|
|
|
*/
|
|
|
|
|
1999-08-31 02:38:58 +04:00
|
|
|
#ifndef _nsILayoutHistoryState_h
|
|
|
|
#define _nsILayoutHistoryState_h
|
|
|
|
|
|
|
|
#include "nsISupports.h"
|
2005-01-28 01:52:53 +03:00
|
|
|
#include "nsStringFwd.h"
|
1999-08-31 02:38:58 +04:00
|
|
|
|
2005-01-28 01:52:53 +03:00
|
|
|
class nsPresState;
|
1999-08-31 02:38:58 +04:00
|
|
|
|
|
|
|
#define NS_ILAYOUTHISTORYSTATE_IID \
|
2008-12-03 20:55:14 +03:00
|
|
|
{ 0x003919e2, 0x5e6b, 0x4d76, \
|
|
|
|
{ 0xa9, 0x4f, 0xbc, 0x5d, 0x15, 0x5b, 0x1c, 0x67 } }
|
1999-08-31 02:38:58 +04:00
|
|
|
|
|
|
|
class nsILayoutHistoryState : public nsISupports {
|
|
|
|
public:
|
2005-11-11 17:36:26 +03:00
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILAYOUTHISTORYSTATE_IID)
|
1999-08-31 02:38:58 +04:00
|
|
|
|
2005-01-28 01:52:53 +03:00
|
|
|
/**
|
|
|
|
* Set |aState| as the state object for |aKey|.
|
|
|
|
* This _transfers_ownership_ of |aState| to the LayoutHistoryState.
|
|
|
|
* It will be freed when RemoveState() is called or when the
|
|
|
|
* LayoutHistoryState is destroyed.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD AddState(const nsCString& aKey, nsPresState* aState) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Look up the state object for |aKey|.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetState(const nsCString& aKey, nsPresState** aState) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove the state object for |aKey|.
|
|
|
|
*/
|
2001-05-30 15:26:21 +04:00
|
|
|
NS_IMETHOD RemoveState(const nsCString& aKey) = 0;
|
2007-07-21 07:00:02 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Check whether this history has any states in it
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
NS_IMETHOD_(bool) HasStates() const = 0;
|
2008-12-03 20:55:14 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets whether this history can contain only scroll position history
|
|
|
|
* or all possible history
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
NS_IMETHOD SetScrollPositionOnly(const bool aFlag) = 0;
|
1999-08-31 02:38:58 +04:00
|
|
|
};
|
|
|
|
|
2005-11-11 17:36:26 +03:00
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsILayoutHistoryState,
|
|
|
|
NS_ILAYOUTHISTORYSTATE_IID)
|
|
|
|
|
1999-08-31 02:38:58 +04:00
|
|
|
nsresult
|
|
|
|
NS_NewLayoutHistoryState(nsILayoutHistoryState** aState);
|
|
|
|
|
1999-09-01 04:53:21 +04:00
|
|
|
#endif /* _nsILayoutHistoryState_h */
|
|
|
|
|