Class AttrClass

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class AttrClass extends ProxyInstance

The PangoAttrClass structure stores the type and operations for a particular type of attribute.

The functions in this structure should not be called directly. Instead, one should use the wrapper functions provided for PangoAttribute.

  • Constructor Details

    • AttrClass

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

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

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

      public AttrClass(AttrType type, AttrClass.CopyCallback copy, AttrClass.DestroyCallback destroy, AttrClass.EqualCallback equal, Arena arena)
      Allocate a new AttrClass with the fields set to the provided values.
      Parameters:
      type - value for the field type
      copy - callback function for the field copy
      destroy - callback function for the field destroy
      equal - callback function for the field equal
      arena - to control the memory allocation scope
    • AttrClass

      public AttrClass(AttrType type, AttrClass.CopyCallback copy, AttrClass.DestroyCallback destroy, AttrClass.EqualCallback equal)
      Allocate a new AttrClass with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      type - value for the field type
      copy - callback function for the field copy
      destroy - callback function for the field destroy
      equal - callback function for the field equal
  • Method Details

    • getMemoryLayout

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

      public AttrType readType()
      Read the value of the field type.
      Returns:
      The value of the field type
    • writeType

      public void writeType(AttrType type)
      Write a value in the field type.
      Parameters:
      type - The new value for the field type
    • overrideCopy

      public void overrideCopy(AttrClass.CopyCallback copy, Arena _arena)
      Write a value in the field copy.
      Parameters:
      copy - The new value for the field copy
      _arena - to control the memory allocation scope
    • overrideDestroy

      public void overrideDestroy(AttrClass.DestroyCallback destroy, Arena _arena)
      Write a value in the field destroy.
      Parameters:
      destroy - The new value for the field destroy
      _arena - to control the memory allocation scope
    • overrideEqual

      public void overrideEqual(AttrClass.EqualCallback equal, Arena _arena)
      Write a value in the field equal.
      Parameters:
      equal - The new value for the field equal
      _arena - to control the memory allocation scope