* accessible.py: Fix for bug #439531, unable to define instance
[platform/core/uifw/at-spi2-atk.git] / libspi / value.c
index c2eade5..0434411 100644 (file)
@@ -23,6 +23,7 @@
 
 /* value.c : implements the Value interface */
 #include <config.h>
+#include <math.h>
 #include <stdio.h>
 #include <libspi/value.h>
 
@@ -51,12 +52,15 @@ static void
 impl__set_currentValue (PortableServer_Servant _servant,
                        const CORBA_double     value,
                        CORBA_Environment *    ev);
+static double
+impl__get_minimumIncrement (PortableServer_Servant _servant,
+                       CORBA_Environment *    ev);
 
 
 BONOBO_TYPE_FUNC_FULL (SpiValue,
                       Accessibility_Value,
                       PARENT_TYPE,
-                      spi_value);
+                      spi_value)
 
 
 static void
@@ -70,6 +74,7 @@ spi_value_class_init (SpiValueClass *klass)
   epv->_get_maximumValue = impl__get_maximumValue;
   epv->_get_currentValue = impl__get_currentValue;
   epv->_set_currentValue = impl__set_currentValue;
+  epv->_get_minimumIncrement = impl__get_minimumIncrement;
 }
 
 
@@ -247,4 +252,18 @@ impl__set_currentValue (PortableServer_Servant servant,
   atk_value_set_current_value (avalue, &gvalue);
 }
 
+static double
+impl__get_minimumIncrement (PortableServer_Servant servant,
+                           CORBA_Environment     *ev)
+{
+  GValue    gvalue = {0, };
+  AtkValue *value = get_value_from_servant (servant);
+
+  g_return_val_if_fail (value != NULL, 0.0);
+
+  atk_value_get_minimum_increment (value, &gvalue);
+
+  return get_double_from_gvalue (&gvalue);
+}
+