📄 param_value_types.sgml
字号:
<row><entry align="right"><parameter>default_value</parameter> :</entry><entry>default value for the property specified</entry></row><row><entry align="right"><parameter>flags</parameter> :</entry><entry> flags for the property specified</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a newly created parameter specification</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-value-set-boolean">g_value_set_boolean ()</title><programlisting>void g_value_set_boolean (<link linkend="GValue">GValue</link> *value, <link linkend="gboolean">gboolean</link> v_boolean);</programlisting><para>Set the contents of a <literal>G_TYPE_BOOLEAN</literal> <link linkend="GValue">GValue</link> to <parameter>v_boolean</parameter>.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>value</parameter> :</entry><entry> a valid <link linkend="GValue">GValue</link> of type <literal>G_TYPE_BOOLEAN</literal></entry></row><row><entry align="right"><parameter>v_boolean</parameter> :</entry><entry>boolean value to be set</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-value-get-boolean">g_value_get_boolean ()</title><programlisting><link linkend="gboolean">gboolean</link> g_value_get_boolean (const <link linkend="GValue">GValue</link> *value);</programlisting><para>Get the contents of a <literal>G_TYPE_BOOLEAN</literal> <link linkend="GValue">GValue</link>.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>value</parameter> :</entry><entry> a valid <link linkend="GValue">GValue</link> of type <literal>G_TYPE_BOOLEAN</literal></entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>boolean contents of <parameter>value</parameter></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-IS-PARAM-SPEC-CHAR-CAPS">G_IS_PARAM_SPEC_CHAR()</title><programlisting>#define G_IS_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CHAR))</programlisting><para>Return whether the given <link linkend="GParamSpec">GParamSpec</link> is of type <literal>G_TYPE_PARAM_CHAR</literal>.</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> :</entry><entry>a valid <link linkend="GParamSpec">GParamSpec</link> instance</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-PARAM-SPEC-CHAR-CAPS">G_PARAM_SPEC_CHAR()</title><programlisting>#define G_PARAM_SPEC_CHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CHAR, GParamSpecChar))</programlisting><para>Cast a <link linkend="GParamSpec">GParamSpec</link> instance into a <link linkend="GParamSpecChar">GParamSpecChar</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> :</entry><entry>a valid <link linkend="GParamSpec">GParamSpec</link> instance</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-VALUE-HOLDS-CHAR-CAPS">G_VALUE_HOLDS_CHAR()</title><programlisting>#define G_VALUE_HOLDS_CHAR(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_CHAR))</programlisting><para>Return whether the given <link linkend="GValue">GValue</link> can hold values of type <literal>G_TYPE_CHAR</literal>.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>value</parameter> :</entry><entry>a valid <link linkend="GValue">GValue</link> structure</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-PARAM-CHAR-CAPS">G_TYPE_PARAM_CHAR</title><programlisting>#define G_TYPE_PARAM_CHAR (g_param_spec_types[0])</programlisting><para></para></refsect2><refsect2><title><anchor id="GParamSpecChar">struct GParamSpecChar</title><programlisting>struct GParamSpecChar{ GParamSpec parent_instance; gint8 minimum; gint8 maximum; gint8 default_value;};</programlisting><para>A <link linkend="GParamSpec">GParamSpec</link> derived structure that contains the meta data for character properties.</para><informaltable pgwide="1" frame="none" role="struct"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry><link linkend="GParamSpec">GParamSpec</link> <structfield>parent_instance</structfield></entry><entry>private <link linkend="GParamSpec">GParamSpec</link> portion</entry></row><row><entry><link linkend="gint8">gint8</link> <structfield>minimum</structfield></entry><entry> minimum value for the property specified</entry></row><row><entry><link linkend="gint8">gint8</link> <structfield>maximum</structfield></entry><entry> maximum value for the property specified</entry></row><row><entry><link linkend="gint8">gint8</link> <structfield>default_value</structfield></entry><entry> default value for the property specified</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-param-spec-char">g_param_spec_char ()</title><programlisting><link linkend="GParamSpec">GParamSpec</link>* g_param_spec_char (const <link linkend="gchar">gchar</link> *name, const <link linkend="gchar">gchar</link> *nick, const <link linkend="gchar">gchar</link> *blurb, <link linkend="gint8">gint8</link> minimum, <link linkend="gint8">gint8</link> maximum, <link linkend="gint8">gint8</link> default_value, <link linkend="GParamFlags">GParamFlags</link> flags);</programlisting><para>Create a new <link linkend="GParamSpecChar">GParamSpecChar</link> instance specifying a <literal>G_TYPE_CHAR</literal> property.</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> :</entry><entry> canonical name of the property specified</entry></row><row><entry align="right"><parameter>nick</parameter> :</entry><entry> nick name for the property specified</entry></row><row><entry align="right"><parameter>blurb</parameter> :</entry><entry> description of the property specified</entry></row><row><entry align="right"><parameter>minimum</parameter> :</entry><entry> minimum value for the property specified</entry></row><row><entry align="right"><parameter>maximum</parameter> :</entry><entry> maximum value for the property specified</entry></row><row><entry align="right"><parameter>default_value</parameter> :</entry><entry>default value for the property specified</entry></row><row><entry align="right"><parameter>flags</parameter> :</entry><entry> flags for the property specified</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a newly created parameter specification</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-value-set-char">g_value_set_char ()</title><programlisting>void g_value_set_char (<link linkend="GValue">GValue</link> *value, <link linkend="gchar">gchar</link> v_char);</programlisting><para>Set the contents of a <literal>G_TYPE_CHAR</literal> <link linkend="GValue">GValue</link> to <parameter>v_char</parameter>.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>value</parameter> :</entry><entry> a valid <link linkend="GValue">GValue</link> of type <literal>G_TYPE_CHAR</literal></entry></row><row><entry align="right"><parameter>v_char</parameter> :</entry><entry>character value to be set</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-value-get-char">g_value_get_char ()</title><programlisting><link linkend="gchar">gchar</link> g_value_get_char (const <link linkend="GValue">GValue</link> *value);</programlisting><para>Get the contents of a <literal>G_TYPE_CHAR</literal> <link linkend="GValue">GValue</link>.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>value</parameter> :</entry><entry> a valid <link linkend="GValue">GValue</link> of type <literal>G_TYPE_CHAR</literal></entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>character contents of <parameter>value</parameter></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-IS-PARAM-SPEC-UCHAR-CAPS">G_IS_PARAM_SPEC_UCHAR()</title><programlisting>#define G_IS_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UCHAR))</programlisting>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -