Virtual Method
Gtk.IMContext.get_surrounding_with_selection
Declaration [src]
gboolean
get_surrounding_with_selection (
  GtkIMContext* context,
  char** text,
  int* cursor_index,
  int* anchor_index
)
Description [src]
Retrieves context around the insertion point.
Input methods typically want context in order to constrain input text based on existing text; this is important for languages such as Thai where only some sequences of characters are allowed.
This function is implemented by emitting the
GtkIMContext::retrieve-surrounding signal on the input method;
in response to this signal, a widget should provide as much context as
is available, up to an entire paragraph, by calling
gtk_im_context_set_surrounding_with_selection().
Note that there is no obligation for a widget to respond to the
::retrieve-surrounding signal, so input methods must be prepared to
function without context.
Parameters
| text | char** | 
| location to store a UTF-8 encoded
  string of text holding context around the insertion point.
  If the function returns  | |
| Direction: out | |
| Ownership of the data is transferred to the callee | |
| The string is a NUL terminated UTF-8 string | |
| cursor_index | int* | 
| location to store byte index of the insertion
  cursor within  | |
| Direction: out | |
| Ownership of the data is transferred to the callee | |
| anchor_index | int* | 
| location to store byte index of the selection
  bound within  | |
| Direction: out | |
| Ownership of the data is transferred to the callee |