TextView.getIterAtLocation

Retrieves the iterator at buffer coordinates @x and @y.

Buffer coordinates are coordinates for the entire buffer, not just the currently-displayed portion. If you have coordinates from an event, you have to convert those to buffer coordinates with [method@Gtk.TextView.window_to_buffer_coords].

class TextView
bool
getIterAtLocation
(,
int x
,
int y
)

Parameters

iter TextIter

a GtkTextIter

x int

x position, in buffer coordinates

y int

y position, in buffer coordinates

Return Value

Type: bool

%TRUE if the position is over text

Meta