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

#ifndef __gen_mozIRealTimeSpell_h__
#define __gen_mozIRealTimeSpell_h__


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

#ifndef __gen_domstubs_h__
#include "domstubs.h"
#endif

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

class nsIEditor; /* forward declaration */

class nsIEditorSpellCheck; /* forward declaration */


/* starting interface:    mozIRealTimeSpell */
#define MOZIREALTIMESPELL_IID_STR "f5d1ec9e-4d30-11d8-8053-da0cc7df1f20"

#define MOZIREALTIMESPELL_IID \
  {0xf5d1ec9e, 0x4d30, 0x11d8, \
    { 0x80, 0x53, 0xda, 0x0c, 0xc7, 0xdf, 0x1f, 0x20 }}

class NS_NO_VTABLE mozIRealTimeSpell : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(MOZIREALTIMESPELL_IID)

  /* readonly attribute nsIEditorSpellCheck spellChecker; */
  NS_IMETHOD GetSpellChecker(nsIEditorSpellCheck * *aSpellChecker) = 0;

  /* [noscript] void init (in nsIEditor editor); */
  NS_IMETHOD Init(nsIEditor *editor) = 0;

  /* [noscript] void destroy (); */
  NS_IMETHOD Destroy(void) = 0;

  /* void enableRealTimeSpell (in boolean enable); */
  NS_IMETHOD EnableRealTimeSpell(PRBool enable) = 0;

  /* void spellCheckAfterEditorChange (in PRInt32 action, in nsISelection aSelection, in nsIDOMNode previousSelectedNode, in PRInt32 previousSelectedOffset, in nsIDOMNode aStartNode, in PRInt32 aStartOffset, in nsIDOMNode aEndNode, in PRInt32 aEndOffset); */
  NS_IMETHOD SpellCheckAfterEditorChange(PRInt32 action, nsISelection *aSelection, nsIDOMNode *previousSelectedNode, PRInt32 previousSelectedOffset, nsIDOMNode *aStartNode, PRInt32 aStartOffset, nsIDOMNode *aEndNode, PRInt32 aEndOffset) = 0;

  /* void spellCheckRange (in nsIDOMRange aSelection); */
  NS_IMETHOD SpellCheckRange(nsIDOMRange *aSelection) = 0;

  /* nsIDOMRange getMispelledWord (in nsIDOMNode aNode, in PRInt32 aOffset); */
  NS_IMETHOD GetMispelledWord(nsIDOMNode *aNode, PRInt32 aOffset, nsIDOMRange **_retval) = 0;

  /* void replaceWord (in nsIDOMNode aNode, in PRInt32 aOffset, in AString newword); */
  NS_IMETHOD ReplaceWord(nsIDOMNode *aNode, PRInt32 aOffset, const nsAString & newword) = 0;

  /* void addWordToDictionary (in AString word); */
  NS_IMETHOD AddWordToDictionary(const nsAString & word) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MOZIREALTIMESPELL \
  NS_IMETHOD GetSpellChecker(nsIEditorSpellCheck * *aSpellChecker); \
  NS_IMETHOD Init(nsIEditor *editor); \
  NS_IMETHOD Destroy(void); \
  NS_IMETHOD EnableRealTimeSpell(PRBool enable); \
  NS_IMETHOD SpellCheckAfterEditorChange(PRInt32 action, nsISelection *aSelection, nsIDOMNode *previousSelectedNode, PRInt32 previousSelectedOffset, nsIDOMNode *aStartNode, PRInt32 aStartOffset, nsIDOMNode *aEndNode, PRInt32 aEndOffset); \
  NS_IMETHOD SpellCheckRange(nsIDOMRange *aSelection); \
  NS_IMETHOD GetMispelledWord(nsIDOMNode *aNode, PRInt32 aOffset, nsIDOMRange **_retval); \
  NS_IMETHOD ReplaceWord(nsIDOMNode *aNode, PRInt32 aOffset, const nsAString & newword); \
  NS_IMETHOD AddWordToDictionary(const nsAString & word); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MOZIREALTIMESPELL(_to) \
  NS_IMETHOD GetSpellChecker(nsIEditorSpellCheck * *aSpellChecker) { return _to GetSpellChecker(aSpellChecker); } \
  NS_IMETHOD Init(nsIEditor *editor) { return _to Init(editor); } \
  NS_IMETHOD Destroy(void) { return _to Destroy(); } \
  NS_IMETHOD EnableRealTimeSpell(PRBool enable) { return _to EnableRealTimeSpell(enable); } \
  NS_IMETHOD SpellCheckAfterEditorChange(PRInt32 action, nsISelection *aSelection, nsIDOMNode *previousSelectedNode, PRInt32 previousSelectedOffset, nsIDOMNode *aStartNode, PRInt32 aStartOffset, nsIDOMNode *aEndNode, PRInt32 aEndOffset) { return _to SpellCheckAfterEditorChange(action, aSelection, previousSelectedNode, previousSelectedOffset, aStartNode, aStartOffset, aEndNode, aEndOffset); } \
  NS_IMETHOD SpellCheckRange(nsIDOMRange *aSelection) { return _to SpellCheckRange(aSelection); } \
  NS_IMETHOD GetMispelledWord(nsIDOMNode *aNode, PRInt32 aOffset, nsIDOMRange **_retval) { return _to GetMispelledWord(aNode, aOffset, _retval); } \
  NS_IMETHOD ReplaceWord(nsIDOMNode *aNode, PRInt32 aOffset, const nsAString & newword) { return _to ReplaceWord(aNode, aOffset, newword); } \
  NS_IMETHOD AddWordToDictionary(const nsAString & word) { return _to AddWordToDictionary(word); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_MOZIREALTIMESPELL(_to) \
  NS_IMETHOD GetSpellChecker(nsIEditorSpellCheck * *aSpellChecker) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSpellChecker(aSpellChecker); } \
  NS_IMETHOD Init(nsIEditor *editor) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(editor); } \
  NS_IMETHOD Destroy(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Destroy(); } \
  NS_IMETHOD EnableRealTimeSpell(PRBool enable) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnableRealTimeSpell(enable); } \
  NS_IMETHOD SpellCheckAfterEditorChange(PRInt32 action, nsISelection *aSelection, nsIDOMNode *previousSelectedNode, PRInt32 previousSelectedOffset, nsIDOMNode *aStartNode, PRInt32 aStartOffset, nsIDOMNode *aEndNode, PRInt32 aEndOffset) { return !_to ? NS_ERROR_NULL_POINTER : _to->SpellCheckAfterEditorChange(action, aSelection, previousSelectedNode, previousSelectedOffset, aStartNode, aStartOffset, aEndNode, aEndOffset); } \
  NS_IMETHOD SpellCheckRange(nsIDOMRange *aSelection) { return !_to ? NS_ERROR_NULL_POINTER : _to->SpellCheckRange(aSelection); } \
  NS_IMETHOD GetMispelledWord(nsIDOMNode *aNode, PRInt32 aOffset, nsIDOMRange **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMispelledWord(aNode, aOffset, _retval); } \
  NS_IMETHOD ReplaceWord(nsIDOMNode *aNode, PRInt32 aOffset, const nsAString & newword) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReplaceWord(aNode, aOffset, newword); } \
  NS_IMETHOD AddWordToDictionary(const nsAString & word) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddWordToDictionary(word); } 

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

