/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM $SRCDIR/dom/base/nsIScriptableContentIterator.idl
 */

#ifndef __gen_nsIScriptableContentIterator_h__
#define __gen_nsIScriptableContentIterator_h__


#include "nsISupports.h"

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsINode; /* webidl Node */

namespace mozilla {
namespace dom {
class Range; /* webidl Range */
} // namespace dom
} // namespace mozilla


/* starting interface:    nsIScriptableContentIterator */
#define NS_ISCRIPTABLECONTENTITERATOR_IID_STR "9f25fb2a-265f-44f9-a122-62bbf443239e"

#define NS_ISCRIPTABLECONTENTITERATOR_IID \
  {0x9f25fb2a, 0x265f, 0x44f9, \
    { 0xa1, 0x22, 0x62, 0xbb, 0xf4, 0x43, 0x23, 0x9e }}

class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIScriptableContentIterator) nsIScriptableContentIterator : public nsISupports {
 public:

  NS_INLINE_DECL_STATIC_IID(NS_ISCRIPTABLECONTENTITERATOR_IID)

  /* Used by ToJSValue to check which scriptable interface is implemented. */
  using ScriptableInterfaceType = nsIScriptableContentIterator;

  enum MOZ_BINDING(binding_to, idl, class, XPIDL_nsIScriptableContentIterator_IteratorType) IteratorType : uint8_t {
    NOT_INITIALIZED MOZ_BINDING(binding_to, idl, const, XPIDL_nsIScriptableContentIterator_IteratorType_NOT_INITIALIZED) = 0,
    POST_ORDER_ITERATOR MOZ_BINDING(binding_to, idl, const, XPIDL_nsIScriptableContentIterator_IteratorType_POST_ORDER_ITERATOR) = 1,
    PRE_ORDER_ITERATOR MOZ_BINDING(binding_to, idl, const, XPIDL_nsIScriptableContentIterator_IteratorType_PRE_ORDER_ITERATOR) = 2,
    SUBTREE_ITERATOR MOZ_BINDING(binding_to, idl, const, XPIDL_nsIScriptableContentIterator_IteratorType_SUBTREE_ITERATOR) = 3,
  };

  /* void initWithRootNode (in nsIScriptableContentIterator_IteratorType aType, in Node aRoot); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_initWithRootNode)
  NS_IMETHOD InitWithRootNode(nsIScriptableContentIterator::IteratorType aType, nsINode *aRoot) = 0;

  /* void initWithRange (in nsIScriptableContentIterator_IteratorType aType, in Range aRange); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_initWithRange)
  NS_IMETHOD InitWithRange(nsIScriptableContentIterator::IteratorType aType, mozilla::dom::Range *aRange) = 0;

  /* void initWithRangeAllowCrossShadowBoundary (in nsIScriptableContentIterator_IteratorType aType, in Range aRange); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_initWithRangeAllowCrossShadowBoundary)
  NS_IMETHOD InitWithRangeAllowCrossShadowBoundary(nsIScriptableContentIterator::IteratorType aType, mozilla::dom::Range *aRange) = 0;

  /* void initWithPositions (in nsIScriptableContentIterator_IteratorType aType, in Node aStartContainer, in unsigned long aStartOffset, in Node aEndContainer, in unsigned long aEndOffset); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_initWithPositions)
  NS_IMETHOD InitWithPositions(nsIScriptableContentIterator::IteratorType aType, nsINode *aStartContainer, uint32_t aStartOffset, nsINode *aEndContainer, uint32_t aEndOffset) = 0;

  /* void first (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_first)
  NS_IMETHOD First(void) = 0;

  /* void last (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_last)
  NS_IMETHOD Last(void) = 0;

  /* void next (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_next)
  NS_IMETHOD Next(void) = 0;

  /* void prev (); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_prev)
  NS_IMETHOD Prev(void) = 0;

  /* readonly attribute Node currentNode; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIScriptableContentIterator_currentNode)
  NS_IMETHOD GetCurrentNode(nsINode **aCurrentNode) = 0;

  /* readonly attribute boolean isDone; */
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIScriptableContentIterator_isDone)
  NS_IMETHOD GetIsDone(bool *aIsDone) = 0;

  /* void positionAt (in Node aNode); */
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_positionAt)
  NS_IMETHOD PositionAt(nsINode *aNode) = 0;

};


