Hello,

I've tried to use GtkMozEmbed in a very simple C application. I've
created a GtkMozEmbeded* and placed it in a GTK+ container. Without any
further preparation I've tried to load a URL or render some data in the
widget. Unfortunately, despite the fact that loading URLs works
flawlessly, I'm unable to render any text. Here's the code:

gtk_init(&argc, &argv); 
GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
GtkWidget *html = gtk_moz_embed_new();  
char *data = "string";
gtk_container_add(GTK_CONTAINER(window), html);
//gtk_moz_embed_render_data(GTK_MOZ_EMBED(html), data, strlen(data),
        "file:///", "text/html");
//gtk_moz_embed_load_url(GTK_MOZ_EMBED(html), "http://mozilla.org";);
gtk_widget_show_all(window);
gtk_main();

If gtk_moz_embed_load_url() is uncommented everything works fine. On the
other hand, if the gtk_moz_embed_render_data() is uncommented then
application dies with a segmentation fault.

Have you got any suggestions?


_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to