Basics
Guides
API Reference
Basics
Guides
API Reference
[17:7] extends: object
The PangoAttribute 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 [method@Pango.Attribute.init]. By default, an attribute
will have an all-inclusive range of [0,%G_MAXUINT].
PangoAttribute (Handle = null)
Creates a new
Attributeby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.as_color ()
Returns the attribute cast to
PangoAttrColor. This is mainly useful for language bindings.
The attribute as PangoAttrColor, or %NULL if it's not a color attribute.as_float ()
Returns the attribute cast to
PangoAttrFloat. This is mainly useful for language bindings.
The attribute as PangoAttrFloat, or %NULL if it's not a floating point attribute.as_font_desc ()
Returns the attribute cast to
PangoAttrFontDesc. This is mainly useful for language bindings.
The attribute as PangoAttrFontDesc, or %NULL if it's not a font description attribute.as_font_features ()
Returns the attribute cast to
PangoAttrFontFeatures. This is mainly useful for language bindings.
The attribute as PangoAttrFontFeatures, or %NULL if it's not a font features attribute.as_int ()
Returns the attribute cast to
PangoAttrInt. This is mainly useful for language bindings.
The attribute as PangoAttrInt, or %NULL if it's not an integer attribute.as_language ()
Returns the attribute cast to
PangoAttrLanguage. This is mainly useful for language bindings.
The attribute as PangoAttrLanguage, or %NULL if it's not a language attribute.as_shape ()
Returns the attribute cast to
PangoAttrShape. This is mainly useful for language bindings.
The attribute as PangoAttrShape, or %NULL if it's not a shape attribute.as_size ()
Returns the attribute cast to
PangoAttrSize. This is mainly useful for language bindings.
The attribute as PangoAttrSize, or NULL if it's not a size attribute.as_string ()
Returns the attribute cast to
PangoAttrString. This is mainly useful for language bindings.
The attribute as PangoAttrString, or %NULL if it's not a string attribute.copy ()
Make a copy of an attribute.
the newly allocated PangoAttribute, which should be freed with [method@Pango.Attribute.destroy]..destroy ()
Destroy a
PangoAttributeand free all associated memory.
None.equal (object attr2)
Compare two attributes for equality. This compares only the actual value of the two attributes and not the ranges that the attributes apply to.
attr2 is another PangoAttribute.%TRUE if the two attributes have the same value.init (object klass)
Initializes @attr'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.
klass is a PangoAttrClass.None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.