| IBus Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
enum IBusAttrType; enum IBusAttrUnderline; IBusAttribute; IBusAttribute * ibus_attribute_new (guint type,guint value,guint start_index,guint end_index); IBusAttribute * ibus_attr_underline_new (guint underline_type,guint start_index,guint end_index); IBusAttribute * ibus_attr_foreground_new (guint color,guint start_index,guint end_index); IBusAttribute * ibus_attr_background_new (guint color,guint start_index,guint end_index);
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.
typedef enum {
IBUS_ATTR_TYPE_UNDERLINE = 1,
IBUS_ATTR_TYPE_FOREGROUND = 2,
IBUS_ATTR_TYPE_BACKGROUND = 3,
} IBusAttrType;
Type enumeration of IBusText attribute.
typedef enum {
IBUS_ATTR_UNDERLINE_NONE = 0,
IBUS_ATTR_UNDERLINE_SINGLE = 1,
IBUS_ATTR_UNDERLINE_DOUBLE = 2,
IBUS_ATTR_UNDERLINE_LOW = 3,
IBUS_ATTR_UNDERLINE_ERROR = 4,
} IBusAttrUnderline;
Type of IBusText attribute.
typedef struct {
guint type;
guint value;
guint start_index;
guint end_index;
} IBusAttribute;
Signify the type, value and scope of the attribute.
The scope starts from start_index till the end_index-1.
IBusAttribute * ibus_attribute_new (guint type,guint value,guint start_index,guint end_index);
New an IBusAttribute.
|
Type of the attribute. |
|
Value of the attribute. |
|
Where attribute starts. |
|
Where attribute ends. |
Returns : |
A newly allocated IBusAttribute. |
IBusAttribute * ibus_attr_underline_new (guint underline_type,guint start_index,guint end_index);
New an underline IBusAttribute.
|
Type of underline. |
|
Where attribute starts. |
|
Where attribute ends. |
Returns : |
A newly allocated IBusAttribute. |
IBusAttribute * ibus_attr_foreground_new (guint color,guint start_index,guint end_index);
New an foreground IBusAttribute.
|
Color in RGB. |
|
Where attribute starts. |
|
Where attribute ends. |
Returns : |
A newly allocated IBusAttribute. |
IBusAttribute * ibus_attr_background_new (guint color,guint start_index,guint end_index);
New an background IBusAttribute.
|
Color in RGB. |
|
Where attribute starts. |
|
Where attribute ends. |
Returns : |
A newly allocated IBusAttribute. |