Back to index

lightning-sunbird  0.9+nobinonly
Enumerations | Functions | Variables
gtkmozembed2.cpp File Reference
#include <stdio.h>
#include "gtkmozembed.h"
#include "gtkmozembedprivate.h"
#include "gtkmozembed_internal.h"
#include "EmbedPrivate.h"
#include "EmbedWindow.h"
#include <nsIWebBrowser.h>
#include <nsXPIDLString.h>
#include <nsReadableUtils.h>

Go to the source code of this file.

Enumerations

enum  { NEW_WINDOW_ORPHAN, SINGLE_LAST_SIGNAL }

Functions

static void gtk_moz_embed_class_init (GtkMozEmbedClass *klass)
static void gtk_moz_embed_init (GtkMozEmbed *embed)
static void gtk_moz_embed_destroy (GtkObject *object)
static void gtk_moz_embed_realize (GtkWidget *widget)
static void gtk_moz_embed_unrealize (GtkWidget *widget)
static void gtk_moz_embed_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
static void gtk_moz_embed_map (GtkWidget *widget)
static void gtk_moz_embed_unmap (GtkWidget *widget)
static gint handle_child_focus_in (GtkWidget *aWidget, GdkEventFocus *aGdkFocusEvent, GtkMozEmbed *aEmbed)
static gint handle_child_focus_out (GtkWidget *aWidget, GdkEventFocus *aGdkFocusEvent, GtkMozEmbed *aEmbed)
GtkType gtk_moz_embed_get_type (void)
GtkWidget * gtk_moz_embed_new (void)
void gtk_moz_embed_push_startup (void)
void gtk_moz_embed_pop_startup (void)
void gtk_moz_embed_set_comp_path (const char *aPath)
void gtk_moz_embed_set_app_components (const nsModuleComponentInfo *aComps, int aNumComponents)
void gtk_moz_embed_set_profile_path (const char *aDir, const char *aName)
void gtk_moz_embed_set_directory_service_provider (nsIDirectoryServiceProvider *appFileLocProvider)
void gtk_moz_embed_load_url (GtkMozEmbed *embed, const char *url)
void gtk_moz_embed_stop_load (GtkMozEmbed *embed)
gboolean gtk_moz_embed_can_go_back (GtkMozEmbed *embed)
gboolean gtk_moz_embed_can_go_forward (GtkMozEmbed *embed)
void gtk_moz_embed_go_back (GtkMozEmbed *embed)
void gtk_moz_embed_go_forward (GtkMozEmbed *embed)
void gtk_moz_embed_render_data (GtkMozEmbed *embed, const char *data, guint32 len, const char *base_uri, const char *mime_type)
void gtk_moz_embed_open_stream (GtkMozEmbed *embed, const char *base_uri, const char *mime_type)
void gtk_moz_embed_append_data (GtkMozEmbed *embed, const char *data, guint32 len)
void gtk_moz_embed_close_stream (GtkMozEmbed *embed)
char * gtk_moz_embed_get_link_message (GtkMozEmbed *embed)
char * gtk_moz_embed_get_js_status (GtkMozEmbed *embed)
char * gtk_moz_embed_get_title (GtkMozEmbed *embed)
char * gtk_moz_embed_get_location (GtkMozEmbed *embed)
void gtk_moz_embed_reload (GtkMozEmbed *embed, gint32 flags)
void gtk_moz_embed_set_chrome_mask (GtkMozEmbed *embed, guint32 flags)
guint32 gtk_moz_embed_get_chrome_mask (GtkMozEmbed *embed)
void gtk_moz_embed_get_nsIWebBrowser (GtkMozEmbed *embed, nsIWebBrowser **retval)
PRUnichargtk_moz_embed_get_title_unichar (GtkMozEmbed *embed)
PRUnichargtk_moz_embed_get_js_status_unichar (GtkMozEmbed *embed)
PRUnichargtk_moz_embed_get_link_message_unichar (GtkMozEmbed *embed)
static void gtk_moz_embed_single_class_init (GtkMozEmbedSingleClass *klass)
static void gtk_moz_embed_single_init (GtkMozEmbedSingle *embed)
GtkMozEmbedSingle * gtk_moz_embed_single_new (void)
GtkType gtk_moz_embed_single_get_type (void)
GtkMozEmbedSingle * gtk_moz_embed_single_get (void)
void gtk_moz_embed_single_create_window (GtkMozEmbed **aNewEmbed, guint aChromeFlags)

Variables

static GtkBinClass * embed_parent_class
guint moz_embed_signals [EMBED_LAST_SIGNAL] = { 0 }
guint moz_embed_single_signals [SINGLE_LAST_SIGNAL] = { 0 }

Enumeration Type Documentation

anonymous enum
Enumerator:
NEW_WINDOW_ORPHAN 
SINGLE_LAST_SIGNAL 

Definition at line 1240 of file gtkmozembed2.cpp.


Function Documentation

