michael@0: /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0: *
michael@0: * This Source Code Form is subject to the terms of the Mozilla Public
michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0:
michael@0: #include "nsISupports.idl"
michael@0:
michael@0: interface nsIDocShellTreeOwner;
michael@0:
michael@0:
michael@0: /**
michael@0: * The nsIDocShellTreeItem supplies the methods that are required of any item
michael@0: * that wishes to be able to live within the docshell tree either as a middle
michael@0: * node or a leaf.
michael@0: */
michael@0:
michael@0: [scriptable, uuid(f897f4af-f67e-4115-9d37-ce09f71122e2)]
michael@0: interface nsIDocShellTreeItem : nsISupports
michael@0: {
michael@0: /*
michael@0: name of the DocShellTreeItem
michael@0: */
michael@0: attribute AString name;
michael@0:
michael@0: /**
michael@0: * Compares the provided name against the item's name and
michael@0: * returns the appropriate result.
michael@0: *
michael@0: * @return PR_TRUE
if names match;
michael@0: * PR_FALSE
otherwise.
michael@0: */
michael@0: boolean nameEquals(in wstring name);
michael@0:
michael@0: /*
michael@0: Definitions for the item types.
michael@0: */
michael@0: const long typeChrome=0; // typeChrome must equal 0
michael@0: const long typeContent=1; // typeContent must equal 1
michael@0: const long typeContentWrapper=2; // typeContentWrapper must equal 2
michael@0: const long typeChromeWrapper=3; // typeChromeWrapper must equal 3
michael@0:
michael@0: const long typeAll=0x7FFFFFFF;
michael@0:
michael@0: /*
michael@0: The type this item is.
michael@0: */
michael@0: attribute long itemType;
michael@0: [noscript,notxpcom,nostdcall] long ItemType();
michael@0:
michael@0: /*
michael@0: Parent DocShell.
michael@0: */
michael@0: readonly attribute nsIDocShellTreeItem parent;
michael@0:
michael@0: /*
michael@0: This getter returns the same thing parent does however if the parent
michael@0: is of a different itemType, or if the parent is an