BuilderCScopeProtocol

public protocol BuilderCScopeProtocol : ObjectProtocol, BuilderScopeProtocol

A GtkBuilderScope implementation for the C language.

GtkBuilderCScope instances use symbols explicitly added to builder with prior calls to [methodGtk.BuilderCScope.add_callback_symbol]. If developers want to do that, they are encouraged to create their own scopes for that purpose.

In the case that symbols are not explicitly added; GTK will uses GModule’s introspective features (by opening the module nil) to look at the application’s symbol table. From here it tries to match the signal function names given in the interface description with symbols in the application.

Note that unless [methodGtk.BuilderCScope.add_callback_symbol] is called for all signal callbacks which are referenced by the loaded XML, this functionality will require that GModule be supported on the platform.

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

  • ptr

    Untyped pointer to the underlying GtkBuilderCScope instance.

    Declaration

    Swift

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

    Typed pointer to the underlying GtkBuilderCScope instance.

    Default Implementation

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

    Declaration

    Swift

    var builder_cscope_ptr: UnsafeMutablePointer<GtkBuilderCScope>! { get }
  • Required Initialiser for types conforming to BuilderCScopeProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

BuilderCScope Class: BuilderCScopeProtocol extension (methods and fields)

  • Adds the callback_symbol to the scope of builder under the given callback_name.

    Using this function overrides the behavior of [methodGtk.Builder.create_closure] for any callback symbols that are added. Using this method allows for better encapsulation as it does not require that callback symbols be declared in the global namespace.

    Declaration

    Swift

    @inlinable
    func addCallbackSymbol(callbackName: UnsafePointer<CChar>!, callbackSymbol: GCallback?)
  • Fetches a symbol previously added with gtk_builder_cscope_add_callback_symbol().

    Declaration

    Swift

    @inlinable
    func lookupCallbackSymbol(callbackName: UnsafePointer<CChar>!) -> GCallback!
  • parentInstance Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var parentInstance: GObject { get }