Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gtkIMContextGetSurrounding

gtkIMContextGetSurrounding


Description

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.

Usage

gtkIMContextGetSurrounding(object)

Arguments

object

a GtkIMContext

Details

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 gtkIMContextSetSurrounding. 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.

Value

A list containing the following elements:

retval

[logical] TRUE if surrounding text was provided; in this case you must free the result stored in *text.

text

location to store a UTF-8 encoded string of text holding context around the insertion point. If the function returns TRUE, then you must free the result stored in this location with gFree().

cursor.index

location to store byte index of the insertion cursor within text.

Author(s)

Derived by RGtkGen from GTK+ documentation


RGtk2

R Bindings for Gtk 2.8.0 and Above

v2.20.36
GPL
Authors
Michael Lawrence <michafla@gene.com> and Duncan Temple Lang <duncan@wald.ucdavis.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.