gi-gtk-3.0.41: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Structs.SymbolicColor

Description

GtkSymbolicColor is a boxed type that represents a symbolic color. It is the result of parsing a [color expression][gtkcssprovider-symbolic-colors]. To obtain the color represented by a GtkSymbolicColor, it has to be resolved with symbolicColorResolve, which replaces all symbolic color references by the colors they refer to (in a given context) and evaluates mix, shade and other expressions, resulting in a RGBA value.

It is not normally necessary to deal directly with GtkSymbolicColors, since they are mostly used behind the scenes by StyleContext and CssProvider.

SymbolicColor is deprecated. Symbolic colors are considered an implementation detail of GTK+.

Synopsis

Exported types

newtype SymbolicColor Source #

Memory-managed wrapper type.

Constructors

SymbolicColor (ManagedPtr SymbolicColor) 

Instances

Instances details
Eq SymbolicColor Source # 
Instance details

Defined in GI.Gtk.Structs.SymbolicColor

GBoxed SymbolicColor Source # 
Instance details

Defined in GI.Gtk.Structs.SymbolicColor

ManagedPtrNewtype SymbolicColor Source # 
Instance details

Defined in GI.Gtk.Structs.SymbolicColor

Methods

toManagedPtr :: SymbolicColor -> ManagedPtr SymbolicColor

TypedObject SymbolicColor Source # 
Instance details

Defined in GI.Gtk.Structs.SymbolicColor

Methods

glibType :: IO GType

HasParentTypes SymbolicColor Source # 
Instance details

Defined in GI.Gtk.Structs.SymbolicColor

IsGValue (Maybe SymbolicColor) Source #

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

Instance details

Defined in GI.Gtk.Structs.SymbolicColor

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe SymbolicColor -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe SymbolicColor)

type ParentTypes SymbolicColor Source # 
Instance details

Defined in GI.Gtk.Structs.SymbolicColor

type ParentTypes SymbolicColor = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

ref, resolve, toString, unref.

Getters

None.

Setters

None.

newAlpha

symbolicColorNewAlpha Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SymbolicColor

color: another SymbolicColor

-> Double

factor: factor to apply to color alpha

-> m SymbolicColor

Returns: A newly created SymbolicColor

Deprecated: (Since version 3.8)tSymbolicColor is deprecated.

Creates a symbolic color by modifying the relative alpha value of color. A factor < 1.0 would resolve to a more transparent color, while > 1.0 would resolve to a more opaque color.

Since: 3.0

newLiteral

symbolicColorNewLiteral Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> RGBA

color: a RGBA

-> m SymbolicColor

Returns: a newly created SymbolicColor

Deprecated: (Since version 3.8)tSymbolicColor is deprecated.

Creates a symbolic color pointing to a literal color.

Since: 3.0

newMix

symbolicColorNewMix Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SymbolicColor

color1: color to mix

-> SymbolicColor

color2: another color to mix

-> Double

factor: mix factor

-> m SymbolicColor

Returns: A newly created SymbolicColor

Deprecated: (Since version 3.8)tSymbolicColor is deprecated.

Creates a symbolic color defined as a mix of another two colors. a mix factor of 0 would resolve to color1, while a factor of 1 would resolve to color2.

Since: 3.0

newName

symbolicColorNewName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: color name

-> m SymbolicColor

Returns: a newly created SymbolicColor

Deprecated: (Since version 3.8)tSymbolicColor is deprecated.

Creates a symbolic color pointing to an unresolved named color. See styleContextLookupColor and stylePropertiesLookupColor.

Since: 3.0

newShade

symbolicColorNewShade Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SymbolicColor

color: another SymbolicColor

-> Double

factor: shading factor to apply to color

-> m SymbolicColor

Returns: A newly created SymbolicColor

Deprecated: (Since version 3.8)tSymbolicColor is deprecated.

Creates a symbolic color defined as a shade of another color. A factor > 1.0 would resolve to a brighter color, while < 1.0 would resolve to a darker color.

Since: 3.0

newWin32

symbolicColorNewWin32 Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

themeClass: The theme class to pull color from

-> Int32

id: The color id

-> m SymbolicColor

Returns: A newly created SymbolicColor

Deprecated: (Since version 3.8)tSymbolicColor is deprecated.

Creates a symbolic color based on the current win32 theme.

Note that while this call is available on all platforms the actual value returned is not reliable on non-win32 platforms.

Since: 3.4

ref

symbolicColorRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SymbolicColor

color: a SymbolicColor

-> m SymbolicColor

Returns: the same color

Deprecated: (Since version 3.8)tSymbolicColor is deprecated.

Increases the reference count of color

Since: 3.0

resolve

symbolicColorResolve Source #

Arguments

:: (HasCallStack, MonadIO m, IsStyleProperties a) 
=> SymbolicColor

color: a SymbolicColor

-> Maybe a

props: StyleProperties to use when resolving named colors, or Nothing

-> m (Bool, RGBA)

Returns: True if the color has been resolved

Deprecated: (Since version 3.8)tSymbolicColor is deprecated.

If color is resolvable, resolvedColor will be filled in with the resolved color, and True will be returned. Generally, if color can’t be resolved, it is due to it being defined on top of a named color that doesn’t exist in props.

When props is Nothing, resolving of named colors will fail, so if your color is or references such a color, this function will return False.

Since: 3.0

toString

symbolicColorToString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SymbolicColor

color: color to convert to a string

-> m Text

Returns: a new string representing color

Deprecated: (Since version 3.8)tSymbolicColor is deprecated.

Converts the given color to a string representation. This is useful both for debugging and for serialization of strings. The format of the string may change between different versions of GTK, but it is guaranteed that the GTK css parser is able to read the string and create the same symbolic color from it.

unref

symbolicColorUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> SymbolicColor

color: a SymbolicColor

-> m () 

Deprecated: (Since version 3.8)tSymbolicColor is deprecated.

Decreases the reference count of color, freeing its memory if the reference count reaches 0.

Since: 3.0