Class AttrSize

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class AttrSize extends ProxyInstance
The PangoAttrSize structure is used to represent attributes which set font size.
  • Constructor Details

    • AttrSize

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

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

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

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

      public AttrSize(Attribute attr, int size)
      Allocate a new AttrSize with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      attr - value for the field attr
      size - value for the field size
  • 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
    • readSize

      public int readSize()
      Read the value of the field size.
      Returns:
      The value of the field size
    • writeSize

      public void writeSize(int size)
      Write a value in the field size.
      Parameters:
      size - The new value for the field size
    • new_

      public static Attribute new_(int size)
      Create a new font-size attribute in fractional points.
      Parameters:
      size - the font size, in PANGO_SCALE-ths of a point
      Returns:
      the newly allocated PangoAttribute, which should be freed with Attribute.destroy()
    • newAbsolute

      public static Attribute newAbsolute(int size)
      Create a new font-size attribute in device units.
      Parameters:
      size - the font size, in PANGO_SCALE-ths of a device unit
      Returns:
      the newly allocated PangoAttribute, which should be freed with Attribute.destroy()
      Since:
      1.8