StylePropertiesProtocol
public protocol StylePropertiesProtocol : ObjectProtocol, StyleProviderProtocol
GtkStyleProperties provides the storage for style information
that is used by GtkStyleContext
and other GtkStyleProvider
implementations.
Before style properties can be stored in GtkStyleProperties, they
must be registered with gtk_style_properties_register_property()
.
Unless you are writing a GtkStyleProvider
implementation, you
are unlikely to use this API directly, as gtk_style_context_get()
and its variants are the preferred way to access styling information
from widget implementations and theming engine implementations
should use the APIs provided by GtkThemingEngine
instead.
GtkStyleProperties
has been deprecated in GTK 3.16. The CSS
machinery does not use it anymore and all users of this object
have been deprecated.
The StylePropertiesProtocol
protocol exposes the methods and properties of an underlying GtkStyleProperties
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 StyleProperties
.
Alternatively, use StylePropertiesRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkStyleProperties
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
style_properties_ptr
Default implementationTyped pointer to the underlying
GtkStyleProperties
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkStyleProperties
instance.Declaration
Swift
var style_properties_ptr: UnsafeMutablePointer<GtkStyleProperties>! { get }
-
Required Initialiser for types conforming to
StylePropertiesProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
clear()
Extension methodClears all style information from
props
.clear is deprecated:
GtkStyleProperties are deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func clear()
-
get(property:
Extension methodstate: value: ) Gets a style property from
props
for the given state. When done withvalue
,g_value_unset()
needs to be called to free any allocated memory.get_property is deprecated:
GtkStyleProperties are deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func get<ValueT>(property: UnsafePointer<gchar>!, state: StateFlags, value: ValueT) -> Bool where ValueT : ValueProtocol
-
getValist(state:
Extension methodargs: ) Retrieves several style property values from
props
for a given state.get_valist is deprecated:
GtkStyleProperties are deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func getValist(state: StateFlags, args: CVaListPointer)
-
lookupColor(name:
Extension method) Returns the symbolic color that is mapped to
name
.lookup_color is deprecated:
GtkSymbolicColor is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func lookupColor(name: UnsafePointer<gchar>!) -> SymbolicColorRef!
-
mapColor(name:
Extension methodcolor: ) Maps
color
so it can be referenced byname
. Seegtk_style_properties_lookup_color()
map_color is deprecated:
GtkSymbolicColor is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func mapColor<SymbolicColorT>(name: UnsafePointer<gchar>!, color: SymbolicColorT) where SymbolicColorT : SymbolicColorProtocol
-
merge(propsToMerge:
Extension methodreplace: ) Merges into
props
all the style information contained inprops_to_merge
. Ifreplace
istrue
, the values will be overwritten, if it isfalse
, the older values will prevail.merge is deprecated:
GtkStyleProperties are deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func merge<StylePropertiesT>(propsToMerge: StylePropertiesT, replace: Bool) where StylePropertiesT : StylePropertiesProtocol
-
set(property:
Extension methodstate: value: ) Sets a styling property in
props
.set_property is deprecated:
GtkStyleProperties are deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func set<ValueT>(property: UnsafePointer<gchar>!, state: StateFlags, value: ValueT) where ValueT : ValueProtocol
-
setValist(state:
Extension methodargs: ) Sets several style properties on
props
.set_valist is deprecated:
GtkStyleProperties are deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func setValist(state: StateFlags, args: CVaListPointer)
-
unset(property:
Extension methodstate: ) Unsets a style property in
props
.unset_property is deprecated:
GtkStyleProperties are deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func unset(property: UnsafePointer<gchar>!, state: StateFlags)