/* gcc spinner.c $(pkg-config --cflags --libs gtk+-3.0 glib-2.0) */

#include <gtk/gtk.h>

int
main (void)
{
  GtkWidget *window;
  GtkWidget *button;
  GtkWidget *spinner;

  gtk_init (NULL, NULL);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);
  g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);

  button = gtk_button_new ();
  gtk_container_add (GTK_CONTAINER (window), button);

  spinner = gtk_spinner_new ();
  gtk_spinner_start (GTK_SPINNER (spinner));
  gtk_container_add (GTK_CONTAINER (button), spinner);

  gtk_widget_show_all (window);
  gtk_main ();

  return 0;
}
