Struct xpcom::interfaces::nsISHistoryListener
[−]
[src]
#[repr(C)]pub struct nsISHistoryListener { /* fields omitted */ }
interface nsISHistoryListener : nsISupports
/**
* nsISHistoryListener defines the interface one can implement to receive
* notifications about activities in session history and to be able to
* cancel them.
*
* A session history listener will be notified when pages are added, removed
* and loaded from session history. It can prevent any action (except adding
* a new session history entry) from happening by returning false from the
* corresponding callback method.
*
* A session history listener can be registered on a particular nsISHistory
* instance via the nsISHistory::addSHistoryListener() method.
*/
Methods
impl nsISHistoryListener
[src]
pub fn coerce<T: nsISHistoryListenerCoerce>(&self) -> &T
[src]
Cast this nsISHistoryListener
to one of its base interfaces.
impl nsISHistoryListener
[src]
pub unsafe fn OnHistoryNewEntry(
&self,
aNewURI: *const nsIURI,
aOldIndex: int32_t
) -> nsresult
[src]
&self,
aNewURI: *const nsIURI,
aOldIndex: int32_t
) -> nsresult
/**
* Called when a new document is added to session history. New documents are
* added to session history by docshell when new pages are loaded in a frame
* or content area, for example via nsIWebNavigation::loadURI()
*
* @param aNewURI The URI of the document to be added to session history.
* @param aOldIndex The index of the current history item before the operation.
*/
void OnHistoryNewEntry (in nsIURI aNewURI, in long aOldIndex);
pub unsafe fn OnHistoryGoBack(
&self,
aBackURI: *const nsIURI,
_retval: *mut bool
) -> nsresult
[src]
&self,
aBackURI: *const nsIURI,
_retval: *mut bool
) -> nsresult
/**
* Called when navigating to a previous session history entry, for example
* due to a nsIWebNavigation::goBack() call.
*
* @param aBackURI The URI of the session history entry being navigated to.
* It could be null in case of a grouped session history
* navigation since we have no URI information of entries
* existing in other partial histories.
* @return Whether the operation can proceed.
*/
boolean OnHistoryGoBack (in nsIURI aBackURI);
pub unsafe fn OnHistoryGoForward(
&self,
aForwardURI: *const nsIURI,
_retval: *mut bool
) -> nsresult
[src]
&self,
aForwardURI: *const nsIURI,
_retval: *mut bool
) -> nsresult
/**
* Called when navigating to a next session history entry, for example
* due to a nsIWebNavigation::goForward() call.
*
* @param aForwardURI The URI of the session history entry being navigated to.
* It could be null in case of a grouped session history
* navigation since we have no URI information of entries
* existing in other partial histories.
* @return Whether the operation can proceed.
*/
boolean OnHistoryGoForward (in nsIURI aForwardURI);
pub unsafe fn OnHistoryReload(
&self,
aReloadURI: *const nsIURI,
aReloadFlags: uint32_t,
_retval: *mut bool
) -> nsresult
[src]
&self,
aReloadURI: *const nsIURI,
aReloadFlags: uint32_t,
_retval: *mut bool
) -> nsresult
/**
* Called when the current document is reloaded, for example due to a
* nsIWebNavigation::reload() call.
*
* @param aReloadURI The URI of the document to be reloaded.
* @param aReloadFlags Flags that indicate how the document is to be
* refreshed. See constants on the nsIWebNavigation
* interface.
* @return Whether the operation can proceed.
*
* @see nsIWebNavigation
*/
boolean OnHistoryReload (in nsIURI aReloadURI, in unsigned long aReloadFlags);
pub unsafe fn OnHistoryGotoIndex(
&self,
aIndex: int32_t,
aGotoURI: *const nsIURI,
_retval: *mut bool
) -> nsresult
[src]
&self,
aIndex: int32_t,
aGotoURI: *const nsIURI,
_retval: *mut bool
) -> nsresult
/**
* Called when navigating to a session history entry by index, for example,
* when nsIWebNavigation::gotoIndex() is called.
*
* @param aIndex The index in session history of the entry to be loaded.
* @param aGotoURI The URI of the session history entry to be loaded.
* It could be null in case of a grouped session history
* navigation since we have no URI information of entries
* existing in other partial histories.
* @return Whether the operation can proceed.
*/
boolean OnHistoryGotoIndex (in long aIndex, in nsIURI aGotoURI);
pub unsafe fn OnHistoryPurge(
&self,
aNumEntries: int32_t,
_retval: *mut bool
) -> nsresult
[src]
&self,
aNumEntries: int32_t,
_retval: *mut bool
) -> nsresult
/**
* Called when entries are removed from session history. Entries can be
* removed from session history for various reasons, for example to control
* the memory usage of the browser, to prevent users from loading documents
* from history, to erase evidence of prior page loads, etc.
*
* To purge documents from session history call nsISHistory::PurgeHistory()
*
* @param aNumEntries The number of entries to be removed from session history.
* @return Whether the operation can proceed.
*/
boolean OnHistoryPurge (in long aNumEntries);
pub unsafe fn OnHistoryReplaceEntry(&self, aIndex: int32_t) -> nsresult
[src]
/**
* Called when an entry is replaced in the session history. Entries are
* replaced when navigating away from non-persistent history entries (such as
* about pages) and when history.replaceState is called.
*
* @param aIndex The index in session history of the entry being
* replaced
*/
void OnHistoryReplaceEntry (in long aIndex);
pub unsafe fn OnLengthChanged(&self, aCount: int32_t) -> nsresult
[src]
/**
* Called when nsISHistory::count has been updated. Unlike OnHistoryNewEntry
* and OnHistoryPurge which happen before the modifications are actually done
* and maybe cancellable, this function is called after these modifications.
*/
void OnLengthChanged (in long aCount);
pub unsafe fn OnIndexChanged(&self, aIndex: int32_t) -> nsresult
[src]
/**
* Called when nsISHistory::index has been updated. Unlike the other methods
* on this interface, which happen before the modifications are actually done
* and maybe cancellable, this function is called after these modifications.
*/
void OnIndexChanged (in long aIndex);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsISHistoryListener
[src]
const IID: nsIID
IID: nsIID = nsID(308021299, 29802, 16398, [155, 137, 210, 209, 133, 69, 192, 138])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsISHistoryListener
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsISHistoryListener
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.