Displays an icon-size spinning animation.
It is often used as an alternative to a [classGtk.ProgressBar] for displaying indefinite activity, instead of actual progress.
<picture> <source srcset="spinner-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example GtkSpinner" src="spinner.png"> </picture> To start the animation, use [methodGtk.Spinner.start], to stop it use [methodGtk.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.
# Accessibility
GtkSpinner uses the [enumGtk.AccessibleRole.progress_bar] role.
<group>Ornaments</group> <gtkada_demo>create_spinners.adb</gtkada_demo>
function "+"
(Widget : access Gtk_Spinner_Record'Class)
return Gtk.Accessible.Gtk_Accessible
function "+"
(Widget : access Gtk_Spinner_Record'Class)
return Gtk.Buildable.Gtk_Buildable
function "+"
(Widget : access Gtk_Spinner_Record'Class)
return Gtk.Constraint_Target.Gtk_Constraint_Target
function "-"
(Interf : Gtk.Accessible.Gtk_Accessible)
return Gtk_Spinner
function "-"
(Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Spinner
function "-"
(Interf : Gtk.Constraint_Target.Gtk_Constraint_Target)
return Gtk_Spinner
procedure Announce
(Self : not null access Gtk_Spinner_Record;
Message : UTF8_String;
Priority : Gtk.Accessible.Gtk_Accessible_Announcement_Priority)
function Get_Accessible_Id
(Self : not null access Gtk_Spinner_Record) return UTF8_String
function Get_Accessible_Parent
(Self : not null access Gtk_Spinner_Record)
return Gtk.Accessible.Gtk_Accessible
function Get_Accessible_Role
(Self : not null access Gtk_Spinner_Record)
return Gtk.Accessible.Gtk_Accessible_Role
function Get_At_Context
(Self : not null access Gtk_Spinner_Record)
return Gtk.Atcontext.Gtk_Atcontext
function Get_Bounds
(Self : not null access Gtk_Spinner_Record;
X : out Glib.Gint;
Y : out Glib.Gint;
Width : out Glib.Gint;
Height : out Glib.Gint) return Boolean
function Get_First_Accessible_Child
(Self : not null access Gtk_Spinner_Record)
return Gtk.Accessible.Gtk_Accessible
function Get_Next_Accessible_Sibling
(Self : not null access Gtk_Spinner_Record)
return Gtk.Accessible.Gtk_Accessible
function Get_Platform_State
(Self : not null access Gtk_Spinner_Record;
State : Gtk.Accessible.Gtk_Accessible_Platform_State) return Boolean
function Get_Spinning
(Self : not null access Gtk_Spinner_Record) return Boolean
Returns whether the spinner is spinning.
True if the spinner is active
function Get_Type return Glib.GType
procedure Gtk_New (Self : out Gtk_Spinner)
Returns a new spinner widget. Not yet started. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
type Gtk_Spinner is access all Gtk_Spinner_Record'Class;
function Gtk_Spinner_New return Gtk_Spinner
Returns a new spinner widget. Not yet started.
type Gtk_Spinner_Record is new Gtk_Widget_Record with null record;
package Implements_Gtk_Accessible is new Glib.Types.Implements
(Gtk.Accessible.Gtk_Accessible, Gtk_Spinner_Record, Gtk_Spinner);
package Implements_Gtk_Buildable is new Glib.Types.Implements
(Gtk.Buildable.Gtk_Buildable, Gtk_Spinner_Record, Gtk_Spinner);
package Implements_Gtk_Constraint_Target is new Glib.Types.Implements
(Gtk.Constraint_Target.Gtk_Constraint_Target, Gtk_Spinner_Record, Gtk_Spinner);
procedure Initialize (Self : not null access Gtk_Spinner_Record'Class)
Returns a new spinner widget. Not yet started. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
procedure Reset_Property
(Self : not null access Gtk_Spinner_Record;
Property : Gtk.Accessible.Gtk_Accessible_Property)
procedure Reset_Relation
(Self : not null access Gtk_Spinner_Record;
Relation : Gtk.Accessible.Gtk_Accessible_Relation)
procedure Reset_State
(Self : not null access Gtk_Spinner_Record;
State : Gtk.Accessible.Gtk_Accessible_State)
procedure Set_Accessible_Parent
(Self : not null access Gtk_Spinner_Record;
Parent : Gtk.Accessible.Gtk_Accessible;
Next_Sibling : Gtk.Accessible.Gtk_Accessible)
procedure Set_Spinning
(Self : not null access Gtk_Spinner_Record;
Spinning : Boolean)
Sets the activity of the spinner.
whether the spinner should be spinning
Spinning_Property : constant Glib.Properties.Property_Boolean;
Whether the spinner is spinning
procedure Start (Self : not null access Gtk_Spinner_Record)
Starts the animation of the spinner.
procedure Stop (Self : not null access Gtk_Spinner_Record)
Stops the animation of the spinner.
procedure Update_Next_Accessible_Sibling
(Self : not null access Gtk_Spinner_Record;
New_Sibling : Gtk.Accessible.Gtk_Accessible)
procedure Update_Platform_State
(Self : not null access Gtk_Spinner_Record;
State : Gtk.Accessible.Gtk_Accessible_Platform_State)