748f12e5288fe051b32f1ab24133eb305e222bfd
[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 int
13 AccessibleValue_ref (AccessibleValue *obj)
14 {
15   cspi_object_ref (obj);
16   return 0;
17 }
18
19
20
21 /**
22  * AccessibleValue_unref:
23  * @obj: a pointer to the #AccessibleValue implementor on which to operate. 
24  *
25  * Decrement the reference count for an #AccessibleValue object.
26  *
27  * Returns: (no return code implemented yet).
28  *
29  **/
30 int
31 AccessibleValue_unref (AccessibleValue *obj)
32 {
33   cspi_object_unref (obj);
34   return 0;
35 }
36
37
38
39 /**
40  * AccessibleValue_getMinimumValue:
41  * @obj: a pointer to the #AccessibleValue implementor on which to operate. 
42  *
43  * Get the minimum allowed value for an #AccessibleValue.
44  *
45  * Returns: the minimum allowed value for this object.
46  *
47  **/
48 float
49 AccessibleValue_getMinimumValue (AccessibleValue *obj)
50 {
51   return (float)
52     Accessibility_Value__get_minimumValue (CSPI_OBJREF (obj), cspi_ev ());
53 }
54
55
56
57 /**
58  * AccessibleValue_getCurrentValue:
59  * @obj: a pointer to the #AccessibleValue implementor on which to operate. 
60  *
61  * Get the current value for an #AccessibleValue.
62  *
63  * Returns: the current value for this object.
64  *
65  **/
66 float
67 AccessibleValue_getCurrentValue (AccessibleValue *obj)
68 {
69   return (float)
70     Accessibility_Value__get_currentValue (CSPI_OBJREF (obj), cspi_ev ());
71 }
72
73
74
75 /**
76  * AccessibleValue_getMaximumValue:
77  * @obj: a pointer to the #AccessibleValue implementor on which to operate. 
78  *
79  * Get the maximum allowed value for an #AccessibleValue.
80  *
81  * Returns: the maximum allowed value for this object.
82  *
83  **/
84 float
85 AccessibleValue_getMaximumValue (AccessibleValue *obj)
86 {
87   return (float)
88     Accessibility_Value__get_maximumValue (CSPI_OBJREF (obj), cspi_ev ());
89 }
90
91
92
93 /**
94  * AccessibleValue_setCurrentValue:
95  * @obj: a pointer to the #AccessibleValue implementor on which to operate.
96  * @newValue: a #float value which is the desired new value of the object.
97  *
98  * Set the current value of an #AccessibleValue.
99  *
100  * Returns: #TRUE if the value could be assigned the specified value,
101  *          #FALSE otherwise.
102  *
103  **/
104 SPIBoolean
105 AccessibleValue_setCurrentValue (AccessibleValue *obj,
106                                  float newValue)
107 {
108   Accessibility_Value__set_currentValue (CSPI_OBJREF (obj),
109                                          (CORBA_float) newValue, cspi_ev ());
110   return TRUE;
111 }
112
113