Adw.SpinnerPaintable

g Adw.SpinnerPaintable Adw.SpinnerPaintable GObject.GInterface GObject.GInterface Gdk.Paintable Gdk.Paintable GObject.GInterface->Gdk.Paintable Gtk.SymbolicPaintable Gtk.SymbolicPaintable GObject.GInterface->Gtk.SymbolicPaintable GObject.Object GObject.Object GObject.Object->Adw.SpinnerPaintable Gdk.Paintable->Adw.SpinnerPaintable Gtk.SymbolicPaintable->Adw.SpinnerPaintable

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gdk.Paintable (10), Gtk.SymbolicPaintable (1)

Structs:

GObject.ObjectClass (5)

class

new (widget)

get_widget ()

set_widget (widget)

Virtual Methods

Inherited:

GObject.Object (7), Gdk.Paintable (6), Gtk.SymbolicPaintable (1)

Properties

Name

Type

Flags

Short Description

widget

Gtk.Widget

r/w/en

Signals

Inherited:

GObject.Object (1), Gdk.Paintable (2)

Fields

Inherited:

GObject.Object (1), Gdk.Paintable (2)

Class Details

class Adw.SpinnerPaintable(**kwargs)
Bases:

GObject.Object, Gdk.Paintable, Gtk.SymbolicPaintable

Abstract:

No

Structure:

Adw.SpinnerPaintableClass

A paintable showing a loading spinner.

<picture> <source srcset=”spinner-dark.png” media=”(prefers-color-scheme: dark)”> <img src=”spinner.png” alt=”spinner”> </picture>

AdwSpinnerPaintable size varies depending on the available space, but is capped at 64×64 pixels.

To be able to animate, AdwSpinnerPaintable needs a widget. It will be animated according to that widget’s frame clock, and only if that widget is mapped. Ideally it should be the same widget the paintable is displayed in, but that’s not a requirement.

Most applications should be using [class`Spinner`] instead. AdwSpinnerPaintable is provided for the cases where using a widget is impractical or impossible, such as [property`StatusPage`:py:data::paintable<Adw.SpinnerPaintable.props.paintable>]:

``xml <object class=”AdwStatusPage” id=”status_page”>

<property name=”paintable”>
<object class=”AdwSpinnerPaintable”>

<property name=”widget”>status_page</property>

</object>

</property> <!– … –>

</object> ``

New in version 1.6.

classmethod new(widget)
Parameters:

widget (Gtk.Widget or None) – the widget used for frame clock

Returns:

the newly created AdwSpinnerPaintable

Return type:

Adw.SpinnerPaintable

Creates a new AdwSpinnerPaintable for widget.

New in version 1.6.

get_widget()
Returns:

the widget

Return type:

Gtk.Widget or None

Gets the widget used for frame clock.

New in version 1.6.

set_widget(widget)
Parameters:

widget (Gtk.Widget or None) – the widget to use for frame clock

Sets the widget used for frame clock.

New in version 1.6.

Property Details

Adw.SpinnerPaintable.props.widget
Name:

widget

Type:

Gtk.Widget

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The widget the spinner uses for frame clock.

New in version 1.6.