void gtk_moz_embed_append_data ( GtkMozEmbed *  embed,
const char *  data,
guint32  len 
)

Definition at line 954 of file gtkmozembed2.cpp.

{
  EmbedPrivate *embedPrivate;

  g_return_if_fail (embed != NULL);
  g_return_if_fail (GTK_IS_MOZ_EMBED(embed));
  g_return_if_fail (GTK_WIDGET_REALIZED(GTK_WIDGET(embed)));

  embedPrivate = (EmbedPrivate *)embed->data;
  embedPrivate->AppendToStream((const PRUint8*)data, len);
}

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean gtk_moz_embed_can_go_back ( GtkMozEmbed *  embed)

Definition at line 863 of file gtkmozembed2.cpp.

{
  PRBool retval = PR_FALSE;
  EmbedPrivate *embedPrivate;

  g_return_val_if_fail ((embed != NULL), FALSE);
  g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), FALSE);

  embedPrivate = (EmbedPrivate *)embed->data;

  if (embedPrivate->mNavigation)
    embedPrivate->mNavigation->GetCanGoBack(&retval);
  return retval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean gtk_moz_embed_can_go_forward ( GtkMozEmbed *  embed)

Definition at line 879 of file gtkmozembed2.cpp.

{
  PRBool retval = PR_FALSE;
  EmbedPrivate *embedPrivate;

  g_return_val_if_fail ((embed != NULL), FALSE);
  g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), FALSE);

  embedPrivate = (EmbedPrivate *)embed->data;

  if (embedPrivate->mNavigation)
    embedPrivate->mNavigation->GetCanGoForward(&retval);
  return retval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void gtk_moz_embed_class_init ( GtkMozEmbedClass *  klass) [static]

Definition at line 277 of file gtkmozembed2.cpp.

