### Interface

# Gtk SymbolicPaintable

since: 4.6

#### Description [src]

    interface Gtk.SymbolicPaintable : Gdk.Paintable

An interface that supports symbolic colors in paintables.

`GdkPaintable`s implementing the interface will have the `Gtk.SymbolicPaintableInterface.snapshot_symbolic` function called and have the colors for drawing symbolic icons passed. At least 5 colors are guaranteed to be passed every time. These 5 colors are the foreground color, and the colors to use for errors, warnings and success information in that order, followed by the system accent color.

The system accent color has been added in GTK 4.22. More colors may be added in the future.

Available since: 4.6

#### Prerequisite

In order to implement SymbolicPaintable, your type must inherit from`GdkPaintable`.

#### Implementations

- GtkIconPaintable
- GtkSvg

#### Instance methods

###### gtk_symbolic_paintable_snapshot_symbolic

Snapshots the paintable with the given colors.

since: 4.6

###### gtk_symbolic_paintable_snapshot_with_weight

Snapshots the paintable with the given colors and weight.

since: 4.22

#### Interface structure

    struct GtkSymbolicPaintableInterface {
      void (* snapshot_symbolic) (
        GtkSymbolicPaintable* paintable,
        GdkSnapshot* snapshot,
        double width,
        double height,
        const GdkRGBA* colors,
        gsize n_colors
      );
      void (* snapshot_with_weight) (
        GtkSymbolicPaintable* paintable,
        GdkSnapshot* snapshot,
        double width,
        double height,
        const GdkRGBA* colors,
        gsize n_colors,
        double weight
      );

    }

The list of virtual functions for the `GtkSymbolicPaintable` interface. No function must be implemented, default implementations exist for each one.

###### Interface members

`snapshot_symbolic` |
    void (* snapshot_symbolic) (
        GtkSymbolicPaintable* paintable,
        GdkSnapshot* snapshot,
        double width,
        double height,
        const GdkRGBA* colors,
        gsize n_colors
      )
| Snapshot the paintable using the given colors. See `GtkSymbolicPaintable::snapshot_symbolic()` for details. If this function is not implemented, `Gdk.PaintableInterface.snapshot` will be called.
`snapshot_with_weight` |
    void (* snapshot_with_weight) (
        GtkSymbolicPaintable* paintable,
        GdkSnapshot* snapshot,
        double width,
        double height,
        const GdkRGBA* colors,
        gsize n_colors,
        double weight
      )
| Like `snapshot_symbolic`, but additionally takes a font weight argument. Since: 4.22.

#### Virtual methods

###### Gtk.SymbolicPaintable.snapshot_symbolic

Snapshots the paintable with the given colors.

since: 4.6

###### Gtk.SymbolicPaintable.snapshot_with_weight

Snapshots the paintable with the given colors and weight.

since: 4.22