Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
EmbedEventListener Class Reference

#include <EmbedEventListener.h>

Inheritance diagram for EmbedEventListener:
Inheritance graph
[legend]
Collaboration diagram for EmbedEventListener:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 EmbedEventListener ()
virtual ~EmbedEventListener ()
nsresult Init (EmbedPrivate *aOwner)
NS_DECL_ISUPPORTS NS_IMETHOD HandleEvent (nsIDOMEvent *aEvent)
NS_IMETHOD KeyDown (nsIDOMEvent *aDOMEvent)
 Processes a key pressed event.
NS_IMETHOD KeyUp (nsIDOMEvent *aDOMEvent)
 Processes a key release event.
NS_IMETHOD KeyPress (nsIDOMEvent *aDOMEvent)
 Processes a key typed event.
NS_IMETHOD MouseDown (nsIDOMEvent *aDOMEvent)
 Processes a mouse down event.
NS_IMETHOD MouseUp (nsIDOMEvent *aDOMEvent)
 Processes a mouse up event.
NS_IMETHOD MouseClick (nsIDOMEvent *aDOMEvent)
 Processes a mouse click event.
NS_IMETHOD MouseDblClick (nsIDOMEvent *aDOMEvent)
 Processes a mouse click event.
NS_IMETHOD MouseOver (nsIDOMEvent *aDOMEvent)
 Processes a mouse enter event.
NS_IMETHOD MouseOut (nsIDOMEvent *aDOMEvent)
 Processes a mouse leave event.
NS_IMETHOD Activate (nsIDOMEvent *aDOMEvent)
NS_IMETHOD FocusIn (nsIDOMEvent *aDOMEvent)
NS_IMETHOD FocusOut (nsIDOMEvent *aDOMEvent)
 EmbedEventListener ()
virtual ~EmbedEventListener ()
nsresult Init (EmbedPrivate *aOwner)
NS_DECL_ISUPPORTS NS_IMETHOD HandleEvent (nsIDOMEvent *aEvent)
NS_IMETHOD KeyDown (nsIDOMEvent *aDOMEvent)
 Processes a key pressed event.
NS_IMETHOD KeyUp (nsIDOMEvent *aDOMEvent)
 Processes a key release event.
NS_IMETHOD KeyPress (nsIDOMEvent *aDOMEvent)
 Processes a key typed event.
NS_IMETHOD MouseDown (nsIDOMEvent *aDOMEvent)
 Processes a mouse down event.
NS_IMETHOD MouseUp (nsIDOMEvent *aDOMEvent)
 Processes a mouse up event.
NS_IMETHOD MouseClick (nsIDOMEvent *aDOMEvent)
 Processes a mouse click event.
NS_IMETHOD MouseDblClick (nsIDOMEvent *aDOMEvent)
 Processes a mouse click event.
NS_IMETHOD MouseOver (nsIDOMEvent *aDOMEvent)
 Processes a mouse enter event.
NS_IMETHOD MouseOut (nsIDOMEvent *aDOMEvent)
 Processes a mouse leave event.
NS_IMETHOD Activate (nsIDOMEvent *aDOMEvent)
NS_IMETHOD FocusIn (nsIDOMEvent *aDOMEvent)
NS_IMETHOD FocusOut (nsIDOMEvent *aDOMEvent)
 EmbedEventListener (QGeckoEmbed *q)
 ~EmbedEventListener ()
NS_DECL_ISUPPORTS NS_IMETHOD HandleEvent (nsIDOMEvent *aEvent)
NS_IMETHOD KeyDown (nsIDOMEvent *aDOMEvent)
 Processes a key pressed event.
NS_IMETHOD KeyUp (nsIDOMEvent *aDOMEvent)
 Processes a key release event.
NS_IMETHOD KeyPress (nsIDOMEvent *aDOMEvent)
 Processes a key typed event.
NS_IMETHOD MouseDown (nsIDOMEvent *aDOMEvent)
 Processes a mouse down event.
