⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 param_value_types.sgml

📁 GLib是GTK+和GNOME工程的基础底层核心程序库
💻 SGML
📖 第 1 页 / 共 5 页
字号:
</para></refsect2><refsect2><title><anchor id="GParamSpecInt">struct GParamSpecInt</title><programlisting>struct GParamSpecInt{  GParamSpec    parent_instance;    gint          minimum;  gint          maximum;  gint          default_value;};</programlisting><para>A <link linkend="GParamSpec">GParamSpec</link> derived structure that contains the meta data for integer 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="gint">gint</link> <structfield>minimum</structfield></entry><entry>        minimum value for the property specified</entry></row><row><entry><link linkend="gint">gint</link> <structfield>maximum</structfield></entry><entry>        maximum value for the property specified</entry></row><row><entry><link linkend="gint">gint</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-int">g_param_spec_int ()</title><programlisting><link linkend="GParamSpec">GParamSpec</link>* g_param_spec_int                (const <link linkend="gchar">gchar</link> *name,                                             const <link linkend="gchar">gchar</link> *nick,                                             const <link linkend="gchar">gchar</link> *blurb,                                             <link linkend="gint">gint</link> minimum,                                             <link linkend="gint">gint</link> maximum,                                             <link linkend="gint">gint</link> default_value,                                             <link linkend="GParamFlags">GParamFlags</link> flags);</programlisting><para>Create a new <link linkend="GParamSpecInt">GParamSpecInt</link> instance specifying a <literal>G_TYPE_INT</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>&nbsp;:</entry><entry>         canonical name of the property specified</entry></row><row><entry align="right"><parameter>nick</parameter>&nbsp;:</entry><entry>         nick name for the property specified</entry></row><row><entry align="right"><parameter>blurb</parameter>&nbsp;:</entry><entry>        description of the property specified</entry></row><row><entry align="right"><parameter>minimum</parameter>&nbsp;:</entry><entry>      minimum value for the property specified</entry></row><row><entry align="right"><parameter>maximum</parameter>&nbsp;:</entry><entry>      maximum value for the property specified</entry></row><row><entry align="right"><parameter>default_value</parameter>&nbsp;:</entry><entry>default value for the property specified</entry></row><row><entry align="right"><parameter>flags</parameter>&nbsp;:</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-int">g_value_set_int ()</title><programlisting>void        g_value_set_int                 (<link linkend="GValue">GValue</link> *value,                                             <link linkend="gint">gint</link> v_int);</programlisting><para>Set the contents of a <literal>G_TYPE_INT</literal> <link linkend="GValue">GValue</link> to <parameter>v_int</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>&nbsp;:</entry><entry>a valid <link linkend="GValue">GValue</link> of type <literal>G_TYPE_INT</literal></entry></row><row><entry align="right"><parameter>v_int</parameter>&nbsp;:</entry><entry>integer value to be set</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-value-get-int">g_value_get_int ()</title><programlisting><link linkend="gint">gint</link>        g_value_get_int                 (const <link linkend="GValue">GValue</link> *value);</programlisting><para>Get the contents of a <literal>G_TYPE_INT</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>&nbsp;:</entry><entry>  a valid <link linkend="GValue">GValue</link> of type <literal>G_TYPE_INT</literal></entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>integer contents of <parameter>value</parameter></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-IS-PARAM-SPEC-UINT-CAPS">G_IS_PARAM_SPEC_UINT()</title><programlisting>#define G_IS_PARAM_SPEC_UINT(pspec)        (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT))</programlisting><para>Return whether the given <link linkend="GParamSpec">GParamSpec</link> is of type <literal>G_TYPE_PARAM_UINT</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>&nbsp;:</entry><entry>a valid <link linkend="GParamSpec">GParamSpec</link> instance</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-PARAM-SPEC-UINT-CAPS">G_PARAM_SPEC_UINT()</title><programlisting>#define G_PARAM_SPEC_UINT(pspec)           (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt))</programlisting><para>Cast a <link linkend="GParamSpec">GParamSpec</link> instance into a <link linkend="GParamSpecUInt">GParamSpecUInt</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> instance</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-VALUE-HOLDS-UINT-CAPS">G_VALUE_HOLDS_UINT()</title><programlisting>#define G_VALUE_HOLDS_UINT(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT))</programlisting><para>Return whether the given <link linkend="GValue">GValue</link> can hold values of type <literal>G_TYPE_UINT</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>&nbsp;:</entry><entry>a valid <link linkend="GValue">GValue</link> structure</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-PARAM-UINT-CAPS">G_TYPE_PARAM_UINT</title><programlisting>#define	G_TYPE_PARAM_UINT		   (g_param_spec_types[4])</programlisting><para></para></refsect2><refsect2><title><anchor id="GParamSpecUInt">struct GParamSpecUInt</title><programlisting>struct GParamSpecUInt{  GParamSpec    parent_instance;    guint         minimum;  guint         maximum;  guint         default_value;};</programlisting><para>A <link linkend="GParamSpec">GParamSpec</link> derived structure that contains the meta data for unsigned integer 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="guint">guint</link> <structfield>minimum</structfield></entry><entry>        minimum value for the property specified</entry></row><row><entry><link linkend="guint">guint</link> <structfield>maximum</structfield></entry><entry>        maximum value for the property specified</entry></row><row><entry><link linkend="guint">guint</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-uint">g_param_spec_uint ()</title><programlisting><link linkend="GParamSpec">GParamSpec</link>* g_param_spec_uint               (const <link linkend="gchar">gchar</link> *name,                                             const <link linkend="gchar">gchar</link> *nick,                                             const <link linkend="gchar">gchar</link> *blurb,                                             <link linkend="guint">guint</link> minimum,                                             <link linkend="guint">guint</link> maximum,                                             <link lin

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -