/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIFindAndReplace.idl
 */

#ifndef __gen_nsIFindAndReplace_h__
#define __gen_nsIFindAndReplace_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsITextServicesDocument; /* forward declaration */

#define NS_FINDANDREPLACE_CONTRACTID "@mozilla.org/textservices/findandreplace;1"

/* starting interface:    nsIFindAndReplace */
#define NS_IFINDANDREPLACE_IID_STR "e0178a21-b9a2-11d4-a3ff-000064657374"

#define NS_IFINDANDREPLACE_IID \
  {0xe0178a21, 0xb9a2, 0x11d4, \
    { 0xa3, 0xff, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }}

class NS_NO_VTABLE nsIFindAndReplace : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFINDANDREPLACE_IID)

  /* [noscript] attribute nsITextServicesDocument tsDoc; */
  NS_IMETHOD GetTsDoc(nsITextServicesDocument * *aTsDoc) = 0;
  NS_IMETHOD SetTsDoc(nsITextServicesDocument * aTsDoc) = 0;

  /* attribute boolean findBackwards; */
  NS_IMETHOD GetFindBackwards(PRBool *aFindBackwards) = 0;
  NS_IMETHOD SetFindBackwards(PRBool aFindBackwards) = 0;

  /* attribute boolean caseSensitive; */
  NS_IMETHOD GetCaseSensitive(PRBool *aCaseSensitive) = 0;
  NS_IMETHOD SetCaseSensitive(PRBool aCaseSensitive) = 0;

  /* attribute boolean wrapFind; */
  NS_IMETHOD GetWrapFind(PRBool *aWrapFind) = 0;
  NS_IMETHOD SetWrapFind(PRBool aWrapFind) = 0;

  /* attribute boolean entireWord; */
  NS_IMETHOD GetEntireWord(PRBool *aEntireWord) = 0;
  NS_IMETHOD SetEntireWord(PRBool aEntireWord) = 0;

  /* readonly attribute boolean replaceEnabled; */
  NS_IMETHOD GetReplaceEnabled(PRBool *aReplaceEnabled) = 0;

  /**
   * Find some text in the current context. The implementation is
   * responsible for performing the find and highliting the text.
   * @param aFindText The text to search for.
   * @retval Returns true if an instance of aFindText was found.
   */
  /* boolean Find (in wstring aFindText); */
  NS_IMETHOD Find(const PRUnichar *aFindText, PRBool *_retval) = 0;

  /**
   * Finds the text specified by aFindText and replaces it with
   * the text specified by aReplaceText. The implementation is responsible
   * for performing the find, replacing the text, and finding the
   * next instance.
   * @param aFindText The text to search for.
   * @param aReplaceText The text to replace aFindText with.
   * @param aAllOccurrences If true, the Replace() call will replace all
   * instances of aFindText in the document with a ReplaceText.
   * @retval Returns true if another instance of aFindText was found.
   */
  /* boolean Replace (in wstring aFindText, in wstring aReplaceText, in boolean aAllOccurrences); */
  NS_IMETHOD Replace(const PRUnichar *aFindText, const PRUnichar *aReplaceText, PRBool aAllOccurrences, PRBool *_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIFINDANDREPLACE \
  NS_IMETHOD GetTsDoc(nsITextServicesDocument * *aTsDoc); \
  NS_IMETHOD SetTsDoc(nsITextServicesDocument * aTsDoc); \
  NS_IMETHOD GetFindBackwards(PRBool *aFindBackwards); \
  NS_IMETHOD SetFindBackwards(PRBool aFindBackwards); \
  NS_IMETHOD GetCaseSensitive(PRBool *aCaseSensitive); \
  NS_IMETHOD SetCaseSensitive(PRBool aCaseSensitive); \
  NS_IMETHOD GetWrapFind(PRBool *aWrapFind); \
  NS_IMETHOD SetWrapFind(PRBool aWrapFind); \
  NS_IMETHOD GetEntireWord(PRBool *aEntireWord); \
  NS_IMETHOD SetEntireWord(PRBool aEntireWord); \
  NS_IMETHOD GetReplaceEnabled(PRBool *aReplaceEnabled); \
  NS_IMETHOD Find(const PRUnichar *aFindText, PRBool *_retval); \
  NS_IMETHOD Replace(const PRUnichar *aFindText, const PRUnichar *aReplaceText, PRBool aAllOccurrences, PRBool *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIFINDANDREPLACE(_to) \
  NS_IMETHOD GetTsDoc(nsITextServicesDocument * *aTsDoc) { return _to GetTsDoc(aTsDoc); } \
  NS_IMETHOD SetTsDoc(nsITextServicesDocument * aTsDoc) { return _to SetTsDoc(aTsDoc); } \
  NS_IMETHOD GetFindBackwards(PRBool *aFindBackwards) { return _to GetFindBackwards(aFindBackwards); } \
  NS_IMETHOD SetFindBackwards(PRBool aFindBackwards) { return _to SetFindBackwards(aFindBackwards); } \
  NS_IMETHOD GetCaseSensitive(PRBool *aCaseSensitive) { return _to GetCaseSensitive(aCaseSensitive); } \
  NS_IMETHOD SetCaseSensitive(PRBool aCaseSensitive) { return _to SetCaseSensitive(aCaseSensitive); } \
  NS_IMETHOD GetWrapFind(PRBool *aWrapFind) { return _to GetWrapFind(aWrapFind); } \
  NS_IMETHOD SetWrapFind(PRBool aWrapFind) { return _to SetWrapFind(aWrapFind); } \
  NS_IMETHOD GetEntireWord(PRBool *aEntireWord) { return _to GetEntireWord(aEntireWord); } \
  NS_IMETHOD SetEntireWord(PRBool aEntireWord) { return _to SetEntireWord(aEntireWord); } \
  NS_IMETHOD GetReplaceEnabled(PRBool *aReplaceEnabled) { return _to GetReplaceEnabled(aReplaceEnabled); } \
  NS_IMETHOD Find(const PRUnichar *aFindText, PRBool *_retval) { return _to Find(aFindText, _retval); } \
  NS_IMETHOD Replace(const PRUnichar *aFindText, const PRUnichar *aReplaceText, PRBool aAllOccurrences, PRBool *_retval) { return _to Replace(aFindText, aReplaceText, aAllOccurrences, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIFINDANDREPLACE(_to) \
  NS_IMETHOD GetTsDoc(nsITextServicesDocument * *aTsDoc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTsDoc(aTsDoc); } \
  NS_IMETHOD SetTsDoc(nsITextServicesDocument * aTsDoc) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTsDoc(aTsDoc); } \
  NS_IMETHOD GetFindBackwards(PRBool *aFindBackwards) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFindBackwards(aFindBackwards); } \
  NS_IMETHOD SetFindBackwards(PRBool aFindBackwards) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFindBackwards(aFindBackwards); } \
  NS_IMETHOD GetCaseSensitive(PRBool *aCaseSensitive) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCaseSensitive(aCaseSensitive); } \
  NS_IMETHOD SetCaseSensitive(PRBool aCaseSensitive) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCaseSensitive(aCaseSensitive); } \
  NS_IMETHOD GetWrapFind(PRBool *aWrapFind) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWrapFind(aWrapFind); } \
  NS_IMETHOD SetWrapFind(PRBool aWrapFind) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWrapFind(aWrapFind); } \
  NS_IMETHOD GetEntireWord(PRBool *aEntireWord) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEntireWord(aEntireWord); } \
  NS_IMETHOD SetEntireWord(PRBool aEntireWord) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEntireWord(aEntireWord); } \
  NS_IMETHOD GetReplaceEnabled(PRBool *aReplaceEnabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReplaceEnabled(aReplaceEnabled); } \
  NS_IMETHOD Find(const PRUnichar *aFindText, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Find(aFindText, _retval); } \
  NS_IMETHOD Replace(const PRUnichar *aFindText, const PRUnichar *aReplaceText, PRBool aAllOccurrences, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Replace(aFindText, aReplaceText, aAllOccurrences, _retval); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsFindAndReplace : public nsIFindAndReplace
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIFINDANDREPLACE

  nsFindAndReplace();
  virtual ~nsFindAndReplace();
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsFindAndReplace, nsIFindAndReplace)

