Hi!
I am trying to embed firefox browser into a GTK window.
Based on examples I came across I tried the following piece of code.
It just opens a GTK window but I don't see any browser capabilities or
an option to enter a url.
Is there something that I am missing?
BTW, I am compiling this code with
gcc moz.c -o moz_embed `pkg-config --cflags --libs gtk+-2.0 firefox-
gtkmozembed` -Lgtkembedmoz
#include <gtk/gtk.h>
#include "gtkmozembed.h"
#include "mozilla-config.h"
int main(int argc, char * argv[])
{
GtkWidget * window;
GtkWidget * browser;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_moz_embed_set_profile_path("/root/.mozconfig", "mozilla");
browser = gtk_moz_embed_new();
if(!browser)
{
printf("Browser is null.\n");
exit (1);
}
gtk_container_add(GTK_CONTAINER(window), browser);
gtk_moz_embed_load_url(GTK_MOZ_EMBED(browser), "http://
www.google.com/");
gtk_widget_show(window);
gtk_main();
return 0;
}
Thanks and Regards,
puran
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding