Gtk.IconView.prototype.get_item_at_pos

function get_item_at_pos(x:Number, y:Number):Boolean {
    // Gjs wrapper for gtk_icon_view_get_item_at_pos()
}

Finds the path at the point (x, y), relative to bin_window coordinates. In contrast to Gtk.get_path_at_pos, this function also obtains the cell at the specified position. The returned path should be freed with Gtk.free. See Gtk.IconView.prototype.convert_widget_to_bin_window_coords for converting widget coordinates to bin_window coordinates.

Since 2.8

x

The x position to be identified

y

The y position to be identified

Returns

true if an item exists at the specified position