/* Header file */
class _MYCLASS_ : public mozIRealTimeSpell
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_MOZIREALTIMESPELL

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, mozIRealTimeSpell)

_MYCLASS_::_MYCLASS_()
{
  /* member initializers and constructor code */
}

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

/* readonly attribute nsIEditorSpellCheck spellChecker; */
NS_IMETHODIMP _MYCLASS_::GetSpellChecker(nsIEditorSpellCheck * *aSpellChecker)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void init (in nsIEditor editor); */
NS_IMETHODIMP _MYCLASS_::Init(nsIEditor *editor)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void destroy (); */
NS_IMETHODIMP _MYCLASS_::Destroy()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void enableRealTimeSpell (in boolean enable); */
NS_IMETHODIMP _MYCLASS_::EnableRealTimeSpell(PRBool enable)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void spellCheckAfterEditorChange (in PRInt32 action, in nsISelection aSelection, in nsIDOMNode previousSelectedNode, in PRInt32 previousSelectedOffset, in nsIDOMNode aStartNode, in PRInt32 aStartOffset, in nsIDOMNode aEndNode, in PRInt32 aEndOffset); */
NS_IMETHODIMP _MYCLASS_::SpellCheckAfterEditorChange(PRInt32 action, nsISelection *aSelection, nsIDOMNode *previousSelectedNode, PRInt32 previousSelectedOffset, nsIDOMNode *aStartNode, PRInt32 aStartOffset, nsIDOMNode *aEndNode, PRInt32 aEndOffset)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void spellCheckRange (in nsIDOMRange aSelection); */
NS_IMETHODIMP _MYCLASS_::SpellCheckRange(nsIDOMRange *aSelection)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsIDOMRange getMispelledWord (in nsIDOMNode aNode, in PRInt32 aOffset); */
NS_IMETHODIMP _MYCLASS_::GetMispelledWord(nsIDOMNode *aNode, PRInt32 aOffset, nsIDOMRange **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void replaceWord (in nsIDOMNode aNode, in PRInt32 aOffset, in AString newword); */
NS_IMETHODIMP _MYCLASS_::ReplaceWord(nsIDOMNode *aNode, PRInt32 aOffset, const nsAString & newword)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addWordToDictionary (in AString word); */
NS_IMETHODIMP _MYCLASS_::AddWordToDictionary(const nsAString & word)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

#define MOZ_REALTIMESPELL_CID { 0x70db2cdc, 0x5b43, 0x11d8, { 0x9b, 0xae, 0xfc, 0xcf, 0x5b, 0x08, 0xed, 0xc3 } }
#define MOZ_REALTIMESPELL_CONTRACTID "@mozilla.org/spellchecker-realtime;1"

#endif /* __gen_mozIRealTimeSpell_h__ */
