gi-gtk4-4.0.12: Gtk 4.x bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Interfaces.SymbolicPaintable

Description

An interface that supports symbolic colors in paintables.

GdkPaintables implementing the interface will have the 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.

Since: 4.6

Synopsis

Exported types

newtype SymbolicPaintable Source #

Memory-managed wrapper type.

Instances

Instances details
Eq SymbolicPaintable Source # 
Instance details

Defined in GI.Gtk.Interfaces.SymbolicPaintable

GObject SymbolicPaintable Source # 
Instance details

Defined in GI.Gtk.Interfaces.SymbolicPaintable

ManagedPtrNewtype SymbolicPaintable Source # 
Instance details

Defined in GI.Gtk.Interfaces.SymbolicPaintable

TypedObject SymbolicPaintable Source # 
Instance details

Defined in GI.Gtk.Interfaces.SymbolicPaintable

Methods

glibType :: IO GType #

HasParentTypes SymbolicPaintable Source # 
Instance details

Defined in GI.Gtk.Interfaces.SymbolicPaintable

IsGValue (Maybe SymbolicPaintable) Source #

Convert SymbolicPaintable to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Interfaces.SymbolicPaintable

Methods

gvalueGType_ :: IO GType #

gvalueSet_ :: Ptr GValue -> Maybe SymbolicPaintable -> IO () #

gvalueGet_ :: Ptr GValue -> IO (Maybe SymbolicPaintable) #

type ParentTypes SymbolicPaintable Source # 
Instance details

Defined in GI.Gtk.Interfaces.SymbolicPaintable

type ParentTypes SymbolicPaintable = '[Paintable, Object]

class (GObject o, IsDescendantOf SymbolicPaintable o) => IsSymbolicPaintable o Source #

Type class for types which can be safely cast to SymbolicPaintable, for instance with toSymbolicPaintable.

Instances

Instances details
(GObject o, IsDescendantOf SymbolicPaintable o) => IsSymbolicPaintable o Source # 
Instance details

Defined in GI.Gtk.Interfaces.SymbolicPaintable

toSymbolicPaintable :: (MonadIO m, IsSymbolicPaintable o) => o -> m SymbolicPaintable Source #

Cast to SymbolicPaintable, for types for which this is known to be safe. For general casts, use castTo.

Methods

snapshotSymbolic

symbolicPaintableSnapshotSymbolic Source #

Arguments

:: (HasCallStack, MonadIO m, IsSymbolicPaintable a, IsSnapshot b) 
=> a

paintable: a GtkSymbolicPaintable

-> b

snapshot: a GdkSnapshot to snapshot to

-> Double

width: width to snapshot in

-> Double

height: height to snapshot in

-> [RGBA]

colors: a pointer to an array of colors

-> m () 

Snapshots the paintable with the given colors.

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

Since: 4.6

snapshotWithWeight

symbolicPaintableSnapshotWithWeight Source #

Arguments

:: (HasCallStack, MonadIO m, IsSymbolicPaintable a, IsSnapshot b) 
=> a

paintable: a GtkSymbolicPaintable

-> b

snapshot: a GdkSnapshot to snapshot to

-> Double

width: width to snapshot in

-> Double

height: height to snapshot in

-> [RGBA]

colors: a pointer to an array of colors

-> Double

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

-> m () 

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: 4.22