Gtk.Toolbar.prototype.get_item_index

function get_item_index(item:Gtk.ToolItem):Number {
    // Gjs wrapper for gtk_toolbar_get_item_index()
}

Returns the position of item on the toolbar, starting from 0. It is an error if item is not a child of the toolbar.

Since 2.4

item

a Gtk.ToolItem that is a child of toolbar

Returns

the position of item on the toolbar.