/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl\nsITextInputProcessor.idl
 */

#ifndef __gen_nsITextInputProcessor_h__
#define __gen_nsITextInputProcessor_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 nsIDOMWindow; /* forward declaration */

class nsITextInputProcessorCallback; /* forward declaration */


/* starting interface:    nsITextInputProcessor */
#define NS_ITEXTINPUTPROCESSOR_IID_STR "8c20753c-8339-4e9c-86c5-ae30f1b456c3"

#define NS_ITEXTINPUTPROCESSOR_IID \
  {0x8c20753c, 0x8339, 0x4e9c, \
    { 0x86, 0xc5, 0xae, 0x30, 0xf1, 0xb4, 0x56, 0xc3 }}

class NS_NO_VTABLE nsITextInputProcessor : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITEXTINPUTPROCESSOR_IID)

  /* boolean init (in nsIDOMWindow aWindow, in nsITextInputProcessorCallback aCallback); */
  NS_IMETHOD Init(nsIDOMWindow *aWindow, nsITextInputProcessorCallback *aCallback, bool *_retval) = 0;

  /* [optional_argc] boolean initForTests (in nsIDOMWindow aWindow, [optional] in nsITextInputProcessorCallback aCallback); */
  NS_IMETHOD InitForTests(nsIDOMWindow *aWindow, nsITextInputProcessorCallback *aCallback, uint8_t _argc, bool *_retval) = 0;

  /* boolean startComposition (); */
  NS_IMETHOD StartComposition(bool *_retval) = 0;

  /* void setPendingCompositionString (in DOMString aString); */
  NS_IMETHOD SetPendingCompositionString(const nsAString & aString) = 0;

  enum {
    ATTR_RAW_CLAUSE = 2U,
    ATTR_SELECTED_RAW_CLAUSE = 3U,
    ATTR_CONVERTED_CLAUSE = 4U,
    ATTR_SELECTED_CLAUSE = 5U
  };

  /* void appendClauseToPendingComposition (in unsigned long aLength, in unsigned long aAttribute); */
  NS_IMETHOD AppendClauseToPendingComposition(uint32_t aLength, uint32_t aAttribute) = 0;

  /* void setCaretInPendingComposition (in unsigned long aOffset); */
  NS_IMETHOD SetCaretInPendingComposition(uint32_t aOffset) = 0;

  /* boolean flushPendingComposition (); */
  NS_IMETHOD FlushPendingComposition(bool *_retval) = 0;

  /* [optional_argc] boolean commitComposition ([optional] in DOMString aCommitString); */
  NS_IMETHOD CommitComposition(const nsAString & aCommitString, uint8_t _argc, bool *_retval) = 0;

  /* void cancelComposition (); */
  NS_IMETHOD CancelComposition(void) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsITextInputProcessor, NS_ITEXTINPUTPROCESSOR_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITEXTINPUTPROCESSOR \
  NS_IMETHOD Init(nsIDOMWindow *aWindow, nsITextInputProcessorCallback *aCallback, bool *_retval) MOZ_OVERRIDE; \
  NS_IMETHOD InitForTests(nsIDOMWindow *aWindow, nsITextInputProcessorCallback *aCallback, uint8_t _argc, bool *_retval) MOZ_OVERRIDE; \
  NS_IMETHOD StartComposition(bool *_retval) MOZ_OVERRIDE; \
  NS_IMETHOD SetPendingCompositionString(const nsAString & aString) MOZ_OVERRIDE; \
  NS_IMETHOD AppendClauseToPendingComposition(uint32_t aLength, uint32_t aAttribute) MOZ_OVERRIDE; \
  NS_IMETHOD SetCaretInPendingComposition(uint32_t aOffset) MOZ_OVERRIDE; \
  NS_IMETHOD FlushPendingComposition(bool *_retval) MOZ_OVERRIDE; \
  NS_IMETHOD CommitComposition(const nsAString & aCommitString, uint8_t _argc, bool *_retval) MOZ_OVERRIDE; \
  NS_IMETHOD CancelComposition(void) MOZ_OVERRIDE; 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITEXTINPUTPROCESSOR(_to) \
  NS_IMETHOD Init(nsIDOMWindow *aWindow, nsITextInputProcessorCallback *aCallback, bool *_retval) MOZ_OVERRIDE { return _to Init(aWindow, aCallback, _retval); } \
  NS_IMETHOD InitForTests(nsIDOMWindow *aWindow, nsITextInputProcessorCallback *aCallback, uint8_t _argc, bool *_retval) MOZ_OVERRIDE { return _to InitForTests(aWindow, aCallback, _argc, _retval); } \
  NS_IMETHOD StartComposition(bool *_retval) MOZ_OVERRIDE { return _to StartComposition(_retval); } \
  NS_IMETHOD SetPendingCompositionString(const nsAString & aString) MOZ_OVERRIDE { return _to SetPendingCompositionString(aString); } \
  NS_IMETHOD AppendClauseToPendingComposition(uint32_t aLength, uint32_t aAttribute) MOZ_OVERRIDE { return _to AppendClauseToPendingComposition(aLength, aAttribute); } \
  NS_IMETHOD SetCaretInPendingComposition(uint32_t aOffset) MOZ_OVERRIDE { return _to SetCaretInPendingComposition(aOffset); } \
  NS_IMETHOD FlushPendingComposition(bool *_retval) MOZ_OVERRIDE { return _to FlushPendingComposition(_retval); } \
  NS_IMETHOD CommitComposition(const nsAString & aCommitString, uint8_t _argc, bool *_retval) MOZ_OVERRIDE { return _to CommitComposition(aCommitString, _argc, _retval); } \
  NS_IMETHOD CancelComposition(void) MOZ_OVERRIDE { return _to CancelComposition(); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSITEXTINPUTPROCESSOR(_to) \
  NS_IMETHOD Init(nsIDOMWindow *aWindow, nsITextInputProcessorCallback *aCallback, bool *_retval) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aWindow, aCallback, _retval); } \
  NS_IMETHOD InitForTests(nsIDOMWindow *aWindow, nsITextInputProcessorCallback *aCallback, uint8_t _argc, bool *_retval) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->InitForTests(aWindow, aCallback, _argc, _retval); } \
  NS_IMETHOD StartComposition(bool *_retval) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->StartComposition(_retval); } \
  NS_IMETHOD SetPendingCompositionString(const nsAString & aString) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPendingCompositionString(aString); } \
  NS_IMETHOD AppendClauseToPendingComposition(uint32_t aLength, uint32_t aAttribute) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendClauseToPendingComposition(aLength, aAttribute); } \
  NS_IMETHOD SetCaretInPendingComposition(uint32_t aOffset) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCaretInPendingComposition(aOffset); } \
  NS_IMETHOD FlushPendingComposition(bool *_retval) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->FlushPendingComposition(_retval); } \
  NS_IMETHOD CommitComposition(const nsAString & aCommitString, uint8_t _argc, bool *_retval) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->CommitComposition(aCommitString, _argc, _retval); } \
  NS_IMETHOD CancelComposition(void) MOZ_OVERRIDE { return !_to ? NS_ERROR_NULL_POINTER : _to->CancelComposition(); } 

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

