Gtk.Builder.prototype.add_objects_from_resource

function add_objects_from_resource(resource_path:String, object_ids:[String]):Number {
    // Gjs wrapper for gtk_builder_add_objects_from_resource()
}

Parses a resource 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_RESOURCE_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 3.4

resource_path

the path of the resource file to parse

object_ids

nul-terminated array of objects to build

Returns

A positive value on success, 0 if an error occurred