Package org.gnome.gobject
Class TypeValueTable
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeValueTable
- All Implemented Interfaces:
Proxy
'i': Integers, passed ascollect_values[].v_int'l': Longs, passed ascollect_values[].v_long'd': Doubles, passed ascollect_values[].v_double'p': Pointers, passed ascollect_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 Summary
ConstructorsConstructorDescriptionAllocate a new TypeValueTable.TypeValueTable(Arena arena) Allocate a new TypeValueTable.TypeValueTable(MemorySegment address) Create a TypeValueTable proxy instance for the provided memory address.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.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. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.static @Nullable TypeValueTableReturns the location of theGTypeValueTableassociated withtype.Read the value of the fieldcollect_format.@Nullable TypeValueCollectFuncRead the value of the fieldcollect_value.Read the value of the fieldlcopy_format.@Nullable TypeValueLCopyFuncRead the value of the fieldlcopy_value.@Nullable TypeValueCopyFuncRead the value of the fieldvalue_copy.@Nullable TypeValueFreeFuncRead the value of the fieldvalue_free.@Nullable TypeValueInitFuncRead the value of the fieldvalue_init.@Nullable TypeValuePeekPointerFuncRead the value of the fieldvalue_peek_pointer.voidwriteCollectFormat(String collectFormat, Arena _arena) Write a value in the fieldcollect_format.voidwriteCollectValue(@Nullable TypeValueCollectFunc collectValue, Arena _arena) Write a value in the fieldcollect_value.voidwriteLcopyFormat(String lcopyFormat, Arena _arena) Write a value in the fieldlcopy_format.voidwriteLcopyValue(@Nullable TypeValueLCopyFunc lcopyValue, Arena _arena) Write a value in the fieldlcopy_value.voidwriteValueCopy(@Nullable TypeValueCopyFunc valueCopy, Arena _arena) Write a value in the fieldvalue_copy.voidwriteValueFree(@Nullable TypeValueFreeFunc valueFree, Arena _arena) Write a value in the fieldvalue_free.voidwriteValueInit(@Nullable TypeValueInitFunc valueInit, Arena _arena) Write a value in the fieldvalue_init.voidwriteValuePeekPointer(@Nullable TypeValuePeekPointerFunc valuePeekPointer, Arena _arena) Write a value in the fieldvalue_peek_pointer.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
TypeValueTable
Create a TypeValueTable proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
TypeValueTable
Allocate a new TypeValueTable.- Parameters:
arena- to control the memory allocation scope
-
TypeValueTable
public TypeValueTable()Allocate a new TypeValueTable. The memory is allocated withArena.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 fieldvalueInitvalueFree- value for the fieldvalueFreevalueCopy- value for the fieldvalueCopyvaluePeekPointer- value for the fieldvaluePeekPointercollectFormat- value for the fieldcollectFormatcollectValue- value for the fieldcollectValuelcopyFormat- value for the fieldlcopyFormatlcopyValue- value for the fieldlcopyValuearena- 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 withArena.ofAuto().- Parameters:
valueInit- value for the fieldvalueInitvalueFree- value for the fieldvalueFreevalueCopy- value for the fieldvalueCopyvaluePeekPointer- value for the fieldvaluePeekPointercollectFormat- value for the fieldcollectFormatcollectValue- value for the fieldcollectValuelcopyFormat- value for the fieldlcopyFormatlcopyValue- value for the fieldlcopyValue
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readValueInit
Read the value of the fieldvalue_init.- Returns:
- The value of the field
value_init
-
writeValueInit
Write a value in the fieldvalue_init.- Parameters:
valueInit- The new value for the fieldvalue_init_arena- to control the memory allocation scope
-
readValueFree
Read the value of the fieldvalue_free.- Returns:
- The value of the field
value_free
-
writeValueFree
Write a value in the fieldvalue_free.- Parameters:
valueFree- The new value for the fieldvalue_free_arena- to control the memory allocation scope
-
readValueCopy
Read the value of the fieldvalue_copy.- Returns:
- The value of the field
value_copy
-
writeValueCopy
Write a value in the fieldvalue_copy.- Parameters:
valueCopy- The new value for the fieldvalue_copy_arena- to control the memory allocation scope
-
readValuePeekPointer
Read the value of the fieldvalue_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 fieldvalue_peek_pointer.- Parameters:
valuePeekPointer- The new value for the fieldvalue_peek_pointer_arena- to control the memory allocation scope
-
readCollectFormat
Read the value of the fieldcollect_format.- Returns:
- The value of the field
collect_format
-
writeCollectFormat
-
readCollectValue
Read the value of the fieldcollect_value.- Returns:
- The value of the field
collect_value
-
writeCollectValue
Write a value in the fieldcollect_value.- Parameters:
collectValue- The new value for the fieldcollect_value_arena- to control the memory allocation scope
-
readLcopyFormat
Read the value of the fieldlcopy_format.- Returns:
- The value of the field
lcopy_format
-
writeLcopyFormat
-
readLcopyValue
Read the value of the fieldlcopy_value.- Returns:
- The value of the field
lcopy_value
-
writeLcopyValue
Write a value in the fieldlcopy_value.- Parameters:
lcopyValue- The new value for the fieldlcopy_value_arena- to control the memory allocation scope
-
peek
Returns the location of theGTypeValueTableassociated withtype.Note that this function should only be used from source code that implements or has internal knowledge of the implementation of
type.- Parameters:
type- aGType- Returns:
- location of the
GTypeValueTableassociated withtypeornullif there is noGTypeValueTableassociated withtype
-