<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
  <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
  <!ENTITY % gtkdocentities SYSTEM "../xml/gtkdocentities.ent">
  %gtkdocentities;
]>
<refentry id="AtkValue">
<refmeta>
<refentrytitle role="top_of_page" id="AtkValue.top_of_page">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 or select a value from a bounded range of
values.</refpurpose>
</refnamediv>

<refsect1 id="AtkValue.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-value-get-current-value">atk_value_get_current_value</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-value-get-maximum-value">atk_value_get_maximum_value</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-value-get-minimum-value">atk_value_get_minimum_value</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-value-set-current-value">atk_value_set_current_value</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-value-get-minimum-increment">atk_value_get_minimum_increment</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-value-get-value-and-text">atk_value_get_value_and_text</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="AtkRange"><returnvalue>AtkRange</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="atk-value-get-range">atk_value_get_range</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-value-get-increment">atk_value_get_increment</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GSList"><returnvalue>GSList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="atk-value-get-sub-ranges">atk_value_get_sub_ranges</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="atk-value-set-value">atk_value_set_value</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AtkValue.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="AtkValue-value-changed">value-changed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AtkValue.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="AtkValue-struct">AtkValue</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="AtkValue.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GInterface">GInterface</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> AtkValue
</screen>
</refsect1>
<refsect1 id="AtkValue.implementations" role="implementations">
<title role="implementations.title">Known Implementations</title>
<para>
AtkValue is implemented by
 <link linkend="AtkNoOpObject">AtkNoOpObject</link>.</para>

</refsect1>


<refsect1 id="AtkValue.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="AtkValue"><type>AtkValue</type></link> should be implemented for components which either display
a value from a bounded range, or which allow the user to specify a
value from a bounded range, or both. For instance, most sliders and
range controls, as well as dials, should have <link linkend="AtkObject"><type>AtkObject</type></link>
representations which implement <link linkend="AtkValue"><type>AtkValue</type></link> on the component's
behalf. <link linkend="AtKValues"><type>AtKValues</type></link> may be read-only, in which case attempts to
alter the value return would fail.</para>
<refsect1 id="current-value-text">
<title>On the subject of current value text</title>
<para>
In addition to providing the current value, implementors can
optionally provide an end-user-consumable textual description
associated with this value. This description should be included
when the numeric value fails to convey the full, on-screen
representation seen by users.
</para>

<example>
<title>Password strength</title>
A password strength meter whose value changes as the user types
their new password. Red is used for values less than 4.0, yellow
for values between 4.0 and 7.0, and green for values greater than
7.0. In this instance, value text should be provided by the
implementor. Appropriate value text would be "weak", "acceptable,"
and "strong" respectively.
</example>

A level bar whose value changes to reflect the battery charge. The
color remains the same regardless of the charge and there is no
on-screen text reflecting the fullness of the battery. In this
case, because the position within the bar is the only indication
the user has of the current charge, value text should not be
provided by the implementor.

<refsect2 id="implementor-notes">
<title>Implementor Notes</title>
<para>
Implementors should bear in mind that assistive technologies will
likely prefer the value text provided over the numeric value when
presenting a widget's value. As a result, strings not intended for
end users should not be exposed in the value text, and strings
which are exposed should be localized. In the case of widgets which
display value text on screen, for instance through a separate label
in close proximity to the value-displaying widget, it is still
expected that implementors will expose the value text using the
above API.
</para>

<para>
<link linkend="AtkValue"><type>AtkValue</type></link> should NOT be implemented for widgets whose displayed
value is not reflective of a meaningful amount. For instance, a
progress pulse indicator whose value alternates between 0.0 and 1.0
to indicate that some process is still taking place should not
implement <link linkend="AtkValue"><type>AtkValue</type></link> because the current value does not reflect
progress towards completion.
</para>
</refsect2>
</refsect1>
<refsect1 id="ranges">
<title>On the subject of ranges</title>
<para>
In addition to providing the minimum and maximum values,
implementors can optionally provide details about subranges
associated with the widget. These details should be provided by the
implementor when both of the following are communicated visually to
the end user:
</para>
<itemizedlist>
  <listitem>The existence of distinct ranges such as "weak",
  "acceptable", and "strong" indicated by color, bar tick marks,
  and/or on-screen text.</listitem>
  <listitem>Where the current value stands within a given subrange,
  for instance illustrating progression from very "weak" towards
  nearly "acceptable" through changes in shade and/or position on
  the bar within the "weak" subrange.</listitem>
