Bug 1550519 - Show a translucent parent highlight when a subgrid is highlighted....
[gecko.git] / dom / base / nsINodeList.h
bloba5db43da51c20cf9975bfb866a573eeb88b29cac
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsINodeList_h___
8 #define nsINodeList_h___
10 #include "nsWrapperCache.h"
11 #include "nsIContent.h"
13 // IID for the nsINodeList interface
14 #define NS_INODELIST_IID \
15 { \
16 0xadb5e54c, 0x6e96, 0x4102, { \
17 0x8d, 0x40, 0xe0, 0x12, 0x3d, 0xcf, 0x48, 0x7a \
18 } \
21 class nsIContent;
22 class nsINode;
24 /**
25 * An internal interface for a reasonably fast indexOf.
27 class nsINodeList : public nsISupports, public nsWrapperCache {
28 public:
29 NS_DECLARE_STATIC_IID_ACCESSOR(NS_INODELIST_IID)
31 /**
32 * Get the index of the given node in the list. Will return -1 if the node
33 * is not in the list.
35 virtual int32_t IndexOf(nsIContent* aContent) = 0;
37 /**
38 * Get the root node for this nodelist.
40 virtual nsINode* GetParentObject() = 0;
42 virtual uint32_t Length() = 0;
43 virtual nsIContent* Item(uint32_t aIndex) = 0;
44 nsIContent* IndexedGetter(uint32_t aIndex, bool& aFound) {
45 nsIContent* item = Item(aIndex);
46 aFound = !!item;
47 return item;
51 NS_DEFINE_STATIC_IID_ACCESSOR(nsINodeList, NS_INODELIST_IID)
53 #endif /* nsINodeList_h___ */