Gtk.UIManager.prototype.add_ui_from_string
function add_ui_from_string(buffer:String, length:gssize):Number {
// Gjs wrapper for gtk_ui_manager_add_ui_from_string()
}Parses a string containing a <link linkend="XML-UI">UI definition</link> and merges it with the current contents of manager. An enclosing <ui> element is added if it is missing.
Since 2.4
- buffer
the string to parse
- length
the length of buffer (may be -1 if buffer is nul-terminated)
- Returns
The merge id for the merged UI. The merge id can be used to unmerge the UI with Gtk.remove_ui. If an error occurred, the return value is 0.