/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/slave/mozilla-central-linux-xulrunner/build/editor/idl/nsIEditorIMESupport.idl
 */

#ifndef __gen_nsIEditorIMESupport_h__
#define __gen_nsIEditorIMESupport_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 nsIPrivateTextRangeList;

/* starting interface:    nsIEditorIMESupport */
#define NS_IEDITORIMESUPPORT_IID_STR "5cb3f9c9-5ab9-40fd-8ee2-0d1c7abd20dd"

#define NS_IEDITORIMESUPPORT_IID \
  {0x5cb3f9c9, 0x5ab9, 0x40fd, \
    { 0x8e, 0xe2, 0x0d, 0x1c, 0x7a, 0xbd, 0x20, 0xdd }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIEditorIMESupport : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IEDITORIMESUPPORT_IID)

  /**
   * beginComposition() Handles the start of inline input composition.
   */
  /* [noscript] void beginComposition (); */
  NS_IMETHOD BeginComposition(void) = 0;

  /**
   * setCompositionString() Sets the inline input composition string.
   * beginComposition must be called prior to this.
   */
  /* [noscript] void setCompositionString (in DOMString aCompositionString, in nsIPrivateTextRangeListPtr aTextRange); */
  NS_IMETHOD SetCompositionString(const nsAString & aCompositionString, nsIPrivateTextRangeList * aTextRange) = 0;

  /**
   * endComposition() Handles the end of inline input composition.
   */
  /* [noscript] void endComposition (); */
  NS_IMETHOD EndComposition(void) = 0;

  /**
   * forceCompositionEnd() force the composition end
   */
  /* void forceCompositionEnd (); */
  NS_SCRIPTABLE NS_IMETHOD ForceCompositionEnd(void) = 0;

  /**
   * Get preferred IME status of current widget.
   */
  /* [noscript] void getPreferredIMEState (out unsigned long aState); */
  NS_IMETHOD GetPreferredIMEState(PRUint32 *aState NS_OUTPARAM) = 0;

  /**
   * whether this editor has active IME transaction
   */
  /* readonly attribute boolean composing; */
  NS_SCRIPTABLE NS_IMETHOD GetComposing(PRBool *aComposing) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIEditorIMESupport, NS_IEDITORIMESUPPORT_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIEDITORIMESUPPORT \
  NS_IMETHOD BeginComposition(void); \
  NS_IMETHOD SetCompositionString(const nsAString & aCompositionString, nsIPrivateTextRangeList * aTextRange); \
  NS_IMETHOD EndComposition(void); \
  NS_SCRIPTABLE NS_IMETHOD ForceCompositionEnd(void); \
  NS_IMETHOD GetPreferredIMEState(PRUint32 *aState NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD GetComposing(PRBool *aComposing); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIEDITORIMESUPPORT(_to) \
  NS_IMETHOD BeginComposition(void) { return _to BeginComposition(); } \
  NS_IMETHOD SetCompositionString(const nsAString & aCompositionString, nsIPrivateTextRangeList * aTextRange) { return _to SetCompositionString(aCompositionString, aTextRange); } \
  NS_IMETHOD EndComposition(void) { return _to EndComposition(); } \
  NS_SCRIPTABLE NS_IMETHOD ForceCompositionEnd(void) { return _to ForceCompositionEnd(); } \
  NS_IMETHOD GetPreferredIMEState(PRUint32 *aState NS_OUTPARAM) { return _to GetPreferredIMEState(aState); } \
  NS_SCRIPTABLE NS_IMETHOD GetComposing(PRBool *aComposing) { return _to GetComposing(aComposing); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIEDITORIMESUPPORT(_to) \
  NS_IMETHOD BeginComposition(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->BeginComposition(); } \
  NS_IMETHOD SetCompositionString(const nsAString & aCompositionString, nsIPrivateTextRangeList * aTextRange) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCompositionString(aCompositionString, aTextRange); } \
  NS_IMETHOD EndComposition(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->EndComposition(); } \
  NS_SCRIPTABLE NS_IMETHOD ForceCompositionEnd(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ForceCompositionEnd(); } \
  NS_IMETHOD GetPreferredIMEState(PRUint32 *aState NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPreferredIMEState(aState); } \
  NS_SCRIPTABLE NS_IMETHOD GetComposing(PRBool *aComposing) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetComposing(aComposing); } 

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

/* Header file */
class nsEditorIMESupport : public nsIEditorIMESupport
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIEDITORIMESUPPORT

  nsEditorIMESupport();

private:
  ~nsEditorIMESupport();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsEditorIMESupport, nsIEditorIMESupport)

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

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

/* [noscript] void beginComposition (); */
NS_IMETHODIMP nsEditorIMESupport::BeginComposition()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void setCompositionString (in DOMString aCompositionString, in nsIPrivateTextRangeListPtr aTextRange); */
NS_IMETHODIMP nsEditorIMESupport::SetCompositionString(const nsAString & aCompositionString, nsIPrivateTextRangeList * aTextRange)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void endComposition (); */
NS_IMETHODIMP nsEditorIMESupport::EndComposition()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void forceCompositionEnd (); */
NS_IMETHODIMP nsEditorIMESupport::ForceCompositionEnd()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void getPreferredIMEState (out unsigned long aState); */
NS_IMETHODIMP nsEditorIMESupport::GetPreferredIMEState(PRUint32 *aState NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute boolean composing; */
NS_IMETHODIMP nsEditorIMESupport::GetComposing(PRBool *aComposing)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIEditorIMESupport_h__ */
