StyleRef

public struct StyleRef : StyleProtocol, GWeakCapturing

A GtkStyle object encapsulates the information that provides the look and feel for a widget.

> In GTK+ 3.0, GtkStyle has been deprecated and replaced by > GtkStyleContext.

Each GtkWidget has an associated GtkStyle object that is used when rendering that widget. Also, a GtkStyle holds information for the five possible widget states though not every widget supports all five states; see GtkStateType.

Usually the GtkStyle for a widget is the same as the default style that is set by GTK+ and modified the theme engine.

Usually applications should not need to use or modify the GtkStyle of their widgets.

The StyleRef type acts as a lightweight Swift reference to an underlying GtkStyle instance. It exposes methods that can operate on this data type through StyleProtocol conformance. Use StyleRef only as an unowned reference to an existing GtkStyle instance.

  • ptr
    Untyped pointer to the underlying `GtkStyle` instance.
    

    For type-safe access, use the generated, typed pointer style_ptr property instead.

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

Style Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafeMutablePointer<GtkStyle>)
  • Designated initialiser from a constant pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafePointer<GtkStyle>)
  • Conditional initialiser from an optional pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafeMutablePointer<GtkStyle>?)
  • Conditional initialiser from an optional, non-mutable pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<GtkStyle>?)
  • Conditional initialiser from an optional gpointer

    Declaration

    Swift

    @inlinable
    init!(gpointer g: gpointer?)
  • Conditional initialiser from an optional, non-mutable gconstpointer

    Declaration

    Swift

    @inlinable
    init!(gconstpointer g: gconstpointer?)
  • Reference intialiser for a related type that implements StyleProtocol

    Declaration

    Swift

    @inlinable
    init<T>(_ other: T) where T : StyleProtocol
  • This factory is syntactic sugar for setting weak pointers wrapped in GWeak<T>

    Declaration

    Swift

    @inlinable
    static func unowned<T>(_ other: T) -> StyleRef where T : StyleProtocol
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to StyleProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(cPointer: UnsafeMutablePointer<T>)
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to StyleProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(constPointer: UnsafePointer<T>)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to StyleProtocol.

    Declaration

    Swift

    @inlinable
    init(mutating raw: UnsafeRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to StyleProtocol.

    Declaration

    Swift

    @inlinable
    init(raw: UnsafeMutableRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to StyleProtocol.

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Creates a new `GtkStyle`.
    

    new is deprecated: Use #GtkStyleContext

    Declaration

    Swift

    @available(*, deprecated)
    @inlinable
    init()