SymbolicColorProtocol
public protocol SymbolicColorProtocol
GtkSymbolicColor is a boxed type that represents a symbolic color.
It is the result of parsing a
color expression.
To obtain the color represented by a GtkSymbolicColor, it has to
be resolved with gtk_symbolic_color_resolve(), 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 GdkRGBA value.
It is not normally necessary to deal directly with GtkSymbolicColors,
since they are mostly used behind the scenes by GtkStyleContext and
GtkCssProvider.
GtkSymbolicColor is deprecated. Symbolic colors are considered an
implementation detail of GTK+.
The SymbolicColorProtocol protocol exposes the methods and properties of an underlying GtkSymbolicColor instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see SymbolicColor.
Alternatively, use SymbolicColorRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkSymbolicColorinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
symbolic_color_ptrDefault implementationTyped pointer to the underlying
GtkSymbolicColorinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkSymbolicColorinstance.Declaration
Swift
var symbolic_color_ptr: UnsafeMutablePointer<GtkSymbolicColor>! { get } -
Required Initialiser for types conforming to
SymbolicColorProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
ref()Extension methodIncreases the reference count of
colorref is deprecated:
GtkSymbolicColor is deprecated.
Declaration
Swift
@available(*, deprecated) @discardableResult @inlinable func ref() -> SymbolicColorRef! -
resolve(props:Extension methodresolvedColor: ) If
coloris resolvable,resolved_colorwill be filled in with the resolved color, andtruewill be returned. Generally, ifcolorcan’t be resolved, it is due to it being defined on top of a named color that doesn’t exist inprops.When
propsisnil, resolving of named colors will fail, so if yourcoloris or references such a color, this function will returnfalse.resolve is deprecated:
GtkSymbolicColor is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func resolve<RGBAT>(props: StylePropertiesRef? = nil, resolvedColor: RGBAT) -> Bool where RGBAT : RGBAProtocol -
resolve(props:Extension methodresolvedColor: ) If
coloris resolvable,resolved_colorwill be filled in with the resolved color, andtruewill be returned. Generally, ifcolorcan’t be resolved, it is due to it being defined on top of a named color that doesn’t exist inprops.When
propsisnil, resolving of named colors will fail, so if yourcoloris or references such a color, this function will returnfalse.resolve is deprecated:
GtkSymbolicColor is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func resolve<RGBAT, StylePropertiesT>(props: StylePropertiesT?, resolvedColor: RGBAT) -> Bool where RGBAT : RGBAProtocol, StylePropertiesT : StylePropertiesProtocol -
toString()Extension methodConverts the given
colorto 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.to_string is deprecated:
GtkSymbolicColor is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func toString() -> String! -
unref()Extension methodDecreases the reference count of
color, freeing its memory if the reference count reaches 0.unref is deprecated:
GtkSymbolicColor is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func unref()
View on GitHub
Install in Dash
SymbolicColorProtocol Protocol Reference