nsFindAndReplace::nsFindAndReplace()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

nsFindAndReplace::~nsFindAndReplace()
{
  /* destructor code */
}

/* [noscript] attribute nsITextServicesDocument tsDoc; */
NS_IMETHODIMP nsFindAndReplace::GetTsDoc(nsITextServicesDocument * *aTsDoc)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsFindAndReplace::SetTsDoc(nsITextServicesDocument * aTsDoc)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute boolean findBackwards; */
NS_IMETHODIMP nsFindAndReplace::GetFindBackwards(PRBool *aFindBackwards)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsFindAndReplace::SetFindBackwards(PRBool aFindBackwards)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute boolean caseSensitive; */
NS_IMETHODIMP nsFindAndReplace::GetCaseSensitive(PRBool *aCaseSensitive)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsFindAndReplace::SetCaseSensitive(PRBool aCaseSensitive)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute boolean wrapFind; */
NS_IMETHODIMP nsFindAndReplace::GetWrapFind(PRBool *aWrapFind)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsFindAndReplace::SetWrapFind(PRBool aWrapFind)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute boolean entireWord; */
NS_IMETHODIMP nsFindAndReplace::GetEntireWord(PRBool *aEntireWord)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsFindAndReplace::SetEntireWord(PRBool aEntireWord)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute boolean replaceEnabled; */
NS_IMETHODIMP nsFindAndReplace::GetReplaceEnabled(PRBool *aReplaceEnabled)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean Find (in wstring aFindText); */
NS_IMETHODIMP nsFindAndReplace::Find(const PRUnichar *aFindText, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean Replace (in wstring aFindText, in wstring aReplaceText, in boolean aAllOccurrences); */
NS_IMETHODIMP nsFindAndReplace::Replace(const PRUnichar *aFindText, const PRUnichar *aReplaceText, PRBool aAllOccurrences, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


#endif /* __gen_nsIFindAndReplace_h__ */