{
  GtkContainerClass  *container_class;
  GtkWidgetClass     *widget_class;
  GtkObjectClass     *object_class;
  
  container_class = GTK_CONTAINER_CLASS(klass);
  widget_class    = GTK_WIDGET_CLASS(klass);
  object_class    = GTK_OBJECT_CLASS(klass);

  embed_parent_class = (GtkBinClass *)gtk_type_class(gtk_bin_get_type());

  widget_class->realize = gtk_moz_embed_realize;
  widget_class->unrealize = gtk_moz_embed_unrealize;
  widget_class->size_allocate = gtk_moz_embed_size_allocate;
  widget_class->map = gtk_moz_embed_map;
  widget_class->unmap = gtk_moz_embed_unmap;

#ifdef MOZ_ACCESSIBILITY_ATK
  widget_class->get_accessible = gtk_moz_embed_get_accessible;
#endif

  object_class->destroy = gtk_moz_embed_destroy;
  
  // set up our signals

  moz_embed_signals[LINK_MESSAGE] = 
    gtk_signal_new ("link_message",
                  GTK_RUN_FIRST,
                  GET_OBJECT_CLASS_TYPE(klass),
                  GTK_SIGNAL_OFFSET(GtkMozEmbedClass, link_message),
                  gtk_marshal_NONE__NONE,
                  GTK_TYPE_NONE, 0);
  moz_embed_signals[JS_STATUS] =
    gtk_signal_new ("js_status",
                  GTK_RUN_FIRST,
                  GET_OBJECT_CLASS_TYPE(klass),
                  GTK_SIGNAL_OFFSET(GtkMozEmbedClass, js_status),
                  gtk_marshal_NONE__NONE,
                  GTK_TYPE_NONE, 0);
  moz_embed_signals[LOCATION] =
    gtk_signal_new ("location",
                  GTK_RUN_FIRST,
                  GET_OBJECT_CLASS_TYPE(klass),
                  GTK_SIGNAL_OFFSET(GtkMozEmbedClass, location),
                  gtk_marshal_NONE__NONE,
                  GTK_TYPE_NONE, 0);
  moz_embed_signals[TITLE] = 
    gtk_signal_new("title",
                 GTK_RUN_FIRST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, title),
                 gtk_marshal_NONE__NONE,
                 GTK_TYPE_NONE, 0);
  moz_embed_signals[PROGRESS] =
    gtk_signal_new("progress",
                 GTK_RUN_FIRST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, progress),
                 gtk_marshal_NONE__INT_INT,
                 GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT);
  moz_embed_signals[PROGRESS_ALL] = 
    gtk_signal_new("progress_all",
                 GTK_RUN_FIRST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, progress_all),
                 gtkmozembed_VOID__STRING_INT_INT,
                 GTK_TYPE_NONE, 3,
                 GTK_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE,
                 GTK_TYPE_INT, GTK_TYPE_INT);
  moz_embed_signals[NET_STATE] =
    gtk_signal_new("net_state",
                 GTK_RUN_FIRST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, net_state),
                 gtkmozembed_VOID__INT_UINT,
                 GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_UINT);
  moz_embed_signals[NET_STATE_ALL] =
    gtk_signal_new("net_state_all",
                 GTK_RUN_FIRST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, net_state_all),
                 gtkmozembed_VOID__STRING_INT_UINT,
                 GTK_TYPE_NONE, 3,
                 GTK_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE,
                 GTK_TYPE_INT, GTK_TYPE_UINT);
  moz_embed_signals[NET_START] =
    gtk_signal_new("net_start",
                 GTK_RUN_FIRST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, net_start),
                 gtk_marshal_NONE__NONE,
                 GTK_TYPE_NONE, 0);
  moz_embed_signals[NET_STOP] =
    gtk_signal_new("net_stop",
                 GTK_RUN_FIRST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, net_stop),
                 gtk_marshal_NONE__NONE,
                 GTK_TYPE_NONE, 0);
  moz_embed_signals[NEW_WINDOW] =
    gtk_signal_new("new_window",
                 GTK_RUN_FIRST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, new_window),
                 gtk_marshal_NONE__POINTER_UINT,
                 GTK_TYPE_NONE, 2, GTK_TYPE_POINTER, GTK_TYPE_UINT);
  moz_embed_signals[VISIBILITY] =
    gtk_signal_new("visibility",
                 GTK_RUN_FIRST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, visibility),
                 gtk_marshal_NONE__BOOL,
                 GTK_TYPE_NONE, 1, GTK_TYPE_BOOL);
  moz_embed_signals[DESTROY_BROWSER] =
    gtk_signal_new("destroy_browser",
                 GTK_RUN_FIRST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, destroy_brsr),
                 gtk_marshal_NONE__NONE,
                 GTK_TYPE_NONE, 0);
  moz_embed_signals[OPEN_URI] = 
    gtk_signal_new("open_uri",
                 GTK_RUN_LAST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, open_uri),
                 gtkmozembed_BOOL__STRING,
                 GTK_TYPE_BOOL, 1, GTK_TYPE_STRING |
                                   G_SIGNAL_TYPE_STATIC_SCOPE);
  moz_embed_signals[SIZE_TO] =
    gtk_signal_new("size_to",
                 GTK_RUN_LAST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, size_to),
                 gtk_marshal_NONE__INT_INT,
                 GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT);
  moz_embed_signals[DOM_KEY_DOWN] =
    gtk_signal_new("dom_key_down",
                 GTK_RUN_LAST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_key_down),
                 gtk_marshal_BOOL__POINTER,
                 GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
  moz_embed_signals[DOM_KEY_PRESS] =
    gtk_signal_new("dom_key_press",
                 GTK_RUN_LAST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_key_press),
                 gtk_marshal_BOOL__POINTER,
                 GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
  moz_embed_signals[DOM_KEY_UP] =
    gtk_signal_new("dom_key_up",
                 GTK_RUN_LAST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_key_up),
                 gtk_marshal_BOOL__POINTER,
                 GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
  moz_embed_signals[DOM_MOUSE_DOWN] =
    gtk_signal_new("dom_mouse_down",
                 GTK_RUN_LAST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_down),
                 gtk_marshal_BOOL__POINTER,
                 GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
  moz_embed_signals[DOM_MOUSE_UP] =
    gtk_signal_new("dom_mouse_up",
                 GTK_RUN_LAST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_up),
                 gtk_marshal_BOOL__POINTER,
                 GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
  moz_embed_signals[DOM_MOUSE_CLICK] =
    gtk_signal_new("dom_mouse_click",
                 GTK_RUN_LAST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_click),
                 gtk_marshal_BOOL__POINTER,
                 GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
  moz_embed_signals[DOM_MOUSE_DBL_CLICK] =
    gtk_signal_new("dom_mouse_dbl_click",
                 GTK_RUN_LAST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_dbl_click),
                 gtk_marshal_BOOL__POINTER,
                 GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
  moz_embed_signals[DOM_MOUSE_OVER] =
    gtk_signal_new("dom_mouse_over",
                 GTK_RUN_LAST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_over),
                 gtk_marshal_BOOL__POINTER,
                 GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
  moz_embed_signals[DOM_MOUSE_OUT] =
    gtk_signal_new("dom_mouse_out",
                 GTK_RUN_LAST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_out),
                 gtk_marshal_BOOL__POINTER,
                 GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
  moz_embed_signals[SECURITY_CHANGE] =
    gtk_signal_new("security_change",
                 GTK_RUN_LAST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, security_change),
                 gtk_marshal_NONE__POINTER_UINT,
                 GTK_TYPE_NONE, 2, GTK_TYPE_POINTER, GTK_TYPE_UINT);
  moz_embed_signals[STATUS_CHANGE] =
    gtk_signal_new("status_change",
                 GTK_RUN_LAST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedClass, status_change),
                 gtkmozembed_VOID__POINTER_INT_POINTER,
                 GTK_TYPE_NONE, 3,
                 GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_POINTER);
  moz_embed_signals[DOM_ACTIVATE] =
    gtk_signal_new("dom_activate",
                   GTK_RUN_LAST,
                   GET_OBJECT_CLASS_TYPE(klass),
                   GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_activate),
                   gtk_marshal_BOOL__POINTER,
                   GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
  moz_embed_signals[DOM_FOCUS_IN] =
    gtk_signal_new("dom_focus_in",
                   GTK_RUN_LAST,
                   GET_OBJECT_CLASS_TYPE(klass),
                   GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_focus_in),
                   gtk_marshal_BOOL__POINTER,
                   GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
  moz_embed_signals[DOM_FOCUS_OUT] =
    gtk_signal_new("dom_focus_out",
                   GTK_RUN_LAST,
                   GET_OBJECT_CLASS_TYPE(klass),
                   GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_focus_out),
                   gtk_marshal_BOOL__POINTER,
                   GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
