2.19 <GtkSymbolicPaintable>

Interface: <GtkSymbolicPaintable>

An interface that supports symbolic colors in paintables.

<GdkPaintable>s implementing the interface will have the symbolic-paintable:do-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.

Procedures

Method: symbolic-paintable:snapshot-symbolic self snapshot width height colors
Method: snapshot-symbolic self snapshot width height colors

Snapshots the paintable with the given colors.

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

self

Passed: a <GtkSymbolicPaintable>.

a <GtkSymbolicPaintable>

snapshot

Passed: a <GdkSnapshot>.

a <GdkSnapshot> to snapshot to

width

Passed: a real number.

width to snapshot in

height

Passed: a real number.

height to snapshot in

colors

Passed: a list or vector, each a <GdkRGBA>.

a pointer to an array of colors

n-colors

Not passed: guile-gi gives the length of colors.

The number of colors

Method: symbolic-paintable:snapshot-with-weight self snapshot width height colors weight
Method: snapshot-with-weight self snapshot width height colors weight

Snapshots the paintable with the given colors and weight.

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

self

Passed: a <GtkSymbolicPaintable>.

a <GtkSymbolicPaintable>

snapshot

Passed: a <GdkSnapshot>.

a <GdkSnapshot> to snapshot to

width

Passed: a real number.

width to snapshot in

height

Passed: a real number.

height to snapshot in

colors

Passed: a list or vector, each a <GdkRGBA>.

a pointer to an array of colors

weight

Passed: a real number.

The font weight to use (from 1 to 1000, with default 400)

n-colors

Not passed: guile-gi gives the length of colors.

The number of colors

Virtual methods

Virtual method: symbolic-paintable:do-snapshot-symbolic implementor self snapshot width height colors

Snapshots the paintable with the given colors.

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

To override it in a new class, give register-type #:vfuncs `((snapshot-symbolic . ,procedure)). The procedure is called as (procedure self snapshot width height colors).

implementor

Passed: the class whose implementation to call: a class that implements <GtkSymbolicPaintable>, or its GType number.

self

Passed: a <GtkSymbolicPaintable>.

a <GtkSymbolicPaintable>

snapshot

Passed: a <GdkSnapshot>.

a <GdkSnapshot> to snapshot to

width

Passed: a real number.

width to snapshot in

height

Passed: a real number.

height to snapshot in

colors

Passed: a list or vector, each a <GdkRGBA>.

a pointer to an array of colors

n-colors

Not passed: guile-gi gives the length of colors.

The number of colors

Virtual method: symbolic-paintable:do-snapshot-with-weight implementor self snapshot width height colors weight

Snapshots the paintable with the given colors and weight.

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

To override it in a new class, give register-type #:vfuncs `((snapshot-with-weight . ,procedure)). The procedure is called as (procedure self snapshot width height colors weight).

implementor

Passed: the class whose implementation to call: a class that implements <GtkSymbolicPaintable>, or its GType number.

self

Passed: a <GtkSymbolicPaintable>.

a <GtkSymbolicPaintable>

snapshot

Passed: a <GdkSnapshot>.

a <GdkSnapshot> to snapshot to

width

Passed: a real number.

width to snapshot in

height

Passed: a real number.

height to snapshot in

colors

Passed: a list or vector, each a <GdkRGBA>.

a pointer to an array of colors

weight

Passed: a real number.

The font weight to use (from 1 to 1000, with default 400)

n-colors

Not passed: guile-gi gives the length of colors.

The number of colors