NS_IMETHOD MouseUp (nsIDOMEvent *aDOMEvent)
 Processes a mouse up event.
NS_IMETHOD MouseClick (nsIDOMEvent *aDOMEvent)
 Processes a mouse click event.
NS_IMETHOD MouseDblClick (nsIDOMEvent *aDOMEvent)
 Processes a mouse click event.
NS_IMETHOD MouseOver (nsIDOMEvent *aDOMEvent)
 Processes a mouse enter event.
NS_IMETHOD MouseOut (nsIDOMEvent *aDOMEvent)
 Processes a mouse leave event.
NS_IMETHOD Activate (nsIDOMEvent *aDOMEvent)
NS_IMETHOD FocusIn (nsIDOMEvent *aDOMEvent)
NS_IMETHOD FocusOut (nsIDOMEvent *aDOMEvent)
void handleEvent (in nsIDOMEvent event)
 This method is called whenever an event occurs of the type for which the EventListener interface was registered.

Private Attributes

EmbedPrivatemOwner
QGeckoEmbedmOwner

Detailed Description

Definition at line 47 of file EmbedEventListener.h.


Constructor & Destructor Documentation

Definition at line 47 of file EmbedEventListener.cpp.

{
  mOwner = nsnull;
}

Definition at line 52 of file EmbedEventListener.cpp.

{
}

Definition at line 50 of file EmbedEventListener.cpp.

{
    mOwner = aOwner;
}

Member Function Documentation

Implements nsIDOMUIListener.

Implements nsIDOMUIListener.

Definition at line 253 of file EmbedEventListener.cpp.

{
  nsCOMPtr <nsIDOMUIEvent> uiEvent = do_QueryInterface(aDOMEvent);
  if (!uiEvent)
    return NS_OK;
  // Return TRUE from your signal handler to mark the event as consumed.
  gint return_val = FALSE;
  gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
                  moz_embed_signals[DOM_ACTIVATE],
                  (void *)uiEvent, &return_val);
  if (return_val) {
    aDOMEvent->StopPropagation();
    aDOMEvent->PreventDefault();
  }
  return NS_OK;
}

Here is the call graph for this function:

Implements nsIDOMUIListener.

Implements nsIDOMUIListener.

Implements nsIDOMUIListener.

Definition at line 271 of file EmbedEventListener.cpp.

{
  nsCOMPtr <nsIDOMUIEvent> uiEvent = do_QueryInterface(aDOMEvent);
  if (!uiEvent)
    return NS_OK;
  // Return TRUE from your signal handler to mark the event as consumed.
  gint return_val = FALSE;
  gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
                  moz_embed_signals[DOM_FOCUS_IN],
                  (void *)uiEvent, &return_val);
  if (return_val) {
    aDOMEvent->StopPropagation();
    aDOMEvent->PreventDefault();
  }
  return NS_OK;
}

Here is the call graph for this function:

Implements nsIDOMUIListener.

Implements nsIDOMUIListener.

Implements nsIDOMUIListener.

Definition at line 289 of file EmbedEventListener.cpp.

{
  nsCOMPtr <nsIDOMUIEvent> uiEvent = do_QueryInterface(aDOMEvent);
  if (!uiEvent)
    return NS_OK;
  // Return TRUE from your signal handler to mark the event as consumed.
  gint return_val = FALSE;
  gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
                  moz_embed_signals[DOM_FOCUS_OUT],
                  (void *)uiEvent, &return_val);
  if (return_val) {
    aDOMEvent->StopPropagation();
    aDOMEvent->PreventDefault();
  }
  return NS_OK;
}

Here is the call graph for this function:

Implements nsIDOMUIListener.

Definition at line 74 of file EmbedEventListener.cpp.

{
  return NS_OK;
}

This method is called whenever an event occurs of the type for which the EventListener interface was registered.

Parameters:
evtThe Event contains contextual information about the event. It also contains the stopPropagation and preventDefault methods which are used in determining the event's flow and default action.

Definition at line 67 of file EmbedEventListener.cpp.