#ifdef MOZ_WIDGET_GTK
  gtk_object_class_add_signals(object_class, moz_embed_signals,
                            EMBED_LAST_SIGNAL);
#endif /* MOZ_WIDGET_GTK */

}

Here is the call graph for this function:

Here is the caller graph for this function:

void gtk_moz_embed_close_stream ( GtkMozEmbed *  embed)

Definition at line 968 of file gtkmozembed2.cpp.

{
  EmbedPrivate *embedPrivate;

  g_return_if_fail (embed != NULL);
  g_return_if_fail (GTK_IS_MOZ_EMBED(embed));
  g_return_if_fail (GTK_WIDGET_REALIZED(GTK_WIDGET(embed)));

  embedPrivate = (EmbedPrivate *)embed->data;
  embedPrivate->CloseStream();
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void gtk_moz_embed_destroy ( GtkObject *  object) [static]

Definition at line 540 of file gtkmozembed2.cpp.

{
  GtkMozEmbed  *embed;
  EmbedPrivate *embedPrivate;
  
  g_return_if_fail(object != NULL);
  g_return_if_fail(GTK_IS_MOZ_EMBED(object));

  embed = GTK_MOZ_EMBED(object);
  embedPrivate = (EmbedPrivate *)embed->data;

  if (embedPrivate) {

    // Destroy the widget only if it's been Init()ed.
    if(embedPrivate->mMozWindowWidget != 0) {
      embedPrivate->Destroy();
    }

    delete embedPrivate;
    embed->data = NULL;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

guint32 gtk_moz_embed_get_chrome_mask ( GtkMozEmbed *  embed)

Definition at line 1100 of file gtkmozembed2.cpp.

{
  EmbedPrivate *embedPrivate;

  g_return_val_if_fail ((embed != NULL), 0);
  g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), 0);

  embedPrivate = (EmbedPrivate *)embed->data;

  return embedPrivate->mChromeMask;
}
char* gtk_moz_embed_get_js_status ( GtkMozEmbed *  embed)

Definition at line 998 of file gtkmozembed2.cpp.

{
  char *retval = nsnull;
  EmbedPrivate *embedPrivate;

  g_return_val_if_fail ((embed != NULL), (char *)NULL);
  g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL);

  embedPrivate = (EmbedPrivate *)embed->data;

  if (embedPrivate->mWindow)
    retval = NEW_TOOLKIT_STRING(embedPrivate->mWindow->mJSStatus);

  return retval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1196 of file gtkmozembed2.cpp.

{
  PRUnichar *retval = nsnull;
  EmbedPrivate *embedPrivate;
                   
  g_return_val_if_fail ((embed != NULL), (PRUnichar *)NULL);
  g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (PRUnichar *)NULL);
  
  embedPrivate = (EmbedPrivate *)embed->data;
                   
  if (embedPrivate->mWindow)
    retval = ToNewUnicode(embedPrivate->mWindow->mJSStatus);
                   
  return retval;
}

Here is the call graph for this function:

char* gtk_moz_embed_get_link_message ( GtkMozEmbed *  embed)

Definition at line 981 of file gtkmozembed2.cpp.

{
  char *retval = nsnull;
  EmbedPrivate *embedPrivate;

  g_return_val_if_fail ((embed != NULL), (char *)NULL);
  g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL);

  embedPrivate = (EmbedPrivate *)embed->data;

  if (embedPrivate->mWindow)
    retval = NEW_TOOLKIT_STRING(embedPrivate->mWindow->mLinkMessage);

  return retval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1213 of file gtkmozembed2.cpp.

{
  PRUnichar *retval = nsnull;
  EmbedPrivate *embedPrivate;
                   
  g_return_val_if_fail ((embed != NULL), (PRUnichar *)NULL);
  g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (PRUnichar *)NULL);
  
  embedPrivate = (EmbedPrivate *)embed->data;
                   
  if (embedPrivate->mWindow)
    retval = ToNewUnicode(embedPrivate->mWindow->mLinkMessage);
                   
  return retval;
}

