| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte | 
|---|---|
| License | LGPL-2.1 | 
| Maintainer | Iñaki García Etxebarria | 
| Safe Haskell | None | 
| Language | Haskell2010 | 
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
- newtype SymbolicColor = SymbolicColor (ManagedPtr SymbolicColor)
 - symbolicColorNewAlpha :: (HasCallStack, MonadIO m) => SymbolicColor -> Double -> m SymbolicColor
 - symbolicColorNewLiteral :: (HasCallStack, MonadIO m) => RGBA -> m SymbolicColor
 - symbolicColorNewMix :: (HasCallStack, MonadIO m) => SymbolicColor -> SymbolicColor -> Double -> m SymbolicColor
 - symbolicColorNewName :: (HasCallStack, MonadIO m) => Text -> m SymbolicColor
 - symbolicColorNewShade :: (HasCallStack, MonadIO m) => SymbolicColor -> Double -> m SymbolicColor
 - symbolicColorNewWin32 :: (HasCallStack, MonadIO m) => Text -> Int32 -> m SymbolicColor
 - symbolicColorRef :: (HasCallStack, MonadIO m) => SymbolicColor -> m SymbolicColor
 - symbolicColorResolve :: (HasCallStack, MonadIO m, IsStyleProperties a) => SymbolicColor -> Maybe a -> m (Bool, RGBA)
 - symbolicColorToString :: (HasCallStack, MonadIO m) => SymbolicColor -> m Text
 - symbolicColorUnref :: (HasCallStack, MonadIO m) => SymbolicColor -> m ()
 
Exported types
newtype SymbolicColor Source #
Memory-managed wrapper type.
Constructors
| SymbolicColor (ManagedPtr SymbolicColor) | 
Instances
| Eq SymbolicColor Source # | |
Defined in GI.Gtk.Structs.SymbolicColor Methods (==) :: SymbolicColor -> SymbolicColor -> Bool # (/=) :: SymbolicColor -> SymbolicColor -> Bool #  | |
| IsGValue SymbolicColor Source # | Convert   | 
Defined in GI.Gtk.Structs.SymbolicColor  | |
| BoxedObject SymbolicColor Source # | |
Defined in GI.Gtk.Structs.SymbolicColor Methods boxedType :: SymbolicColor -> IO GType #  | |
Methods
Overloaded methods
newAlpha
symbolicColorNewAlpha Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => SymbolicColor | 
  | 
| -> Double | 
  | 
| -> m SymbolicColor | Returns: A newly created   | 
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 | 
  | 
| -> m SymbolicColor | Returns: a newly created   | 
Deprecated: (Since version 3.8)tSymbolicColor is deprecated.
Creates a symbolic color pointing to a literal color.
Since: 3.0
newMix
Arguments
| :: (HasCallStack, MonadIO m) | |
| => SymbolicColor | 
  | 
| -> SymbolicColor | 
  | 
| -> Double | 
  | 
| -> m SymbolicColor | Returns: A newly created   | 
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
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Text | 
  | 
| -> m SymbolicColor | Returns: a newly created   | 
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 | 
  | 
| -> Double | 
  | 
| -> m SymbolicColor | Returns: A newly created   | 
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 | 
  | 
| -> Int32 | 
  | 
| -> m SymbolicColor | Returns: A newly created   | 
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
Arguments
| :: (HasCallStack, MonadIO m) | |
| => SymbolicColor | 
  | 
| -> m SymbolicColor | Returns: the same   | 
Deprecated: (Since version 3.8)tSymbolicColor is deprecated.
Increases the reference count of color
Since: 3.0
resolve
Arguments
| :: (HasCallStack, MonadIO m, IsStyleProperties a) | |
| => SymbolicColor | 
  | 
| -> Maybe a | 
  | 
| -> m (Bool, RGBA) | Returns:   | 
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 | 
  | 
| -> m Text | Returns: a new string representing   | 
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
Arguments
| :: (HasCallStack, MonadIO m) | |
| => 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