Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: PangoAttribute

[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].

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • PangoAttribute (Handle = null)

    Creates a new Attribute by wrapping a native handle or another wrapper.

    • @p 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 exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • as_color ()

    Returns the attribute cast to PangoAttrColor. This is mainly useful for language bindings.

    • @r 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.

    • @r 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.

    • @r 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.

    • @r 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.

    • @r 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.

    • @r 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.

    • @r 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.

    • @r 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.

    • @r The attribute as PangoAttrString, or %NULL if it's not a string attribute.
  • copy ()

    Make a copy of an attribute.

    • @r the newly allocated PangoAttribute, which should be freed with [method@Pango.Attribute.destroy]..
  • destroy ()

    Destroy a PangoAttribute and free all associated memory.

    • @r 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.

    • @p attr2 is another PangoAttribute.
    • @r %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.

    • @p klass is a PangoAttrClass.
    • @r None.