Package org.gnome.gio
Class StaticResource
java.lang.Object
org.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
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 TypeMethodDescriptionvoidfini()Finalizes aGio.Resourceinitialized byinit().static MemoryLayoutThe memory layout of the native struct.Gets theGio.Resourcethat was registered by a call toinit().voidinit()Initializes aGio.Resourcefrom static data using aGio.StaticResource.readData()Read the value of the fielddata.longRead the value of the fielddata_len.readNext()Read the value of the fieldnext.Read the value of the fieldresource.voidwriteData(MemorySegment data) Write a value in the fielddata.voidwriteDataLen(long dataLen) Write a value in the fielddata_len.voidwriteNext(StaticResource next) Write a value in the fieldnext.voidwriteResource(Resource resource) Write a value in the fieldresource.Methods inherited from class org.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 fielddatadataLen- value for the fielddataLenresource- value for the fieldresourcenext- value for the fieldnextarena- 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 fielddatadataLen- value for the fielddataLenresource- value for the fieldresourcenext- 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.Resourceinitialized byinit().This is normally used by code generated by
glib-compile-resourcesand is not typically used by other code.- Since:
- 2.32
-
getResource
Gets theGio.Resourcethat was registered by a call toinit().This is normally used by code generated by
glib-compile-resourcesand is not typically used by other code.- Returns:
- a
Gio.Resource - Since:
- 2.32
-
init
public void init()Initializes aGio.Resourcefrom static data using aGio.StaticResource.This is normally used by code generated by
glib-compile-resourcesand is not typically used by other code.- Since:
- 2.32
-