Struct xpcom::interfaces::nsINavHistoryResultTreeViewer
[−]
[src]
#[repr(C)]pub struct nsINavHistoryResultTreeViewer { /* fields omitted */ }
interface nsINavHistoryResultTreeViewer : nsINavHistoryResultObserver
/**
* TODO: Bug 517719.
*
* A predefined view adaptor for interfacing results with an nsITree. This
* object will remove itself from its associated result when the tree has been
* detached. This prevents circular references. Users should be aware of this,
* if you want to re-use the same viewer, you will need to keep your own
* reference to it and re-initialize it when the tree changes. If you use this
* object, attach it to a result, never attach it to a tree, and forget about
* it, it will leak!
*/
Methods
impl nsINavHistoryResultTreeViewer
[src]
pub fn coerce<T: nsINavHistoryResultTreeViewerCoerce>(&self) -> &T
[src]
Cast this nsINavHistoryResultTreeViewer
to one of its base interfaces.
impl nsINavHistoryResultTreeViewer
[src]
pub const INDEX_INVISIBLE: i64
INDEX_INVISIBLE: i64 = 4294967295
/**
* Reverse of nodeForFlatIndex, returns the row index for a given result node.
* Returns INDEX_INVISIBLE if the item is not visible (for example, its
* parent is collapsed). This is only valid when a tree is attached. The
* the result will always be INDEX_INVISIBLE if not.
*
* Note: This sounds sort of obvious, but it got me: aNode must be a node
* retrieved from the same result that this viewer is for. If you
* execute another query and get a node from a _different_ result, this
* function will always return the index of that node in the tree that
* is attached to that result.
*/
pub unsafe fn NodeForTreeIndex(
&self,
aIndex: uint32_t,
_retval: *mut *const nsINavHistoryResultNode
) -> nsresult
[src]
&self,
aIndex: uint32_t,
_retval: *mut *const nsINavHistoryResultNode
) -> nsresult
/**
* This allows you to get at the real node for a given row index. This is
* only valid when a tree is attached.
*/
nsINavHistoryResultNode nodeForTreeIndex (in unsigned long aIndex);
pub unsafe fn TreeIndexForNode(
&self,
aNode: *const nsINavHistoryResultNode,
_retval: *mut uint32_t
) -> nsresult
[src]
&self,
aNode: *const nsINavHistoryResultNode,
_retval: *mut uint32_t
) -> nsresult
unsigned long treeIndexForNode (in nsINavHistoryResultNode aNode);
Methods from Deref<Target = nsINavHistoryResultObserver>
pub fn coerce<T: nsINavHistoryResultObserverCoerce>(&self) -> &T
[src]
Cast this nsINavHistoryResultObserver
to one of its base interfaces.
pub unsafe fn NodeInserted(
&self,
aParent: *const nsINavHistoryContainerResultNode,
aNode: *const nsINavHistoryResultNode,
aNewIndex: uint32_t
) -> nsresult
[src]
&self,
aParent: *const nsINavHistoryContainerResultNode,
aNode: *const nsINavHistoryResultNode,
aNewIndex: uint32_t
) -> nsresult
/**
* Called when 'aItem' is inserted into 'aParent' at index 'aNewIndex'.
* The item previously at index (if any) and everything below it will have
* been shifted down by one. The item may be a container or a leaf.
*/
void nodeInserted (in nsINavHistoryContainerResultNode aParent, in nsINavHistoryResultNode aNode, in unsigned long aNewIndex);
pub unsafe fn NodeRemoved(
&self,
aParent: *const nsINavHistoryContainerResultNode,
aItem: *const nsINavHistoryResultNode,
aOldIndex: uint32_t
) -> nsresult
[src]
&self,
aParent: *const nsINavHistoryContainerResultNode,
aItem: *const nsINavHistoryResultNode,
aOldIndex: uint32_t
) -> nsresult
/**
* Called whan 'aItem' is removed from 'aParent' at 'aOldIndex'. The item
* may be a container or a leaf. This function will be called after the item
* has been removed from its parent list, but before anything else (including
* NULLing out the item's parent) has happened.
*/
void nodeRemoved (in nsINavHistoryContainerResultNode aParent, in nsINavHistoryResultNode aItem, in unsigned long aOldIndex);
pub unsafe fn NodeMoved(
&self,
aNode: *const nsINavHistoryResultNode,
aOldParent: *const nsINavHistoryContainerResultNode,
aOldIndex: uint32_t,
aNewParent: *const nsINavHistoryContainerResultNode,
aNewIndex: uint32_t
) -> nsresult
[src]
&self,
aNode: *const nsINavHistoryResultNode,
aOldParent: *const nsINavHistoryContainerResultNode,
aOldIndex: uint32_t,
aNewParent: *const nsINavHistoryContainerResultNode,
aNewIndex: uint32_t
) -> nsresult
/**
* Called whan 'aItem' is moved from 'aOldParent' at 'aOldIndex' to
* aNewParent at aNewIndex. The item may be a container or a leaf.
*
* XXX: at the moment, this method is called only when an item is moved
* within the same container. When an item is moved between containers,
* a new node is created for the item, and the itemRemoved/itemAdded methods
* are used.
*/
void nodeMoved (in nsINavHistoryResultNode aNode, in nsINavHistoryContainerResultNode aOldParent, in unsigned long aOldIndex, in nsINavHistoryContainerResultNode aNewParent, in unsigned long aNewIndex);
pub unsafe fn NodeTitleChanged(
&self,
aNode: *const nsINavHistoryResultNode,
aNewTitle: &nsACString
) -> nsresult
[src]
&self,
aNode: *const nsINavHistoryResultNode,
aNewTitle: &nsACString
) -> nsresult
/**
* Called right after aNode's title has changed.
*
* @param aNode
* a result node
* @param aNewTitle
* the new title
*/
void nodeTitleChanged (in nsINavHistoryResultNode aNode, in AUTF8String aNewTitle);
pub unsafe fn NodeURIChanged(
&self,
aNode: *const nsINavHistoryResultNode,
aOldURI: &nsACString
) -> nsresult
[src]
&self,
aNode: *const nsINavHistoryResultNode,
aOldURI: &nsACString
) -> nsresult
/**
* Called right after aNode's uri property has changed.
*
* @param aNode
* a result node
* @param aNewURI
* the old uri
*/
void nodeURIChanged (in nsINavHistoryResultNode aNode, in AUTF8String aOldURI);
pub unsafe fn NodeIconChanged(
&self,
aNode: *const nsINavHistoryResultNode
) -> nsresult
[src]
&self,
aNode: *const nsINavHistoryResultNode
) -> nsresult
/**
* Called right after aNode's icon property has changed.
*
* @param aNode
* a result node
*
* @note: The new icon is accessible through aNode.icon.
*/
void nodeIconChanged (in nsINavHistoryResultNode aNode);
pub unsafe fn NodeHistoryDetailsChanged(
&self,
aNode: *const nsINavHistoryResultNode,
aOldVisitDate: PRTime,
aOldAccessCount: uint32_t
) -> nsresult
[src]
&self,
aNode: *const nsINavHistoryResultNode,
aOldVisitDate: PRTime,
aOldAccessCount: uint32_t
) -> nsresult
/**
* Called right after aNode's time property or accessCount property, or both,
* have changed.
*
* @param aNode
* a uri result node
* @param aOldVisitDate
* the old visit date
* @param aOldAccessCount
* the old access-count
*/
void nodeHistoryDetailsChanged (in nsINavHistoryResultNode aNode, in PRTime aOldVisitDate, in unsigned long aOldAccessCount);
pub unsafe fn NodeTagsChanged(
&self,
aNode: *const nsINavHistoryResultNode
) -> nsresult
[src]
&self,
aNode: *const nsINavHistoryResultNode
) -> nsresult
/**
* Called when the tags set on the uri represented by aNode have changed.
*
* @param aNode
* a uri result node
*
* @note: The new tags list is accessible through aNode.tags.
*/
void nodeTagsChanged (in nsINavHistoryResultNode aNode);
pub unsafe fn NodeKeywordChanged(
&self,
aNode: *const nsINavHistoryResultNode,
aNewKeyword: &nsACString
) -> nsresult
[src]
&self,
aNode: *const nsINavHistoryResultNode,
aNewKeyword: &nsACString
) -> nsresult
/**
* Called right after the aNode's keyword property has changed.
*
* @param aNode
* a uri result node
* @param aNewKeyword
* the new keyword
*/
void nodeKeywordChanged (in nsINavHistoryResultNode aNode, in AUTF8String aNewKeyword);
pub unsafe fn NodeAnnotationChanged(
&self,
aNode: *const nsINavHistoryResultNode,
aAnnoName: &nsACString
) -> nsresult
[src]
&self,
aNode: *const nsINavHistoryResultNode,
aAnnoName: &nsACString
) -> nsresult
/**
* Called right after an annotation of aNode's has changed (set, altered, or
* unset).
*
* @param aNode
* a result node
* @param aAnnoName
* the name of the annotation that changed
*/
void nodeAnnotationChanged (in nsINavHistoryResultNode aNode, in AUTF8String aAnnoName);
pub unsafe fn NodeDateAddedChanged(
&self,
aNode: *const nsINavHistoryResultNode,
aNewValue: PRTime
) -> nsresult
[src]
&self,
aNode: *const nsINavHistoryResultNode,
aNewValue: PRTime
) -> nsresult
/**
* Called right after aNode's dateAdded property has changed.
*
* @param aNode
* a result node
* @param aNewValue
* the new value of the dateAdded property
*/
void nodeDateAddedChanged (in nsINavHistoryResultNode aNode, in PRTime aNewValue);
pub unsafe fn NodeLastModifiedChanged(
&self,
aNode: *const nsINavHistoryResultNode,
aNewValue: PRTime
) -> nsresult
[src]
&self,
aNode: *const nsINavHistoryResultNode,
aNewValue: PRTime
) -> nsresult
/**
* Called right after aNode's dateModified property has changed.
*
* @param aNode
* a result node
* @param aNewValue
* the new value of the dateModified property
*/
void nodeLastModifiedChanged (in nsINavHistoryResultNode aNode, in PRTime aNewValue);
pub unsafe fn ContainerStateChanged(
&self,
aContainerNode: *const nsINavHistoryContainerResultNode,
aOldState: uint32_t,
aNewState: uint32_t
) -> nsresult
[src]
&self,
aContainerNode: *const nsINavHistoryContainerResultNode,
aOldState: uint32_t,
aNewState: uint32_t
) -> nsresult
/**
* Called after a container changes state.
*
* @param aContainerNode
* The container that has changed state.
* @param aOldState
* The state that aContainerNode has transitioned out of.
* @param aNewState
* The state that aContainerNode has transitioned into.
*/
void containerStateChanged (in nsINavHistoryContainerResultNode aContainerNode, in unsigned long aOldState, in unsigned long aNewState);
pub unsafe fn InvalidateContainer(
&self,
aContainerNode: *const nsINavHistoryContainerResultNode
) -> nsresult
[src]
&self,
aContainerNode: *const nsINavHistoryContainerResultNode
) -> nsresult
/**
* Called when something significant has happened within the container. The
* contents of the container should be re-built.
*
* @param aContainerNode
* the container node to invalidate
*/
void invalidateContainer (in nsINavHistoryContainerResultNode aContainerNode);
pub unsafe fn SortingChanged(&self, sortingMode: uint16_t) -> nsresult
[src]
/**
* This is called to indicate to the UI that the sort has changed to the
* given mode. For trees, for example, this would update the column headers
* to reflect the sorting. For many other types of views, this won't be
* applicable.
*
* @param sortingMode One of nsINavHistoryQueryOptions.SORT_BY_* that
* indicates the new sorting mode.
*
* This only is expected to update the sorting UI. invalidateAll() will also
* get called if the sorting changes to update everything.
*/
void sortingChanged (in unsigned short sortingMode);
pub unsafe fn Batching(&self, aToggleMode: bool) -> nsresult
[src]
/**
* This is called to indicate that a batch operation is about to start or end.
* The observer could want to disable some events or updates during batches,
* since multiple operations are packed in a short time.
* For example treeviews could temporarily suppress select notifications.
*
* @param aToggleMode
* true if a batch is starting, false if it's ending.
*/
void batching (in boolean aToggleMode);
pub unsafe fn GetResult(
&self,
aResult: *mut *const nsINavHistoryResult
) -> nsresult
[src]
&self,
aResult: *mut *const nsINavHistoryResult
) -> nsresult
/**
* Called by the result when this observer is added.
*/
attribute nsINavHistoryResult result;
pub unsafe fn SetResult(&self, aResult: *const nsINavHistoryResult) -> nsresult
[src]
/**
* Called by the result when this observer is added.
*/
attribute nsINavHistoryResult result;
Trait Implementations
impl XpCom for nsINavHistoryResultTreeViewer
[src]
const IID: nsIID
IID: nsIID = nsID(4172617920, 8111, 4575, [138, 57, 8, 0, 32, 12, 154, 102])
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 nsINavHistoryResultTreeViewer
[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 nsINavHistoryResultTreeViewer
[src]
type Target = nsINavHistoryResultObserver
The resulting type after dereferencing.
fn deref(&self) -> &nsINavHistoryResultObserver
[src]
Dereferences the value.