Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsXBLEventHandler.h File Reference
#include "nsCOMPtr.h"
#include "nsIDOMEventListener.h"
#include "nsVoidArray.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nsXBLEventHandler
class  nsXBLMouseEventHandler
class  nsXBLKeyEventHandler

Functions

nsresult NS_NewXBLEventHandler (nsXBLPrototypeHandler *aHandler, nsIAtom *aEventType, nsXBLEventHandler **aResult)
nsresult NS_NewXBLKeyEventHandler (nsIAtom *aEventType, PRUint8 aPhase, PRUint8 aType, nsXBLKeyEventHandler **aResult)

Function Documentation

nsresult NS_NewXBLEventHandler ( nsXBLPrototypeHandler aHandler,
nsIAtom aEventType,
nsXBLEventHandler **  aResult 
)

Definition at line 161 of file nsXBLEventHandler.cpp.

{
  if (aEventType == nsXBLAtoms::mousedown ||
      aEventType == nsXBLAtoms::mouseup ||
      aEventType == nsXBLAtoms::click ||
      aEventType == nsXBLAtoms::dblclick ||
      aEventType == nsXBLAtoms::mouseover ||
      aEventType == nsXBLAtoms::mouseout ||
      aEventType == nsXBLAtoms::mousemove ||
      aEventType == nsXBLAtoms::contextmenu ||
      aEventType == nsXBLAtoms::dragenter ||
      aEventType == nsXBLAtoms::dragover ||
      aEventType == nsXBLAtoms::dragdrop ||
      aEventType == nsXBLAtoms::dragexit ||
      aEventType == nsXBLAtoms::draggesture) {
    *aResult = new nsXBLMouseEventHandler(aHandler);
  }
  else {
    *aResult = new nsXBLEventHandler(aHandler);
  }

  if (!*aResult)
    return NS_ERROR_OUT_OF_MEMORY;

  NS_ADDREF(*aResult);

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult NS_NewXBLKeyEventHandler ( nsIAtom aEventType,
PRUint8  aPhase,
PRUint8  aType,
nsXBLKeyEventHandler **  aResult 
)

Definition at line 193 of file nsXBLEventHandler.cpp.

{
  *aResult = new nsXBLKeyEventHandler(aEventType, aPhase, aType);

  if (!*aResult)
    return NS_ERROR_OUT_OF_MEMORY;

  NS_ADDREF(*aResult);

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function: