Package org.gnome.gobject
Class TypeQuery
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.TypeQuery
- All Implemented Interfaces:
Proxy
A structure holding information for a specific type.
See also: g_type_query()
-
Constructor Summary
ConstructorDescriptionAllocate a new TypeQuery.Allocate a new TypeQuery.TypeQuery
(MemorySegment address) Create a TypeQuery proxy instance for the provided memory address.Allocate a new TypeQuery with the fields set to the provided values.Allocate a new TypeQuery with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayout
The memory layout of the native struct.int
Read the value of the fieldclass_size
.int
Read the value of the fieldinstance_size
.readType()
Read the value of the fieldtype
.Read the value of the fieldtype_name
.void
writeClassSize
(int classSize) Write a value in the fieldclass_size
.void
writeInstanceSize
(int instanceSize) Write a value in the fieldinstance_size
.void
Write a value in the fieldtype
.void
writeTypeName
(String typeName, Arena _arena) Write a value in the fieldtype_name
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
TypeQuery
Create a TypeQuery proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
TypeQuery
Allocate a new TypeQuery.- Parameters:
arena
- to control the memory allocation scope
-
TypeQuery
public TypeQuery()Allocate a new TypeQuery. The memory is allocated withArena.ofAuto()
. -
TypeQuery
Allocate a new TypeQuery with the fields set to the provided values.- Parameters:
type
- value for the fieldtype
typeName
- value for the fieldtypeName
classSize
- value for the fieldclassSize
instanceSize
- value for the fieldinstanceSize
arena
- to control the memory allocation scope
-
TypeQuery
Allocate a new TypeQuery with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
type
- value for the fieldtype
typeName
- value for the fieldtypeName
classSize
- value for the fieldclassSize
instanceSize
- value for the fieldinstanceSize
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readType
-
writeType
Write a value in the fieldtype
.- Parameters:
type
- The new value for the fieldtype
-
readTypeName
Read the value of the fieldtype_name
.- Returns:
- The value of the field
type_name
-
writeTypeName
-
readClassSize
public int readClassSize()Read the value of the fieldclass_size
.- Returns:
- The value of the field
class_size
-
writeClassSize
public void writeClassSize(int classSize) Write a value in the fieldclass_size
.- Parameters:
classSize
- The new value for the fieldclass_size
-
readInstanceSize
public int readInstanceSize()Read the value of the fieldinstance_size
.- Returns:
- The value of the field
instance_size
-
writeInstanceSize
public void writeInstanceSize(int instanceSize) Write a value in the fieldinstance_size
.- Parameters:
instanceSize
- The new value for the fieldinstance_size
-