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.-
Constructor Summary
ConstructorDescriptionAllocate 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()
Finalized a GResource initialized by g_static_resource_init().static MemoryLayout
The memory layout of the native struct.Gets the GResource that was registered by a call to g_static_resource_init().void
init()
Initializes a GResource from static data using a GStaticResource.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()Finalized a GResource initialized by g_static_resource_init().This is normally used by code generated by [glib-compile-resources][glib-compile-resources] and is not typically used by other code.
-
getResource
Gets the GResource that was registered by a call to g_static_resource_init().This is normally used by code generated by [glib-compile-resources][glib-compile-resources] and is not typically used by other code.
- Returns:
- a
GResource
-
init
public void init()Initializes a GResource from static data using a GStaticResource.This is normally used by code generated by [glib-compile-resources][glib-compile-resources] and is not typically used by other code.
-