</itemizedlist>
<para>
If both of the above do not apply to the widget, it should be
sufficient to expose the numeric value, along with the value text
if appropriate, to make the widget accessible.
</para>

<refsect2 id="ranges-implementor-notes">
<title>Implementor Notes</title>
<para>
If providing subrange details is deemed necessary, all possible
values of the widget are expected to fall within one of the
subranges defined by the implementor.
</para>
</refsect2>
</refsect1>
<refsect1 id="localization">
<title>On the subject of localization of end-user-consumable text
values</title>
<para>
Because value text and subrange descriptors are human-consumable,
implementors are expected to provide localized strings which can be
directly presented to end users via their assistive technology. In
order to simplify this for implementors, implementors can use
<link linkend="atk-value-type-get-localized-name"><function>atk_value_type_get_localized_name()</function></link> with the following
already-localized constants for commonly-needed values can be used:
</para>

<itemizedlist>
  <listitem>ATK_VALUE_VERY_WEAK</listitem>
  <listitem>ATK_VALUE_WEAK</listitem>
  <listitem>ATK_VALUE_ACCEPTABLE</listitem>
  <listitem>ATK_VALUE_STRONG</listitem>
  <listitem>ATK_VALUE_VERY_STRONG</listitem>
  <listitem>ATK_VALUE_VERY_LOW</listitem>
  <listitem>ATK_VALUE_LOW</listitem>
  <listitem>ATK_VALUE_MEDIUM</listitem>
  <listitem>ATK_VALUE_HIGH</listitem>
  <listitem>ATK_VALUE_VERY_HIGH</listitem>
  <listitem>ATK_VALUE_VERY_BAD</listitem>
  <listitem>ATK_VALUE_BAD</listitem>
  <listitem>ATK_VALUE_GOOD</listitem>
  <listitem>ATK_VALUE_VERY_GOOD</listitem>
  <listitem>ATK_VALUE_BEST</listitem>
  <listitem>ATK_VALUE_SUBSUBOPTIMAL</listitem>
  <listitem>ATK_VALUE_SUBOPTIMAL</listitem>
  <listitem>ATK_VALUE_OPTIMAL</listitem>
</itemizedlist>
<para>
Proposals for additional constants, along with their use cases,
should be submitted to the GNOME Accessibility Team.
</para>
</refsect1>
<refsect1 id="changes">
<title>On the subject of changes</title>
<para>
Note that if there is a textual description associated with the new
numeric value, that description should be included regardless of
whether or not it has also changed.
</para>
</refsect1>

</refsect1>
<refsect1 id="AtkValue.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="atk-value-get-current-value" role="function" condition="deprecated">
<title>atk_value_get_current_value&#160;()</title>
<indexterm zone="atk-value-get-current-value" role="deprecated"><primary>atk_value_get_current_value</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_value_get_current_value (<parameter><link linkend="AtkValue"><type>AtkValue</type></link> *obj</parameter>,
                             <parameter><link linkend="GValue"><type>GValue</type></link> *value</parameter>);</programlisting>
<warning><para><literal>atk_value_get_current_value</literal> is deprecated and should not be used in newly-written code.</para> <para>Since 2.12. Use <link linkend="atk-value-get-value-and-text"><function>atk_value_get_value_and_text()</function></link>
instead.</para>
</warning>
<para>Gets the value of this object.</para>
<refsect3 id="atk-value-get-current-value.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>obj</para></entry>
<entry role="parameter_description"><para>a GObject instance that implements AtkValueIface</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>a <link linkend="GValue"><type>GValue</type></link> representing the current accessible value. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="atk-value-get-maximum-value" role="function" condition="deprecated:Since 2.12. Use atk_value_get_range() instead.">
<title>atk_value_get_maximum_value&#160;()</title>
<indexterm zone="atk-value-get-maximum-value" role="deprecated"><primary>atk_value_get_maximum_value</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_value_get_maximum_value (<parameter><link linkend="AtkValue"><type>AtkValue</type></link> *obj</parameter>,
                             <parameter><link linkend="GValue"><type>GValue</type></link> *value</parameter>);</programlisting>
