GParamSpec
Metadata for parameter specifications
#GParamSpec is an object structure that encapsulates the metadata
required to specify parameters, such as e.g. #GObject properties.
g_object_class_install_property(), g_object_set(), g_object_get(),
g_object_set_property(), g_object_get_property(), g_value_register_transform_func()
Returns whether @type "is a" %G_TYPE_PARAM.
@type: a #GType ID
Cast a derived #GParamSpec object (e.g. of type #GParamSpecInt) into
a #GParamSpec object.
@pspec: a valid #GParamSpec
Check whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAM
or derived.
@pspec: a #GParamSpec
Cast a derived #GParamSpecClass structure into a #GParamSpecClass structure.
@pclass: a valid #GParamSpecClass
Check whether @pclass "is a" valid #GParamSpecClass structure of type %G_TYPE_PARAM
or derived.
@pclass: a #GParamSpecClass
Retrieve the #GParamSpecClass of a #GParamSpec.
@pspec: a valid #GParamSpec
Retrieve the #GType of this @pspec.
@pspec: a valid #GParamSpec
Retrieve the #GType name of this @pspec.
@pspec: a valid #GParamSpec
Retrieve the #GType to intiialize a #GValue for this parameter.
@pspec: a valid #GParamSpec
@g_type_instance: private #GTypeInstance portion
@name: name of this parameter
@flags: #GParamFlags flags for this parameter
@value_type: the #GValue type for this parameter
@owner_type: #GType type that uses (introduces) this paremeter
@g_type_class:
@value_type:
@finalize:
@value_set_default:
@value_validate:
@values_cmp:
@dummy:
Through the #GParamFlags flag values, certain aspects of parameters
can be configured.
@G_PARAM_READABLE: the parameter is readable
@G_PARAM_WRITABLE: the parameter is writable
@G_PARAM_CONSTRUCT: the parameter will be set upon object construction
@G_PARAM_CONSTRUCT_ONLY: the parameter will only be set upon object construction
@G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert())
strict validation is not required
@G_PARAM_PRIVATE:
#GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.
Mask containing the bits of #GParamSpec.flags which are reserved for GLib.
Minimum shift count to be used for user defined flags, to be stored in
#GParamSpec.flags.
Increment the reference count of @pspec.
@pspec: a valid #GParamSpec
@Returns: the #GParamSpec that was passed into this function
Decrement the reference count of a @pspec.
@pspec: a valid #GParamSpec
The initial reference count of a newly created #GParamSpec is 1,
eventhough no one has explicitely called g_param_spec_ref() on it yet.
So the einital reference count is flagged as "floating", untill someone
calls: g_param_spec_ref (@pspec); g_param_spec_sink (@pspec);
in sequence on it, taking over the initial reference count (thus
ending up with a @pspec that has a reference count of 1 still, but is
not flagged "floating" anymore).
@pspec: a valid #GParamSpec
Set @value to its default value as specified in @pspec.
@pspec: a valid #GParamSpec
@value: a #GValue of correct type for @pspec
Check whether @value contains the default value as specified in @pspec.
@pspec: a valid #GParamSpec
@value: a #GValue of correct type for @pspec
@Returns: whether @value contains the canonical defualt for this @pspec
Ensure that the contents of @value comply with the specifications
set out by @pspec. For example, a #GParamSpecInt might require
that integers stored in @value may not be smaller than -42 and not be
greater than +42. If @value contains an integer outside of this range,
it is modified accordingly, so the resulting value will fit into the
range -42 .. +42.
@pspec: a valid #GParamSpec
@value: a #GValue of correct type for @pspec
@Returns: whether modifying @value was necessary to ensure validity
This function 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 suceed if
the transformed @dest_value complied to @pspec without modifications.
See also g_value_type_transformable(), g_value_transform() and
g_param_value_validate().
@pspec: a valid #GParamSpec
@src_value: souce #GValue
@dest_value: destination #GValue of correct type for @pspec
@strict_validation: %TRUE requires @dest_value to conform to @pspec without modifications
@Returns: %TRUE if transformation and validation were successfull,
%FALSE otherwise and @dest_value is left untouched.
Compare @value1 with @value2 according to @pspec, and return -1, 0 or +1,
if @value1 is found to be less than, equal to or greater than @value2, respectively.
@pspec: a valid #GParamSpec
@value1: a #GValue of correct type for @pspec
@value2: a #GValue of correct type for @pspec
@Returns: -1, 0 or +1, for a less than, equal to or greater than result
@pspec:
@Returns:
@pspec:
@Returns:
@pspec:
@Returns:
@pspec:
@quark:
@Returns:
@pspec:
@quark:
@data:
@pspec:
@quark:
@data:
@destroy:
@pspec:
@quark:
@Returns:
Creates a new #GParamSpec instance.
A property name consists of segments consisting of ASCII letters and
digits, separated by either the '-' or '_' character. The first
character of a property name must be a letter. Names which violate these
rules lead to undefined behaviour.
When creating and looking up a #GParamSpec, either separator can be used,
but they cannot be mixed. Using '-' is considerably more efficient and in
fact required when using property names as detail strings for signals.
@param_type: the #GType for the property; must be derived from #G_TYPE_PARAM
@name: the canonical name of the property
@nick: the nickname of the property
@blurb: a short description of the property
@flags: a combination of #GParamFlags
@Returns: a newly allocated #GParamSpec instance
@instance_size:
@n_preallocs:
@instance_init:
@value_type:
@finalize:
@value_set_default:
@value_validate:
@values_cmp:
@name:
@pspec_info:
@Returns:
@type_prefixing:
@Returns:
@pool:
@pspec:
@owner_type:
@pool:
@pspec:
@pool:
@param_name:
@owner_type:
@walk_ancestors:
@Returns:
@trailer_p:
@pool:
@owner_type:
@n_pspecs_p:
@Returns:
@pool:
@owner_type:
@Returns: