Package org.gnome.gobject
Class ParamSpecTypeInfo
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.ParamSpecTypeInfo
- All Implemented Interfaces:
Proxy
This structure is used to provide the type system with the information
required to initialize and destruct (finalize) a parameter's class and
instances thereof.
The initialized structure is passed to the g_param_type_register_static() The type system will perform a deep copy of this structure, so its memory does not need to be persistent across invocation of g_param_type_register_static().
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Functional interface declaration of theFinalizeCallback
callback.static interface
Functional interface declaration of theInstanceInitCallback
callback.static interface
Functional interface declaration of theValuesCmpCallback
callback.static interface
Functional interface declaration of theValueSetDefaultCallback
callback.static interface
Functional interface declaration of theValueValidateCallback
callback. -
Constructor Summary
ConstructorDescriptionAllocate a new ParamSpecTypeInfo.ParamSpecTypeInfo
(short instanceSize, short nPreallocs, ParamSpecTypeInfo.InstanceInitCallback instanceInit, Type valueType, ParamSpecTypeInfo.FinalizeCallback finalize_, ParamSpecTypeInfo.ValueSetDefaultCallback valueSetDefault, ParamSpecTypeInfo.ValueValidateCallback valueValidate, ParamSpecTypeInfo.ValuesCmpCallback valuesCmp) Allocate a new ParamSpecTypeInfo with the fields set to the provided values.ParamSpecTypeInfo
(short instanceSize, short nPreallocs, ParamSpecTypeInfo.InstanceInitCallback instanceInit, Type valueType, ParamSpecTypeInfo.FinalizeCallback finalize_, ParamSpecTypeInfo.ValueSetDefaultCallback valueSetDefault, ParamSpecTypeInfo.ValueValidateCallback valueValidate, ParamSpecTypeInfo.ValuesCmpCallback valuesCmp, Arena arena) Allocate a new ParamSpecTypeInfo with the fields set to the provided values.ParamSpecTypeInfo
(Arena arena) Allocate a new ParamSpecTypeInfo.ParamSpecTypeInfo
(MemorySegment address) Create a ParamSpecTypeInfo proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayout
The memory layout of the native struct.void
overrideFinalize
(ParamSpecTypeInfo.FinalizeCallback finalize_, Arena _arena) Write a value in the fieldfinalize
.void
overrideInstanceInit
(ParamSpecTypeInfo.InstanceInitCallback instanceInit, Arena _arena) Write a value in the fieldinstance_init
.void
overrideValuesCmp
(ParamSpecTypeInfo.ValuesCmpCallback valuesCmp, Arena _arena) Write a value in the fieldvalues_cmp
.void
overrideValueSetDefault
(ParamSpecTypeInfo.ValueSetDefaultCallback valueSetDefault, Arena _arena) Write a value in the fieldvalue_set_default
.void
overrideValueValidate
(ParamSpecTypeInfo.ValueValidateCallback valueValidate, Arena _arena) Write a value in the fieldvalue_validate
.short
Read the value of the fieldinstance_size
.short
Read the value of the fieldn_preallocs
.Read the value of the fieldvalue_type
.void
writeInstanceSize
(short instanceSize) Write a value in the fieldinstance_size
.void
writeNPreallocs
(short nPreallocs) Write a value in the fieldn_preallocs
.void
writeValueType
(Type valueType) Write a value in the fieldvalue_type
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
ParamSpecTypeInfo
Create a ParamSpecTypeInfo proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
ParamSpecTypeInfo
Allocate a new ParamSpecTypeInfo.- Parameters:
arena
- to control the memory allocation scope
-
ParamSpecTypeInfo
public ParamSpecTypeInfo()Allocate a new ParamSpecTypeInfo. The memory is allocated withArena.ofAuto()
. -
ParamSpecTypeInfo
public ParamSpecTypeInfo(short instanceSize, short nPreallocs, ParamSpecTypeInfo.InstanceInitCallback instanceInit, Type valueType, ParamSpecTypeInfo.FinalizeCallback finalize_, ParamSpecTypeInfo.ValueSetDefaultCallback valueSetDefault, ParamSpecTypeInfo.ValueValidateCallback valueValidate, ParamSpecTypeInfo.ValuesCmpCallback valuesCmp, Arena arena) Allocate a new ParamSpecTypeInfo with the fields set to the provided values.- Parameters:
instanceSize
- value for the fieldinstanceSize
nPreallocs
- value for the fieldnPreallocs
instanceInit
- callback function for the fieldinstanceInit
valueType
- value for the fieldvalueType
finalize_
- callback function for the fieldfinalize_
valueSetDefault
- callback function for the fieldvalueSetDefault
valueValidate
- callback function for the fieldvalueValidate
valuesCmp
- callback function for the fieldvaluesCmp
arena
- to control the memory allocation scope
-
ParamSpecTypeInfo
public ParamSpecTypeInfo(short instanceSize, short nPreallocs, ParamSpecTypeInfo.InstanceInitCallback instanceInit, Type valueType, ParamSpecTypeInfo.FinalizeCallback finalize_, ParamSpecTypeInfo.ValueSetDefaultCallback valueSetDefault, ParamSpecTypeInfo.ValueValidateCallback valueValidate, ParamSpecTypeInfo.ValuesCmpCallback valuesCmp) Allocate a new ParamSpecTypeInfo with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
instanceSize
- value for the fieldinstanceSize
nPreallocs
- value for the fieldnPreallocs
instanceInit
- callback function for the fieldinstanceInit
valueType
- value for the fieldvalueType
finalize_
- callback function for the fieldfinalize_
valueSetDefault
- callback function for the fieldvalueSetDefault
valueValidate
- callback function for the fieldvalueValidate
valuesCmp
- callback function for the fieldvaluesCmp
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readInstanceSize
public short readInstanceSize()Read the value of the fieldinstance_size
.- Returns:
- The value of the field
instance_size
-
writeInstanceSize
public void writeInstanceSize(short instanceSize) Write a value in the fieldinstance_size
.- Parameters:
instanceSize
- The new value for the fieldinstance_size
-
readNPreallocs
public short readNPreallocs()Read the value of the fieldn_preallocs
.- Returns:
- The value of the field
n_preallocs
-
writeNPreallocs
public void writeNPreallocs(short nPreallocs) Write a value in the fieldn_preallocs
.- Parameters:
nPreallocs
- The new value for the fieldn_preallocs
-
overrideInstanceInit
Write a value in the fieldinstance_init
.- Parameters:
instanceInit
- The new value for the fieldinstance_init
_arena
- to control the memory allocation scope
-
readValueType
Read the value of the fieldvalue_type
.- Returns:
- The value of the field
value_type
-
writeValueType
Write a value in the fieldvalue_type
.- Parameters:
valueType
- The new value for the fieldvalue_type
-
overrideFinalize
Write a value in the fieldfinalize
.- Parameters:
finalize_
- The new value for the fieldfinalize
_arena
- to control the memory allocation scope
-
overrideValueSetDefault
public void overrideValueSetDefault(ParamSpecTypeInfo.ValueSetDefaultCallback valueSetDefault, Arena _arena) Write a value in the fieldvalue_set_default
.- Parameters:
valueSetDefault
- The new value for the fieldvalue_set_default
_arena
- to control the memory allocation scope
-
overrideValueValidate
public void overrideValueValidate(ParamSpecTypeInfo.ValueValidateCallback valueValidate, Arena _arena) Write a value in the fieldvalue_validate
.- Parameters:
valueValidate
- The new value for the fieldvalue_validate
_arena
- to control the memory allocation scope
-
overrideValuesCmp
Write a value in the fieldvalues_cmp
.- Parameters:
valuesCmp
- The new value for the fieldvalues_cmp
_arena
- to control the memory allocation scope
-