2001-12-10 Michael Meeks <michael@ximian.com>
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_value.c
1 #include <cspi/spi-private.h>
2
3 /**
4  * AccessibleValue_ref:
5  * @obj: a pointer to the #AccessibleValue implementor on which to operate.
6  *
7  * Increment the reference count for an #AccessibleValue object.
8  *
9  * Returns: (no return code implemented yet).
10  *
11  **/
12 void
13 AccessibleValue_ref (AccessibleValue *obj)
14 {
15   cspi_object_ref (obj);
16 }
17
18 /**
19  * AccessibleValue_unref:
20  * @obj: a pointer to the #AccessibleValue implementor on which to operate. 
21  *
22  * Decrement the reference count for an #AccessibleValue object.
23  *
24  * Returns: (no return code implemented yet).
25  *
26  **/
27 void
28 AccessibleValue_unref (AccessibleValue *obj)
29 {
30   cspi_object_unref (obj);
31 }
32
33 /**
34  * AccessibleValue_getMinimumValue:
35  * @obj: a pointer to the #AccessibleValue implementor on which to operate. 
36  *
37  * Get the minimum allowed value for an #AccessibleValue.
38  *
39  * Returns: the minimum allowed value for this object.
40  *
41  **/
42 float
43 AccessibleValue_getMinimumValue (AccessibleValue *obj)
44 {
45   return (float)
46     Accessibility_Value__get_minimumValue (CSPI_OBJREF (obj), cspi_ev ());
47 }
48
49
50
51 /**
52  * AccessibleValue_getCurrentValue:
53  * @obj: a pointer to the #AccessibleValue implementor on which to operate. 
54  *
55  * Get the current value for an #AccessibleValue.
56  *
57  * Returns: the current value for this object.
58  *
59  **/
60 float
61 AccessibleValue_getCurrentValue (AccessibleValue *obj)
62 {
63   return (float)
64     Accessibility_Value__get_currentValue (CSPI_OBJREF (obj), cspi_ev ());
65 }
66
67
68
69 /**
70  * AccessibleValue_getMaximumValue:
71  * @obj: a pointer to the #AccessibleValue implementor on which to operate. 
72  *
73  * Get the maximum allowed value for an #AccessibleValue.
74  *
75  * Returns: the maximum allowed value for this object.
76  *
77  **/
78 float
79 AccessibleValue_getMaximumValue (AccessibleValue *obj)
80 {
81   return (float)
82     Accessibility_Value__get_maximumValue (CSPI_OBJREF (obj), cspi_ev ());
83 }
84
85
86
87 /**
88  * AccessibleValue_setCurrentValue:
89  * @obj: a pointer to the #AccessibleValue implementor on which to operate.
90  * @newValue: a #float value which is the desired new value of the object.
91  *
92  * Set the current value of an #AccessibleValue.
93  *
94  * Returns: #TRUE if the value could be assigned the specified value,
95  *          #FALSE otherwise.
96  *
97  **/
98 SPIBoolean
99 AccessibleValue_setCurrentValue (AccessibleValue *obj,
100                                  float newValue)
101 {
102   Accessibility_Value__set_currentValue (CSPI_OBJREF (obj),
103                                          (CORBA_float) newValue, cspi_ev ());
104   return TRUE;
105 }
106
107