ThemingEngineProtocol
public protocol ThemingEngineProtocol : ObjectProtocol
GtkThemingEngine was the object used for rendering themed content
in GTK+ widgets. It used to allow overriding GTK+‘s default
implementation of rendering functions by allowing engines to be
loaded as modules.
GtkThemingEngine has been deprecated in GTK+ 3.14 and will be
ignored for rendering. The advancements in CSS theming are good
enough to allow themers to achieve their goals without the need
to modify source code.
The ThemingEngineProtocol protocol exposes the methods and properties of an underlying GtkThemingEngine 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 ThemingEngine.
Alternatively, use ThemingEngineRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkThemingEngineinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
theming_engine_ptrDefault implementationTyped pointer to the underlying
GtkThemingEngineinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkThemingEngineinstance.Declaration
Swift
var theming_engine_ptr: UnsafeMutablePointer<GtkThemingEngine>! { get } -
Required Initialiser for types conforming to
ThemingEngineProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
ThemingEnginePropertyNamesource property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: ThemingEnginePropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a ThemingEngine property
Declaration
Swift
@inlinable func get(property: ThemingEnginePropertyName) -> GLibObject.ValueParameters
propertythe property to get the value for
Return Value
the value of the named property
-
set(property:Extension methodvalue: ) Set the value of a ThemingEngine property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: ThemingEnginePropertyName, value v: GLibObject.Value)Parameters
propertythe property to get the value for
Return Value
the value of the named property
-
getBackgroundColor(state:Extension methodcolor: ) Gets the background color for a given state.
get_background_color is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func getBackgroundColor<RGBAT>(state: StateFlags, color: RGBAT) where RGBAT : RGBAProtocol -
getBorder(state:Extension methodborder: ) Gets the border for a given state as a
GtkBorder.get_border is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func getBorder<BorderT>(state: StateFlags, border: BorderT) where BorderT : BorderProtocol -
getBorderColor(state:Extension methodcolor: ) Gets the border color for a given state.
get_border_color is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func getBorderColor<RGBAT>(state: StateFlags, color: RGBAT) where RGBAT : RGBAProtocol -
getColor(state:Extension methodcolor: ) Gets the foreground color for a given state.
get_color is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func getColor<RGBAT>(state: StateFlags, color: RGBAT) where RGBAT : RGBAProtocol -
getDirection()Extension methodReturns the widget direction used for rendering.
get_direction is deprecated: Use gtk_theming_engine_get_state() and check for #GTK_STATE_FLAG_DIR_LTR and #GTK_STATE_FLAG_DIR_RTL instead.
Declaration
Swift
@available(*, deprecated) @inlinable func getDirection() -> GtkTextDirection -
getFont(state:Extension method) Returns the font description for a given state.
get_font is deprecated: Use gtk_theming_engine_get()
Declaration
Swift
@available(*, deprecated) @inlinable func getFont(state: StateFlags) -> Pango.FontDescriptionRef! -
getJunctionSides()Extension methodReturns the widget direction used for rendering.
get_junction_sides is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func getJunctionSides() -> JunctionSides -
getMargin(state:Extension methodmargin: ) Gets the margin for a given state as a
GtkBorder.get_margin is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func getMargin<BorderT>(state: StateFlags, margin: BorderT) where BorderT : BorderProtocol -
getPadding(state:Extension methodpadding: ) Gets the padding for a given state as a
GtkBorder.get_padding is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func getPadding<BorderT>(state: StateFlags, padding: BorderT) where BorderT : BorderProtocol -
getPath()Extension methodReturns the widget path used for style matching.
get_path is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func getPath() -> WidgetPathRef! -
get(property:Extension methodstate: value: ) Gets a property value as retrieved from the style settings that apply to the currently rendered element.
get_property is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func get<ValueT>(property: UnsafePointer<gchar>!, state: StateFlags, value: ValueT) where ValueT : ValueProtocol -
getScreen()Extension methodReturns the
GdkScreento whichenginecurrently rendering to.get_screen is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func getScreen() -> Gdk.ScreenRef! -
getState()Extension methodreturns the state used when rendering.
get_state is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func getState() -> StateFlags -
getStyleProperty(propertyName:Extension methodvalue: ) Gets the value for a widget style property.
get_style_property is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func getStyleProperty<ValueT>(propertyName: UnsafePointer<gchar>!, value: ValueT) where ValueT : ValueProtocol -
getStyleValist(args:Extension method) Retrieves several widget style properties from
engineaccording to the currently rendered content’s style.get_style_valist is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func getStyleValist(args: CVaListPointer) -
getValist(state:Extension methodargs: ) Retrieves several style property values that apply to the currently rendered element.
get_valist is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func getValist(state: StateFlags, args: CVaListPointer) -
hasClass(styleClass:Extension method) Returns
trueif the currently rendered contents have defined the given class name.has_class is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func hasClass(styleClass: UnsafePointer<gchar>!) -> Bool -
hasRegion(styleRegion:Extension methodflags: ) Returns
trueif the currently rendered contents have the region defined. Ifflags_returnis notnil, it is set to the flags affecting the region.has_region is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func hasRegion(styleRegion: UnsafePointer<gchar>!, flags: UnsafeMutablePointer<GtkRegionFlags>! = nil) -> Bool -
lookupColor(colorName:Extension methodcolor: ) Looks up and resolves a color name in the current style’s color map.
lookup_color is deprecated: This method is deprecated.
Declaration
Swift
@available(*, deprecated) @inlinable func lookupColor<RGBAT>(colorName: UnsafePointer<gchar>!, color: RGBAT) -> Bool where RGBAT : RGBAProtocol -
stateIsRunning(state:Extension methodprogress: ) Returns
trueif there is a transition animation running for the current region (seegtk_style_context_push_animatable_region()).If
progressis notnil, the animation progress will be returned there, 0.0 means the state is closest to beingfalse, while 1.0 means it’s closest to beingtrue. This means transition animations will run from 0 to 1 whenstateis being set totrueand from 1 to 0 when it’s being set tofalse.state_is_running is deprecated: Always returns %FALSE
Declaration
Swift
@available(*, deprecated) @inlinable func stateIsRunning(state: GtkStateType, progress: UnsafeMutablePointer<gdouble>!) -> Bool -
directionExtension methodReturns the widget direction used for rendering.
get_direction is deprecated: Use gtk_theming_engine_get_state() and check for #GTK_STATE_FLAG_DIR_LTR and #GTK_STATE_FLAG_DIR_RTL instead.
Declaration
Swift
@inlinable var direction: GtkTextDirection { get } -
junctionSidesExtension methodReturns the widget direction used for rendering.
get_junction_sides is deprecated: This method is deprecated.
Declaration
Swift
@inlinable var junctionSides: JunctionSides { get } -
pathExtension methodReturns the widget path used for style matching.
get_path is deprecated: This method is deprecated.
Declaration
Swift
@inlinable var path: WidgetPathRef! { get } -
screenExtension methodReturns the
GdkScreento whichenginecurrently rendering to.get_screen is deprecated: This method is deprecated.
Declaration
Swift
@inlinable var screen: Gdk.ScreenRef! { get } -
stateExtension methodreturns the state used when rendering.
get_state is deprecated: This method is deprecated.
Declaration
Swift
@inlinable var state: StateFlags { get } -
parentObjectExtension methodUndocumented
Declaration
Swift
@inlinable var parentObject: GObject { get }
View on GitHub
Install in Dash
ThemingEngineProtocol Protocol Reference