Gtk.Entry.prototype.get_icon_at_pos

function get_icon_at_pos(x:Number, y:Number):Number {
    // Gjs wrapper for gtk_entry_get_icon_at_pos()
}

Finds the icon at the given position and return its index. The position's coordinates are relative to the entry's top left corner. If x, y doesn't lie inside an icon, -1 is returned. This function is intended for use in a Gtk.query-tooltip signal handler.

Since 2.16

x

the x coordinate of the position to find

y

the y coordinate of the position to find

Returns

the index of the icon at the given position, or -1