Provides language binding support to GtkBuilder.
The goal of GtkBuilderScope is to look up programming-language-specific values for strings that are given in a GtkBuilder UI file.
The primary intended audience is bindings that want to provide deeper integration of GtkBuilder into the language.
A GtkBuilderScope instance may be used with multiple GtkBuilder objects, even at once.
By default, GTK will use its own implementation of GtkBuilderScope for the C language which can be created via [ctorGtk.BuilderCScope.new].
If you implement GtkBuilderScope for a language binding, you may want to (partially) derive from or fall back to a [classGtk.BuilderCScope], as that class implements support for automatic lookups from C symbols.
function "+" (W : Gtk_Builder_Scope) return Gtk_Builder_Scope
subtype Builder_Scope_Interface_Descr is Glib.Object.Interface_Description;
function Get_Type return Glib.GType
type Gtk_Builder_Scope is new Glib.Types.GType_Interface;
Null_Gtk_Builder_Scope : constant Gtk_Builder_Scope;
procedure Set_Create_Closure
(Self : Builder_Scope_Interface_Descr;
Handler : Virtual_Create_Closure)
procedure Set_Get_Type_From_Function
(Self : Builder_Scope_Interface_Descr;
Handler : Virtual_Get_Type_From_Function)
procedure Set_Get_Type_From_Name
(Self : Builder_Scope_Interface_Descr;
Handler : Virtual_Get_Type_From_Name)
See Glib.Object.Add_Interface
type Virtual_Create_Closure is access function
(Self : Gtk_Builder_Scope;
Builder : System.Address;
Function_Name : Gtkada.Types.Chars_Ptr;
Flags : Gtk.Enums.Gtk_Builder_Closure_Flags;
Object : System.Address;
Error : out Glib.Error.GError) return System.Address;
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.
the return location for a recoverable error
type Virtual_Get_Type_From_Function is access function
(Self : Gtk_Builder_Scope;
Builder : System.Address;
Function_Name : Gtkada.Types.Chars_Ptr) return GType;
Try to lookup a 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.
type Virtual_Get_Type_From_Name is access function
(Self : Gtk_Builder_Scope;
Builder : System.Address;
Type_Name : Gtkada.Types.Chars_Ptr) return GType;
Try to lookup a 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.