📄 param_value_types.sgml
字号:
<para>Return whether the given <link linkend="GParamSpec">GParamSpec</link> is of type <literal>G_TYPE_PARAM_UCHAR</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-UCHAR-CAPS">G_PARAM_SPEC_UCHAR()</title><programlisting>#define G_PARAM_SPEC_UCHAR(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UCHAR, GParamSpecUChar))</programlisting><para>Cast a <link linkend="GParamSpec">GParamSpec</link> instance into a <link linkend="GParamSpecUChar">GParamSpecUChar</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-UCHAR-CAPS">G_VALUE_HOLDS_UCHAR()</title><programlisting>#define G_VALUE_HOLDS_UCHAR(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UCHAR))</programlisting><para>Return whether the given <link linkend="GValue">GValue</link> can hold values of type <literal>G_TYPE_UCHAR</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-UCHAR-CAPS">G_TYPE_PARAM_UCHAR</title><programlisting>#define G_TYPE_PARAM_UCHAR (g_param_spec_types[1])</programlisting><para></para></refsect2><refsect2><title><anchor id="GParamSpecUChar">struct GParamSpecUChar</title><programlisting>struct GParamSpecUChar{ GParamSpec parent_instance; guint8 minimum; guint8 maximum; guint8 default_value;};</programlisting><para>A <link linkend="GParamSpec">GParamSpec</link> derived structure that contains the meta data for unsigned 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="guint8">guint8</link> <structfield>minimum</structfield></entry><entry> minimum value for the property specified</entry></row><row><entry><link linkend="guint8">guint8</link> <structfield>maximum</structfield></entry><entry> maximum value for the property specified</entry></row><row><entry><link linkend="guint8">guint8</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-uchar">g_param_spec_uchar ()</title><programlisting><link linkend="GParamSpec">GParamSpec</link>* g_param_spec_uchar (const <link linkend="gchar">gchar</link> *name, const <link linkend="gchar">gchar</link> *nick, const <link linkend="gchar">gchar</link> *blurb, <link linkend="guint8">guint8</link> minimum, <link linkend="guint8">guint8</link> maximum, <link linkend="guint8">guint8</link> default_value, <link linkend="GParamFlags">GParamFlags</link> flags);</programlisting><para>Create a new <link linkend="GParamSpecUChar">GParamSpecUChar</link> instance specifying a <literal>G_TYPE_UCHAR</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-uchar">g_value_set_uchar ()</title><programlisting>void g_value_set_uchar (<link linkend="GValue">GValue</link> *value, <link linkend="guchar">guchar</link> v_uchar);</programlisting><para>Set the contents of a <literal>G_TYPE_UCHAR</literal> <link linkend="GValue">GValue</link> to <parameter>v_uchar</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_UCHAR</literal></entry></row><row><entry align="right"><parameter>v_uchar</parameter> :</entry><entry>unsigned character value to be set</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-value-get-uchar">g_value_get_uchar ()</title><programlisting><link linkend="guchar">guchar</link> g_value_get_uchar (const <link linkend="GValue">GValue</link> *value);</programlisting><para>Get the contents of a <literal>G_TYPE_UCHAR</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_UCHAR</literal></entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>unsigned character contents of <parameter>value</parameter></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-IS-PARAM-SPEC-INT-CAPS">G_IS_PARAM_SPEC_INT()</title><programlisting>#define G_IS_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT))</programlisting><para>Return whether the given <link linkend="GParamSpec">GParamSpec</link> is of type <literal>G_TYPE_PARAM_INT</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-INT-CAPS">G_PARAM_SPEC_INT()</title><programlisting>#define G_PARAM_SPEC_INT(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt))</programlisting><para>Cast a <link linkend="GParamSpec">GParamSpec</link> instance into a <link linkend="GParamSpecInt">GParamSpecInt</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-INT-CAPS">G_VALUE_HOLDS_INT()</title><programlisting>#define G_VALUE_HOLDS_INT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT))</programlisting><para>Return whether the given <link linkend="GValue">GValue</link> can hold values of type <literal>G_TYPE_INT</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-INT-CAPS">G_TYPE_PARAM_INT</title><programlisting>#define G_TYPE_PARAM_INT (g_param_spec_types[3])</programlisting><para>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -