Update svn:ignore and remove .cvsignore files
[platform/core/uifw/at-spi2-atk.git] / libspi / value.c
index 204e6b1..0434411 100644 (file)
@@ -2,7 +2,8 @@
  * AT-SPI - Assistive Technology Service Provider Interface
  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
  *
- * Copyright 2001 Sun Microsystems Inc.
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -22,6 +23,7 @@
 
 /* value.c : implements the Value interface */
 #include <config.h>
+#include <math.h>
 #include <stdio.h>
 #include <libspi/value.h>
 
@@ -50,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
@@ -69,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;
 }
 
 
@@ -246,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);
+}
+