Blame perf/textview.c

Packit 98cdb6
#include <gtk/gtk.h>
Packit 98cdb6
#include "widgets.h"
Packit 98cdb6
Packit 98cdb6
GtkWidget *
Packit 98cdb6
text_view_new (void)
Packit 98cdb6
{
Packit 98cdb6
  GtkWidget *sw;
Packit 98cdb6
  GtkWidget *text_view;
Packit 98cdb6
  GtkTextBuffer *buffer;
Packit 98cdb6
Packit 98cdb6
  sw = gtk_scrolled_window_new (NULL, NULL);
Packit 98cdb6
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
Packit 98cdb6
Packit 98cdb6
  text_view = gtk_text_view_new ();
Packit 98cdb6
  gtk_widget_set_size_request (text_view, 400, 300);
Packit 98cdb6
  gtk_container_add (GTK_CONTAINER (sw), text_view);
Packit 98cdb6
Packit 98cdb6
  buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
Packit 98cdb6
Packit 98cdb6
  gtk_text_buffer_set_text (buffer,
Packit 98cdb6
			    "In felaweshipe, and pilgrimes were they alle,\n"
Packit 98cdb6
			    "That toward Caunterbury wolden ryde.\n"
Packit 98cdb6
			    "The chambres and the stables weren wyde,\n"
Packit 98cdb6
			    "And wel we weren esed atte beste;\n"
Packit 98cdb6
			    "And shortly, whan the sonne was to reste,\n"
Packit 98cdb6
			    "\n"
Packit 98cdb6
			    "So hadde I spoken with hem everychon \n"
Packit 98cdb6
			    "That I was of hir felaweshipe anon, \n"
Packit 98cdb6
			    "And made forward erly for to ryse \n"
Packit 98cdb6
			    "To take our wey, ther as I yow devyse. \n"
Packit 98cdb6
			    "   But nathelees, whil I have tyme and space, \n"
Packit 98cdb6
			    " \n"
Packit 98cdb6
			    "Er that I ferther in this tale pace, \n"
Packit 98cdb6
			    "Me thynketh it acordaunt to resoun \n"
Packit 98cdb6
			    "To telle yow al the condicioun \n"
Packit 98cdb6
			    "Of ech of hem, so as it semed me, \n"
Packit 98cdb6
			    "And whiche they weren, and of what degree, \n"
Packit 98cdb6
			    " \n"
Packit 98cdb6
			    "And eek in what array that they were inne; \n"
Packit 98cdb6
			    "And at a knyght than wol I first bigynne. \n"
Packit 98cdb6
			    "   A knyght ther was, and that a worthy man, \n"
Packit 98cdb6
			    "That fro the tyme that he first bigan \n"
Packit 98cdb6
			    "To riden out, he loved chivalrie, \n"
Packit 98cdb6
			    " \n"
Packit 98cdb6
			    "Trouthe and honour, fredom and curteisie. \n"
Packit 98cdb6
			    "Ful worthy was he in his lordes werre, \n"
Packit 98cdb6
			    " \n"
Packit 98cdb6
			    "And therto hadde he riden, no man ferre, \n"
Packit 98cdb6
			    "As wel in Cristendom as in Hethenesse, \n"
Packit 98cdb6
			    "And evere honoured for his worthynesse. \n"
Packit 98cdb6
			    " \n"
Packit 98cdb6
			    "   At Alisaundre he was, whan it was wonne; \n"
Packit 98cdb6
			    "Ful ofte tyme he hadde the bord bigonne \n"
Packit 98cdb6
			    "Aboven alle nacions in Pruce; \n"
Packit 98cdb6
			    "In Lettow hadde he reysed, and in Ruce, \n"
Packit 98cdb6
			    "No cristen man so ofte of his degree. \n",
Packit 98cdb6
			    -1);
Packit 98cdb6
Packit 98cdb6
  return sw;
Packit 98cdb6
}