GtkSpinner

GtkSpinner — Show a spinner animation

Synopsis

#include <gtk/gtk.h>

                    GtkSpinner;
GtkWidget *         gtk_spinner_new                     (void);
void                gtk_spinner_start                   (GtkSpinner *spinner);
void                gtk_spinner_stop                    (GtkSpinner *spinner);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkDrawingArea
                           +----GtkSpinner

Implemented Interfaces

GtkSpinner implements AtkImplementorIface and GtkBuildable.

Properties

  "active"                   gboolean              : Read / Write

Style Properties

  "cycle-duration"           guint                 : Read
  "num-steps"                guint                 : Read

Description

A GtkSpinner widget displays an icon-size spinning animation. It is often used as an alternative to a GtkProgressBar for displaying indefinite activity, instead of actual progress.

To start the animation, use gtk_spinner_start(), to stop it use gtk_spinner_stop().

Details

GtkSpinner

typedef struct _GtkSpinner GtkSpinner;


gtk_spinner_new ()

GtkWidget *         gtk_spinner_new                     (void);

Returns a new spinner widget. Not yet started.

Returns :

a new GtkSpinner

Since 2.20


gtk_spinner_start ()

void                gtk_spinner_start                   (GtkSpinner *spinner);

Starts the animation of the spinner.

spinner :

a GtkSpinner

Since 2.20


gtk_spinner_stop ()

void                gtk_spinner_stop                    (GtkSpinner *spinner);

Stops the animation of the spinner.

spinner :

a GtkSpinner

Since 2.20

Property Details

The "active" property

  "active"                   gboolean              : Read / Write

Whether the spinner is active.

Default value: FALSE

Style Property Details

The "cycle-duration" style property

  "cycle-duration"           guint                 : Read

The duration in milliseconds for the spinner to complete a full cycle.

Allowed values: >= 500

Default value: 1000

Since 2.20


The "num-steps" style property

  "num-steps"                guint                 : Read

The number of steps for the spinner to complete a full loop. The animation will complete a full cycle in one second by default (see the "cycle-duration" style property).

Allowed values: >= 1

Default value: 12

Since 2.20

See Also

GtkCellRendererSpinner, GtkProgressBar