get_cursor_locations


Description:

[ Version ( since = "3.0" ) ]
public void get_cursor_locations (TextIter? iter, out Rectangle strong, out Rectangle @weak)

Given an iter within a text layout, determine the positions of the strong and weak cursors if the insertion point is at that iterator.

The position of each cursor is stored as a zero-width rectangle. The strong cursor location is the location where characters of the directionality equal to the base direction of the paragraph are inserted. The weak cursor location is the location where characters of the directionality opposite to the base direction of the paragraph are inserted.

If iter is null, the actual cursor position is used.

Note that if iter happens to be the actual cursor position, and there is currently an IM preedit sequence being entered, the returned locations will be adjusted to account for the preedit cursor’s offset within the preedit sequence.

The rectangle position is in buffer coordinates; use buffer_to_window_coords to convert these coordinates to coordinates for one of the windows in the text view.

Parameters:

this

a TextView

iter

a TextIter

strong

location to store the strong cursor position (may be null)

weak

location to store the weak cursor position (may be null)