setSurroundingWithSelection

open fun setSurroundingWithSelection(text: String, len: Int, cursorIndex: Int, anchorIndex: Int)

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

Since

4.2

Parameters

text

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

len

the length of @text, or -1 if @text is nul-terminated

cursorIndex

the byte index of the insertion cursor within @text

anchorIndex

the byte index of the selection bound within @text