summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPadraig O'Briain <padraigo@src.gnome.org>2001-06-01 15:22:33 +0000
committerPadraig O'Briain <padraigo@src.gnome.org>2001-06-01 15:22:33 +0000
commit5b4b18c80d2981f76ed80434cbaeb97b414a4b6d (patch)
tree96590f94d228dbd329ad3a92ed4e2608bed51c0a
parent024817e8b6fe39410a65b67cf2994c84973da545 (diff)
downloadatk-5b4b18c80d2981f76ed80434cbaeb97b414a4b6d.tar.gz
Add support for setting and getting accessible-value property.
* atk/atkobject.c: Add support for setting and getting accessible-value property. * atk/atkvalue.[ch] Make GValue in atk_value_set_current_value const
-rw-r--r--ChangeLog5
-rwxr-xr-xatk/atkobject.c19
-rwxr-xr-xatk/atkvalue.c4
-rwxr-xr-xatk/atkvalue.h4
4 files changed, 21 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 28d12e3..4d2edfd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-01 Padraig O'Briain <padraig.obriain@sun.com>
+
+ * atk/atkobject.c: Add support for setting and getting
+ accessible-value property.
+ * atk/atkvalue.[ch] Make GValue in atk_value_set_current_value const
Fri Jun 01 Brian Cameron <brian.cameron@sun.com>
diff --git a/atk/atkobject.c b/atk/atkobject.c
index 37e3782..7be969b 100755
--- a/atk/atkobject.c
+++ b/atk/atkobject.c
@@ -184,17 +184,14 @@ atk_object_class_init (AtkObjectClass *klass)
"Is used to notify that the selection has been changed ",
ATK_TYPE_OBJECT,
G_PARAM_READWRITE));
- /*
- * XXX We need to reconsider the value type for this
- */
g_object_class_install_property (gobject_class,
PROP_VALUE,
- g_param_spec_int (atk_object_name_property_value,
+ g_param_spec_double (atk_object_name_property_value,
"Accessible Value",
"Is used to notify that the value has been changed ",
- 0,
- G_MAXINT,
- 0,
+ 0.0,
+ G_MAXDOUBLE,
+ 0.0,
G_PARAM_READWRITE));
/*
* The signal "children_changed" supports two details:
@@ -675,6 +672,10 @@ atk_object_real_set_property (GObject *object,
case PROP_STATE:
g_print ("This interface does not support setting the state set of an accessible object\n");
break;
+ case PROP_VALUE:
+ if (ATK_IS_VALUE (accessible))
+ atk_value_set_current_value (ATK_VALUE (accessible), value);
+ break;
default:
break;
}
@@ -698,6 +699,10 @@ atk_object_real_get_property (GObject *object,
case PROP_DESCRIPTION:
g_value_set_string (value, atk_object_get_description (accessible));
break;
+ case PROP_VALUE:
+ if (ATK_IS_VALUE (accessible))
+ atk_value_get_current_value (ATK_VALUE (accessible), value);
+ break;
default:
break;
}
diff --git a/atk/atkvalue.c b/atk/atkvalue.c
index c85faa0..ac559f4 100755
--- a/atk/atkvalue.c
+++ b/atk/atkvalue.c
@@ -130,8 +130,8 @@ atk_value_get_minimum_value (AtkValue *obj,
* Returns: %TRUE if new value is successfully set, %FALSE otherwise.
**/
gboolean
-atk_value_set_current_value (AtkValue *obj,
- GValue *value)
+atk_value_set_current_value (AtkValue *obj,
+ const GValue *value)
{
AtkValueIface *iface;
diff --git a/atk/atkvalue.h b/atk/atkvalue.h
index 42f9a28..b4b3122 100755
--- a/atk/atkvalue.h
+++ b/atk/atkvalue.h
@@ -56,7 +56,7 @@ struct _AtkValueIface
void (* get_minimum_value) (AtkValue *obj,
GValue *value);
gboolean (* set_current_value) (AtkValue *obj,
- GValue *value);
+ const GValue *value);
};
@@ -73,7 +73,7 @@ void atk_value_get_minimum_value (AtkValue *obj,
GValue *value);
gboolean atk_value_set_current_value (AtkValue *obj,
- GValue *value);
+ const GValue *value);
/*
* Additional GObject properties exported by GaccessibleValue: