BuildableProtocol

public protocol BuildableProtocol

GtkBuildable allows objects to extend and customize their deserialization from ui files.

The interface includes methods for setting names and properties of objects, parsing custom tags and constructing child objects.

The GtkBuildable interface is implemented by all widgets and many of the non-widget objects that are provided by GTK. The main user of this interface is [classGtk.Builder]. There should be very little need for applications to call any of these functions directly.

An object only needs to implement this interface if it needs to extend the GtkBuilder XML format or run any extra routines at deserialization time.

The BuildableProtocol protocol exposes the methods and properties of an underlying GtkBuildable 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 Buildable. Alternatively, use BuildableRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying GtkBuildable instance.

    Declaration

    Swift

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

    Typed pointer to the underlying GtkBuildable instance.

    Default Implementation

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

    Declaration

    Swift

    var buildable_ptr: UnsafeMutablePointer<GtkBuildable>! { get }
  • Required Initialiser for types conforming to BuildableProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

Buildable Interface: BuildableProtocol extension (methods and fields)

  • getBuildableId() Extension method

    Gets the ID of the buildable object.

    GtkBuilder sets the name based on the ID attribute of the <object> tag used to construct the buildable.

    Declaration

    Swift

    @inlinable
    func getBuildableId() -> String!
  • buildableId Extension method

    Gets the ID of the buildable object.

    GtkBuilder sets the name based on the ID attribute of the <object> tag used to construct the buildable.

    Declaration

    Swift

    @inlinable
    var buildableId: String! { get }