Package org.gnome.gobject
Class ParamSpecTypeInfo
java.lang.Object
org.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
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFunctional interface declaration of theFinalizeCallbackcallback.static interfaceFunctional interface declaration of theInstanceInitCallbackcallback.static interfaceFunctional interface declaration of theValuesCmpCallbackcallback.static interfaceFunctional interface declaration of theValueSetDefaultCallbackcallback.static interfaceFunctional interface declaration of theValueValidateCallbackcallback. -
Constructor Summary
ConstructorsConstructorDescriptionAllocate 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 MemoryLayoutThe memory layout of the native struct.voidoverrideFinalize(ParamSpecTypeInfo.FinalizeCallback finalize_, Arena _arena) Write a value in the fieldfinalize.voidoverrideInstanceInit(ParamSpecTypeInfo.InstanceInitCallback instanceInit, Arena _arena) Write a value in the fieldinstance_init.voidoverrideValuesCmp(ParamSpecTypeInfo.ValuesCmpCallback valuesCmp, Arena _arena) Write a value in the fieldvalues_cmp.voidoverrideValueSetDefault(ParamSpecTypeInfo.ValueSetDefaultCallback valueSetDefault, Arena _arena) Write a value in the fieldvalue_set_default.voidoverrideValueValidate(ParamSpecTypeInfo.ValueValidateCallback valueValidate, Arena _arena) Write a value in the fieldvalue_validate.shortRead the value of the fieldinstance_size.shortRead the value of the fieldn_preallocs.Read the value of the fieldvalue_type.voidwriteInstanceSize(short instanceSize) Write a value in the fieldinstance_size.voidwriteNPreallocs(short nPreallocs) Write a value in the fieldn_preallocs.voidwriteValueType(Type valueType) Write a value in the fieldvalue_type.Methods inherited from class org.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 fieldinstanceSizenPreallocs- value for the fieldnPreallocsinstanceInit- callback function for the fieldinstanceInitvalueType- value for the fieldvalueTypefinalize_- callback function for the fieldfinalize_valueSetDefault- callback function for the fieldvalueSetDefaultvalueValidate- callback function for the fieldvalueValidatevaluesCmp- callback function for the fieldvaluesCmparena- 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 fieldinstanceSizenPreallocs- value for the fieldnPreallocsinstanceInit- callback function for the fieldinstanceInitvalueType- value for the fieldvalueTypefinalize_- callback function for the fieldfinalize_valueSetDefault- callback function for the fieldvalueSetDefaultvalueValidate- callback function for the fieldvalueValidatevaluesCmp- 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
-