Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / layout / base / nsIFrameTraversal.h
blob9217100015abdb5a80669181f56dce3aae045a0a
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either of the GNU General Public License Version 2 or later (the "GPL"),
26 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
37 #ifndef NSIFRAMETRAVERSAL_H
38 #define NSIFRAMETRAVERSAL_H
40 #include "nsISupports.h"
41 #include "nsIFrame.h"
43 #define NS_IFRAMEENUMERATOR_IID \
44 { 0x7c633f5d, 0x91eb, 0x494e, \
45 { 0xa1, 0x40, 0x17, 0x46, 0x17, 0x4c, 0x23, 0xd3 } }
47 class nsIFrameEnumerator : public nsISupports
49 public:
50 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFRAMEENUMERATOR_IID)
52 virtual void First() = 0;
53 virtual void Next() = 0;
54 virtual nsIFrame* CurrentItem() = 0;
55 virtual PRBool IsDone() = 0;
57 virtual void Last() = 0;
58 virtual void Prev() = 0;
61 NS_DEFINE_STATIC_IID_ACCESSOR(nsIFrameEnumerator, NS_IFRAMEENUMERATOR_IID)
63 enum nsIteratorType {
64 eLeaf,
65 ePreOrder,
66 ePostOrder
69 // {9d469828-9bf2-4151-a385-05f30219221b}
70 #define NS_IFRAMETRAVERSAL_IID \
71 { 0x9d469828, 0x9bf2, 0x4151, { 0xa3, 0x85, 0x05, 0xf3, 0x02, 0x19, 0x22, 0x1b } }
73 class nsIFrameTraversal : public nsISupports
75 public:
76 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFRAMETRAVERSAL_IID)
78 /**
79 * Create a frame iterator with the specified properties.
80 * @param aEnumerator [out] the created iterator
81 * @param aPresContext [in]
82 * @param aStart [in] the frame to start iterating from
83 * @param aType [in] the type of the iterator: leaf, pre-order, or post-order
84 * @param aVisual [in] whether the iterator should traverse frames in visual
85 * bidi order
86 * @param aLockInScrollView [in] whether to stop iterating when exiting a
87 * scroll view
88 * @param aFollowOOFs [in] whether the iterator should follow out-of-flows.
89 * If true, when reaching a placeholder frame while going down will get
90 * the real frame. Going back up will go on past the placeholder,
91 * so the placeholders are logically part of the frame tree.
93 NS_IMETHOD NewFrameTraversal(nsIFrameEnumerator **aEnumerator,
94 nsPresContext* aPresContext,
95 nsIFrame *aStart,
96 PRInt32 aType,
97 PRBool aVisual,
98 PRBool aLockInScrollView,
99 PRBool aFollowOOFs) = 0;
102 NS_DEFINE_STATIC_IID_ACCESSOR(nsIFrameTraversal, NS_IFRAMETRAVERSAL_IID)
104 #endif //NSIFRAMETRAVERSAL_H