Function

GObjectparam_value_convert

Declaration [src]

gboolean
g_param_value_convert (
  GParamSpec* pspec,
  const GValue* src_value,
  GValue* dest_value,
  gboolean strict_validation
)

Description [src]

Transforms src_value into dest_value if possible, and then validates dest_value, in order for it to conform to pspec. If strict_validation is TRUE this function will only succeed if the transformed dest_value complied to pspec without modifications.

See also g_value_type_transformable(), g_value_transform() and g_param_value_validate().

Parameters

pspec GParamSpec
 

A valid GParamSpec.

 The data is owned by the caller of the function.
src_value GValue
 

Source GValue.

 The data is owned by the caller of the function.
dest_value GValue
 

Destination GValue of correct type for pspec.

 The data is owned by the caller of the function.
strict_validation gboolean
 

TRUE requires dest_value to conform to pspec without modifications.

Return value

Returns: gboolean
 

TRUE if transformation and validation were successful, FALSE otherwise and dest_value is left untouched.