IBus.Text¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
attrs |
r |
Associated IBusAttributes. |
|
is_static |
r |
Whether text is static, i.e., no need and will not be freed. Only |
|
parent |
r |
||
text |
r |
The string content of |
Class Details¶
- class IBus.Text(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An
IBus.Textis the main text object in IBus. The text is decorated according to associatedIBus.Attribute, e.g. the foreground/background color, underline, and applied scope.see_also:
IBus.Attribute- classmethod new_from_string(str)¶
- Parameters:
str (
str) – An text string to be set.- Returns:
A newly allocated
IBus.Text.- Return type:
Creates a new
IBus.Textfrom a string. str will be duplicated inIBus.Text, so feel free to free str after this function.
- classmethod new_from_ucs4(str)¶
- Parameters:
str (
str) – An text string to be set.- Returns:
A newly allocated
IBus.Text.- Return type:
Creates a new
IBus.Textfrom an UCS-4 encoded string. str will be duplicated inIBus.Text, so feel free to free str after this function.
- classmethod new_from_unichar(c)¶
- Parameters:
c (
str) – A single UCS4-encoded character.- Returns:
A newly allocated
IBus.Text.- Return type:
Creates a new
IBus.Textfrom a single UCS4-encoded character.
- append_attribute(type, value, start_index, end_index)¶
- Parameters:
Append an
IBus.AttributeforIBus.Text.
- get_attributes()¶
- Returns:
the attrs in self.
- Return type:
Return the attributes in an
IBus.Text. Should not be freed.
- get_length()¶
- Returns:
Number of character in self, not counted by bytes.
- Return type:
Return number of characters in an
IBus.Text. This function is based onGLib.utf8_strlen(), so unlike strlen(), it does not count by bytes but characters instead.
- get_text()¶
- Returns:
the text in self.
- Return type:
Return the text in an
IBus.Text. Should not be freed.
- set_attributes(attrs)¶
- Parameters:
attrs (
IBus.AttrList) – AnIBus.AttrList