<warning><para><literal>atk_value_get_maximum_value</literal> is deprecated and should not be used in newly-written code.</para> <para>Since 2.12. Use <link linkend="atk-value-get-range"><function>atk_value_get_range()</function></link> instead.</para>
</warning>
<para>Gets the maximum value of this object.</para>
<refsect3 id="atk-value-get-maximum-value.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>obj</para></entry>
<entry role="parameter_description"><para>a GObject instance that implements AtkValueIface</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>a <link linkend="GValue"><type>GValue</type></link> representing the maximum accessible value. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="atk-value-get-minimum-value" role="function" condition="deprecated:Since 2.12. Use atk_value_get_range() instead.">
<title>atk_value_get_minimum_value&#160;()</title>
<indexterm zone="atk-value-get-minimum-value" role="deprecated"><primary>atk_value_get_minimum_value</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_value_get_minimum_value (<parameter><link linkend="AtkValue"><type>AtkValue</type></link> *obj</parameter>,
                             <parameter><link linkend="GValue"><type>GValue</type></link> *value</parameter>);</programlisting>
<warning><para><literal>atk_value_get_minimum_value</literal> is deprecated and should not be used in newly-written code.</para> <para>Since 2.12. Use <link linkend="atk-value-get-range"><function>atk_value_get_range()</function></link> instead.</para>
</warning>
<para>Gets the minimum value of this object.</para>
<refsect3 id="atk-value-get-minimum-value.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>obj</para></entry>
<entry role="parameter_description"><para>a GObject instance that implements AtkValueIface</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>a <link linkend="GValue"><type>GValue</type></link> representing the minimum accessible value. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="atk-value-set-current-value" role="function" condition="deprecated:Since 2.12. Use atk_value_set_value() instead.">
<title>atk_value_set_current_value&#160;()</title>
<indexterm zone="atk-value-set-current-value" role="deprecated"><primary>atk_value_set_current_value</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
atk_value_set_current_value (<parameter><link linkend="AtkValue"><type>AtkValue</type></link> *obj</parameter>,
                             <parameter>const <link linkend="GValue"><type>GValue</type></link> *value</parameter>);</programlisting>
<warning><para><literal>atk_value_set_current_value</literal> is deprecated and should not be used in newly-written code.</para> <para>Since 2.12. Use <link linkend="atk-value-set-value"><function>atk_value_set_value()</function></link> instead.</para>
</warning>
<para>Sets the value of this object.</para>
<refsect3 id="atk-value-set-current-value.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>obj</para></entry>
<entry role="parameter_description"><para>a GObject instance that implements AtkValueIface</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>a <link linkend="GValue"><type>GValue</type></link> which is the desired new accessible value.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="atk-value-set-current-value.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if new value is successfully set, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.</para>
</refsect3></refsect2>
<refsect2 id="atk-value-get-minimum-increment" role="function" condition="deprecated:Since 2.12. Use atk_value_get_increment() instead.|since:1.12">
<title>atk_value_get_minimum_increment&#160;()</title>
<indexterm zone="atk-value-get-minimum-increment" role="deprecated"><primary>atk_value_get_minimum_increment</primary></indexterm><indexterm zone="atk-value-get-minimum-increment" role="1.12"><primary>atk_value_get_minimum_increment</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_value_get_minimum_increment (<parameter><link linkend="AtkValue"><type>AtkValue</type></link> *obj</parameter>,
                                 <parameter><link linkend="GValue"><type>GValue</type></link> *value</parameter>);</programlisting>
