/*
 * compile with:
 * gcc -o label-1 `pkg-config --cflags --libs gtk+-3.0` label-1.c
 */

#include <gtk/gtk.h>

int
main (int argc, char *argv[])
{
  GtkWidget *window;
  GtkWidget *box;
  GtkWidget *label;
  GtkWidget *info_bar;
  GtkWidget *content_area;

  gtk_init (&argc, &argv);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  g_signal_connect (G_OBJECT (window), "destroy",
		    G_CALLBACK (gtk_main_quit), NULL);
  g_signal_connect (G_OBJECT (window), "delete_event",
		    G_CALLBACK (gtk_main_quit), NULL);

  box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 12);
  gtk_container_add (GTK_CONTAINER (window), box);

  label = gtk_label_new ("A label in a GtkInfobar");
  gtk_label_set_selectable (GTK_LABEL (label), TRUE);

  info_bar = gtk_info_bar_new ();
  content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar));
  gtk_container_add (GTK_CONTAINER (content_area), label);

  gtk_container_add (GTK_CONTAINER (box), info_bar);

  label = gtk_label_new ("A label just in a box");
  gtk_label_set_selectable (GTK_LABEL (label), TRUE);

  gtk_container_add (GTK_CONTAINER (box), label);

  gtk_widget_show_all (window);

  gtk_main ();

  return 0;
}
