<refentry id="gobject-GParamSpec">
<refmeta>
<refentrytitle>GParamSpec</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GOBJECT Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GParamSpec</refname><refpurpose>Meta data object for parameter specifications.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gobject.h&gt;


#define     <link linkend="G-TYPE-IS-PARAM-CAPS">G_TYPE_IS_PARAM</link>                 (type)
#define     <link linkend="G-PARAM-SPEC-CAPS">G_PARAM_SPEC</link>                    (pspec)
#define     <link linkend="G-IS-PARAM-SPEC-CAPS">G_IS_PARAM_SPEC</link>                 (pspec)
#define     <link linkend="G-PARAM-SPEC-CLASS-CAPS">G_PARAM_SPEC_CLASS</link>              (pclass)
#define     <link linkend="G-IS-PARAM-SPEC-CLASS-CAPS">G_IS_PARAM_SPEC_CLASS</link>           (pclass)
#define     <link linkend="G-PARAM-SPEC-GET-CLASS-CAPS">G_PARAM_SPEC_GET_CLASS</link>          (pspec)
#define     <link linkend="G-PARAM-SPEC-TYPE-CAPS">G_PARAM_SPEC_TYPE</link>               (pspec)
#define     <link linkend="G-PARAM-SPEC-TYPE-NAME-CAPS">G_PARAM_SPEC_TYPE_NAME</link>          (pspec)
#define     <link linkend="G-PARAM-SPEC-VALUE-TYPE-CAPS">G_PARAM_SPEC_VALUE_TYPE</link>         (pspec)
struct      <link linkend="GParamSpec">GParamSpec</link>;
struct      <link linkend="GParamSpecClass">GParamSpecClass</link>;
enum        <link linkend="GParamFlags">GParamFlags</link>;
#define     <link linkend="G-PARAM-READWRITE-CAPS">G_PARAM_READWRITE</link>
#define     <link linkend="G-PARAM-MASK-CAPS">G_PARAM_MASK</link>
#define     <link linkend="G-PARAM-USER-SHIFT-CAPS">G_PARAM_USER_SHIFT</link>
<link linkend="GParamSpec">GParamSpec</link>* <link linkend="g-param-spec-ref">g_param_spec_ref</link>                (<link linkend="GParamSpec">GParamSpec</link> *pspec);
void        <link linkend="g-param-spec-unref">g_param_spec_unref</link>              (<link linkend="GParamSpec">GParamSpec</link> *pspec);
void        <link linkend="g-param-spec-sink">g_param_spec_sink</link>               (<link linkend="GParamSpec">GParamSpec</link> *pspec);
void        <link linkend="g-param-value-set-default">g_param_value_set_default</link>       (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GValue">GValue</link> *value);
<link linkend="gboolean">gboolean</link>    <link linkend="g-param-value-defaults">g_param_value_defaults</link>          (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GValue">GValue</link> *value);
<link linkend="gboolean">gboolean</link>    <link linkend="g-param-value-validate">g_param_value_validate</link>          (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GValue">GValue</link> *value);
<link linkend="gboolean">gboolean</link>    <link linkend="g-param-value-convert">g_param_value_convert</link>           (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             const <link linkend="GValue">GValue</link> *src_value,
                                             <link linkend="GValue">GValue</link> *dest_value,
                                             <link linkend="gboolean">gboolean</link> strict_validation);
<link linkend="gint">gint</link>        <link linkend="g-param-values-cmp">g_param_values_cmp</link>              (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             const <link linkend="GValue">GValue</link> *value1,
                                             const <link linkend="GValue">GValue</link> *value2);
G_CONST_RETURN <link linkend="gchar">gchar</link>* <link linkend="g-param-spec-get-name">g_param_spec_get_name</link> (<link linkend="GParamSpec">GParamSpec</link> *pspec);
G_CONST_RETURN <link linkend="gchar">gchar</link>* <link linkend="g-param-spec-get-nick">g_param_spec_get_nick</link> (<link linkend="GParamSpec">GParamSpec</link> *pspec);
G_CONST_RETURN <link linkend="gchar">gchar</link>* <link linkend="g-param-spec-get-blurb">g_param_spec_get_blurb</link>
                                            (<link linkend="GParamSpec">GParamSpec</link> *pspec);
<link linkend="gpointer">gpointer</link>    <link linkend="g-param-spec-get-qdata">g_param_spec_get_qdata</link>          (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GQuark">GQuark</link> quark);
void        <link linkend="g-param-spec-set-qdata">g_param_spec_set_qdata</link>          (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GQuark">GQuark</link> quark,
                                             <link linkend="gpointer">gpointer</link> data);
void        <link linkend="g-param-spec-set-qdata-full">g_param_spec_set_qdata_full</link>     (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GQuark">GQuark</link> quark,
                                             <link linkend="gpointer">gpointer</link> data,
                                             <link linkend="GDestroyNotify">GDestroyNotify</link> destroy);
<link linkend="gpointer">gpointer</link>    <link linkend="g-param-spec-steal-qdata">g_param_spec_steal_qdata</link>        (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GQuark">GQuark</link> quark);
<link linkend="gpointer">gpointer</link>    <link linkend="g-param-spec-internal">g_param_spec_internal</link>           (<link linkend="GType">GType</link> param_type,
                                             const <link linkend="gchar">gchar</link> *name,
                                             const <link linkend="gchar">gchar</link> *nick,
                                             const <link linkend="gchar">gchar</link> *blurb,
                                             <link linkend="GParamFlags">GParamFlags</link> flags);
struct      <link linkend="GParamSpecTypeInfo">GParamSpecTypeInfo</link>;
<link linkend="GType">GType</link>       <link linkend="g-param-type-register-static">g_param_type_register_static</link>    (const <link linkend="gchar">gchar</link> *name,
                                             const <link linkend="GParamSpecTypeInfo">GParamSpecTypeInfo</link> *pspec_info);
struct      <link linkend="GParamSpecPool">GParamSpecPool</link>;
<link linkend="GParamSpecPool">GParamSpecPool</link>* <link linkend="g-param-spec-pool-new">g_param_spec_pool_new</link>       (<link linkend="gboolean">gboolean</link> type_prefixing);
void        <link linkend="g-param-spec-pool-insert">g_param_spec_pool_insert</link>        (<link linkend="GParamSpecPool">GParamSpecPool</link> *pool,
                                             <link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GType">GType</link> owner_type);
void        <link linkend="g-param-spec-pool-remove">g_param_spec_pool_remove</link>        (<link linkend="GParamSpecPool">GParamSpecPool</link> *pool,
                                             <link linkend="GParamSpec">GParamSpec</link> *pspec);
<link linkend="GParamSpec">GParamSpec</link>* <link linkend="g-param-spec-pool-lookup">g_param_spec_pool_lookup</link>        (<link linkend="GParamSpecPool">GParamSpecPool</link> *pool,
                                             const <link linkend="gchar">gchar</link> *param_name,
                                             <link linkend="GType">GType</link> owner_type,
                                             <link linkend="gboolean">gboolean</link> walk_ancestors);
<link linkend="GParamSpec">GParamSpec</link>** <link linkend="g-param-spec-pool-list">g_param_spec_pool_list</link>         (<link linkend="GParamSpecPool">GParamSpecPool</link> *pool,
                                             <link linkend="GType">GType</link> owner_type,
                                             <link linkend="guint">guint</link> *n_pspecs_p);
<link linkend="GList">GList</link>*      <link linkend="g-param-spec-pool-list-owned">g_param_spec_pool_list_owned</link>    (<link linkend="GParamSpecPool">GParamSpecPool</link> *pool,
                                             <link linkend="GType">GType</link> owner_type);
</synopsis>
</refsynopsisdiv>





<refsect1>
<title>Description</title>
<para>
<link linkend="GParamSpec">GParamSpec</link> is an object structure that encapsulates the meta data
required to specify parameters, such as e.g. <link linkend="GObject">GObject</link> properties.
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="G-TYPE-IS-PARAM-CAPS">G_TYPE_IS_PARAM()</title>
<programlisting>#define G_TYPE_IS_PARAM(type)		(G_TYPE_FUNDAMENTAL (type) == G_TYPE_PARAM)
</programlisting>
<para>
Returns whether <parameter>type</parameter> "is a" <literal>G_TYPE_PARAM</literal>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>type</parameter>&nbsp;:</entry>
<entry>a <link linkend="GType">GType</link> ID


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="G-PARAM-SPEC-CAPS">G_PARAM_SPEC()</title>
<programlisting>#define G_PARAM_SPEC(pspec)		(G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM, GParamSpec))
</programlisting>
<para>
Cast a derived <link linkend="GParamSpec">GParamSpec</link> object (e.g. of type <link linkend="GParamSpecInt">GParamSpecInt</link>) into
a <link linkend="GParamSpec">GParamSpec</link> object.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>a valid <link linkend="GParamSpec">GParamSpec</link>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="G-IS-PARAM-SPEC-CAPS">G_IS_PARAM_SPEC()</title>
<programlisting>#define G_IS_PARAM_SPEC(pspec)		(G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM))
</programlisting>
<para>
Check whether <parameter>pspec</parameter> "is a" valid <link linkend="GParamSpec">GParamSpec</link> structure of type <literal>G_TYPE_PARAM</literal>
or derived.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>a <link linkend="GParamSpec">GParamSpec</link>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="G-PARAM-SPEC-CLASS-CAPS">G_PARAM_SPEC_CLASS()</title>
<programlisting>#define G_PARAM_SPEC_CLASS(pclass)      (G_TYPE_CHECK_CLASS_CAST ((pclass), G_TYPE_PARAM, GParamSpecClass))
</programlisting>
<para>
Cast a derived <link linkend="GParamSpecClass">GParamSpecClass</link> structure into a <link linkend="GParamSpecClass">GParamSpecClass</link> structure.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pclass</parameter>&nbsp;:</entry>
<entry>a valid <link linkend="GParamSpecClass">GParamSpecClass</link>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="G-IS-PARAM-SPEC-CLASS-CAPS">G_IS_PARAM_SPEC_CLASS()</title>
<programlisting>#define G_IS_PARAM_SPEC_CLASS(pclass)   (G_TYPE_CHECK_CLASS_TYPE ((pclass), G_TYPE_PARAM))
</programlisting>
<para>
Check whether <parameter>pclass</parameter> "is a" valid <link linkend="GParamSpecClass">GParamSpecClass</link> structure of type <literal>G_TYPE_PARAM</literal>
or derived.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pclass</parameter>&nbsp;:</entry>
<entry>a <link linkend="GParamSpecClass">GParamSpecClass</link>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="G-PARAM-SPEC-GET-CLASS-CAPS">G_PARAM_SPEC_GET_CLASS()</title>
<programlisting>#define G_PARAM_SPEC_GET_CLASS(pspec)	(G_TYPE_INSTANCE_GET_CLASS ((pspec), G_TYPE_PARAM, GParamSpecClass))
</programlisting>
<para>
Retrieve the <link linkend="GParamSpecClass">GParamSpecClass</link> of a <link linkend="GParamSpec">GParamSpec</link>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>a valid <link linkend="GParamSpec">GParamSpec</link>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="G-PARAM-SPEC-TYPE-CAPS">G_PARAM_SPEC_TYPE()</title>
<programlisting>#define G_PARAM_SPEC_TYPE(pspec)	(G_TYPE_FROM_INSTANCE (pspec))
</programlisting>
<para>
Retrive the <link linkend="GType">GType</link> of this <parameter>pspec</parameter>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>a valid <link linkend="GParamSpec">GParamSpec</link>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="G-PARAM-SPEC-TYPE-NAME-CAPS">G_PARAM_SPEC_TYPE_NAME()</title>
<programlisting>#define G_PARAM_SPEC_TYPE_NAME(pspec)	(g_type_name (G_PARAM_SPEC_TYPE (pspec)))
</programlisting>
<para>
Retrive the <link linkend="GType">GType</link> name of this <parameter>pspec</parameter>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>a valid <link linkend="GParamSpec">GParamSpec</link>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="G-PARAM-SPEC-VALUE-TYPE-CAPS">G_PARAM_SPEC_VALUE_TYPE()</title>
<programlisting>#define	G_PARAM_SPEC_VALUE_TYPE(pspec)	(G_PARAM_SPEC (pspec)-&gt;value_type)
</programlisting>
<para>
Retrive the <link linkend="GType">GType</link> to intiialize a <link linkend="GValue">GValue</link> for this parameter.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>a valid <link linkend="GParamSpec">GParamSpec</link>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="GParamSpec">struct GParamSpec</title>
<programlisting>struct GParamSpec
{
  GTypeInstance  g_type_instance;

  gchar         *name;
  GParamFlags    flags;
  GType		 value_type;
  GType		 owner_type;	/* class using this property */

  /*&lt; private &gt;*/
  gchar         *_nick;
  gchar         *_blurb;
  GData		*qdata;
  guint          ref_count;
  guint		 param_id;	/* sort-criteria */
};
</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row>
<entry><link linkend="GTypeInstance">GTypeInstance</link> <structfield>g_type_instance</structfield></entry>
<entry>private <link linkend="GTypeInstance">GTypeInstance</link> portion
</entry>
</row>
<row>
<entry><link linkend="gchar">gchar</link> *<structfield>name</structfield></entry>
<entry>           name of this parameter
</entry>
</row>
<row>
<entry><link linkend="GParamFlags">GParamFlags</link> <structfield>flags</structfield></entry>
<entry>          <link linkend="GParamFlags">GParamFlags</link> flags for this parameter
</entry>
</row>
<row>
<entry><link linkend="GType">GType</link> <structfield>value_type</structfield></entry>
<entry>     the <link linkend="GValue">GValue</link> type for this parameter
</entry>
</row>
<row>
<entry><link linkend="GType">GType</link> <structfield>owner_type</structfield></entry>
<entry>     <link linkend="GType">GType</link> type that uses (introduces) this paremeter

</entry>
</row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="GParamSpecClass">struct GParamSpecClass</title>
<programlisting>struct GParamSpecClass;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GParamFlags">enum GParamFlags</title>
<programlisting>typedef enum
{
  G_PARAM_READABLE            = 1 &lt;&lt; 0,
  G_PARAM_WRITABLE            = 1 &lt;&lt; 1,
  G_PARAM_CONSTRUCT	      = 1 &lt;&lt; 2,
  G_PARAM_CONSTRUCT_ONLY      = 1 &lt;&lt; 3,
  G_PARAM_LAX_VALIDATION      = 1 &lt;&lt; 4,
  G_PARAM_PRIVATE	      = 1 &lt;&lt; 5
} GParamFlags;
</programlisting>
<para>
Through the <link linkend="GParamFlags">GParamFlags</link> flag values, certain aspects of parameters
can be configured.
</para><informaltable pgwide="1" frame="none" role="enum">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row>
<entry><literal>G_PARAM_READABLE</literal></entry>
<entry>      the parameter is readable
</entry>
</row>
<row>
<entry><literal>G_PARAM_WRITABLE</literal></entry>
<entry>      the parameter is writable
</entry>
</row>
<row>
<entry><literal>G_PARAM_CONSTRUCT</literal></entry>
<entry>     the parameter will be set upon object construction
</entry>
</row>
<row>
<entry><literal>G_PARAM_CONSTRUCT_ONLY</literal></entry>
<entry>the parameter will only be set upon object construction
</entry>
</row>
<row>
<entry><literal>G_PARAM_LAX_VALIDATION</literal></entry>
<entry>upon parameter conversion (see <link linkend="g-param-value-convert">g_param_value_convert</link>())
                         strict validation is not required
</entry>
</row>
<row>
<entry><literal>G_PARAM_PRIVATE</literal></entry>
<entry>

</entry>
</row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="G-PARAM-READWRITE-CAPS">G_PARAM_READWRITE</title>
<programlisting>#define	G_PARAM_READWRITE	(G_PARAM_READABLE | G_PARAM_WRITABLE)
</programlisting>
<para>
<link linkend="GParamFlags">GParamFlags</link> value alias for <literal>G_PARAM_READABLE</literal> | <literal>G_PARAM_WRITABLE</literal>.
</para></refsect2>
<refsect2>
<title><anchor id="G-PARAM-MASK-CAPS">G_PARAM_MASK</title>
<programlisting>#define	G_PARAM_MASK		(0x000000ff)
</programlisting>
<para>
Mask containing the bits of <link linkend="GParamSpec">GParamSpec</link>.flags which are reserved for GLib.
</para></refsect2>
<refsect2>
<title><anchor id="G-PARAM-USER-SHIFT-CAPS">G_PARAM_USER_SHIFT</title>
<programlisting>#define	G_PARAM_USER_SHIFT	(8)
</programlisting>
<para>
Minimum shift count to be used for user defined flags, to be stored in
<link linkend="GParamSpec">GParamSpec</link>.flags.
</para></refsect2>
<refsect2>
<title><anchor id="g-param-spec-ref">g_param_spec_ref ()</title>
<programlisting><link linkend="GParamSpec">GParamSpec</link>* g_param_spec_ref                (<link linkend="GParamSpec">GParamSpec</link> *pspec);</programlisting>
<para>
Increment the reference count of <parameter>pspec</parameter>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>  a valid <link linkend="GParamSpec">GParamSpec</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the <link linkend="GParamSpec">GParamSpec</link> that was passed into this function


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-unref">g_param_spec_unref ()</title>
<programlisting>void        g_param_spec_unref              (<link linkend="GParamSpec">GParamSpec</link> *pspec);</programlisting>
<para>
Decrement the reference count of a <parameter>pspec</parameter>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>a valid <link linkend="GParamSpec">GParamSpec</link>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-sink">g_param_spec_sink ()</title>
<programlisting>void        g_param_spec_sink               (<link linkend="GParamSpec">GParamSpec</link> *pspec);</programlisting>
<para>
The initial reference count of a newly created <link linkend="GParamSpec">GParamSpec</link> is 1,
eventhough no one has explicitely called <link linkend="g-param-spec-ref">g_param_spec_ref</link>() on it yet.
So the einital reference count is flagged as "floating", untill someone
calls: g_param_spec_ref (<parameter>pspec</parameter>); g_param_spec_sink (<parameter>pspec</parameter>);
in sequence on it, taking over the initial reference count (thus
ending up with a <parameter>pspec</parameter> that has a reference count of 1 still, but is
not flagged "floating" anymore).
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>a valid <link linkend="GParamSpec">GParamSpec</link>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-value-set-default">g_param_value_set_default ()</title>
<programlisting>void        g_param_value_set_default       (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GValue">GValue</link> *value);</programlisting>
<para>
Set <parameter>value</parameter> to its default value as specified in <parameter>pspec</parameter>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>a valid <link linkend="GParamSpec">GParamSpec</link>
</entry></row>
<row><entry align="right"><parameter>value</parameter>&nbsp;:</entry>
<entry>a <link linkend="GValue">GValue</link> of correct type for <parameter>pspec</parameter>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-value-defaults">g_param_value_defaults ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    g_param_value_defaults          (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GValue">GValue</link> *value);</programlisting>
<para>
Check whether <parameter>value</parameter> contains the default value as specified in <parameter>pspec</parameter>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>  a valid <link linkend="GParamSpec">GParamSpec</link>
</entry></row>
<row><entry align="right"><parameter>value</parameter>&nbsp;:</entry>
<entry>  a <link linkend="GValue">GValue</link> of correct type for <parameter>pspec</parameter>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>whether <parameter>value</parameter> contains the canonical defualt for this <parameter>pspec</parameter>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-value-validate">g_param_value_validate ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    g_param_value_validate          (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GValue">GValue</link> *value);</programlisting>
<para>
Ensure that the contents of <parameter>value</parameter> comply with the specifications
set out by <parameter>pspec</parameter>. For example, a <link linkend="GParamSpecInt">GParamSpecInt</link> might require
that integers stored in <parameter>value</parameter> may not be smaller than -42 and not be
greater than +42. If <parameter>value</parameter> contains an integer outside of this range,
it is modified accordingly, so the resulting value will fit into the
range -42 .. +42.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>  a valid <link linkend="GParamSpec">GParamSpec</link>
</entry></row>
<row><entry align="right"><parameter>value</parameter>&nbsp;:</entry>
<entry>  a <link linkend="GValue">GValue</link> of correct type for <parameter>pspec</parameter>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>whether modifying <parameter>value</parameter> was necessary to ensure validity


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-value-convert">g_param_value_convert ()</title>
<programlisting><link linkend="gboolean">gboolean</link>    g_param_value_convert           (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             const <link linkend="GValue">GValue</link> *src_value,
                                             <link linkend="GValue">GValue</link> *dest_value,
                                             <link linkend="gboolean">gboolean</link> strict_validation);</programlisting>
<para>
This function transforms <parameter>src_value</parameter> into <parameter>dest_value</parameter> if possible,
and then validates <parameter>dest_value</parameter>, in order for it to conform to
<parameter>pspec</parameter>.
If <parameter>strict_validation</parameter> is <literal>TRUE</literal> this function will only suceed if
the transformed <parameter>dest_value</parameter> complied to <parameter>pspec</parameter> without modifications.

See also <link linkend="g-value-type-transformable">g_value_type_transformable</link>(), <link linkend="g-value-transform">g_value_transform</link>() and
<link linkend="g-param-value-validate">g_param_value_validate</link>().
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>            a valid <link linkend="GParamSpec">GParamSpec</link>
</entry></row>
<row><entry align="right"><parameter>src_value</parameter>&nbsp;:</entry>
<entry>        souce <link linkend="GValue">GValue</link>
</entry></row>
<row><entry align="right"><parameter>dest_value</parameter>&nbsp;:</entry>
<entry>       destination <link linkend="GValue">GValue</link> of correct type for <parameter>pspec</parameter>
</entry></row>
<row><entry align="right"><parameter>strict_validation</parameter>&nbsp;:</entry>
<entry>$TRUE requires <parameter>dest_value</parameter> to conform to <parameter>pspec</parameter> without modifications
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>          <literal>TRUE</literal> if transformation and validation were successfull,
                    <literal>FALSE</literal> otherwise and <parameter>dest_value</parameter> is left untouched.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-values-cmp">g_param_values_cmp ()</title>
<programlisting><link linkend="gint">gint</link>        g_param_values_cmp              (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             const <link linkend="GValue">GValue</link> *value1,
                                             const <link linkend="GValue">GValue</link> *value2);</programlisting>
<para>
Compare <parameter>value1</parameter> with <parameter>value2</parameter> according to <parameter>pspec</parameter>, and return -1, 0 or +1,
if <parameter>value1</parameter> is found to be less than, equal to or greater than <parameter>value2</parameter>, respectively.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>  a valid <link linkend="GParamSpec">GParamSpec</link>
</entry></row>
<row><entry align="right"><parameter>value1</parameter>&nbsp;:</entry>
<entry> a <link linkend="GValue">GValue</link> of correct type for <parameter>pspec</parameter>
</entry></row>
<row><entry align="right"><parameter>value2</parameter>&nbsp;:</entry>
<entry> a <link linkend="GValue">GValue</link> of correct type for <parameter>pspec</parameter>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>-1, 0 or +1, for a less than, equal to or greater than result


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-get-name">g_param_spec_get_name ()</title>
<programlisting>G_CONST_RETURN <link linkend="gchar">gchar</link>* g_param_spec_get_name (<link linkend="GParamSpec">GParamSpec</link> *pspec);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-get-nick">g_param_spec_get_nick ()</title>
<programlisting>G_CONST_RETURN <link linkend="gchar">gchar</link>* g_param_spec_get_nick (<link linkend="GParamSpec">GParamSpec</link> *pspec);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-get-blurb">g_param_spec_get_blurb ()</title>
<programlisting>G_CONST_RETURN <link linkend="gchar">gchar</link>* g_param_spec_get_blurb
                                            (<link linkend="GParamSpec">GParamSpec</link> *pspec);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-get-qdata">g_param_spec_get_qdata ()</title>
<programlisting><link linkend="gpointer">gpointer</link>    g_param_spec_get_qdata          (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GQuark">GQuark</link> quark);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>quark</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-set-qdata">g_param_spec_set_qdata ()</title>
<programlisting>void        g_param_spec_set_qdata          (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GQuark">GQuark</link> quark,
                                             <link linkend="gpointer">gpointer</link> data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>quark</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>data</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-set-qdata-full">g_param_spec_set_qdata_full ()</title>
<programlisting>void        g_param_spec_set_qdata_full     (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GQuark">GQuark</link> quark,
                                             <link linkend="gpointer">gpointer</link> data,
                                             <link linkend="GDestroyNotify">GDestroyNotify</link> destroy);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>quark</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>data</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>destroy</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-steal-qdata">g_param_spec_steal_qdata ()</title>
<programlisting><link linkend="gpointer">gpointer</link>    g_param_spec_steal_qdata        (<link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GQuark">GQuark</link> quark);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>quark</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-internal">g_param_spec_internal ()</title>
<programlisting><link linkend="gpointer">gpointer</link>    g_param_spec_internal           (<link linkend="GType">GType</link> param_type,
                                             const <link linkend="gchar">gchar</link> *name,
                                             const <link linkend="gchar">gchar</link> *nick,
                                             const <link linkend="gchar">gchar</link> *blurb,
                                             <link linkend="GParamFlags">GParamFlags</link> flags);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>param_type</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>name</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>nick</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>blurb</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>flags</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="GParamSpecTypeInfo">struct GParamSpecTypeInfo</title>
<programlisting>struct GParamSpecTypeInfo
{
  /* type system portion */
  guint16         instance_size;                               /* obligatory */
  guint16         n_preallocs;                                 /* optional */
  void		(*instance_init)	(GParamSpec   *pspec); /* optional */

  /* class portion */
  GType           value_type;				       /* obligatory */
  void          (*finalize)             (GParamSpec   *pspec); /* optional */
  void          (*value_set_default)    (GParamSpec   *pspec,  /* recommended */
					 GValue       *value);
  gboolean      (*value_validate)       (GParamSpec   *pspec,  /* optional */
					 GValue       *value);
  gint          (*values_cmp)           (GParamSpec   *pspec,  /* recommended */
					 const GValue *value1,
					 const GValue *value2);
};
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="g-param-type-register-static">g_param_type_register_static ()</title>
<programlisting><link linkend="GType">GType</link>       g_param_type_register_static    (const <link linkend="gchar">gchar</link> *name,
                                             const <link linkend="GParamSpecTypeInfo">GParamSpecTypeInfo</link> *pspec_info);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>name</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>pspec_info</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="GParamSpecPool">struct GParamSpecPool</title>
<programlisting>struct GParamSpecPool;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="g-param-spec-pool-new">g_param_spec_pool_new ()</title>
<programlisting><link linkend="GParamSpecPool">GParamSpecPool</link>* g_param_spec_pool_new       (<link linkend="gboolean">gboolean</link> type_prefixing);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>type_prefixing</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-pool-insert">g_param_spec_pool_insert ()</title>
<programlisting>void        g_param_spec_pool_insert        (<link linkend="GParamSpecPool">GParamSpecPool</link> *pool,
                                             <link linkend="GParamSpec">GParamSpec</link> *pspec,
                                             <link linkend="GType">GType</link> owner_type);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pool</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>owner_type</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-pool-remove">g_param_spec_pool_remove ()</title>
<programlisting>void        g_param_spec_pool_remove        (<link linkend="GParamSpecPool">GParamSpecPool</link> *pool,
                                             <link linkend="GParamSpec">GParamSpec</link> *pspec);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pool</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-pool-lookup">g_param_spec_pool_lookup ()</title>
<programlisting><link linkend="GParamSpec">GParamSpec</link>* g_param_spec_pool_lookup        (<link linkend="GParamSpecPool">GParamSpecPool</link> *pool,
                                             const <link linkend="gchar">gchar</link> *param_name,
                                             <link linkend="GType">GType</link> owner_type,
                                             <link linkend="gboolean">gboolean</link> walk_ancestors);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pool</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>param_name</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>owner_type</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>walk_ancestors</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-pool-list">g_param_spec_pool_list ()</title>
<programlisting><link linkend="GParamSpec">GParamSpec</link>** g_param_spec_pool_list         (<link linkend="GParamSpecPool">GParamSpecPool</link> *pool,
                                             <link linkend="GType">GType</link> owner_type,
                                             <link linkend="guint">guint</link> *n_pspecs_p);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pool</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>owner_type</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>n_pspecs_p</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="g-param-spec-pool-list-owned">g_param_spec_pool_list_owned ()</title>
<programlisting><link linkend="GList">GList</link>*      g_param_spec_pool_list_owned    (<link linkend="GParamSpecPool">GParamSpecPool</link> *pool,
                                             <link linkend="GType">GType</link> owner_type);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>pool</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>owner_type</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>



<refsect1>
<title>See Also</title>
<para>
<link linkend="g-object-class-install-property">g_object_class_install_property</link>(), <link linkend="g-object-set">g_object_set</link>(), <link linkend="g-object-get">g_object_get</link>(),
<link linkend="g-object-set-property">g_object_set_property</link>(), <link linkend="g-object-get-property">g_object_get_property</link>(), <link linkend="g-value-register-transform-func">g_value_register_transform_func</link>()
</para>
</refsect1>

</refentry>
