IBus.Attribute

g GObject.InitiallyUnowned GObject.InitiallyUnowned IBus.Object IBus.Object GObject.InitiallyUnowned->IBus.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned IBus.Attribute IBus.Attribute IBus.Serializable IBus.Serializable IBus.Object->IBus.Serializable IBus.Serializable->IBus.Attribute

Subclasses:None

Methods

Inherited:IBus.Serializable (7), IBus.Object (2), GObject.Object (37)
Structs:GObject.ObjectClass (5)
class new (type, value, start_index, end_index)
  get_attr_type ()
  get_end_index ()
  get_start_index ()
  get_value ()

Properties

None

Fields

Inherited:IBus.Object (1), GObject.Object (1)
Name Type Access Description
end_index int r The ending index, exclusive.
parent IBus.Serializable r  
start_index int r The starting index, inclusive.
type int r IBusAttributeType
value int r Value for the type.

Class Details

class IBus.Attribute(**kwargs)
Bases:IBus.Serializable
Abstract:No
Structure:IBus.AttributeClass

An IBus.Attribute represents an attribute that associate to IBus.Text. It decorates preedit buffer and auxiliary text with underline, foreground and background colors.

classmethod new(type, value, start_index, end_index)
Parameters:
  • type (int) – Type of the attribute.
  • value (int) – Value of the attribute.
  • start_index (int) – Where attribute starts.
  • end_index (int) – Where attribute ends.
Returns:

A newly allocated IBus.Attribute.

Return type:

IBus.Attribute

Creates a new IBus.Attribute.

get_attr_type()
Returns:An enum of IBus.AttrType.
Return type:int

Gets an enum of IBus.AttrType.

get_end_index()
Returns:A end unsigned index
Return type:int

Gets an end unsigned index

get_start_index()
Returns:A start unsigned index
Return type:int

Gets a start unsigned index

get_value()
Returns:An unsigned int value relative with IBus.AttrType.
Return type:int

Gets an unsigned int value relative with IBus.AttrType. If the type is IBus.AttrType.UNDERLINE, the return value is IBus.AttrUnderline. If the type is IBus.AttrType.FOREGROUND, the return value is the color RGB.