Package org.gnome.gobject
Class TypeValueTable
java.lang.Object
io.github.jwharm.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.
-
Field Summary
Fields inherited from class io.github.jwharm.javagi.base.ProxyInstance
address
-
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 MemoryLayout
The memory layout of the native struct.static TypeValueTable
Returns the location of theGTypeValueTable
associated withtype
.Read the value of the fieldcollect_format
.Read the value of the fieldcollect_value
.Read the value of the fieldlcopy_format
.Read the value of the fieldlcopy_value
.Read the value of the fieldvalue_copy
.Read the value of the fieldvalue_free
.Read the value of the fieldvalue_init
.Read the value of the fieldvalue_peek_pointer
.void
writeCollectFormat
(String collectFormat, Arena _arena) Write a value in the fieldcollect_format
.void
writeCollectValue
(TypeValueCollectFunc collectValue, Arena _arena) Write a value in the fieldcollect_value
.void
writeLcopyFormat
(String lcopyFormat, Arena _arena) Write a value in the fieldlcopy_format
.void
writeLcopyValue
(TypeValueLCopyFunc lcopyValue, Arena _arena) Write a value in the fieldlcopy_value
.void
writeValueCopy
(TypeValueCopyFunc valueCopy, Arena _arena) Write a value in the fieldvalue_copy
.void
writeValueFree
(TypeValueFreeFunc valueFree, Arena _arena) Write a value in the fieldvalue_free
.void
writeValueInit
(TypeValueInitFunc valueInit, Arena _arena) Write a value in the fieldvalue_init
.void
writeValuePeekPointer
(TypeValuePeekPointerFunc valuePeekPointer, Arena _arena) Write a value in the fieldvalue_peek_pointer
.Methods inherited from class io.github.jwharm.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 fieldvalueInit
valueFree
- value for the fieldvalueFree
valueCopy
- value for the fieldvalueCopy
valuePeekPointer
- value for the fieldvaluePeekPointer
collectFormat
- value for the fieldcollectFormat
collectValue
- value for the fieldcollectValue
lcopyFormat
- value for the fieldlcopyFormat
lcopyValue
- value for the fieldlcopyValue
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 withArena.ofAuto()
.- Parameters:
valueInit
- value for the fieldvalueInit
valueFree
- value for the fieldvalueFree
valueCopy
- value for the fieldvalueCopy
valuePeekPointer
- value for the fieldvaluePeekPointer
collectFormat
- value for the fieldcollectFormat
collectValue
- value for the fieldcollectValue
lcopyFormat
- value for the fieldlcopyFormat
lcopyValue
- 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
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 theGTypeValueTable
associated 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
GTypeValueTable
associated withtype
ornull
if there is noGTypeValueTable
associated withtype
-