Class TypeCValue

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

@Generated("org.javagi.JavaGI") public class TypeCValue extends ProxyInstance
A union holding one collected value.
  • Constructor Details

    • TypeCValue

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

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

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

      public TypeCValue(int vInt, int vLong, long vInt64, double vDouble, MemorySegment vPointer, Arena arena)
      Allocate a new TypeCValue with the fields set to the provided values.
      Parameters:
      vInt - value for the field vInt
      vLong - value for the field vLong
      vInt64 - value for the field vInt64
      vDouble - value for the field vDouble
      vPointer - value for the field vPointer
      arena - to control the memory allocation scope
    • TypeCValue

      public TypeCValue(int vInt, int vLong, long vInt64, double vDouble, MemorySegment vPointer)
      Allocate a new TypeCValue with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      vInt - value for the field vInt
      vLong - value for the field vLong
      vInt64 - value for the field vInt64
      vDouble - value for the field vDouble
      vPointer - value for the field vPointer
  • Method Details

    • getMemoryLayout

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

      public int readVInt()
      Read the value of the field v_int.
      Returns:
      The value of the field v_int
    • writeVInt

      public void writeVInt(int vInt)
      Write a value in the field v_int.
      Parameters:
      vInt - The new value for the field v_int
    • readVLong

      public int readVLong()
      Read the value of the field v_long.
      Returns:
      The value of the field v_long
    • writeVLong

      public void writeVLong(int vLong)
      Write a value in the field v_long.
      Parameters:
      vLong - The new value for the field v_long
    • readVInt64

      public long readVInt64()
      Read the value of the field v_int64.
      Returns:
      The value of the field v_int64
    • writeVInt64

      public void writeVInt64(long vInt64)
      Write a value in the field v_int64.
      Parameters:
      vInt64 - The new value for the field v_int64
    • readVDouble

      public double readVDouble()
      Read the value of the field v_double.
      Returns:
      The value of the field v_double
    • writeVDouble

      public void writeVDouble(double vDouble)
      Write a value in the field v_double.
      Parameters:
      vDouble - The new value for the field v_double
    • readVPointer

      public MemorySegment readVPointer()
      Read the value of the field v_pointer.
      Returns:
      The value of the field v_pointer
    • writeVPointer

      public void writeVPointer(MemorySegment vPointer)
      Write a value in the field v_pointer.
      Parameters:
      vPointer - The new value for the field v_pointer