Interface

Gtk-4.0GtkBuilderScopeInterface

Interface for implementing BuilderScope. Contains only the virtual methods that need to be implemented.

interface Interface {
    vfunc_create_closure(
        builder: Gtk.Builder,
        function_name: string,
        flags: SWAPPED,
        object: GObject.Object,
    ): Closure;
    vfunc_get_type_from_function(
        builder: Gtk.Builder,
        function_name: string,
    ): GType;
    vfunc_get_type_from_name(builder: Gtk.Builder, type_name: string): GType;
}

Hierarchy (View Summary)

Index

Methods

  • Create a closure with the given arguments. See gtk_builder_create_closure() for more details on those. The C implementation will try to use dlsym() to locate the function name and then g_cclosure_new() to create a closure for the symbol. The default implementation just fails and returns null.

    Parameters

    Returns Closure

  • Try to lookup a GObject.GType via the given function name, specified explicitly in a GtkBuilder file, like via the "type-func" attribute in the <object> tag. This function is very rarely used. The C implementation will use dlsym() and call the resulting function as a GTypeFunc. The default implementation will fail and just return G_TYPE_INVALID.

    Parameters

    Returns GType

  • Try to lookup a GObject.GType via the its name. See gtk_builder_get_type_from_name() for more details. The C implementation will use g_type_from_name() and if that fails try to guess the correct function name for registering the type and then use dlsym() to load it. The default implementation just tries g_type_from_name() and otherwise fails.

    Parameters

    Returns GType