GtkHTML widget

Name

GtkHTML widget -- widget for rendering HTML

Synopsis



GtkWidget*  gtk_html_new                    (void);
GtkWidget*  gtk_html_new_from_string        (const gchar *str,
                                             gint len);
void        gtk_html_construct              (GtkWidget *html);

void        gtk_html_load_from_string       (GtkHTML *html,
                                             const gchar *str,
                                             gint len);
GtkHTMLStream* gtk_html_begin               (GtkHTML *html);
GtkHTMLStream* gtk_html_begin_content       (GtkHTML *html,
                                             gchar *content_type);
void        gtk_html_write                  (GtkHTML *html,
                                             GtkHTMLStream *handle,
                                             const gchar *buffer,
                                             size_t size);
void        gtk_html_end                    (GtkHTML *html,
                                             GtkHTMLStream *handle,
                                             GtkHTMLStreamStatus status);

gboolean    gtk_html_save                   (GtkHTML *html,
                                             GtkHTMLSaveReceiverFn receiver,
                                             gpointer data);
gboolean    gtk_html_export                 (GtkHTML *html,
                                             const char *type,
                                             GtkHTMLSaveReceiverFn receiver,
                                             gpointer data);

void        gtk_html_print                  (GtkHTML *html,
                                             GnomePrintContext *print_context);
void        gtk_html_print_with_header_footer
                                            (GtkHTML *html,
                                             GnomePrintContext *print_context,
                                             gdouble header_height,
                                             gdouble footer_height,
                                             GtkHTMLPrintCallback header_print,
                                             GtkHTMLPrintCallback footer_print,
                                             gpointer user_data);

const gchar* gtk_html_get_title             (GtkHTML *html);
gboolean    gtk_html_jump_to_anchor         (GtkHTML *html,
                                             const gchar *anchor);
void        gtk_html_set_default_background_color
                                            (GtkHTML *html,
                                             GdkColor *c);
void        gtk_html_set_default_content_type
                                            (GtkHTML *html,
                                             gchar *content_type);
void        gtk_html_allow_selection        (GtkHTML *html,
                                             gboolean allow);
gpointer    gtk_html_get_object_by_id       (GtkHTML *html,
                                             const gchar *id);

Description

GtkHTML widget is lightweight HTML viewer / container. It provides an easy way for viewing HTML documents in your application and for layout UI of your application throught HTML.

Details

GtkWidget*  gtk_html_new                    (void);

GtkHTML widget contructor. It creates an empty GtkHTML widget.

Returns :

A GtkHTML widget, newly created and empty.


GtkWidget*  gtk_html_new_from_string        (const gchar *str,
                                             gint len);

GtkHTML widget constructor. It creates an new GtkHTML widget and loads HTML source from str. It is intended for simple creation. For more complicated loading you probably want to use GtkHTMLStream. See gtk_html_begin.

str:

A string containing HTML source.

len:

A length of str, if len == -1 then it will be computed using strlen.

Returns :

A GtkHTML widget, newly created, containing document loaded from input str.


void        gtk_html_construct              (GtkWidget *html);