GtkSpinner

GtkSpinner — Show a spinner animation

Properties

gboolean spinning Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkSpinner

Implemented Interfaces

GtkSpinner implements GtkAccessible, GtkBuildable and GtkConstraintTarget.

Includes

#include <gtk/gtk.h>

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().

CSS nodes

GtkSpinner has a single CSS node with the name spinner. When the animation is active, the :checked pseudoclass is added to this node.

Functions

gtk_spinner_new ()

GtkWidget *
gtk_spinner_new (void);

Returns a new spinner widget. Not yet started.

Returns

a new GtkSpinner


gtk_spinner_start ()

void
gtk_spinner_start (GtkSpinner *spinner);

Starts the animation of the spinner.

Parameters

spinner

a GtkSpinner

 

gtk_spinner_stop ()

void
gtk_spinner_stop (GtkSpinner *spinner);

Stops the animation of the spinner.

Parameters

spinner

a GtkSpinner

 

gtk_spinner_set_spinning ()

void
gtk_spinner_set_spinning (GtkSpinner *spinner,
                          gboolean spinning);

Sets the activity of the spinner.

Parameters

spinner

a GtkSpinner

 

spinning

whether the spinner should be spinning

 

gtk_spinner_get_spinning ()

gboolean
gtk_spinner_get_spinning (GtkSpinner *spinner);

Returns whether the spinner is spinning.

Parameters

spinner

a GtkSpinner

 

Returns

TRUE if the spinner is active

Types and Values

GtkSpinner

typedef struct _GtkSpinner GtkSpinner;

Property Details

The “spinning” property

  “spinning”                 gboolean

Whether the spinner is spinning.

Owner: GtkSpinner

Flags: Read / Write

Default value: FALSE