{
  mOwner = aOwner;
  return NS_OK;
}

Here is the caller graph for this function:

Processes a key pressed event.

Parameters:
aKeyEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMKeyListener.

Processes a key pressed event.

Parameters:
aKeyEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMKeyListener.

Definition at line 80 of file EmbedEventListener.cpp.

{
  nsCOMPtr <nsIDOMKeyEvent> keyEvent;
  keyEvent = do_QueryInterface(aDOMEvent);
  if (!keyEvent)
    return NS_OK;
  // Return FALSE to this function to mark the event as not
  // consumed...
  gint return_val = FALSE;
  gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
                moz_embed_signals[DOM_KEY_DOWN],
                (void *)keyEvent, &return_val);
  if (return_val) {
    aDOMEvent->StopPropagation();
    aDOMEvent->PreventDefault();
  }
  return NS_OK;
}

Here is the call graph for this function:

Processes a key pressed event.

Parameters:
aKeyEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMKeyListener.

Processes a key typed event.

Parameters:
aKeyEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMKeyListener.

Processes a key typed event.

Parameters:
aKeyEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMKeyListener.

Definition at line 120 of file EmbedEventListener.cpp.

{
  nsCOMPtr <nsIDOMKeyEvent> keyEvent;
  keyEvent = do_QueryInterface(aDOMEvent);
  if (!keyEvent)
    return NS_OK;
  // Return TRUE from your signal handler to mark the event as consumed.
  gint return_val = FALSE;
  gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
                moz_embed_signals[DOM_KEY_PRESS],
                (void *)keyEvent, &return_val);
  if (return_val) {
    aDOMEvent->StopPropagation();
    aDOMEvent->PreventDefault();
  }
  return NS_OK;
}

Here is the call graph for this function:

Processes a key typed event.

Parameters:
aKeyEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMKeyListener.

NS_IMETHOD EmbedEventListener::KeyUp ( nsIDOMEvent aKeyEvent) [virtual]

Processes a key release event.

Parameters:
aKeyEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMKeyListener.

Processes a key release event.

Parameters:
aKeyEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMKeyListener.

Definition at line 100 of file EmbedEventListener.cpp.

{
  nsCOMPtr <nsIDOMKeyEvent> keyEvent;
  keyEvent = do_QueryInterface(aDOMEvent);
  if (!keyEvent)
    return NS_OK;
  // return FALSE to this function to mark this event as not
  // consumed...
  gint return_val = FALSE;
  gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
                moz_embed_signals[DOM_KEY_UP],
                (void *)keyEvent, &return_val);
  if (return_val) {
    aDOMEvent->StopPropagation();
    aDOMEvent->PreventDefault();
  }
  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHOD EmbedEventListener::KeyUp ( nsIDOMEvent aKeyEvent) [virtual]

Processes a key release event.

Parameters:
aKeyEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMKeyListener.

Processes a mouse click event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Processes a mouse click event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Definition at line 177 of file EmbedEventListener.cpp.

{
  nsCOMPtr <nsIDOMMouseEvent> mouseEvent;
  mouseEvent = do_QueryInterface(aDOMEvent);
  if (!mouseEvent)
    return NS_OK;
  // Return TRUE from your signal handler to mark the event as consumed.
  gint return_val = FALSE;
  gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
                moz_embed_signals[DOM_MOUSE_CLICK],
                (void *)mouseEvent, &return_val);
  if (return_val) {
    aDOMEvent->StopPropagation();
    aDOMEvent->PreventDefault();
  }
  return NS_OK;
}

Here is the call graph for this function:

Processes a mouse click event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Processes a mouse click event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Processes a mouse click event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Definition at line 196 of file EmbedEventListener.cpp.

{
  nsCOMPtr <nsIDOMMouseEvent> mouseEvent;
  mouseEvent = do_QueryInterface(aDOMEvent);
  if (!mouseEvent)
    return NS_OK;
  // Return TRUE from your signal handler to mark the event as consumed.
  gint return_val = FALSE;
  gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
                moz_embed_signals[DOM_MOUSE_DBL_CLICK],
                (void *)mouseEvent, &return_val);
  if (return_val) {
    aDOMEvent->StopPropagation();
    aDOMEvent->PreventDefault();
  }
  return NS_OK;
}

