Class TypeValueTable

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

@Generated("org.javagi.JavaGI") public class TypeValueTable extends ProxyInstance
  • 'i': Integers, passed as collect_values[].v_int

    • 'l': Longs, passed as collect_values[].v_long
    • 'd': Doubles, passed as collect_values[].v_double
    • 'p': Pointers, passed as collect_values[].v_pointer

    It should be noted that for variable argument list construction, ANSI C promotes every type smaller than an integer to an int, and floats to doubles. So for collection of short int or char, 'i' needs to be used, and for collection of floats 'd'. The GTypeValueTable provides the functions required by the GValue implementation, to serve as a container for values of a type.

  • Constructor Details

    • TypeValueTable

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

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

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

      public TypeValueTable(TypeValueInitFunc valueInit, TypeValueFreeFunc valueFree, TypeValueCopyFunc valueCopy, TypeValuePeekPointerFunc valuePeekPointer, String collectFormat, TypeValueCollectFunc collectValue, String lcopyFormat, TypeValueLCopyFunc lcopyValue, Arena arena)
      Allocate a new TypeValueTable with the fields set to the provided values.
      Parameters:
      valueInit - value for the field valueInit
      valueFree - value for the field valueFree
      valueCopy - value for the field valueCopy
      valuePeekPointer - value for the field valuePeekPointer
      collectFormat - value for the field collectFormat
      collectValue - value for the field collectValue
      lcopyFormat - value for the field lcopyFormat
      lcopyValue - value for the field lcopyValue
      arena - to control the memory allocation scope
    • TypeValueTable

      public TypeValueTable(TypeValueInitFunc valueInit, TypeValueFreeFunc valueFree, TypeValueCopyFunc valueCopy, TypeValuePeekPointerFunc valuePeekPointer, String collectFormat, TypeValueCollectFunc collectValue, String lcopyFormat, TypeValueLCopyFunc lcopyValue)
      Allocate a new TypeValueTable with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      valueInit - value for the field valueInit
      valueFree - value for the field valueFree
      valueCopy - value for the field valueCopy
      valuePeekPointer - value for the field valuePeekPointer
      collectFormat - value for the field collectFormat
      collectValue - value for the field collectValue
      lcopyFormat - value for the field lcopyFormat
      lcopyValue - value for the field lcopyValue
  • Method Details

    • getMemoryLayout

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

      public @Nullable TypeValueInitFunc readValueInit()
      Read the value of the field value_init.
      Returns:
      The value of the field value_init
    • writeValueInit

      public void writeValueInit(@Nullable TypeValueInitFunc valueInit, Arena _arena)
      Write a value in the field value_init.
      Parameters:
      valueInit - The new value for the field value_init
      _arena - to control the memory allocation scope
    • readValueFree

      public @Nullable TypeValueFreeFunc readValueFree()
      Read the value of the field value_free.
      Returns:
      The value of the field value_free
    • writeValueFree

      public void writeValueFree(@Nullable TypeValueFreeFunc valueFree, Arena _arena)
      Write a value in the field value_free.
      Parameters:
      valueFree - The new value for the field value_free
      _arena - to control the memory allocation scope
    • readValueCopy

      public @Nullable TypeValueCopyFunc readValueCopy()
      Read the value of the field value_copy.
      Returns:
      The value of the field value_copy
    • writeValueCopy

      public void writeValueCopy(@Nullable TypeValueCopyFunc valueCopy, Arena _arena)
      Write a value in the field value_copy.
      Parameters:
      valueCopy - The new value for the field value_copy
      _arena - to control the memory allocation scope
    • readValuePeekPointer

      public @Nullable TypeValuePeekPointerFunc readValuePeekPointer()
      Read the value of the field value_peek_pointer.
      Returns:
      The value of the field value_peek_pointer
    • writeValuePeekPointer

      public void writeValuePeekPointer(@Nullable TypeValuePeekPointerFunc valuePeekPointer, Arena _arena)
      Write a value in the field value_peek_pointer.
      Parameters:
      valuePeekPointer - The new value for the field value_peek_pointer
      _arena - to control the memory allocation scope
    • readCollectFormat

      public String readCollectFormat()
      Read the value of the field collect_format.
      Returns:
      The value of the field collect_format
    • writeCollectFormat

      public void writeCollectFormat(String collectFormat, Arena _arena)
      Write a value in the field collect_format.
      Parameters:
      collectFormat - The new value for the field collect_format
      _arena - to control the memory allocation scope
    • readCollectValue

      public @Nullable TypeValueCollectFunc readCollectValue()
      Read the value of the field collect_value.
      Returns:
      The value of the field collect_value
    • writeCollectValue

      public void writeCollectValue(@Nullable TypeValueCollectFunc collectValue, Arena _arena)
      Write a value in the field collect_value.
      Parameters:
      collectValue - The new value for the field collect_value
      _arena - to control the memory allocation scope
    • readLcopyFormat

      public String readLcopyFormat()
      Read the value of the field lcopy_format.
      Returns:
      The value of the field lcopy_format
    • writeLcopyFormat

      public void writeLcopyFormat(String lcopyFormat, Arena _arena)
      Write a value in the field lcopy_format.
      Parameters:
      lcopyFormat - The new value for the field lcopy_format
      _arena - to control the memory allocation scope
    • readLcopyValue

      public @Nullable TypeValueLCopyFunc readLcopyValue()
      Read the value of the field lcopy_value.
      Returns:
      The value of the field lcopy_value
    • writeLcopyValue

      public void writeLcopyValue(@Nullable TypeValueLCopyFunc lcopyValue, Arena _arena)
      Write a value in the field lcopy_value.
      Parameters:
      lcopyValue - The new value for the field lcopy_value
      _arena - to control the memory allocation scope
    • peek

      public static @Nullable TypeValueTable peek(Type type)

      Returns the location of the GTypeValueTable associated with type.

      Note that this function should only be used from source code that implements or has internal knowledge of the implementation of type.

      Parameters:
      type - a GType
      Returns:
      location of the GTypeValueTable associated with type or null if there is no GTypeValueTable associated with type