#include <gtk/gtk.h>
#include <gtkhtml/gtkhtml.h>

gboolean
cb_delete_event (GtkWidget *widget)
{
	gtk_widget_destroy (widget);
	gtk_main_quit ();
	return FALSE;
}

int
main (int argc, char *argv[])
{
	GtkWidget *window, *html;

	gtk_init (&argc, &argv);

	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	gtk_window_set_default_size (GTK_WINDOW (window), 100, 100);
	g_signal_connect (window, "delete-event",
			  G_CALLBACK (cb_delete_event), window);
	html = gtk_html_new ();
	gtk_container_add (GTK_CONTAINER (window), html);
	gtk_widget_show (html);
	gtk_widget_show (window);

	gtk_html_load_from_string (GTK_HTML (html), "this is sample text.", -1);
	gtk_html_set_editable (GTK_HTML (html), TRUE);
	gtk_html_set_inline_spelling (GTK_HTML (html), FALSE);
	gtk_html_select_all (GTK_HTML (html));
	gtk_html_copy (GTK_HTML (html));

	gtk_main ();

	return 0;
}

