Name Type Access Description
end_index int r/w end index of the range (in bytes). The character at this index is not included in the range.
klass Pango.AttrClass r/w the class structure holding information about the type of the attribute
start_index int r/w the start index of the range (in bytes).


  destroy ()
  equal (attr2)
  init (klass)


class Pango.Attribute

The Pango.Attribute structure represents the common portions of all attributes. Particular types of attributes include this structure as their initial portion. The common portion of the attribute holds the range to which the value in the type-specific part of the attribute applies and should be initialized using Pango.Attribute.init(). By default an attribute will have an all-inclusive range of [0,:obj:GObject.G_MAXUINT].


Destroy a Pango.Attribute and free all associated memory.

Parameters:attr2 (Pango.Attribute) – another Pango.Attribute
Returns:True if the two attributes have the same value.
Return type:bool

Compare two attributes for equality. This compares only the actual value of the two attributes and not the ranges that the attributes apply to.

Parameters:klass (Pango.AttrClass) – a Pango.AttrClass

Initializes self’s klass to klass, it’s start_index to Pango.ATTR_INDEX_FROM_TEXT_BEGINNING and end_index to %PANGO_ATTR_INDEX_TO_TEXT_END such that the attribute applies to the entire text by default.

New in version 1.20.