From: Padraig O'Briain Date: Fri, 1 Jun 2001 15:22:33 +0000 (+0000) Subject: Add support for setting and getting accessible-value property. X-Git-Tag: ATK_0_2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b4b18c80d2981f76ed80434cbaeb97b414a4b6d;p=platform%2Fupstream%2Fatk.git 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 --- diff --git a/ChangeLog b/ChangeLog index 28d12e3..4d2edfd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-06-01 Padraig O'Briain + + * 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 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: