From 1a3e2e654d4303a2fc50332cf9c68eb5cf8b57cd Mon Sep 17 00:00:00 2001 From: "blizzard%redhat.com" Date: Tue, 2 Oct 2001 05:03:37 +0000 Subject: [PATCH] Bug #84240. Add methods to get a unicode version of the JS status and link message. r=philipl, sr=shaver --- embedding/browser/gtk/src/gtkmozembed2.cpp | 34 +++++++++++++++++++ .../browser/gtk/src/gtkmozembed_internal.h | 3 ++ 2 files changed, 37 insertions(+) diff --git a/embedding/browser/gtk/src/gtkmozembed2.cpp b/embedding/browser/gtk/src/gtkmozembed2.cpp index adaf07065c4d..fb579f2231d7 100644 --- a/embedding/browser/gtk/src/gtkmozembed2.cpp +++ b/embedding/browser/gtk/src/gtkmozembed2.cpp @@ -1083,6 +1083,40 @@ gtk_moz_embed_get_title_unichar (GtkMozEmbed *embed) return retval; } +PRUnichar * +gtk_moz_embed_get_js_status_unichar (GtkMozEmbed *embed) +{ + 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; +} + +PRUnichar * +gtk_moz_embed_get_link_message_unichar (GtkMozEmbed *embed) +{ + 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; +} + // class and instance initialization GtkType diff --git a/embedding/browser/gtk/src/gtkmozembed_internal.h b/embedding/browser/gtk/src/gtkmozembed_internal.h index d056ac2ef9b7..defe30e301b3 100644 --- a/embedding/browser/gtk/src/gtkmozembed_internal.h +++ b/embedding/browser/gtk/src/gtkmozembed_internal.h @@ -30,6 +30,9 @@ extern "C" { extern void gtk_moz_embed_get_nsIWebBrowser (GtkMozEmbed *embed, nsIWebBrowser **retval); extern PRUnichar *gtk_moz_embed_get_title_unichar (GtkMozEmbed *embed); +extern PRUnichar *gtk_moz_embed_get_js_status_unichar (GtkMozEmbed *embed); +extern PRUnichar *gtk_moz_embed_get_link_message_unichar (GtkMozEmbed *embed); + #ifdef __cplusplus }