layout/base/nsIFrameTraversal.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #ifndef NSIFRAMETRAVERSAL_H
     6 #define NSIFRAMETRAVERSAL_H
     8 #include "nsISupports.h"
     9 #include "nsIFrame.h"
    11 #define NS_IFRAMEENUMERATOR_IID \
    12 { 0x7c633f5d, 0x91eb, 0x494e, \
    13   { 0xa1, 0x40, 0x17, 0x46, 0x17, 0x4c, 0x23, 0xd3 } }
    15 class nsIFrameEnumerator : public nsISupports
    16 {
    17 public:
    18   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFRAMEENUMERATOR_IID)
    20   virtual void First() = 0;
    21   virtual void Next() = 0;
    22   virtual nsIFrame* CurrentItem() = 0;
    23   virtual bool IsDone() = 0;
    25   virtual void Last() = 0;
    26   virtual void Prev() = 0;
    27 };
    29 NS_DEFINE_STATIC_IID_ACCESSOR(nsIFrameEnumerator, NS_IFRAMEENUMERATOR_IID)
    31 enum nsIteratorType {
    32   eLeaf,
    33   ePreOrder,
    34   ePostOrder
    35 };
    37 // {9d469828-9bf2-4151-a385-05f30219221b}
    38 #define NS_IFRAMETRAVERSAL_IID \
    39 { 0x9d469828, 0x9bf2, 0x4151, { 0xa3, 0x85, 0x05, 0xf3, 0x02, 0x19, 0x22, 0x1b } }
    41 class nsIFrameTraversal : public nsISupports
    42 {
    43 public:
    44   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFRAMETRAVERSAL_IID)
    46   /**
    47    * Create a frame iterator with the specified properties.
    48    * @param aEnumerator [out] the created iterator
    49    * @param aPresContext [in]
    50    * @param aStart [in] the frame to start iterating from
    51    * @param aType [in] the type of the iterator: leaf, pre-order, or post-order
    52    * @param aVisual [in] whether the iterator should traverse frames in visual
    53    *        bidi order
    54    * @param aLockInScrollView [in] whether to stop iterating when exiting a
    55    *        scroll view
    56    * @param aFollowOOFs [in] whether the iterator should follow out-of-flows.
    57    *        If true, when reaching a placeholder frame while going down will get
    58    *        the real frame. Going back up will go on past the placeholder,
    59    *        so the placeholders are logically part of the frame tree.
    60    */
    61   NS_IMETHOD NewFrameTraversal(nsIFrameEnumerator **aEnumerator,
    62                                nsPresContext* aPresContext,
    63                                nsIFrame *aStart,
    64                                int32_t aType,
    65                                bool aVisual,
    66                                bool aLockInScrollView,
    67                                bool aFollowOOFs) = 0;
    68 };
    70 NS_DEFINE_STATIC_IID_ACCESSOR(nsIFrameTraversal, NS_IFRAMETRAVERSAL_IID)
    72 #endif //NSIFRAMETRAVERSAL_H

mercurial