:right-sidebar: True Spinner =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: Spinner(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget` A ``GtkSpinner`` widget displays an icon-size spinning animation. It is often used as an alternative to a :obj:`~gi.repository.Gtk.ProgressBar` for displaying indefinite activity, instead of actual progress. .. image:: https://docs.gtk.org/gtk4/spinner.png To start the animation, use :obj:`~gi.repository.Gtk.Spinner.start`, to stop it use :obj:`~gi.repository.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. Constructors ------------ .. rst-class:: interim-class .. class:: Spinner :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Widget Returns a new spinner widget. Not yet started. Methods ------- .. rst-class:: interim-class .. class:: Spinner :no-index: .. method:: get_spinning() -> bool Returns whether the spinner is spinning. .. method:: set_spinning(spinning: bool) -> None Sets the activity of the spinner. :param spinning: whether the spinner should be spinning .. method:: start() -> None Starts the animation of the spinner. .. method:: stop() -> None Stops the animation of the spinner. Properties ---------- .. rst-class:: interim-class .. class:: Spinner :no-index: .. attribute:: props.spinning :type: bool Whether the spinner is spinning