Superclass: g-object
i-m-context defines the interface for GTK+ input methods. An input method is used by GTK+ text input widgets like entry to map from key events to Unicode character strings.
The user may change the current input method via a context menu, unless the settings-gtk-show-input-method-menu property is set to FALSE. The default input method can be set programmatically via the settings-gtk-im-module property. Alternatively, you may set the GTK_IM_MODULE environment variable as documented in gtk-running.
The entry-im-module and text-view-im-module properties may also be used to set input methods for specific widget instances. For instance, a certain entry widget might be expected to contain certain characters which would be easier to input with a certain input method.
An input method may consume multiple key events in sequence and finally output the composed result. This is called preediting, and an input method may provide feedback about this process by displaying the intermediate composition states as preedit text. For instance, the default GTK+ input method implements the input of arbitrary Unicode code points by holding down the Control and Shift keys and then typing "U" followed by the hexadecimal digits of the code point. When releasing the Control and Shift keys, preediting ends and the character is inserted as text. Ctrl+Shift+u20AC for example results in the € sign.
Slots:
Signals:
string
) => void. Options: run-last.
The signal is emitted when a complete input sequence has been entered by the user. This can be a single character immediately after a key press or the final result of preediting.
integer
), (n-chars integer
) => boolean
. Options: run-last.
The signal is emitted when the input method needs to delete all or part of the context surrounding the cursor.
The signal is emitted whenever the preedit sequence currently being entered has changed. It is also emitted at the end of a preedit sequence, in which case gtk_im_context_get_preedit_string() returns the empty string.
The signal is emitted when a preediting sequence has been completed or canceled.
The signal is emitted when a new preediting sequence starts.
boolean
. Options: run-last.
The signal is emitted when the input method requires the context surrounding the cursor. The callback should set the input method surrounding context by calling the gtk_im_context_set_surrounding() method.