![]() |
![]() |
![]() |
IBus Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#define IBUS_TYPE_ATTR_LIST #define IBUS_ATTR_LIST (obj) #define IBUS_ATTR_LIST_CLASS (klass) #define IBUS_IS_ATTR_LIST (obj) #define IBUS_IS_ATTR_LIST_CLASS (klass) #define IBUS_ATTR_LIST_GET_CLASS (obj) enum IBusAttrType; enum IBusAttrUnderline; IBusAttribute; IBusAttributeClass; IBusAttrList; IBusAttrListClass; 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
); GType ibus_attr_list_get_type (); IBusAttrList * ibus_attr_list_new (); void ibus_attr_list_append (IBusAttrList *attr_list
,IBusAttribute *attr
); IBusAttribute * ibus_attr_list_get (IBusAttrList *attr_list
,guint index
);
GObject +----GInitiallyUnowned +----IBusObject +----IBusSerializable +----IBusAttribute
GObject +----GInitiallyUnowned +----IBusObject +----IBusSerializable +----IBusAttrList
An IBusAttribute represents an attribute that associate to IBusText. It decorates preedit buffer and auxiliary text with underline, foreground and background colors.
#define IBUS_ATTR_LIST(obj)
Casts an IBUS_ATTR_LIST or derived pointer into a (IBusAttrList*) pointer. Depending on the current debugging level, this function may invoke certain runtime checks to identify invalid casts.
|
An object which is subject to casting. |
#define IBUS_ATTR_LIST_CLASS(klass)
Casts a derived IBusAttrListClass structure into a IBusAttrListClass structure.
|
A class to be casted. |
#define IBUS_IS_ATTR_LIST(obj)
Checks whether a valid GTypeInstance pointer is of type IBUS_ATTR_LIST.
|
Instance to check for being a IBUS_ATTR_LIST. |
#define IBUS_IS_ATTR_LIST_CLASS(klass)
Checks whether class "is a" valid IBusAttrListClass structure of type IBUS_ATTR_LIST or derived.
|
A class to be checked. |
#define IBUS_ATTR_LIST_GET_CLASS(obj)
Get the class of a given object and cast the class to IBusAttrListClass.
|
An object. |
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.
typedef struct { GArray *attributes; } IBusAttrList;
Array of IBusAttribute.
GArray * |
GArray that holds IBusAttribute. |
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. |
GType ibus_attr_list_get_type ();
Returns GType of IBusAttrList.
Returns : |
GType of IBusAttrList. |
IBusAttrList * ibus_attr_list_new ();
New an IBusAttrList.
Returns : |
A newly allocated IBusAttrList. |
void ibus_attr_list_append (IBusAttrList *attr_list
,IBusAttribute *attr
);
Append an IBusAttribute to IBusAttrList, and increase reference.
|
An IBusAttrList instance. |
|
The IBusAttribute instance to be appended. |
IBusAttribute * ibus_attr_list_get (IBusAttrList *attr_list
,guint index
);
Returns IBusAttribute at given index. Borrowed reference.
|
An IBusAttrList instance. |
|
Index of the attr_list .
|
Returns : |
IBusAttribute at given index, NULL if no such IBusAttribute. |