/* Header file */
class nsTextInputProcessor : public nsITextInputProcessor
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSITEXTINPUTPROCESSOR

  nsTextInputProcessor();

private:
  ~nsTextInputProcessor();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsTextInputProcessor, nsITextInputProcessor)

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

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

/* boolean init (in nsIDOMWindow aWindow, in nsITextInputProcessorCallback aCallback); */
NS_IMETHODIMP nsTextInputProcessor::Init(nsIDOMWindow *aWindow, nsITextInputProcessorCallback *aCallback, bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [optional_argc] boolean initForTests (in nsIDOMWindow aWindow, [optional] in nsITextInputProcessorCallback aCallback); */
NS_IMETHODIMP nsTextInputProcessor::InitForTests(nsIDOMWindow *aWindow, nsITextInputProcessorCallback *aCallback, uint8_t _argc, bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean startComposition (); */
NS_IMETHODIMP nsTextInputProcessor::StartComposition(bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setPendingCompositionString (in DOMString aString); */
NS_IMETHODIMP nsTextInputProcessor::SetPendingCompositionString(const nsAString & aString)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void appendClauseToPendingComposition (in unsigned long aLength, in unsigned long aAttribute); */
NS_IMETHODIMP nsTextInputProcessor::AppendClauseToPendingComposition(uint32_t aLength, uint32_t aAttribute)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setCaretInPendingComposition (in unsigned long aOffset); */
NS_IMETHODIMP nsTextInputProcessor::SetCaretInPendingComposition(uint32_t aOffset)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean flushPendingComposition (); */
NS_IMETHODIMP nsTextInputProcessor::FlushPendingComposition(bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [optional_argc] boolean commitComposition ([optional] in DOMString aCommitString); */
NS_IMETHODIMP nsTextInputProcessor::CommitComposition(const nsAString & aCommitString, uint8_t _argc, bool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void cancelComposition (); */
NS_IMETHODIMP nsTextInputProcessor::CancelComposition()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

#define TEXT_INPUT_PROCESSOR_CID \
  { 0xcaaab47f, 0x1e31, 0x478e, \
    { 0x89, 0x19, 0x97, 0x09, 0x04, 0xe9, 0xcb, 0x72 } }
#define TEXT_INPUT_PROCESSOR_CONTRACTID \
  "@mozilla.org/text-input-processor;1"

#endif /* __gen_nsITextInputProcessor_h__ */
