Gtk.SymbolicPaintable

g GObject.GInterface GObject.GInterface Gtk.SymbolicPaintable Gtk.SymbolicPaintable GObject.GInterface->Gtk.SymbolicPaintable

Implementations:

Gtk.IconPaintable

Methods

snapshot_symbolic (snapshot, width, height, colors)

Virtual Methods

do_snapshot_symbolic (snapshot, width, height, colors)

Properties

None

Signals

None

Fields

None

Class Details

class Gtk.SymbolicPaintable
Bases:

GObject.GInterface

Structure:

Gtk.SymbolicPaintableInterface

GtkSymbolicPaintable is an interface that support symbolic colors in paintables.

``GdkPaintable``s implementing the interface will have the [vfunc`Gtk`.SymbolicPaintable.snapshot_symbolic] function called and have the colors for drawing symbolic icons passed. At least 4 colors are guaranteed to be passed every time.

These 4 colors are the foreground color, and the colors to use for errors, warnings and success information in that order.

More colors may be added in the future.

New in version 4.6.

snapshot_symbolic(snapshot, width, height, colors)[source]
Parameters:
  • snapshot (Gdk.Snapshot) – a GdkSnapshot to snapshot to

  • width (float) – width to snapshot in

  • height (float) – height to snapshot in

  • colors ([Gdk.RGBA]) – a pointer to an array of colors

Snapshots the paintable with the given colors.

If less than 4 colors are provided, GTK will pad the array with default colors.

New in version 4.6.

do_snapshot_symbolic(snapshot, width, height, colors) virtual
Parameters:
  • snapshot (Gdk.Snapshot) – a GdkSnapshot to snapshot to

  • width (float) – width to snapshot in

  • height (float) – height to snapshot in

  • colors ([Gdk.RGBA]) – a pointer to an array of colors

Snapshots the paintable with the given colors.

If less than 4 colors are provided, GTK will pad the array with default colors.

New in version 4.6.