Gtk.Builder.prototype.add_objects_from_file

function add_objects_from_file(filename:String, object_ids:[String]):Number {
    // Gjs wrapper for gtk_builder_add_objects_from_file()
}

Parses a file containing a <link linkend="BUILDER-UI">GtkBuilder UI definition</link> building only the requested objects and merges them with the current contents of builder.

Upon errors 0 will be returned and @error will be assigned a GLib.Error from the #GTK_BUILDER_ERROR, #G_MARKUP_ERROR or #G_FILE_ERROR domain.

<note><para> If you are adding an object that depends on an object that is not its child (for instance a Gtk.TreeView that depends on its Gtk.TreeModel), you have to explicitely list all of them in object_ids. </para></note>

Since 2.14

filename

the name of the file to parse

object_ids

nul-terminated array of objects to build

Returns

A positive value on success, 0 if an error occurred