gtkIMContextGetSurrounding       package:RGtk2       R Documentation

_g_t_k_I_M_C_o_n_t_e_x_t_G_e_t_S_u_r_r_o_u_n_d_i_n_g

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_U_s_a_g_e:

     gtkIMContextGetSurrounding(object)

_A_r_g_u_m_e_n_t_s:

'object': ['GtkIMContext']  a 'GtkIMContext'

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

     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': [character]  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': [integer]  location to store byte index of the
          insertion cursor within 'text'.

_A_u_t_h_o_r(_s):

     Derived by RGtkGen from GTK+ documentation

