Spinners

A spinner is a placeholder for a long-running action happening in the background.

static gboolean
stop_spinner (gpointer data)
{
  GtkSpinner *spinner = data;

  gtk_spinner_stop (spinner);

  return G_SOURCE_REMOVE;
}

GtkWidget *spinner = gtk_spinner_new ();

gtk_spinner_start (GTK_SPINNER (spinner));

// Stop spinner after 5 seconds
g_timeout_add_seconds (5, stop_spinner, spinner);

API references

In the examples we used the following classes: