StyleProviderProtocol
public protocol StyleProviderProtocol
GtkStyleProvider is an interface for style information used by
GtkStyleContext.
See [methodGtk.StyleContext.add_provider] and
[funcGtk.StyleContext.add_provider_for_display] for
adding GtkStyleProviders.
GTK uses the GtkStyleProvider implementation for CSS in
[ifaceGtk.CssProvider].
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
GtkStyleProviderinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
style_provider_ptrDefault implementationTyped pointer to the underlying
GtkStyleProviderinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkStyleProviderinstance.Declaration
Swift
var style_provider_ptr: UnsafeMutablePointer<GtkStyleProvider>! { get } -
Required Initialiser for types conforming to
StyleProviderProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
connect(signal:Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
StyleProviderSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: StyleProviderSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatahandlerThe Swift signal handler (function or callback) to invoke on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
connect(signal:Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
StyleProviderSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: StyleProviderSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatasignalHandlerThe C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onGtkPrivateChanged(flags:Extension methodhandler: ) Note
This represents the underlyinggtk-private-changedsignalDeclaration
Swift
@discardableResult @inlinable func onGtkPrivateChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: StyleProviderRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
gtkPrivateChangedsignal is emitted -
gtkPrivateChangedSignalExtension methodTyped
gtk-private-changedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var gtkPrivateChangedSignal: StyleProviderSignalName { get }
View on GitHub
Install in Dash
StyleProviderProtocol Protocol Reference