diff options
author | Christian Persch <chpe@src.gnome.org> | 2007-08-26 04:59:04 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2007-08-26 04:59:04 +0800 |
commit | 6deabce61b1758b0c395678bf5c2769ee4ca17c6 (patch) | |
tree | 27866c89b34cb0fe866753fbef2894e6dfd01785 /embed/xulrunner/tests/TestGtkEmbedNotebook.cpp | |
parent | d2bc7076ca31996d4a5b80b74e4380e6f2f56321 (diff) | |
download | gsoc2013-epiphany-6deabce61b1758b0c395678bf5c2769ee4ca17c6.tar gsoc2013-epiphany-6deabce61b1758b0c395678bf5c2769ee4ca17c6.tar.gz gsoc2013-epiphany-6deabce61b1758b0c395678bf5c2769ee4ca17c6.tar.bz2 gsoc2013-epiphany-6deabce61b1758b0c395678bf5c2769ee4ca17c6.tar.lz gsoc2013-epiphany-6deabce61b1758b0c395678bf5c2769ee4ca17c6.tar.xz gsoc2013-epiphany-6deabce61b1758b0c395678bf5c2769ee4ca17c6.tar.zst gsoc2013-epiphany-6deabce61b1758b0c395678bf5c2769ee4ca17c6.zip |
Initial checkin: merged embed/gecko from xulrunner branch to embed/xulrunner, and svn copied embed/mozilla to embed/xulrunner/embed. Not integreated with the build yet.
svn path=/trunk/; revision=7297
Diffstat (limited to 'embed/xulrunner/tests/TestGtkEmbedNotebook.cpp')
-rw-r--r-- | embed/xulrunner/tests/TestGtkEmbedNotebook.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/embed/xulrunner/tests/TestGtkEmbedNotebook.cpp b/embed/xulrunner/tests/TestGtkEmbedNotebook.cpp new file mode 100644 index 000000000..1891ca06b --- /dev/null +++ b/embed/xulrunner/tests/TestGtkEmbedNotebook.cpp @@ -0,0 +1,49 @@ +#include <gtk/gtk.h> +#include <gtkmozembed.h> +int main(int argc, char *argv[]) +{ + GtkWidget *window; + GtkWidget *label; + GtkWidget *mozembed; + GtkWidget *container; + char *url; + + gtk_init(&argc, &argv); + + window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + + container = gtk_notebook_new(); + mozembed = gtk_moz_embed_new(); + label = gtk_label_new("Can you see this message?\n" + "Once you switch to mozembed page " + "you never see this message."); + + gtk_signal_connect(GTK_OBJECT(mozembed), "destroy", + GTK_SIGNAL_FUNC(gtk_main_quit), +NULL); + + gtk_container_add(GTK_CONTAINER(window), container); + + gtk_notebook_append_page(GTK_NOTEBOOK(container), + label, + gtk_label_new("gtk label")); + + gtk_notebook_append_page(GTK_NOTEBOOK(container), + mozembed, + gtk_label_new("mozembed")); + + + + + gtk_widget_set_usize(window, 400, 300); + gtk_widget_show(mozembed); + gtk_widget_show(label); + gtk_widget_show_all(window); + + url = (argc > 1) ? argv[1] : (char *)"localhost"; + gtk_moz_embed_load_url(GTK_MOZ_EMBED(mozembed), url); + + gtk_main(); + + return 0; +} |