<warning><para><literal>atk_value_get_minimum_increment</literal> is deprecated and should not be used in newly-written code.</para> <para>Since 2.12. Use <link linkend="atk-value-get-increment"><function>atk_value_get_increment()</function></link> instead.</para>
</warning>
<para>Gets the minimum increment by which the value of this object may be changed.  If zero,
the minimum increment is undefined, which may mean that it is limited only by the 
floating point precision of the platform.</para>
<refsect3 id="atk-value-get-minimum-increment.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>obj</para></entry>
<entry role="parameter_description"><para>a GObject instance that implements AtkValueIface</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>a <link linkend="GValue"><type>GValue</type></link> representing the minimum increment by which the accessible value may be changed. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.12">1.12</link></para></refsect2>
<refsect2 id="atk-value-get-value-and-text" role="function" condition="since:2.12">
<title>atk_value_get_value_and_text&#160;()</title>
<indexterm zone="atk-value-get-value-and-text" role="2.12"><primary>atk_value_get_value_and_text</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_value_get_value_and_text (<parameter><link linkend="AtkValue"><type>AtkValue</type></link> *obj</parameter>,
                              <parameter><link linkend="gdouble"><type>gdouble</type></link> *value</parameter>,
                              <parameter><link linkend="gchar"><type>gchar</type></link> **text</parameter>);</programlisting>
<para>Gets the current value and the human readable text alternative of
<parameter>obj</parameter>
. <parameter>text</parameter>
 is a newly created string, that must be freed by the
caller. Can be NULL if no descriptor is available.</para>
<refsect3 id="atk-value-get-value-and-text.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>obj</para></entry>
<entry role="parameter_description"><para>a GObject instance that implements AtkValueIface</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>address of <link linkend="gdouble"><type>gdouble</type></link> to put the current value of <parameter>obj</parameter>
. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>address of <link linkend="gchar"><type>gchar</type></link> to put the human
readable text alternative for <parameter>value</parameter>
. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-2.12">2.12</link></para></refsect2>
<refsect2 id="atk-value-get-range" role="function" condition="since:2.12">
<title>atk_value_get_range&#160;()</title>
<indexterm zone="atk-value-get-range" role="2.12"><primary>atk_value_get_range</primary></indexterm>
<programlisting language="C"><link linkend="AtkRange"><returnvalue>AtkRange</returnvalue></link>&#160;*
atk_value_get_range (<parameter><link linkend="AtkValue"><type>AtkValue</type></link> *obj</parameter>);</programlisting>
<para>Gets the range of this object.</para>
<refsect3 id="atk-value-get-range.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>obj</para></entry>
<entry role="parameter_description"><para>a GObject instance that implements AtkValueIface</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="atk-value-get-range.returns" role="returns">
<title>Returns</title>
<para>a newly allocated <link linkend="AtkRange"><type>AtkRange</type></link>
that represents the minimum, maximum and descriptor (if available)
of <parameter>obj</parameter>
. NULL if that range is not defined. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer full</acronym>]</emphasis></para>
</refsect3><para role="since">Since: <link linkend="api-index-2.12">2.12</link></para></refsect2>
<refsect2 id="atk-value-get-increment" role="function" condition="since:2.12">
<title>atk_value_get_increment&#160;()</title>
<indexterm zone="atk-value-get-increment" role="2.12"><primary>atk_value_get_increment</primary></indexterm>
<programlisting language="C"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
atk_value_get_increment (<parameter><link linkend="AtkValue"><type>AtkValue</type></link> *obj</parameter>);</programlisting>
<para>Gets the minimum increment by which the value of this object may be
changed.  If zero, the minimum increment is undefined, which may
mean that it is limited only by the floating point precision of the
platform.</para>
<refsect3 id="atk-value-get-increment.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>obj</para></entry>
<entry role="parameter_description"><para>a GObject instance that implements AtkValueIface</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="atk-value-get-increment.returns" role="returns">
<title>Returns</title>
<para> the minimum increment by which the value of this
object may be changed. zero if undefined.</para>
</refsect3><para role="since">Since: <link linkend="api-index-2.12">2.12</link></para></refsect2>
<refsect2 id="atk-value-get-sub-ranges" role="function" condition="since:2.12">
<title>atk_value_get_sub_ranges&#160;()</title>
<indexterm zone="atk-value-get-sub-ranges" role="2.12"><primary>atk_value_get_sub_ranges</primary></indexterm>
<programlisting language="C"><link linkend="GSList"><returnvalue>GSList</returnvalue></link>&#160;*
atk_value_get_sub_ranges (<parameter><link linkend="AtkValue"><type>AtkValue</type></link> *obj</parameter>);</programlisting>
<para>Gets the list of subranges defined for this object. See <link linkend="AtkValue"><type>AtkValue</type></link>
introduction for examples of subranges and when to expose them.</para>
<refsect3 id="atk-value-get-sub-ranges.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>obj</para></entry>
<entry role="parameter_description"><para>a GObject instance that implements AtkValueIface</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="atk-value-get-sub-ranges.returns" role="returns">
<title>Returns</title>
<para>an <link linkend="GSList"><type>GSList</type></link> of
<link linkend="AtkRange"><type>AtkRange</type></link> which each of the subranges defined for this object. Free
the returns list with <link linkend="g-slist-free"><function>g_slist_free()</function></link>. </para>
<para><emphasis role="annotation">[<acronym>element-type</acronym> AtkRange][<acronym>transfer full</acronym>]</emphasis></para>
</refsect3><para role="since">Since: <link linkend="api-index-2.12">2.12</link></para></refsect2>
<refsect2 id="atk-value-set-value" role="function" condition="since:2.12">
<title>atk_value_set_value&#160;()</title>
<indexterm zone="atk-value-set-value" role="2.12"><primary>atk_value_set_value</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
atk_value_set_value (<parameter><link linkend="AtkValue"><type>AtkValue</type></link> *obj</parameter>,
                     <parameter>const <link linkend="gdouble"><type>gdouble</type></link> new_value</parameter>);</programlisting>