Here is the call graph for this function:

char* gtk_moz_embed_get_location ( GtkMozEmbed *  embed)

Definition at line 1032 of file gtkmozembed2.cpp.

{
  char *retval = nsnull;
  EmbedPrivate *embedPrivate;

  g_return_val_if_fail ((embed != NULL), (char *)NULL);
  g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL);

  embedPrivate = (EmbedPrivate *)embed->data;
  
  if (!embedPrivate->mURI.IsEmpty())
    retval = NEW_TOOLKIT_STRING(embedPrivate->mURI);

  return retval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gtk_moz_embed_get_nsIWebBrowser ( GtkMozEmbed *  embed,
nsIWebBrowser **  retval 
)

Definition at line 1165 of file gtkmozembed2.cpp.

{
  EmbedPrivate *embedPrivate;

  g_return_if_fail (embed != NULL);
  g_return_if_fail (GTK_IS_MOZ_EMBED(embed));

  embedPrivate = (EmbedPrivate *)embed->data;
  
  if (embedPrivate->mWindow)
    embedPrivate->mWindow->GetWebBrowser(retval);
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* gtk_moz_embed_get_title ( GtkMozEmbed *  embed)

Definition at line 1015 of file gtkmozembed2.cpp.

{
  char *retval = nsnull;
  EmbedPrivate *embedPrivate;

  g_return_val_if_fail ((embed != NULL), (char *)NULL);
  g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL);

  embedPrivate = (EmbedPrivate *)embed->data;

  if (embedPrivate->mWindow)
    retval = NEW_TOOLKIT_STRING(embedPrivate->mWindow->mTitle);

  return retval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRUnichar* gtk_moz_embed_get_title_unichar ( GtkMozEmbed *  embed)

Definition at line 1179 of file gtkmozembed2.cpp.

{
  PRUnichar *retval = nsnull;
  EmbedPrivate *embedPrivate;
                   
  g_return_val_if_fail ((embed != NULL), (PRUnichar *)NULL);
  g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (PRUnichar *)NULL);
  
  embedPrivate = (EmbedPrivate *)embed->data;
                   
  if (embedPrivate->mWindow)
    retval = ToNewUnicode(embedPrivate->mWindow->mTitle);
                   
  return retval;
}

Here is the call graph for this function:

Definition at line 254 of file gtkmozembed2.cpp.

