Class EnumClass

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.EnumClass
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class EnumClass extends ProxyInstance
The class of an enumeration type holds information about its possible values.
  • Constructor Details

    • EnumClass

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

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

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

      public EnumClass(TypeClass gTypeClass, int minimum, int maximum, int nValues, EnumValue[] values, Arena arena)
      Allocate a new EnumClass with the fields set to the provided values.
      Parameters:
      gTypeClass - value for the field gTypeClass
      minimum - value for the field minimum
      maximum - value for the field maximum
      nValues - value for the field nValues
      values - value for the field values
      arena - to control the memory allocation scope
    • EnumClass

      public EnumClass(TypeClass gTypeClass, int minimum, int maximum, int nValues, EnumValue[] values)
      Allocate a new EnumClass with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      gTypeClass - value for the field gTypeClass
      minimum - value for the field minimum
      maximum - value for the field maximum
      nValues - value for the field nValues
      values - value for the field values
  • Method Details

    • getMemoryLayout

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

      public @Nullable TypeClass readGTypeClass()
      Read the value of the field g_type_class.
      Returns:
      The value of the field g_type_class
    • writeGTypeClass

      public void writeGTypeClass(@Nullable TypeClass gTypeClass)
      Write a value in the field g_type_class.
      Parameters:
      gTypeClass - The new value for the field g_type_class
    • readMinimum

      public int readMinimum()
      Read the value of the field minimum.
      Returns:
      The value of the field minimum
    • writeMinimum

      public void writeMinimum(int minimum)
      Write a value in the field minimum.
      Parameters:
      minimum - The new value for the field minimum
    • readMaximum

      public int readMaximum()
      Read the value of the field maximum.
      Returns:
      The value of the field maximum
    • writeMaximum

      public void writeMaximum(int maximum)
      Write a value in the field maximum.
      Parameters:
      maximum - The new value for the field maximum
    • readNValues

      public int readNValues()
      Read the value of the field n_values.
      Returns:
      The value of the field n_values
    • writeNValues

      public void writeNValues(int nValues)
      Write a value in the field n_values.
      Parameters:
      nValues - The new value for the field n_values
    • readValues

      public @Nullable EnumValue @Nullable [] readValues()
      Read the value of the field values.
      Returns:
      The value of the field values
    • writeValues

      public void writeValues(@Nullable EnumValue @Nullable [] values, Arena _arena)
      Write a value in the field values.
      Parameters:
      values - The new value for the field values
      _arena - to control the memory allocation scope