Package org.gnome.gio
Class StaticResource
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gio.StaticResource
- All Implemented Interfaces:
Proxy
GStaticResource
is an opaque data structure and can only be accessed
using the following functions.-
Field Summary
Fields inherited from class io.github.jwharm.javagi.base.ProxyInstance
address
-
Constructor Summary
ConstructorsConstructorDescriptionAllocate a new StaticResource.StaticResource
(Arena arena) Allocate a new StaticResource.StaticResource
(MemorySegment address) Create a StaticResource proxy instance for the provided memory address.StaticResource
(MemorySegment data, long dataLen, Resource resource, StaticResource next) Allocate a new StaticResource with the fields set to the provided values.StaticResource
(MemorySegment data, long dataLen, Resource resource, StaticResource next, Arena arena) Allocate a new StaticResource with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionvoid
fini()
Finalizes aGio.Resource
initialized byinit()
.static MemoryLayout
The memory layout of the native struct.Gets theGio.Resource
that was registered by a call toinit()
.void
init()
Initializes aGio.Resource
from static data using aGio.StaticResource
.readData()
Read the value of the fielddata
.long
Read the value of the fielddata_len
.readNext()
Read the value of the fieldnext
.Read the value of the fieldresource
.void
writeData
(MemorySegment data) Write a value in the fielddata
.void
writeDataLen
(long dataLen) Write a value in the fielddata_len
.void
writeNext
(StaticResource next) Write a value in the fieldnext
.void
writeResource
(Resource resource) Write a value in the fieldresource
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
StaticResource
Create a StaticResource proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
StaticResource
Allocate a new StaticResource.- Parameters:
arena
- to control the memory allocation scope
-
StaticResource
public StaticResource()Allocate a new StaticResource. The memory is allocated withArena.ofAuto()
. -
StaticResource
public StaticResource(MemorySegment data, long dataLen, Resource resource, StaticResource next, Arena arena) Allocate a new StaticResource with the fields set to the provided values.- Parameters:
data
- value for the fielddata
dataLen
- value for the fielddataLen
resource
- value for the fieldresource
next
- value for the fieldnext
arena
- to control the memory allocation scope
-
StaticResource
Allocate a new StaticResource with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
data
- value for the fielddata
dataLen
- value for the fielddataLen
resource
- value for the fieldresource
next
- value for the fieldnext
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readData
Read the value of the fielddata
.- Returns:
- The value of the field
data
-
writeData
Write a value in the fielddata
.- Parameters:
data
- The new value for the fielddata
-
readDataLen
public long readDataLen()Read the value of the fielddata_len
.- Returns:
- The value of the field
data_len
-
writeDataLen
public void writeDataLen(long dataLen) Write a value in the fielddata_len
.- Parameters:
dataLen
- The new value for the fielddata_len
-
readResource
Read the value of the fieldresource
.- Returns:
- The value of the field
resource
-
writeResource
Write a value in the fieldresource
.- Parameters:
resource
- The new value for the fieldresource
-
readNext
Read the value of the fieldnext
.- Returns:
- The value of the field
next
-
writeNext
Write a value in the fieldnext
.- Parameters:
next
- The new value for the fieldnext
-
fini
public void fini()Finalizes aGio.Resource
initialized byinit()
.This is normally used by code generated by
glib-compile-resources
and is not typically used by other code.- Since:
- 2.32
-
getResource
Gets theGio.Resource
that was registered by a call toinit()
.This is normally used by code generated by
glib-compile-resources
and is not typically used by other code.- Returns:
- a
Gio.Resource
- Since:
- 2.32
-
init
public void init()Initializes aGio.Resource
from static data using aGio.StaticResource
.This is normally used by code generated by
glib-compile-resources
and is not typically used by other code.- Since:
- 2.32
-