Virtual Method

GtkIMContextset_surrounding_with_selection

since: 4.2

Declaration [src]

void
set_surrounding_with_selection (
  GtkIMContext* context,
  const char* text,
  int len,
  int cursor_index,
  int anchor_index
)

Description [src]

Sets surrounding context around the insertion point and preedit string. This function is expected to be called in response to the GtkIMContext::retrieve-surrounding signal, and will likely have no effect if called at other times.

Available since: 4.2

Parameters

text

Type: const char*

Text surrounding the insertion point, as UTF-8. the preedit string should not be included within text.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
len

Type: int

The length of text, or -1 if text is nul-terminated.

cursor_index

Type: int

The byte index of the insertion cursor within text.

anchor_index

Type: int

The byte index of the selection bound within text.