ParamSpecRef

public struct ParamSpecRef : ParamSpecProtocol

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

GParamSpec is an object structure that encapsulates the metadata required to specify parameters, such as e.g. GObject properties.

Parameter names #

A property name consists of segments consisting of ASCII letters and digits, separated by either the - or _ character. The first character of a property name must be a letter. These are the same rules as for signal naming (see g_signal_new()).

When creating and looking up a GParamSpec, either separator can be used, but they cannot be mixed. Using - is considerably more efficient, and is the ‘canonical form’. Using _ is discouraged.

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

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

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer

ParamSpec Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

    init(_ p: UnsafeMutablePointer<GParamSpec>)
  • Reference intialiser for a related type that implements ParamSpecProtocol

    Declaration

    Swift

    init<T>(_ other: T) where T : ParamSpecProtocol
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to ParamSpecProtocol.

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    init(opaquePointer: OpaquePointer)
  • Creates a new `GParamSpec` instance.
    

    See canonical parameter names for details of the rules for name. Names which violate these rules lead to undefined behaviour.

    Beyond the name, GParamSpecs have two more descriptive strings associated with them, the nick, which should be suitable for use as a label for the property in a property editor, and the blurb, which should be a somewhat longer description, suitable for e.g. a tooltip. The nick and blurb should ideally be localized.

    Declaration

    Swift

    static func internal_(paramType param_type: GType, name: UnsafePointer<gchar>, nick: UnsafePointer<gchar>, blurb: UnsafePointer<gchar>, flags: ParamFlags) -> ParamSpecRef!
  • Create a parameter specification reference from a lookup table.

    Declaration

    Swift

    init?<P>(name: P, from pool: OpaquePointer!, ownerType: GType = .object, walkAncestors: Bool = true) where P : PropertyNameProtocol

    Parameters

    name

    property name to look up

    pool

    lookup table to consult

    ownerType

    type of the property owner (defaults to .object)

    walkAncestors

    false to avoid checking ancestors (defaults to true)