Interface SymbolicPaintable
- All Known Implementing Classes:
IconPaintable, SpinnerPaintable, Svg, SymbolicPaintable.SymbolicPaintable$Impl
An interface that supports symbolic colors in paintables.
GdkPaintables implementing the interface will have the
snapshotSymbolic(Snapshot, double, double, RGBA[]) 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.
- Since:
- 4.6
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThe SymbolicPaintable$Impl type represents a native instance of the SymbolicPaintable interface.static classThe list of virtual functions for theGtkSymbolicPaintableinterface.Nested classes/interfaces inherited from interface Paintable
Paintable.InvalidateContentsCallback, Paintable.InvalidateSizeCallback, Paintable.Paintable$Impl, Paintable.PaintableInterface -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable TypegetType()Get the GType of the SymbolicPaintable class.default voidsnapshotSymbolic(Snapshot snapshot, double width, double height, @Nullable RGBA @Nullable [] colors) Snapshots the paintable with the given colors.default voidsnapshotWithWeight(Snapshot snapshot, double width, double height, @Nullable RGBA @Nullable [] colors, double weight) Snapshots the paintable with the given colors and weight.Methods inherited from interface Paintable
computeConcreteSize, emitInvalidateContents, emitInvalidateSize, getCurrentImage, getFlags, getIntrinsicAspectRatio, getIntrinsicHeight, getIntrinsicWidth, invalidateContents, invalidateSize, onInvalidateContents, onInvalidateSize, snapshot
-
Method Details
-
getType
-
snapshotSymbolic
default void snapshotSymbolic(Snapshot snapshot, double width, double height, @Nullable RGBA @Nullable [] colors) Snapshots the paintable with the given colors.
If less than 5 colors are provided, GTK will pad the array with default colors.
- Parameters:
snapshot- aGdkSnapshotto snapshot towidth- width to snapshot inheight- height to snapshot incolors- a pointer to an array of colors- Since:
- 4.6
-
snapshotWithWeight
default void snapshotWithWeight(Snapshot snapshot, double width, double height, @Nullable RGBA @Nullable [] colors, double 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.
- Parameters:
snapshot- aGdkSnapshotto snapshot towidth- width to snapshot inheight- height to snapshot incolors- a pointer to an array of colorsweight- The font weight to use (from 1 to 1000, with default 400)- Since:
- 4.22
-