/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSISCRIPTABLECONTENTITERATOR \
  NS_IMETHOD InitWithRootNode(nsIScriptableContentIterator::IteratorType aType, nsINode *aRoot) override; \
  NS_IMETHOD InitWithRange(nsIScriptableContentIterator::IteratorType aType, mozilla::dom::Range *aRange) override; \
  NS_IMETHOD InitWithRangeAllowCrossShadowBoundary(nsIScriptableContentIterator::IteratorType aType, mozilla::dom::Range *aRange) override; \
  NS_IMETHOD InitWithPositions(nsIScriptableContentIterator::IteratorType aType, nsINode *aStartContainer, uint32_t aStartOffset, nsINode *aEndContainer, uint32_t aEndOffset) override; \
  NS_IMETHOD First(void) override; \
  NS_IMETHOD Last(void) override; \
  NS_IMETHOD Next(void) override; \
  NS_IMETHOD Prev(void) override; \
  NS_IMETHOD GetCurrentNode(nsINode **aCurrentNode) override; \
  NS_IMETHOD GetIsDone(bool *aIsDone) override; \
  NS_IMETHOD PositionAt(nsINode *aNode) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSISCRIPTABLECONTENTITERATOR \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_initWithRootNode)\
  nsresult InitWithRootNode(nsIScriptableContentIterator::IteratorType aType, nsINode *aRoot); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_initWithRange)\
  nsresult InitWithRange(nsIScriptableContentIterator::IteratorType aType, mozilla::dom::Range *aRange); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_initWithRangeAllowCrossShadowBoundary)\
  nsresult InitWithRangeAllowCrossShadowBoundary(nsIScriptableContentIterator::IteratorType aType, mozilla::dom::Range *aRange); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_initWithPositions)\
  nsresult InitWithPositions(nsIScriptableContentIterator::IteratorType aType, nsINode *aStartContainer, uint32_t aStartOffset, nsINode *aEndContainer, uint32_t aEndOffset); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_first)\
  nsresult First(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_last)\
  nsresult Last(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_next)\
  nsresult Next(void); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_prev)\
  nsresult Prev(void); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIScriptableContentIterator_currentNode)\
  nsresult GetCurrentNode(nsINode **aCurrentNode); \
  MOZ_BINDING(binding_to, idl, getter, XPIDL_nsIScriptableContentIterator_isDone)\
  nsresult GetIsDone(bool *aIsDone); \
  MOZ_BINDING(binding_to, idl, method, XPIDL_nsIScriptableContentIterator_positionAt)\
  nsresult PositionAt(nsINode *aNode); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSISCRIPTABLECONTENTITERATOR(_to) \
  NS_IMETHOD InitWithRootNode(nsIScriptableContentIterator::IteratorType aType, nsINode *aRoot) override { return _to InitWithRootNode(aType, aRoot); } \
  NS_IMETHOD InitWithRange(nsIScriptableContentIterator::IteratorType aType, mozilla::dom::Range *aRange) override { return _to InitWithRange(aType, aRange); } \
  NS_IMETHOD InitWithRangeAllowCrossShadowBoundary(nsIScriptableContentIterator::IteratorType aType, mozilla::dom::Range *aRange) override { return _to InitWithRangeAllowCrossShadowBoundary(aType, aRange); } \
  NS_IMETHOD InitWithPositions(nsIScriptableContentIterator::IteratorType aType, nsINode *aStartContainer, uint32_t aStartOffset, nsINode *aEndContainer, uint32_t aEndOffset) override { return _to InitWithPositions(aType, aStartContainer, aStartOffset, aEndContainer, aEndOffset); } \
  NS_IMETHOD First(void) override { return _to First(); } \
  NS_IMETHOD Last(void) override { return _to Last(); } \
  NS_IMETHOD Next(void) override { return _to Next(); } \
  NS_IMETHOD Prev(void) override { return _to Prev(); } \
  NS_IMETHOD GetCurrentNode(nsINode **aCurrentNode) override { return _to GetCurrentNode(aCurrentNode); } \
  NS_IMETHOD GetIsDone(bool *aIsDone) override { return _to GetIsDone(aIsDone); } \
  NS_IMETHOD PositionAt(nsINode *aNode) override { return _to PositionAt(aNode); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSISCRIPTABLECONTENTITERATOR(_to) \
  NS_IMETHOD InitWithRootNode(nsIScriptableContentIterator::IteratorType aType, nsINode *aRoot) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitWithRootNode(aType, aRoot); } \
  NS_IMETHOD InitWithRange(nsIScriptableContentIterator::IteratorType aType, mozilla::dom::Range *aRange) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitWithRange(aType, aRange); } \
  NS_IMETHOD InitWithRangeAllowCrossShadowBoundary(nsIScriptableContentIterator::IteratorType aType, mozilla::dom::Range *aRange) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitWithRangeAllowCrossShadowBoundary(aType, aRange); } \
  NS_IMETHOD InitWithPositions(nsIScriptableContentIterator::IteratorType aType, nsINode *aStartContainer, uint32_t aStartOffset, nsINode *aEndContainer, uint32_t aEndOffset) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitWithPositions(aType, aStartContainer, aStartOffset, aEndContainer, aEndOffset); } \
  NS_IMETHOD First(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->First(); } \
  NS_IMETHOD Last(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Last(); } \
  NS_IMETHOD Next(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Next(); } \
  NS_IMETHOD Prev(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Prev(); } \
  NS_IMETHOD GetCurrentNode(nsINode **aCurrentNode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentNode(aCurrentNode); } \
  NS_IMETHOD GetIsDone(bool *aIsDone) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsDone(aIsDone); } \
  NS_IMETHOD PositionAt(nsINode *aNode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PositionAt(aNode); } 


#endif /* __gen_nsIScriptableContentIterator_h__ */
