2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001, 2002 Sun Microsystems Inc.,
6 * Copyright 2001, 2002 Ximian, Inc.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #include <cspi/spi-private.h>
27 * AccessibleValue_ref:
28 * @obj: a pointer to the #AccessibleValue implementor on which to operate.
30 * Increment the reference count for an #AccessibleValue object.
33 AccessibleValue_ref (AccessibleValue *obj)
35 cspi_object_ref (obj);
39 * AccessibleValue_unref:
40 * @obj: a pointer to the #AccessibleValue implementor on which to operate.
42 * Decrement the reference count for an #AccessibleValue object.
45 AccessibleValue_unref (AccessibleValue *obj)
47 cspi_object_unref (obj);
51 * AccessibleValue_getMinimumValue:
52 * @obj: a pointer to the #AccessibleValue implementor on which to operate.
54 * Get the minimum allowed value for an #AccessibleValue.
56 * Returns: the minimum allowed value for this object.
60 AccessibleValue_getMinimumValue (AccessibleValue *obj)
64 cspi_return_val_if_fail (obj != NULL, 0.0);
66 cspi_dbus_get_property (obj, spi_interface_value, "minimumValue", NULL, "d", &retval);
68 cspi_return_val_if_ev ("getMinimumValue", 0.0);
74 * AccessibleValue_getCurrentValue:
75 * @obj: a pointer to the #AccessibleValue implementor on which to operate.
77 * Get the current value for an #AccessibleValue.
79 * Returns: the current value for this object.
82 AccessibleValue_getCurrentValue (AccessibleValue *obj)
86 cspi_return_val_if_fail (obj != NULL, 0.0);
88 cspi_dbus_get_property (obj, spi_interface_value, "currentValue", NULL, "d", &retval);
90 cspi_return_val_if_ev ("getCurrentValue", 0.0);
96 * AccessibleValue_getMaximumValue:
97 * @obj: a pointer to the #AccessibleValue implementor on which to operate.
99 * Get the maximum allowed value for an #AccessibleValue.
101 * Returns: the maximum allowed value for this object.
104 AccessibleValue_getMaximumValue (AccessibleValue *obj)
107 cspi_return_val_if_fail (obj != NULL, 0.0);
109 cspi_dbus_get_property (obj, spi_interface_value, "maximumValue", NULL, "d", &retval);
111 cspi_return_val_if_ev ("getMaximumValue", 0.0);
117 * AccessibleValue_setCurrentValue:
118 * @obj: a pointer to the #AccessibleValue implementor on which to operate.
119 * @newValue: a #float value which is the desired new value of the object.
121 * Set the current value of an #AccessibleValue.
123 * Returns: #TRUE if the value could be assigned the specified value,
127 AccessibleValue_setCurrentValue (AccessibleValue *obj,
130 cspi_return_val_if_fail (obj != NULL, FALSE);
132 cspi_dbus_call (obj, spi_interface_value, "setCurrentValue", NULL, "d", &newValue);
134 cspi_return_val_if_ev ("setCurrentValue", FALSE);
140 * AccessibleValue_getMinimumIncrement:
141 * @obj: a pointer to the #AccessibleValue implementor on which to operate.
143 * Get the minimum increment by which an #AccessibleValue can be adjusted.
145 * Returns: the minimum increment by which the value may be changed, or
146 * zero if the minimum increment cannot be determined.
150 AccessibleValue_getMinimumIncrement (AccessibleValue *obj)
154 cspi_return_val_if_fail (obj != NULL, 0.0);
156 cspi_dbus_get_property (obj, spi_interface_value, "minimumIncrement", NULL, "d", &retval);
158 cspi_return_val_if_ev ("getMinimumIncrement", 0.0);