Gtk.IMContext.prototype.set_surrounding

function set_surrounding(text:String, len:Number, cursor_index:Number):void {
    // Gjs wrapper for gtk_im_context_set_surrounding()
}

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.

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

cursor_index

the byte index of the insertion cursor within text.