{
  static GtkType moz_embed_type = 0;
  if (!moz_embed_type)
  {
    static const GtkTypeInfo moz_embed_info =
    {
      "GtkMozEmbed",
      sizeof(GtkMozEmbed),
      sizeof(GtkMozEmbedClass),
      (GtkClassInitFunc)gtk_moz_embed_class_init,
      (GtkObjectInitFunc)gtk_moz_embed_init,
      0,
      0,
      0
    };
    moz_embed_type = gtk_type_unique(GTK_TYPE_BIN, &moz_embed_info);
  }

  return moz_embed_type;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gtk_moz_embed_go_back ( GtkMozEmbed *  embed)

Definition at line 895 of file gtkmozembed2.cpp.

{
  EmbedPrivate *embedPrivate;

  g_return_if_fail (embed != NULL);
  g_return_if_fail (GTK_IS_MOZ_EMBED(embed));

  embedPrivate = (EmbedPrivate *)embed->data;

  if (embedPrivate->mNavigation)
    embedPrivate->mNavigation->GoBack();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gtk_moz_embed_go_forward ( GtkMozEmbed *  embed)

Definition at line 909 of file gtkmozembed2.cpp.

{
  EmbedPrivate *embedPrivate;

  g_return_if_fail (embed != NULL);
  g_return_if_fail (GTK_IS_MOZ_EMBED(embed));

  embedPrivate = (EmbedPrivate *)embed->data;

  if (embedPrivate->mNavigation)
    embedPrivate->mNavigation->GoForward();
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void gtk_moz_embed_init ( GtkMozEmbed *  embed) [static]

Definition at line 520 of file gtkmozembed2.cpp.

{
  EmbedPrivate *priv = new EmbedPrivate();
  embed->data = priv;
  gtk_widget_set_name(GTK_WIDGET(embed), "gtkmozembed");

#ifdef MOZ_WIDGET_GTK2
  GTK_WIDGET_UNSET_FLAGS(GTK_WIDGET(embed), GTK_NO_WINDOW);
#endif
}

Here is the caller graph for this function:

void gtk_moz_embed_load_url ( GtkMozEmbed *  embed,
const char *  url 
)

Definition at line 831 of file gtkmozembed2.cpp.

{
  EmbedPrivate *embedPrivate;
  
  g_return_if_fail(embed != NULL);
  g_return_if_fail(GTK_IS_MOZ_EMBED(embed));

  embedPrivate = (EmbedPrivate *)embed->data;

  embedPrivate->SetURI(url);

  // If the widget is realized, load the URI.  If it isn't then we
  // will load it later.
  if (GTK_WIDGET_REALIZED(embed))
    embedPrivate->LoadCurrentURI();
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void gtk_moz_embed_map ( GtkWidget *  widget) [static]

Definition at line 690 of file gtkmozembed2.cpp.

{
  GtkMozEmbed  *embed;
  EmbedPrivate *embedPrivate;
  
  g_return_if_fail(widget != NULL);
  g_return_if_fail(GTK_IS_MOZ_EMBED(widget));

  embed = GTK_MOZ_EMBED(widget);
  embedPrivate = (EmbedPrivate *)embed->data;

  GTK_WIDGET_SET_FLAGS(widget, GTK_MAPPED);

  embedPrivate->Show();

  gdk_window_show(widget->window);
  
}

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* gtk_moz_embed_new ( void  )

Definition at line 532 of file gtkmozembed2.cpp.

{
  return GTK_WIDGET(gtk_type_new(gtk_moz_embed_get_type()));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gtk_moz_embed_open_stream ( GtkMozEmbed *  embed,
const char *  base_uri,
const char *  mime_type 
)

Definition at line 940 of file gtkmozembed2.cpp.

{
  EmbedPrivate *embedPrivate;

  g_return_if_fail (embed != NULL);
  g_return_if_fail (GTK_IS_MOZ_EMBED(embed));
  g_return_if_fail (GTK_WIDGET_REALIZED(GTK_WIDGET(embed)));

  embedPrivate = (EmbedPrivate *)embed->data;

  embedPrivate->OpenStream(base_uri, mime_type);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 801 of file gtkmozembed2.cpp.

Here is the call graph for this function:

Definition at line 795 of file gtkmozembed2.cpp.

Here is the call graph for this function:

static void gtk_moz_embed_realize ( GtkWidget *  widget) [static]

Definition at line 566 of file gtkmozembed2.cpp.

{
  GtkMozEmbed    *embed;
  EmbedPrivate   *embedPrivate;
  GdkWindowAttr   attributes;
  gint            attributes_mask;
  
  g_return_if_fail(widget != NULL);
  g_return_if_fail(GTK_IS_MOZ_EMBED(widget));

  embed = GTK_MOZ_EMBED(widget);
  embedPrivate = (EmbedPrivate *)embed->data;

  GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED);

  attributes.window_type = GDK_WINDOW_CHILD;
  attributes.x = widget->allocation.x;
  attributes.y = widget->allocation.y;
  attributes.width = widget->allocation.width;
  attributes.height = widget->allocation.height;
  attributes.wclass = GDK_INPUT_OUTPUT;
  attributes.visual = gtk_widget_get_visual (widget);
  attributes.colormap = gtk_widget_get_colormap (widget);
  attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;

  attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;

  widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
                               &attributes, attributes_mask);
  gdk_window_set_user_data (widget->window, embed);

  widget->style = gtk_style_attach (widget->style, widget->window);
  gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);

  // initialize the window
  nsresult rv;
  rv = embedPrivate->Init(embed);
  g_return_if_fail(NS_SUCCEEDED(rv));
  
  PRBool alreadyRealized = PR_FALSE;
  rv = embedPrivate->Realize(&alreadyRealized);
  g_return_if_fail(NS_SUCCEEDED(rv));

  // if we're already realized we don't need to hook up to anything below
  if (alreadyRealized)
    return;

  if (embedPrivate->mURI.Length())
    embedPrivate->LoadCurrentURI();

  // connect to the focus out event for the child
  GtkWidget *child_widget = GTK_BIN(widget)->child;
  gtk_signal_connect_while_alive(GTK_OBJECT(child_widget),
                             "focus_out_event",
                             GTK_SIGNAL_FUNC(handle_child_focus_out),
                             embed,
                             GTK_OBJECT(child_widget));
  gtk_signal_connect_while_alive(GTK_OBJECT(child_widget),
                             "focus_in_event",
                             GTK_SIGNAL_FUNC(handle_child_focus_in),
                             embed,
                             GTK_OBJECT(child_widget));

#ifdef MOZ_WIDGET_GTK
  // connect to the toplevel focus out events for the child
  GtkMozArea *mozarea = GTK_MOZAREA(child_widget);
  gtk_signal_connect_while_alive(GTK_OBJECT(mozarea),
                             "toplevel_focus_in",
                             GTK_SIGNAL_FUNC(handle_toplevel_focus_in),
                             embed,
                             GTK_OBJECT(mozarea));

  gtk_signal_connect_while_alive(GTK_OBJECT(mozarea),
                             "toplevel_focus_out",
                             GTK_SIGNAL_FUNC(handle_toplevel_focus_out),
                             embed,
                             GTK_OBJECT(mozarea));
#endif /* MOZ_WIDGET_GTK */
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gtk_moz_embed_reload ( GtkMozEmbed *  embed,
gint32  flags 
)

Definition at line 1049 of file gtkmozembed2.cpp.

{
  EmbedPrivate *embedPrivate;

  g_return_if_fail (embed != NULL);
  g_return_if_fail (GTK_IS_MOZ_EMBED(embed));

  embedPrivate = (EmbedPrivate *)embed->data;

  PRUint32 reloadFlags = 0;
  
  // map the external API to the internal web navigation API.
  switch (flags) {
  case GTK_MOZ_EMBED_FLAG_RELOADNORMAL:
    reloadFlags = 0;
    break;
  case GTK_MOZ_EMBED_FLAG_RELOADBYPASSCACHE:
    reloadFlags = nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE;
    break;
  case GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXY:
    reloadFlags = nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY;
    break;
  case GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXYANDCACHE:
    reloadFlags = (nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY |
                 nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE);
    break;
  case GTK_MOZ_EMBED_FLAG_RELOADCHARSETCHANGE:
    reloadFlags = nsIWebNavigation::LOAD_FLAGS_CHARSET_CHANGE;
    break;
  default:
    reloadFlags = 0;
    break;
  }

  embedPrivate->Reload(reloadFlags);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gtk_moz_embed_render_data ( GtkMozEmbed *  embed,
const char *  data,
guint32  len,
const char *  base_uri,
const char *  mime_type 
)

Definition at line 923 of file gtkmozembed2.cpp.

{
  EmbedPrivate *embedPrivate;

  g_return_if_fail (embed != NULL);
  g_return_if_fail (GTK_IS_MOZ_EMBED(embed));

  embedPrivate = (EmbedPrivate *)embed->data;

  embedPrivate->OpenStream(base_uri, mime_type);
  embedPrivate->AppendToStream((const PRUint8*)data, len);
  embedPrivate->CloseStream();
}

Here is the call graph for this function:

Definition at line 813 of file gtkmozembed2.cpp.

{
  EmbedPrivate::SetAppComponents(aComps, aNumComponents);
}

Here is the call graph for this function:

void gtk_moz_embed_set_chrome_mask ( GtkMozEmbed *  embed,
guint32  flags 
)

Definition at line 1087 of file gtkmozembed2.cpp.

{
  EmbedPrivate *embedPrivate;

  g_return_if_fail (embed != NULL);
  g_return_if_fail (GTK_IS_MOZ_EMBED(embed));

  embedPrivate = (EmbedPrivate *)embed->data;

  embedPrivate->SetChromeMask(flags);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 807 of file gtkmozembed2.cpp.

Here is the call graph for this function:

Definition at line 826 of file gtkmozembed2.cpp.

Here is the call graph for this function:

void gtk_moz_embed_set_profile_path ( const char *  aDir,
const char *  aName 
)

Definition at line 820 of file gtkmozembed2.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

static void gtk_moz_embed_single_class_init ( GtkMozEmbedSingleClass *  klass) [static]

Definition at line 1274 of file gtkmozembed2.cpp.

{
  GtkObjectClass     *object_class;

  object_class    = GTK_OBJECT_CLASS(klass);

  // set up our signals

  moz_embed_single_signals[NEW_WINDOW_ORPHAN] =
    gtk_signal_new("new_window_orphan",
                 GTK_RUN_FIRST,
                 GET_OBJECT_CLASS_TYPE(klass),
                 GTK_SIGNAL_OFFSET(GtkMozEmbedSingleClass,
                                 new_window_orphan),
                 gtk_marshal_NONE__POINTER_UINT,
                 GTK_TYPE_NONE, 2, GTK_TYPE_POINTER, GTK_TYPE_UINT);
  
#ifdef MOZ_WIDGET_GTK
  gtk_object_class_add_signals(object_class, moz_embed_single_signals,
                            SINGLE_LAST_SIGNAL);
#endif /* MOZ_WIDGET_GTK */
}

Here is the caller graph for this function:

void gtk_moz_embed_single_create_window ( GtkMozEmbed **  aNewEmbed,
guint  aChromeFlags 
)

Definition at line 1325 of file gtkmozembed2.cpp.

{
  GtkMozEmbedSingle *single = gtk_moz_embed_single_get();

  *aNewEmbed = nsnull;

  if (!single)
    return;

  gtk_signal_emit(GTK_OBJECT(single),
                moz_embed_single_signals[NEW_WINDOW_ORPHAN],
                aNewEmbed, aChromeFlags);

}

Here is the call graph for this function:

GtkMozEmbedSingle* gtk_moz_embed_single_get ( void  )

Definition at line 1312 of file gtkmozembed2.cpp.

{
  static GtkMozEmbedSingle *singleton_object = nsnull;
  if (!singleton_object)
  {
    singleton_object = gtk_moz_embed_single_new();
  }

  return singleton_object;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1250 of file gtkmozembed2.cpp.

{
  static GtkType moz_embed_single_type = 0;
  if (!moz_embed_single_type)
  {
    static const GtkTypeInfo moz_embed_single_info =
    {
      "GtkMozEmbedSingle",
      sizeof(GtkMozEmbedSingle),
      sizeof(GtkMozEmbedSingleClass),
      (GtkClassInitFunc)gtk_moz_embed_single_class_init,
      (GtkObjectInitFunc)gtk_moz_embed_single_init,
      0,
      0,
      0
    };
    moz_embed_single_type = gtk_type_unique(GTK_TYPE_OBJECT,
                                       &moz_embed_single_info);
  }

  return moz_embed_single_type;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void gtk_moz_embed_single_init ( GtkMozEmbedSingle *  embed) [static]

Definition at line 1298 of file gtkmozembed2.cpp.

{
  // this is a placeholder for later in case we need to stash data at
  // a later data and maintain backwards compatibility.
  embed->data = nsnull;
}

Here is the caller graph for this function:

GtkMozEmbedSingle * gtk_moz_embed_single_new ( void  )

Definition at line 1306 of file gtkmozembed2.cpp.

{
  return (GtkMozEmbedSingle *)gtk_type_new(gtk_moz_embed_single_get_type());
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void gtk_moz_embed_size_allocate ( GtkWidget *  widget,
GtkAllocation *  allocation 
) [static]

Definition at line 667 of file gtkmozembed2.cpp.

{
  GtkMozEmbed  *embed;
  EmbedPrivate *embedPrivate;
  
  g_return_if_fail(widget != NULL);
  g_return_if_fail(GTK_IS_MOZ_EMBED(widget));

  embed = GTK_MOZ_EMBED(widget);
  embedPrivate = (EmbedPrivate *)embed->data;
  
  widget->allocation = *allocation;

  if (GTK_WIDGET_REALIZED(widget))
  {
    gdk_window_move_resize(widget->window,
                        allocation->x, allocation->y,
                        allocation->width, allocation->height);
    embedPrivate->Resize(allocation->width, allocation->height);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void gtk_moz_embed_stop_load ( GtkMozEmbed *  embed)

Definition at line 849 of file gtkmozembed2.cpp.

{
  EmbedPrivate *embedPrivate;
  
  g_return_if_fail(embed != NULL);
  g_return_if_fail(GTK_IS_MOZ_EMBED(embed));

  embedPrivate = (EmbedPrivate *)embed->data;

  if (embedPrivate->mNavigation)
    embedPrivate->mNavigation->Stop(nsIWebNavigation::STOP_ALL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void gtk_moz_embed_unmap ( GtkWidget *  widget) [static]

Definition at line 710 of file gtkmozembed2.cpp.

{
  GtkMozEmbed  *embed;
  EmbedPrivate *embedPrivate;
  
  g_return_if_fail(widget != NULL);
  g_return_if_fail(GTK_IS_MOZ_EMBED(widget));

  embed = GTK_MOZ_EMBED(widget);
  embedPrivate = (EmbedPrivate *)embed->data;

  GTK_WIDGET_UNSET_FLAGS(widget, GTK_MAPPED);

  gdk_window_hide(widget->window);

  embedPrivate->Hide();
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void gtk_moz_embed_unrealize ( GtkWidget *  widget) [static]

Definition at line 647 of file gtkmozembed2.cpp.

{
  GtkMozEmbed  *embed;
  EmbedPrivate *embedPrivate;
  
  g_return_if_fail(widget != NULL);
  g_return_if_fail(GTK_IS_MOZ_EMBED(widget));

  embed = GTK_MOZ_EMBED(widget);
  embedPrivate = (EmbedPrivate *)embed->data;

  if (embedPrivate) {
    embedPrivate->Unrealize();
  }

  if (GTK_WIDGET_CLASS(embed_parent_class)->unrealize)
    (* GTK_WIDGET_CLASS(embed_parent_class)->unrealize)(widget);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static gint handle_child_focus_in ( GtkWidget *  aWidget,
GdkEventFocus *  aGdkFocusEvent,
GtkMozEmbed *  aEmbed 
) [static]

Definition at line 743 of file gtkmozembed2.cpp.

{
  EmbedPrivate *embedPrivate;

  embedPrivate = (EmbedPrivate *)aEmbed->data;

  embedPrivate->ChildFocusIn();

  return FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static gint handle_child_focus_out ( GtkWidget *  aWidget,
GdkEventFocus *  aGdkFocusEvent,
GtkMozEmbed *  aEmbed 
) [static]

Definition at line 757 of file gtkmozembed2.cpp.

{
  EmbedPrivate *embedPrivate;

  embedPrivate = (EmbedPrivate *)aEmbed->data;

  embedPrivate->ChildFocusOut();
 
  return FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

GtkBinClass* embed_parent_class [static]

Definition at line 247 of file gtkmozembed2.cpp.

Definition at line 249 of file gtkmozembed2.cpp.

Definition at line 1245 of file gtkmozembed2.cpp.