Here is the call graph for this function:

Processes a mouse click event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Processes a mouse down event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Processes a mouse down event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Definition at line 139 of file EmbedEventListener.cpp.

{
  nsCOMPtr <nsIDOMMouseEvent> mouseEvent;
  mouseEvent = do_QueryInterface(aDOMEvent);
  if (!mouseEvent)
    return NS_OK;
  // Return TRUE from your signal handler to mark the event as consumed.
  gint return_val = FALSE;
  gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
                moz_embed_signals[DOM_MOUSE_DOWN],
                (void *)mouseEvent, &return_val);
  if (return_val) {
    aDOMEvent->StopPropagation();
    aDOMEvent->PreventDefault();
  }
  return NS_OK;
}

Here is the call graph for this function:

Processes a mouse down event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

NS_IMETHOD EmbedEventListener::MouseOut ( nsIDOMEvent aMouseEvent) [virtual]

Processes a mouse leave event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Processes a mouse leave event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Definition at line 234 of file EmbedEventListener.cpp.

{
  nsCOMPtr <nsIDOMMouseEvent> mouseEvent;
  mouseEvent = do_QueryInterface(aDOMEvent);
  if (!mouseEvent)
    return NS_OK;
  // Return TRUE from your signal handler to mark the event as consumed.
  gint return_val = FALSE;
  gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
                moz_embed_signals[DOM_MOUSE_OUT],
                (void *)mouseEvent, &return_val);
  if (return_val) {
    aDOMEvent->StopPropagation();
    aDOMEvent->PreventDefault();
  }
  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHOD EmbedEventListener::MouseOut ( nsIDOMEvent aMouseEvent) [virtual]

Processes a mouse leave event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Processes a mouse enter event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Processes a mouse enter event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Definition at line 215 of file EmbedEventListener.cpp.

{
  nsCOMPtr <nsIDOMMouseEvent> mouseEvent;
  mouseEvent = do_QueryInterface(aDOMEvent);
  if (!mouseEvent)
    return NS_OK;
  // Return TRUE from your signal handler to mark the event as consumed.
  gint return_val = FALSE;
  gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
                moz_embed_signals[DOM_MOUSE_OVER],
                (void *)mouseEvent, &return_val);
  if (return_val) {
    aDOMEvent->StopPropagation();
    aDOMEvent->PreventDefault();
  }
  return NS_OK;
}

Here is the call graph for this function:

Processes a mouse enter event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

NS_IMETHOD EmbedEventListener::MouseUp ( nsIDOMEvent aMouseEvent) [virtual]

Processes a mouse up event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Processes a mouse up event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.

Definition at line 158 of file EmbedEventListener.cpp.

{
  nsCOMPtr <nsIDOMMouseEvent> mouseEvent;
  mouseEvent = do_QueryInterface(aDOMEvent);
  if (!mouseEvent)
    return NS_OK;
  // Return TRUE from your signal handler to mark the event as consumed.
  gint return_val = FALSE;
  gtk_signal_emit(GTK_OBJECT(mOwner->mOwningWidget),
                moz_embed_signals[DOM_MOUSE_UP],
                (void *)mouseEvent, &return_val);
  if (return_val) {
    aDOMEvent->StopPropagation();
    aDOMEvent->PreventDefault();
  }
  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHOD EmbedEventListener::MouseUp ( nsIDOMEvent aMouseEvent) [virtual]

Processes a mouse up event.

Parameters:
aMouseEvent
See also:
nsIDOMEvent.h
Returns:
whether the event was consumed or ignored.
See also:
nsresult

Implements nsIDOMMouseListener.


Member Data Documentation

Definition at line 86 of file EmbedEventListener.h.

Definition at line 87 of file EmbedEventListener.h.


The documentation for this class was generated from the following files: