Entry.getIconAtPos

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 [signal@Gtk.Widget::query-tooltip] signal handler.

class Entry
int
getIconAtPos
(
int x
,
int y
)

Parameters

x int

the x coordinate of the position to find, relative to @entry

y int

the y coordinate of the position to find, relative to @entry

Return Value

Type: int

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

Meta