Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions | Variables
nsEventListenerManager.cpp File Reference
#include "nsISupports.h"
#include "nsGUIEvent.h"
#include "nsDOMEvent.h"
#include "nsEventListenerManager.h"
#include "nsICaret.h"
#include "nsIFrameSelection.h"
#include "nsIDOMNSEvent.h"
#include "nsIDOMEventListener.h"
#include "nsIDOMMouseListener.h"
#include "nsIDOMMouseMotionListener.h"
#include "nsIDOMContextMenuListener.h"
#include "nsIDOMKeyListener.h"
#include "nsIDOMFocusListener.h"
#include "nsIDOMFormListener.h"
#include "nsIDOMLoadListener.h"
#include "nsIDOMDragListener.h"
#include "nsIDOMPaintListener.h"
#include "nsIDOMTextListener.h"
#include "nsIDOMCompositionListener.h"
#include "nsIDOMXULListener.h"
#include "nsIDOMScrollListener.h"
#include "nsIDOMMutationListener.h"
#include "nsIDOMUIListener.h"
#include "nsIDOMPageTransitionListener.h"
#include "nsITextControlFrame.h"
#include "nsIEventStateManager.h"
#include "nsPIDOMWindow.h"
#include "nsIPrivateDOMEvent.h"
#include "nsIJSEventListener.h"
#include "prmem.h"
#include "nsIScriptGlobalObject.h"
#include "nsLayoutAtoms.h"
#include "nsLayoutUtils.h"
#include "nsINameSpaceManager.h"
#include "nsIContent.h"
#include "nsINodeInfo.h"
#include "nsIFrame.h"
#include "nsIView.h"
#include "nsIViewManager.h"
#include "nsIScrollableView.h"
#include "nsCOMPtr.h"
#include "nsIServiceManager.h"
#include "nsIScriptSecurityManager.h"
#include "nsDOMError.h"
#include "nsIJSContextStack.h"
#include "nsIDocument.h"
#include "nsIPresShell.h"
#include "nsMutationEvent.h"
#include "nsIXPConnect.h"
#include "nsDOMCID.h"
#include "nsIScriptObjectOwner.h"
#include "nsIClassInfo.h"
#include "nsIFocusController.h"
#include "nsIDOMElement.h"
#include "nsIBoxObject.h"
#include "nsIDOMNSDocument.h"
#include "nsIWidget.h"
#include "nsContentUtils.h"
#include "nsJSUtils.h"
#include "nsIDOMEventGroup.h"
#include "nsContentCID.h"

Go to the source code of this file.

Classes

struct  EventDispatchData
struct  EventTypeData

Defines

#define HANDLER(x)   NS_REINTERPRET_CAST(GenericHandler, x)
#define IMPL_EVENTTYPEDATA(type)

Functions

static NS_DEFINE_CID (kDOMScriptObjectFactoryCID, NS_DOM_SCRIPT_OBJECT_FACTORY_CID)
static NS_DEFINE_CID (kDOMEventGroupCID, NS_DOMEVENTGROUP_CID)
typedef NS_STDCALL_FUNCPROTO (nsresult, GenericHandler, nsIDOMEventListener, HandleEvent,(nsIDOMEvent *))
static nsresult DispatchToInterface (nsIDOMEvent *aEvent, nsIDOMEventListener *aListener, GenericHandler aMethod, const nsIID &aIID, PRBool *aHasInterface)
static PRBool PR_CALLBACK GenericListenersHashEnum (nsHashKey *aKey, void *aData, void *closure)
nsresult NS_NewEventListenerManager (nsIEventListenerManager **aInstancePtrResult)

Variables

static const EventDispatchData sMouseEvents []
static const EventDispatchData sMouseMotionEvents []
static const EventDispatchData sContextMenuEvents []
static const EventDispatchData sCompositionEvents []
static const EventDispatchData sTextEvents []
static const EventDispatchData sKeyEvents []
static const EventDispatchData sFocusEvents []
static const EventDispatchData sFormEvents []
static const EventDispatchData sLoadEvents []
static const EventDispatchData sPaintEvents []
static const EventDispatchData sDragEvents []
static const EventDispatchData sScrollEvents []
static const EventDispatchData sXULEvents []
static const EventDispatchData sMutationEvents []
static const EventDispatchData sUIEvents []
static const EventDispatchData sPageTransitionEvents []
static const EventTypeData sEventTypes []
nsIDOMEventGroupgSystemEventGroup
nsIDOMEventGroupgDOM2EventGroup

Class Documentation

struct EventDispatchData

Definition at line 150 of file nsEventListenerManager.cpp.

Class Members
PRUint8 bits
PRUint32 message
GenericHandler method
struct EventTypeData

Definition at line 157 of file nsEventListenerManager.cpp.

Collaboration diagram for EventTypeData:
Class Members
const EventDispatchData * events
const nsIID * iid
int numEvents

Define Documentation

#define HANDLER (   x)    NS_REINTERPRET_CAST(GenericHandler, x)

Definition at line 164 of file nsEventListenerManager.cpp.

Value:
{ \
  s##type##Events, \
  NS_ARRAY_LENGTH(s##type##Events), \
  &NS_GET_IID(nsIDOM##type##Listener) \
}

Definition at line 359 of file nsEventListenerManager.cpp.


Function Documentation

static nsresult DispatchToInterface ( nsIDOMEvent aEvent,
nsIDOMEventListener aListener,
GenericHandler  aMethod,
const nsIID aIID,
PRBool aHasInterface 
) [static]

Definition at line 133 of file nsEventListenerManager.cpp.

{
  nsIDOMEventListener* ifaceListener = nsnull;
  nsresult rv = NS_OK;
  aListener->QueryInterface(aIID, (void**) &ifaceListener);
  if (ifaceListener) {
    *aHasInterface = PR_TRUE;
    rv = (ifaceListener->*aMethod)(aEvent);
    NS_RELEASE(ifaceListener);
  }
  return rv;
}

Here is the caller graph for this function:

static PRBool PR_CALLBACK GenericListenersHashEnum ( nsHashKey *  aKey,
void aData,
void closure 
) [static]

Definition at line 411 of file nsEventListenerManager.cpp.

{
  nsVoidArray* listeners = NS_STATIC_CAST(nsVoidArray*, aData);
  if (listeners) {
    PRInt32 i, count = listeners->Count();
    nsListenerStruct *ls;
    for (i = count-1; i >= 0; --i) {
      ls = (nsListenerStruct*)listeners->ElementAt(i);
      if (ls) {
        delete ls;
      }
    }
    delete listeners;
  }
  return PR_TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static NS_DEFINE_CID ( kDOMScriptObjectFactoryCID  ,
NS_DOM_SCRIPT_OBJECT_FACTORY_CID   
) [static]
static NS_DEFINE_CID ( kDOMEventGroupCID  ,
NS_DOMEVENTGROUP_CID   
) [static]

Definition at line 2538 of file nsEventListenerManager.cpp.

{
  nsIEventListenerManager* l = new nsEventListenerManager();

  if (!l) {
    return NS_ERROR_OUT_OF_MEMORY;
  }
  
  return CallQueryInterface(l, aInstancePtrResult);
}

Here is the call graph for this function:

Here is the caller graph for this function:

typedef NS_STDCALL_FUNCPROTO ( nsresult  ,
GenericHandler  ,
nsIDOMEventListener  ,
HandleEvent  ,
(nsIDOMEvent *)   
)

Variable Documentation

Definition at line 394 of file nsEventListenerManager.cpp.

Definition at line 393 of file nsEventListenerManager.cpp.