GDK Reference Manual |
A set of bit-flags used to specify the input method styles which are supported or which are currently in use. The flags can be divided into 2 groups, the pre-edit flags and the status flags.
The pre-edit flags specify how pre-editing data is displayed. For example, this could display the text being typed in the phonetic alphabet before it is composed and inserted as an ideograph.
The status flags specify how status information is displayed. The status information can be thought of as an extension of the standard keyboard mode indicators, such as the Caps Lock indicator.
Note: The GDK_IM_PREEDIT_CALLBACKS and GDK_IM_STATUS_CALLBACKS styles are not currently supported in GTK+.
GDK_IM_PREEDIT_AREA The application provides the input method with an area in which to perform off-the-spot pre-editing.
GDK_IM_PREEDIT_CALLBACKS The application registers a number of callback functions which are used to display pre-editing data.
GDK_IM_PREEDIT_POSITION The application provides the input method with the position of the insertion cursor, for over-the-spot pre-editing. The input method creates its own window over the widget to display the pre-editing data.
GDK_IM_PREEDIT_NOTHING The input method uses the root X window to perform pre-editing, so the application does not need to do anything.
GDK_IM_PREEDIT_NONE No pre-editing is done by the input method, or no pre-editing data needs to be displayed.
GDK_IM_PREEDIT_MASK A bit-mask containing all the pre-edit flags.
GDK_IM_STATUS_AREA The application provides the input method with an area in which to display status information.
GDK_IM_STATUS_CALLBACKS The applications registers a number of callback functions which are used to display status information.
GDK_IM_STATUS_NOTHING The input method uses the root X window to display status information, so the application does not need to do anything.
GDK_IM_STATUS_NONE The input method does not display status information.
GDK_IM_STATUS_MASK A bit-mask containing all the status flags.
|
Checks if an input method is to be used for the current locale. If GTK+ has been compiled without support for input methods, or the current locale doesn't need an input method, then this will return FALSE.
Returns : TRUE if an input method is available and should be used.
|
Decides which input method style should be used, by comparing the styles given in supported_style with those of the available input method.
supported_style : styles which are supported by the widget.
Returns : the best style in supported_style that is also supported by the available input method.
|
Sets the best pre-edit and/or status style which should be used. This will affect the style chosen in gdk_im_decide_style().
The order of the pre-edit styles is (from worst to best): GDK_IM_PREEDIT_NONE, GDK_IM_PREEDIT_NOTHING, GDK_IM_PREEDIT_AREA, GDK_IM_PREEDIT_POSITION, GDK_IM_PREEDIT_CALLBACKS. The order of the status styles is: GDK_IM_STATUS_NONE, GDK_IM_STATUS_NOTHING, GDK_IM_STATUS_AREA, GDK_IM_STATUS_CALLBACKS.
So, for example, to set the best allowed pre-edit style to GDK_IM_PREEDIT_AREA you would do this:
|
Or to set the best allowed pre-edit style to GDK_IM_PREEDIT_POSITION and the best allowed status style to GDK_IM_STATUS_NOTHING you can do this:
|
best_allowed_style : a bit-mask with the best pre-edit style and/or the best status style to use. If 0 is used, then the current bit-mask of all allowed styles is returned.