Re: Please, a little exemple with html widget
- From: Charles Iliya Krempeaux <tnt linux ca>
- To: "youssa voila fr" <youssa voila fr>
- Cc: gtk-app-devel-list gnome org, gtk-list gnome org
- Subject: Re: Please, a little exemple with html widget
- Date: 01 Nov 2001 16:05:58 -0800
On Wed, 2001-10-31 at 00:23, youssa voila fr wrote:
>
> Hi all,
> pplease, can you send me any little exemple using a html widget.
> any help is important for me.
> Hva a good time
> Youssa
You can go take a look at:
http://www.mozilla.org/unix/gtk-embedding.html
But basically, to use it, you do something like:
#include <gtkmozembed.h>
...
// Initialization
GtkMozEmbed * mozzie = NULL;
mozzie = gtk_moz_embed_new();
gtk_moz_embed_load_url(mozzie,
"http://matterial.sourceforge.net/");
That would load up a specific URL.
If you wanted to render some HTML from a buffer you would do something
like:
char * s = "<h1>Hello worl</h1><p>I am an HTML message</p>";
gtk_moz_embed_open_stream(mozzie,
"http://developer.gnome.org/",
"text/html");
gtk_moz_embed_append_data(mozzie, s, strlen(s));
gtk_moz_embed_close_stream(mozzie);
In this, the second parameter of "gtk_moz_embed_open_stream" --
"http://developer.gnome.org/" -- is what relative links are relative
to. (It might be just a garbage value for what you are doing.)
You have to link to the correct library. So make sure you link using
the option:
-lgtkembedmoz
Also make sure you have this libary (and its header files) installed.
Hope that helps a bit.
See ya
Charles Iliya Krempeaux
tnt @ linux.ca
ckrempea @ alumni.sfu.ca
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]