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.

  • ptr

    Untyped pointer to the underlying GtkThemingEngine instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • theming_engine_ptr Default implementation

    Typed pointer to the underlying GtkThemingEngine instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GtkThemingEngine instance.

    Declaration

    Swift

    var theming_engine_ptr: UnsafeMutablePointer<GtkThemingEngine>! { get }
  • Required Initialiser for types conforming to ThemingEngineProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

ThemingEngine Class

  • Bind a ThemingEnginePropertyName source 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 : ObjectProtocol

    Parameters

    source_property

    the source property to bind

    target

    the target object to bind to

    target_property

    the target property to bind to

    flags

    the flags to pass to the Binding

    transform_from

    ValueTransformer to use for forward transformation

    transform_to

    ValueTransformer to use for backwards transformation

    Return Value

    binding reference or nil in case of an error

  • get(property:) Extension method

    Get the value of a ThemingEngine property

    Declaration

    Swift

    @inlinable
    func get(property: ThemingEnginePropertyName) -> GLibObject.Value

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

  • set(property:value:) Extension method

    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

    property

    the property to get the value for

    Return Value

    the value of the named property

ThemingEngine Class: ThemingEngineProtocol extension (methods and fields)

  • 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:border:) Extension method

    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:color:) Extension method

    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:color:) Extension method

    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 method

    Returns 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 method

    Returns 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:margin:) Extension method

    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:padding:) Extension method

    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 method

    Returns 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:state:value:) Extension method

    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 method

    Returns the GdkScreen to which engine currently rendering to.

    get_screen is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getScreen() -> Gdk.ScreenRef!
  • getState() Extension method

    returns the state used when rendering.

    get_state is deprecated: This method is deprecated.

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func getState() -> StateFlags
  • 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 engine according 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:args:) Extension method

    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 true if 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
  • Returns true if the currently rendered contents have the region defined. If flags_return is not nil, 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
  • 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
  • Returns true if there is a transition animation running for the current region (see gtk_style_context_push_animatable_region()).

    If progress is not nil, the animation progress will be returned there, 0.0 means the state is closest to being false, while 1.0 means it’s closest to being true. This means transition animations will run from 0 to 1 when state is being set to true and from 1 to 0 when it’s being set to false.

    state_is_running is deprecated: Always returns %FALSE

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    func stateIsRunning(state: GtkStateType, progress: UnsafeMutablePointer<gdouble>!) -> Bool
  • direction Extension method

    Returns 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 }
  • junctionSides Extension method

    Returns the widget direction used for rendering.

    get_junction_sides is deprecated: This method is deprecated.

    Declaration

    Swift

    @inlinable
    var junctionSides: JunctionSides { get }
  • path Extension method

    Returns the widget path used for style matching.

    get_path is deprecated: This method is deprecated.

    Declaration

    Swift

    @inlinable
    var path: WidgetPathRef! { get }
  • screen Extension method

    Returns the GdkScreen to which engine currently rendering to.

    get_screen is deprecated: This method is deprecated.

    Declaration

    Swift

    @inlinable
    var screen: Gdk.ScreenRef! { get }
  • state Extension method

    returns the state used when rendering.

    get_state is deprecated: This method is deprecated.

    Declaration

    Swift

    @inlinable
    var state: StateFlags { get }
  • parentObject Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var parentObject: GObject { get }