Gtk.Toolbar.prototype.get_drop_index

function get_drop_index(x:Number, y:Number):Number {
    // Gjs wrapper for gtk_toolbar_get_drop_index()
}

Returns the position corresponding to the indicated point on toolbar. This is useful when dragging items to the toolbar: this function returns the position a new item should be inserted.

x and y are in toolbar coordinates.

Since 2.4

x

x coordinate of a point on the toolbar

y

y coordinate of a point on the toolbar

Returns

The position corresponding to the point (x, y) on the toolbar.