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

#ifndef __gen_nsIChromeEventHandler_h__
#define __gen_nsIChromeEventHandler_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 nsEventChainPreVisitor;
class nsEventChainPostVisitor;
class nsIDOMEvent; /* forward declaration */


/* starting interface:    nsIChromeEventHandler */
#define NS_ICHROMEEVENTHANDLER_IID_STR "a54dc626-9648-406b-bc82-b5c51b3767d7"

#define NS_ICHROMEEVENTHANDLER_IID \
  {0xa54dc626, 0x9648, 0x406b, \
    { 0xbc, 0x82, 0xb5, 0xc5, 0x1b, 0x37, 0x67, 0xd7 }}

/**
 * The nsIChromeEventHandler
 */
class NS_NO_VTABLE nsIChromeEventHandler : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICHROMEEVENTHANDLER_IID)

  /**
   * Called before the capture phase of the event flow.
   * This is used to create the event target chain and implementations
   * should set the necessary members of nsEventChainPreVisitor.
   * At least aVisitor.mCanHandle must be set,
   * usually also aVisitor.mParentTarget if mCanHandle is PR_TRUE.
   * First one tells that this object can handle the aVisitor.mEvent event and
   * the latter one is the possible parent object for the event target chain.
   * @see nsEventDispatcher.h for more documentation about aVisitor.
   *
   * @param aVisitor the visitor object which is used to create the
   *                 event target chain for event dispatching.
   *
   * @note Only nsEventDispatcher should call this method.
   */
  /* [noscript] void PreHandleChromeEvent (in nsEventChainPreVisitorRef aVisitor); */
  NS_IMETHOD PreHandleChromeEvent(nsEventChainPreVisitor & aVisitor) = 0;

  /**
   * Called after the bubble phase of the system event group.
   * The default handling of the event should happen here.
   * @param aVisitor the visitor object which is used during post handling.
   *
   * @see nsEventDispatcher.h for documentation about aVisitor.
   * @note Only nsEventDispatcher should call this method.
   */
  /* [noscript] void PostHandleChromeEvent (in nsEventChainPostVisitorRef aVisitor); */
  NS_IMETHOD PostHandleChromeEvent(nsEventChainPostVisitor & aVisitor) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIChromeEventHandler, NS_ICHROMEEVENTHANDLER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSICHROMEEVENTHANDLER \
  NS_IMETHOD PreHandleChromeEvent(nsEventChainPreVisitor & aVisitor); \
  NS_IMETHOD PostHandleChromeEvent(nsEventChainPostVisitor & aVisitor); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSICHROMEEVENTHANDLER(_to) \
  NS_IMETHOD PreHandleChromeEvent(nsEventChainPreVisitor & aVisitor) { return _to PreHandleChromeEvent(aVisitor); } \
  NS_IMETHOD PostHandleChromeEvent(nsEventChainPostVisitor & aVisitor) { return _to PostHandleChromeEvent(aVisitor); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSICHROMEEVENTHANDLER(_to) \
  NS_IMETHOD PreHandleChromeEvent(nsEventChainPreVisitor & aVisitor) { return !_to ? NS_ERROR_NULL_POINTER : _to->PreHandleChromeEvent(aVisitor); } \
  NS_IMETHOD PostHandleChromeEvent(nsEventChainPostVisitor & aVisitor) { return !_to ? NS_ERROR_NULL_POINTER : _to->PostHandleChromeEvent(aVisitor); } 

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

/* Header file */
class nsChromeEventHandler : public nsIChromeEventHandler
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSICHROMEEVENTHANDLER

  nsChromeEventHandler();

private:
  ~nsChromeEventHandler();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsChromeEventHandler, nsIChromeEventHandler)

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

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

/* [noscript] void PreHandleChromeEvent (in nsEventChainPreVisitorRef aVisitor); */
NS_IMETHODIMP nsChromeEventHandler::PreHandleChromeEvent(nsEventChainPreVisitor & aVisitor)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript] void PostHandleChromeEvent (in nsEventChainPostVisitorRef aVisitor); */
NS_IMETHODIMP nsChromeEventHandler::PostHandleChromeEvent(nsEventChainPostVisitor & aVisitor)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIChromeEventHandler_h__ */
