#include <gtk/gtk.h>

int
main (int argc, char **argv)
{
  gtk_init (&argc, &argv);

  GtkTextBuffer *text_buffer = gtk_text_buffer_new (NULL);
  gtk_text_buffer_insert_at_cursor (text_buffer,
                                    "Here is a load of text\n"
                                    "that you can attempt to select\n"
                                    "and get rather confused due to all the\n"
                                    "weirdness that occurs.", -1);

  GtkWidget *text_view = gtk_text_view_new ();
  gtk_text_view_set_buffer ((GtkTextView *)text_view, text_buffer);
  gtk_container_set_border_width ((GtkContainer *)text_view, 16);

  GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_container_add ((GtkContainer *)window, text_view);
  gtk_widget_show_all (window);

  gtk_main ();
}
