An interface that supports symbolic colors in paintables.
GdkPaintables implementing the interface will have the [vfuncGtk.SymbolicPaintable.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.
function "+" (W : Gtk_Symbolic_Paintable) return Gtk_Symbolic_Paintable
function Get_Type return Glib.GType
type Gtk_Symbolic_Paintable is new Glib.Types.GType_Interface;
Null_Gtk_Symbolic_Paintable : constant Gtk_Symbolic_Paintable;
procedure Set_Snapshot_Symbolic
(Self : Symbolic_Paintable_Interface_Descr;
Handler : Virtual_Snapshot_Symbolic)
procedure Set_Snapshot_With_Weight
(Self : Symbolic_Paintable_Interface_Descr;
Handler : Virtual_Snapshot_With_Weight)
See Glib.Object.Add_Interface
procedure Snapshot_Symbolic
(Self : Gtk_Symbolic_Paintable;
Snapshot : not null access Gdk.Snapshot.Gdk_Snapshot_Record'Class;
Width : Gdouble;
Height : Gdouble;
Colors : array_of_Gdk_RGBA)
Snapshots the paintable with the given colors. If less than 5 colors are provided, GTK will pad the array with default colors. Since: gtk+ 4.6
a GdkSnapshot to snapshot to
width to snapshot in
height to snapshot in
a pointer to an array of colors
procedure Snapshot_With_Weight
(Self : Gtk_Symbolic_Paintable;
Snapshot : not null access Gdk.Snapshot.Gdk_Snapshot_Record'Class;
Width : Gdouble;
Height : Gdouble;
Colors : array_of_Gdk_RGBA;
Weight : Gdouble)
Snapshots the paintable with the given colors and weight. If less than 5 colors are provided, GTK will pad the array with default colors. Since: gtk+ 4.22
a GdkSnapshot to snapshot to
width to snapshot in
height to snapshot in
a pointer to an array of colors
The font weight to use (from 1 to 1000, with default 400)
subtype Symbolic_Paintable_Interface_Descr is Glib.Object.Interface_Description;
type Virtual_Snapshot_Symbolic is access procedure
(Self : Gtk_Symbolic_Paintable;
Snapshot : System.Address;
Width : Gdouble;
Height : Gdouble;
Colors : System.Address;
N_Colors : Gsize);
Snapshots the paintable with the given colors. If less than 5 colors are provided, GTK will pad the array with default colors. Since: gtk+ 4.6
a GdkSnapshot to snapshot to
width to snapshot in
height to snapshot in
a pointer to an array of colors
The number of colors
type Virtual_Snapshot_With_Weight is access procedure
(Self : Gtk_Symbolic_Paintable;
Snapshot : System.Address;
Width : Gdouble;
Height : Gdouble;
Colors : System.Address;
N_Colors : Gsize;
Weight : Gdouble);
Snapshots the paintable with the given colors and weight. If less than 5 colors are provided, GTK will pad the array with default colors. Since: gtk+ 4.22
a GdkSnapshot to snapshot to
width to snapshot in
height to snapshot in
a pointer to an array of colors
The number of colors
The font weight to use (from 1 to 1000, with default 400)