StyleProviderProtocol
public protocol StyleProviderProtocol
GtkStyleProvider is an interface used to provide style information to a GtkStyleContext
.
See gtk_style_context_add_provider()
and gtk_style_context_add_provider_for_screen()
.
The StyleProviderProtocol
protocol exposes the methods and properties of an underlying GtkStyleProvider
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 StyleProvider
.
Alternatively, use StyleProviderRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkStyleProvider
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
style_provider_ptr
Default implementationTyped pointer to the underlying
GtkStyleProvider
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkStyleProvider
instance.Declaration
Swift
var style_provider_ptr: UnsafeMutablePointer<GtkStyleProvider>! { get }
-
Required Initialiser for types conforming to
StyleProviderProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
getIconFactory(path:
Extension method) Returns the
GtkIconFactory
defined to be in use forpath
, ornil
if none is defined.get_icon_factory is deprecated: Will always return %NULL for all GTK-provided style providers.
Declaration
Swift
@available(*, deprecated) @inlinable func getIconFactory<WidgetPathT>(path: WidgetPathT) -> IconFactoryRef! where WidgetPathT : WidgetPathProtocol
-
getStyle(path:
Extension method) Returns the style settings affecting a widget defined by
path
, ornil
ifprovider
doesn’t contemplate stylingpath
.get_style is deprecated: Will always return %NULL for all GTK-provided style providers as the interface cannot correctly work the way CSS is specified.
Declaration
Swift
@available(*, deprecated) @inlinable func getStyle<WidgetPathT>(path: WidgetPathT) -> StylePropertiesRef! where WidgetPathT : WidgetPathProtocol
-
getStyleProperty(path:
Extension methodstate: pspec: value: ) Looks up a widget style property as defined by
provider
for the widget represented bypath
.Declaration
Swift
@inlinable func getStyleProperty<ParamSpecT, ValueT, WidgetPathT>(path: WidgetPathT, state: StateFlags, pspec: ParamSpecT, value: ValueT) -> Bool where ParamSpecT : ParamSpecProtocol, ValueT : ValueProtocol, WidgetPathT : WidgetPathProtocol