Top | ![]() |
![]() |
![]() |
![]() |
IBusAttribute * | ibus_attribute_new () |
guint | ibus_attribute_get_attr_type () |
guint | ibus_attribute_get_value () |
guint | ibus_attribute_get_start_index () |
guint | ibus_attribute_get_end_index () |
IBusAttribute * | ibus_attr_underline_new () |
IBusAttribute * | ibus_attr_foreground_new () |
IBusAttribute * | ibus_attr_background_new () |
GEnum ├── IBusAttrType ╰── IBusAttrUnderline GObject ╰── GInitiallyUnowned ╰── IBusObject ╰── IBusSerializable ╰── IBusAttribute
An IBusAttribute represents an attribute that associate to IBusText. It decorates preedit buffer and auxiliary text with underline, foreground and background colors.
IBusAttribute * ibus_attribute_new (guint type
,guint value
,guint start_index
,guint end_index
);
Creates a new IBusAttribute.
guint
ibus_attribute_get_attr_type (IBusAttribute *attr
);
Gets an enum of IBusAttrType.
guint
ibus_attribute_get_value (IBusAttribute *attr
);
Gets an unsigned int value relative with IBusAttrType.
If the type is IBUS_ATTR_TYPE_UNDERLINE
, the return value is
IBusAttrUnderline. If the type is IBUS_ATTR_TYPE_FOREGROUND
,
the return value is the color RGB.
guint
ibus_attribute_get_start_index (IBusAttribute *attr
);
Gets a start unsigned index
guint
ibus_attribute_get_end_index (IBusAttribute *attr
);
Gets an end unsigned index
IBusAttribute * ibus_attr_underline_new (guint underline_type
,guint start_index
,guint end_index
);
Creates a new underline IBusAttribute.
IBusAttribute * ibus_attr_foreground_new (guint color
,guint start_index
,guint end_index
);
Creates a new foreground IBusAttribute.
IBusAttribute * ibus_attr_background_new (guint color
,guint start_index
,guint end_index
);
Creates a new background IBusAttribute.
Type of Pre-edit style as the semantic name. The Wayland specs prefers to express the semantic values rather than RGB values and text-input protocol version 1 defines some values: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/unstable/text-input/text-input-unstable-v1.xml?ref_type=headsL251
IBus compiled the values for major input method engines: https://github.com/ibus/ibus/wiki/Wayland-Colors
Default style for composing text. |
||
Style should be the same as in non-composing text. |
||
Most language engines wish to draw underline in the typed whole preedit string except for the prediction string. (Chinese, Japanese, Typing-booster) |
||
Modifying an active segment is distinguished against whole the preedit text. (Hangul, Japanese) |
||
A prediction string can be appended after the typed string. (Typing-booster) |
||
A prefix string can be an informative color. (Table) |
||
A suffix string can be an informative color. (Table) |
||
An detected typo could be an error color with a spelling check or the word could not be found in a dictionary. The underline color also might be more visible. (Typing-booster, Table) |
||
A wrong compose key could be an error color. (Typing-booster) |
Since: 1.5.29
Stability Level: Unstable