Method

GtkTextViewget_cursor_locations

Declaration [src]

void
gtk_text_view_get_cursor_locations (
  GtkTextView* text_view,
  const GtkTextIter* iter,
  GdkRectangle* strong,
  GdkRectangle* weak
)

Description [src]

Determine the positions of the strong and weak cursors if the insertion point is at iter.

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 gtk_text_view_buffer_to_window_coords() to convert these coordinates to coordinates for one of the windows in the text view.

Parameters

iter

Type: GtkTextIter

A GtkTextIter

The argument can be NULL.
The data is owned by the caller of the method.
strong

Type: GdkRectangle

Location to store the strong cursor position.

The argument will be set by the function.
The argument can be NULL.
The returned data is owned by the instance.
weak

Type: GdkRectangle

Location to store the weak cursor position.

The argument will be set by the function.
The argument can be NULL.
The returned data is owned by the instance.