Class AttrFontDesc

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.pango.AttrFontDesc
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class AttrFontDesc extends ProxyInstance
The PangoAttrFontDesc structure is used to store an attribute that sets all aspects of the font description at once.
  • Constructor Details

    • AttrFontDesc

      public AttrFontDesc(MemorySegment address)
      Create a AttrFontDesc proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • AttrFontDesc

      public AttrFontDesc(Arena arena)
      Allocate a new AttrFontDesc.
      Parameters:
      arena - to control the memory allocation scope
    • AttrFontDesc

      public AttrFontDesc()
      Allocate a new AttrFontDesc. The memory is allocated with Arena.ofAuto().
    • AttrFontDesc

      public AttrFontDesc(Attribute attr, FontDescription desc, Arena arena)
      Allocate a new AttrFontDesc with the fields set to the provided values.
      Parameters:
      attr - value for the field attr
      desc - value for the field desc
      arena - to control the memory allocation scope
    • AttrFontDesc

      public AttrFontDesc(Attribute attr, FontDescription desc)
      Allocate a new AttrFontDesc with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      attr - value for the field attr
      desc - value for the field desc
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readAttr

      public @Nullable Attribute readAttr()
      Read the value of the field attr.
      Returns:
      The value of the field attr
    • writeAttr

      public void writeAttr(@Nullable Attribute attr)
      Write a value in the field attr.
      Parameters:
      attr - The new value for the field attr
    • readDesc

      public FontDescription readDesc()
      Read the value of the field desc.
      Returns:
      The value of the field desc
    • writeDesc

      public void writeDesc(FontDescription desc)
      Write a value in the field desc.
      Parameters:
      desc - The new value for the field desc
    • new_

      public static Attribute new_(FontDescription desc)

      Create a new font description attribute.

      This attribute allows setting family, style, weight, variant, stretch, and size simultaneously.

      Parameters:
      desc - the font description
      Returns:
      the newly allocated PangoAttribute, which should be freed with Attribute.destroy()