Added atk_value_get_minimum_increment, to sync up with the minimumIncrement readonly
authorBill Haneman <billh@src.gnome.org>
Thu, 8 Jun 2006 14:01:41 +0000 (14:01 +0000)
committerBill Haneman <billh@src.gnome.org>
Thu, 8 Jun 2006 14:01:41 +0000 (14:01 +0000)
property in AT-SPI's Accessibility_Value.idl.  Bug #341875.

ChangeLog
atk/atkvalue.c
atk/atkvalue.h

index 8f2b2a8..a6d9306 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,9 @@
        ATK_RELATION_DESCRIBED_BY (bug #344144).
 
        * atk/atkstate.h: Added ATK_STATE_DEFAULT (bug #344281).
+
+       * atk/atkvalue.h, atkvalue.c: Add atk_value_get_minimum_increment
+       (missing despite being in AT-SPI's IDL for Value: bug #341875)
        
 2006-04-17  Kjartan Maraas  <kmaraas@gnome.org>
 
index 2eaa679..08d74b3 100755 (executable)
@@ -128,6 +128,37 @@ atk_value_get_minimum_value (AtkValue *obj,
 }
 
 /**
+ * atk_value_get_minimum_increment:
+ * @obj: a GObject instance that implements AtkValueIface
+ * @value: a #GValue representing the minimum increment by which the accessible value may be changed
+ *
+ * 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.
+ **/
+void
+atk_value_get_minimum_increment (AtkValue *obj,
+                             GValue   *value)
+{
+  AtkValueIface *iface;
+
+  g_return_if_fail (value != NULL);
+  g_return_if_fail (ATK_IS_VALUE (obj));
+
+  iface = ATK_VALUE_GET_IFACE (obj);
+
+  if (iface->get_minimum_increment)
+    {
+      if (G_IS_VALUE (value))
+        g_value_unset (value);
+      else
+        memset (value, 0, sizeof (*value));
+
+      (iface->get_minimum_increment) (obj, value);
+    }
+}
+
+/**
  * atk_value_set_current_value:
  * @obj: a GObject instance that implements AtkValueIface
  * @value: a #GValue which is the desired new accessible value.
index 1bd668b..f66c015 100755 (executable)
@@ -57,9 +57,9 @@ struct _AtkValueIface
                                   GValue       *value);
   gboolean (* set_current_value) (AtkValue     *obj,
                                   const GValue *value);
-
+  void     (* get_minimum_increment) (AtkValue   *obj,
+                                     GValue     *value);
   AtkFunction pad1;
-  AtkFunction pad2;
 };
 
 GType            atk_value_get_type (void);
@@ -77,6 +77,9 @@ void     atk_value_get_minimum_value  (AtkValue     *obj,
 gboolean atk_value_set_current_value  (AtkValue     *obj,
                                        const GValue *value);
 
+void     atk_value_get_minimum_increment  (AtkValue     *obj,
+                                          GValue       *value);
+
 /*
  * Additional GObject properties exported by GaccessibleValue:
  *    "accessible_value"