<para>Sets the value of this object.</para>
<para>This method is intended to provide a way to change the value of the
object. In any case, it is possible that the value can't be
modified (ie: a read-only component). If the value changes due this
call, it is possible that the text could change, and will trigger
an <link linkend="AtkValue-value-changed"><type>“value-changed”</type></link> signal emission.</para>
<para>Note for implementors: the deprecated <link linkend="atk-value-set-current-value"><function>atk_value_set_current_value()</function></link>
method returned TRUE or FALSE depending if the value was assigned
or not. In the practice several implementors were not able to
decide it, and returned TRUE in any case. For that reason it is not
required anymore to return if the value was properly assigned or
not.</para>
<refsect3 id="atk-value-set-value.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>obj</para></entry>
<entry role="parameter_description"><para>a GObject instance that implements AtkValueIface</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>new_value</para></entry>
<entry role="parameter_description"><para>a double which is the desired new accessible value.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-2.12">2.12</link></para></refsect2>

</refsect1>
<refsect1 id="AtkValue.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="AtkValue-struct" role="struct">
<title>AtkValue</title>
<indexterm zone="AtkValue-struct"><primary>AtkValue</primary></indexterm>
<programlisting language="C">typedef struct _AtkValue AtkValue;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="AtkValue.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="AtkValue-value-changed" role="signal"><title>The <literal>“value-changed”</literal> signal</title>
<indexterm zone="AtkValue-value-changed" role="2.12"><primary>AtkValue::value-changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="AtkValue"><type>AtkValue</type></link> *atkvalue,
               <link linkend="gdouble"><type>gdouble</type></link>   value,
               <link linkend="gchar"><type>gchar</type></link>    *text,
               <link linkend="gpointer"><type>gpointer</type></link>  user_data)</programlisting>
<para>The 'value-changed' signal is emitted when the current value
that represent the object changes. <parameter>value</parameter>
 is the numerical
representation of this new value.  <parameter>text</parameter>
 is the human
readable text alternative of <parameter>value</parameter>
, and can be NULL if it is
not available. Note that if there is a textual description
associated with the new numeric value, that description
should be included regardless of whether or not it has also
changed.</para>
<para>Example: a password meter whose value changes as the user
types their new password. Appropiate value text would be
"weak", "acceptable" and "strong".</para>
<refsect3 id="AtkValue-value-changed.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>atkvalue</para></entry>
<entry role="parameter_description"><para>the object on which the signal was emitted.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>the new value in a numerical form.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>human readable text alternative (also called
description) of this object. NULL if not available.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
<para role="since">Since: <link linkend="api-index-2.12">2.12</link></para></refsect2>
</refsect1>

</refentry>
