Package org.gnome.gio
Class OutputVector
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gio.OutputVector
- All Implemented Interfaces:
Proxy
Structure used for scatter/gather data output.
You generally pass in an array of
GOutputVectors
and the operation will use all the buffers as if they were
one buffer.-
Constructor Summary
ConstructorDescriptionAllocate a new OutputVector.OutputVector
(Arena arena) Allocate a new OutputVector.OutputVector
(MemorySegment address) Create a OutputVector proxy instance for the provided memory address.OutputVector
(MemorySegment buffer, long size) Allocate a new OutputVector with the fields set to the provided values.OutputVector
(MemorySegment buffer, long size, Arena arena) Allocate a new OutputVector with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayout
The memory layout of the native struct.Read the value of the fieldbuffer
.long
readSize()
Read the value of the fieldsize
.void
writeBuffer
(MemorySegment buffer) Write a value in the fieldbuffer
.void
writeSize
(long size) Write a value in the fieldsize
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
OutputVector
Create a OutputVector proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
OutputVector
Allocate a new OutputVector.- Parameters:
arena
- to control the memory allocation scope
-
OutputVector
public OutputVector()Allocate a new OutputVector. The memory is allocated withArena.ofAuto()
. -
OutputVector
Allocate a new OutputVector with the fields set to the provided values.- Parameters:
buffer
- value for the fieldbuffer
size
- value for the fieldsize
arena
- to control the memory allocation scope
-
OutputVector
Allocate a new OutputVector with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
buffer
- value for the fieldbuffer
size
- value for the fieldsize
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readBuffer
Read the value of the fieldbuffer
.- Returns:
- The value of the field
buffer
-
writeBuffer
Write a value in the fieldbuffer
.- Parameters:
buffer
- The new value for the fieldbuffer
-
readSize
public long readSize()Read the value of the fieldsize
.- Returns:
- The value of the field
size
-
writeSize
public void writeSize(long size) Write a value in the fieldsize
.- Parameters:
size
- The new value for the fieldsize
-