| Top |
| IBusText * | ibus_text_new_from_string () |
| IBusText * | ibus_text_new_from_ucs4 () |
| IBusText * | ibus_text_new_from_static_string () |
| IBusText * | ibus_text_new_from_printf () |
| IBusText * | ibus_text_new_from_unichar () |
| void | ibus_text_append_attribute () |
| guint | ibus_text_get_length () |
| gboolean | ibus_text_get_is_static () |
| const gchar * | ibus_text_get_text () |
| IBusAttrList * | ibus_text_get_attributes () |
| void | ibus_text_set_attributes () |
An IBusText is the main text object in IBus. The text is decorated according to associated IBusAttribute, e.g. the foreground/background color, underline, and applied scope.
see_also: IBusAttribute
IBusText *
ibus_text_new_from_string (const gchar *str);
Creates a new IBusText from a string.
str
will be duplicated in IBusText, so feel free to free str
after this
function.
IBusText *
ibus_text_new_from_ucs4 (const gunichar *str);
Creates a new IBusText from an UCS-4 encoded string.
str
will be duplicated in IBusText, so feel free to free str
after this
function.
IBusText *
ibus_text_new_from_static_string (const gchar *str);
Creates a new IBusText from a static string.
Since str
is a static string which won't be freed.
This function will NOT duplicate str
.
[skip]
IBusText * ibus_text_new_from_printf (const gchar *fmt,...);
Creates a new IBusText from a printf expression.
The result of printf expression is stored in the new IBusText instance.
IBusText *
ibus_text_new_from_unichar (gunichar c);
Creates a new IBusText from a single UCS4-encoded character.
void ibus_text_append_attribute (IBusText *text,guint type,guint value,guint start_index,gint end_index);
Append an IBusAttribute for IBusText.
guint
ibus_text_get_length (IBusText *text);
Return number of characters in an IBusText.
This function is based on g_utf8_strlen(), so unlike strlen(),
it does not count by bytes but characters instead.
gboolean
ibus_text_get_is_static (IBusText *text);
Return the is_static in an IBusText.
[skip]
const gchar *
ibus_text_get_text (IBusText *text);
Return the text in an IBusText. Should not be freed.
IBusAttrList *
ibus_text_get_attributes (IBusText *text);
Return the attributes in an IBusText. Should not be freed.
struct IBusText {
gboolean is_static;
gchar *text;
IBusAttrList *attrs;
};
A text object in IBus.
Whether |
||
The string content of IBusText in UTF-8. |
||
IBusAttrList * |
Associated IBusAttributes. |