📄 atkvalue.xml
字号:
<refentry id="AtkValue"><refmeta><refentrytitle>AtkValue</refentrytitle><manvolnum>3</manvolnum><refmiscinfo>ATK Library</refmiscinfo></refmeta><refnamediv><refname>AtkValue</refname><refpurpose>The ATK interface implemented by valuators and components which display orselect a value from a bounded range of values.</refpurpose></refnamediv><refsynopsisdiv><title>Synopsis</title><synopsis>struct <link linkend="AtkValue-struct">AtkValue</link>;<link linkend="void">void</link> <link linkend="atk-value-get-current-value">atk_value_get_current_value</link> (<link linkend="AtkValue">AtkValue</link> *obj, <link linkend="GValue">GValue</link> *value);<link linkend="void">void</link> <link linkend="atk-value-get-maximum-value">atk_value_get_maximum_value</link> (<link linkend="AtkValue">AtkValue</link> *obj, <link linkend="GValue">GValue</link> *value);<link linkend="void">void</link> <link linkend="atk-value-get-minimum-value">atk_value_get_minimum_value</link> (<link linkend="AtkValue">AtkValue</link> *obj, <link linkend="GValue">GValue</link> *value);<link linkend="gboolean">gboolean</link> <link linkend="atk-value-set-current-value">atk_value_set_current_value</link> (<link linkend="AtkValue">AtkValue</link> *obj, const <link linkend="GValue">GValue</link> *value);</synopsis></refsynopsisdiv><refsect1><title>Object Hierarchy</title><synopsis> <link linkend="GInterface">GInterface</link> +----AtkValue</synopsis></refsect1><refsect1><title>Known Implementations</title><para>AtkValue is implemented by <link linkend="AtkNoOpObject">AtkNoOpObject</link>.</para></refsect1><refsect1><title>Description</title><para><link linkend="AtkValue"><type>AtkValue</type></link> should be implemented for components which either display avalue from a bounded range, or which allow the user to specify a valuefrom a bounded range, or both. For instance, most sliders and rangecontrols, as well as dials, should have <link linkend="AtkObject"><type>AtkObject</type></link> representations whichimplement <link linkend="AtkValue"><type>AtkValue</type></link> on the component's behalf. <link linkend="AtKValues"><type>AtKValues</type></link> may beread-only, in which case attempts to alter the value return FALSE toindicate failure.</para></refsect1><refsect1><title>Details</title><refsect2><title><anchor id="AtkValue-struct"/>struct AtkValue</title><indexterm><primary>AtkValue</primary></indexterm><programlisting>struct AtkValue;</programlisting><para>The AtkValue structure does not contain any fields.</para></refsect2><refsect2><title><anchor id="atk-value-get-current-value"/>atk_value_get_current_value ()</title><indexterm><primary>atk_value_get_current_value</primary></indexterm><programlisting><link linkend="void">void</link> atk_value_get_current_value (<link linkend="AtkValue">AtkValue</link> *obj, <link linkend="GValue">GValue</link> *value);</programlisting><para>Gets the value of this object.</para><para></para><variablelist role="params"><varlistentry><term><parameter>obj</parameter> :</term><listitem><simpara> a GObject instance that implements AtkValueIface</simpara></listitem></varlistentry><varlistentry><term><parameter>value</parameter> :</term><listitem><simpara> a <link linkend="GValue"><type>GValue</type></link> representing the current accessible value</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="atk-value-get-maximum-value"/>atk_value_get_maximum_value ()</title><indexterm><primary>atk_value_get_maximum_value</primary></indexterm><programlisting><link linkend="void">void</link> atk_value_get_maximum_value (<link linkend="AtkValue">AtkValue</link> *obj, <link linkend="GValue">GValue</link> *value);</programlisting><para>Gets the maximum value of this object.</para><para></para><variablelist role="params"><varlistentry><term><parameter>obj</parameter> :</term><listitem><simpara> a GObject instance that implements AtkValueIface</simpara></listitem></varlistentry><varlistentry><term><parameter>value</parameter> :</term><listitem><simpara> a <link linkend="GValue"><type>GValue</type></link> representing the maximum accessible value</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="atk-value-get-minimum-value"/>atk_value_get_minimum_value ()</title><indexterm><primary>atk_value_get_minimum_value</primary></indexterm><programlisting><link linkend="void">void</link> atk_value_get_minimum_value (<link linkend="AtkValue">AtkValue</link> *obj, <link linkend="GValue">GValue</link> *value);</programlisting><para>Gets the minimum value of this object.</para><para></para><variablelist role="params"><varlistentry><term><parameter>obj</parameter> :</term><listitem><simpara> a GObject instance that implements AtkValueIface</simpara></listitem></varlistentry><varlistentry><term><parameter>value</parameter> :</term><listitem><simpara> a <link linkend="GValue"><type>GValue</type></link> representing the minimum accessible value</simpara></listitem></varlistentry></variablelist></refsect2><refsect2><title><anchor id="atk-value-set-current-value"/>atk_value_set_current_value ()</title><indexterm><primary>atk_value_set_current_value</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> atk_value_set_current_value (<link linkend="AtkValue">AtkValue</link> *obj, const <link linkend="GValue">GValue</link> *value);</programlisting><para>Sets the value of this object.</para><para></para><variablelist role="params"><varlistentry><term><parameter>obj</parameter> :</term><listitem><simpara> a GObject instance that implements AtkValueIface</simpara></listitem></varlistentry><varlistentry><term><parameter>value</parameter> :</term><listitem><simpara> a <link linkend="GValue"><type>GValue</type></link> which is the desired new accessible value.</simpara></listitem></varlistentry><varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <literal>TRUE</literal> if new value is successfully set, <literal>FALSE</literal> otherwise.</simpara></listitem></varlistentry></variablelist></refsect2></refsect1></refentry>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -