Class ParamSpecTypeInfo

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

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

This structure is used to provide the type system with the information required to initialize and destruct (finalize) a parameter's class and instances thereof.

The initialized structure is passed to the g_param_type_register_static() The type system will perform a deep copy of this structure, so its memory does not need to be persistent across invocation of g_param_type_register_static().

  • Constructor Details

    • ParamSpecTypeInfo

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

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

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

      public ParamSpecTypeInfo(short instanceSize, short nPreallocs, ParamSpecTypeInfo.InstanceInitCallback instanceInit, Type valueType, ParamSpecTypeInfo.FinalizeCallback finalize_, ParamSpecTypeInfo.ValueSetDefaultCallback valueSetDefault, ParamSpecTypeInfo.ValueValidateCallback valueValidate, ParamSpecTypeInfo.ValuesCmpCallback valuesCmp, Arena arena)
      Allocate a new ParamSpecTypeInfo with the fields set to the provided values.
      Parameters:
      instanceSize - value for the field instanceSize
      nPreallocs - value for the field nPreallocs
      instanceInit - callback function for the field instanceInit
      valueType - value for the field valueType
      finalize_ - callback function for the field finalize_
      valueSetDefault - callback function for the field valueSetDefault
      valueValidate - callback function for the field valueValidate
      valuesCmp - callback function for the field valuesCmp
      arena - to control the memory allocation scope
    • ParamSpecTypeInfo

      public ParamSpecTypeInfo(short instanceSize, short nPreallocs, ParamSpecTypeInfo.InstanceInitCallback instanceInit, Type valueType, ParamSpecTypeInfo.FinalizeCallback finalize_, ParamSpecTypeInfo.ValueSetDefaultCallback valueSetDefault, ParamSpecTypeInfo.ValueValidateCallback valueValidate, ParamSpecTypeInfo.ValuesCmpCallback valuesCmp)
      Allocate a new ParamSpecTypeInfo with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      instanceSize - value for the field instanceSize
      nPreallocs - value for the field nPreallocs
      instanceInit - callback function for the field instanceInit
      valueType - value for the field valueType
      finalize_ - callback function for the field finalize_
      valueSetDefault - callback function for the field valueSetDefault
      valueValidate - callback function for the field valueValidate
      valuesCmp - callback function for the field valuesCmp
  • Method Details

    • getMemoryLayout

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

      public short readInstanceSize()
      Read the value of the field instance_size.
      Returns:
      The value of the field instance_size
    • writeInstanceSize

      public void writeInstanceSize(short instanceSize)
      Write a value in the field instance_size.
      Parameters:
      instanceSize - The new value for the field instance_size
    • readNPreallocs

      public short readNPreallocs()
      Read the value of the field n_preallocs.
      Returns:
      The value of the field n_preallocs
    • writeNPreallocs

      public void writeNPreallocs(short nPreallocs)
      Write a value in the field n_preallocs.
      Parameters:
      nPreallocs - The new value for the field n_preallocs
    • overrideInstanceInit

      public void overrideInstanceInit(ParamSpecTypeInfo.InstanceInitCallback instanceInit, Arena _arena)
      Write a value in the field instance_init.
      Parameters:
      instanceInit - The new value for the field instance_init
      _arena - to control the memory allocation scope
    • readValueType

      public Type readValueType()
      Read the value of the field value_type.
      Returns:
      The value of the field value_type
    • writeValueType

      public void writeValueType(Type valueType)
      Write a value in the field value_type.
      Parameters:
      valueType - The new value for the field value_type
    • overrideFinalize

      public void overrideFinalize(ParamSpecTypeInfo.FinalizeCallback finalize_, Arena _arena)
      Write a value in the field finalize.
      Parameters:
      finalize_ - The new value for the field finalize
      _arena - to control the memory allocation scope
    • overrideValueSetDefault

      public void overrideValueSetDefault(ParamSpecTypeInfo.ValueSetDefaultCallback valueSetDefault, Arena _arena)
      Write a value in the field value_set_default.
      Parameters:
      valueSetDefault - The new value for the field value_set_default
      _arena - to control the memory allocation scope
    • overrideValueValidate

      public void overrideValueValidate(ParamSpecTypeInfo.ValueValidateCallback valueValidate, Arena _arena)
      Write a value in the field value_validate.
      Parameters:
      valueValidate - The new value for the field value_validate
      _arena - to control the memory allocation scope
    • overrideValuesCmp

      public void overrideValuesCmp(ParamSpecTypeInfo.ValuesCmpCallback valuesCmp, Arena _arena)
      Write a value in the field values_cmp.
      Parameters:
      valuesCmp - The new value for the field values_cmp
      _arena - to control the memory allocation scope