Changes to support generation of C bindings docs.
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_accessible.c
1
2 /*
3  *
4  * Accessible function prototypes
5  *
6  */
7
8 /**
9  * Accessible_ref:
10  * @obj: a pointer to the #Accessible object on which to operate.
11  *
12  * Increment the reference count for an #Accessible object.
13  *
14  * Returns: (no return code implemented yet).
15  *
16  **/
17 int
18 Accessible_ref (Accessible *obj)
19 {
20   Accessibility_Accessible_ref (*obj, &ev);
21   return 0;
22 }
23
24
25 /**
26  * Accessible_unref:
27  * @obj: a pointer to the #Accessible object on which to operate.
28  *
29  * Decrement the reference count for an #Accessible object.
30  *
31  * Returns: (no return code implemented yet).
32  *
33  **/
34 int
35 Accessible_unref (Accessible *obj)
36 {
37   Accessibility_Accessible_unref (*obj, &ev);
38   return 0;
39 }
40
41 /**
42  * Accessible_getName:
43  * @obj: a pointer to the #Accessible object on which to operate.
44  *
45  * Get the name of an #Accessible object.
46  *
47  * Returns: a UTF-8 string indicating the name of the #Accessible object.
48  *
49  **/
50 char *
51 Accessible_getName (Accessible *obj)
52 {
53   return Accessibility_Accessible__get_name (*obj, &ev);
54 }
55
56 /**
57  * Accessible_getDescription:
58  * @obj: a pointer to the #Accessible object on which to operate.
59  *
60  * Get the description of an #Accessible object.
61  *
62  * Returns: a UTF-8 string describing the #Accessible object.
63  *
64  **/
65 char *
66 Accessible_getDescription (Accessible *obj)
67 {
68   return Accessibility_Accessible__get_description (*obj, &ev);
69 }
70
71 /**
72  * Accessible_getParent:
73  * @obj: a pointer to the #Accessible object to query.
74  *
75  * Get an #Accessible object's parent container.
76  *
77  * Returns: a pointer to the #Accessible object which contains the given
78  *          #Accessible instance, or NULL if the @obj has no parent container.
79  *
80  **/
81 Accessible *
82 Accessible_getParent (Accessible *obj)
83 {
84   return Obj_Add (Accessibility_Accessible__get_parent (*obj, &ev));
85 }
86
87 /**
88  * Accessible_getChildCount:
89  *
90  * @obj: a pointer to the #Accessible object on which to operate.
91  *
92  * Get the number of children contained by an #Accessible object.
93  *
94  * Returns: a #long indicating the number of #Accessible children
95  *          contained by an #Accessible object.
96  *
97  **/
98 long
99 Accessible_getChildCount (Accessible *obj)
100 {
101   return Accessibility_Accessible__get_childCount (*obj, &ev);
102 }
103
104 /**
105  * Accessible_getChildAtIndex:
106  *
107  * @obj: a pointer to the #Accessible object on which to operate.
108  * @childIndex: a #long indicating which child is specified.
109  *
110  * Get the #Accessible child of an #Accessible object at a given index.
111  *
112  * Returns: a pointer to the #Accessible child object at index
113  *          @childIndex.
114  *
115  **/
116 Accessible *
117 Accessible_getChildAtIndex (Accessible *obj,
118                             long childIndex)
119 {
120   return Obj_Add (Accessibility_Accessible_getChildAtIndex (*obj, childIndex, &ev));
121 }
122
123 /**
124  * Accessible_getIndexInParent:
125  *
126  * @obj: a pointer to the #Accessible object on which to operate.
127  *
128  * Get the index of an #Accessible object in its containing #Accessible.
129  *
130  * Returns: a #long indicating the index of the #Accessible object
131  *          in its parent (i.e. containing) #Accessible instance,
132  *          or -1 if @obj has no containing parent.
133  *
134  **/
135 long
136 Accessible_getIndexInParent (Accessible *obj)
137 {
138   return Accessibility_Accessible_getIndexInParent (*obj, &ev);
139 }
140
141 /**
142  * Accessible_getRelationSet:
143  *
144  * Not Yet Implemented.
145  *
146  * Returns: a pointer to an array of #AccessibleRelations.
147  *
148  **/
149 AccessibleRelation **
150 Accessible_getRelationSet (Accessible *obj)
151 {
152   return NULL;
153 }
154
155 /**
156  * Accessible_getRole:
157  * @obj: a pointer to the #Accessible object on which to operate.
158  *
159  * Get the UI role of an #Accessible object.
160  *
161  * Returns: a UTF-8 string indicating the UI role of the #Accessible object.
162  *
163  **/
164 char *
165 Accessible_getRole (Accessible *obj)
166 {
167   return "";
168 }
169
170 /**
171  * Accessible_getStateSet:
172  *
173  * Not Yet Implemented.
174  *
175  * Returns: a pointer to an #AccessibleStateSet representing the object's current state.
176  **/
177 AccessibleStateSet *
178 Accessible_getStateSet (Accessible *obj)
179 {
180   return NULL;
181 }
182
183 /* Interface query methods */
184
185 /**
186  * Accessible_isAction:
187  * @obj: a pointer to the #Accessible instance to query.
188  *
189  * Query whether the specified #Accessible implements #AccessibleAction.
190  * Not Yet Implemented.
191  *
192  * Returns: #TRUE if @obj implements the #AccessibleAction interface,
193  *          #FALSE otherwise.
194  **/
195 boolean
196 Accessible_isAction (Accessible *obj)
197 {
198   return FALSE;
199 }
200
201 /**
202  * Accessible_isComponent:
203  * @obj: a pointer to the #Accessible instance to query.
204  *
205  * Query whether the specified #Accessible implements #AccessibleComponent.
206  *
207  * Returns: #TRUE if @obj implements the #AccessibleComponent interface,
208  *          #FALSE otherwise.
209  **/
210 boolean
211 Accessible_isComponent (Accessible *obj)
212 {
213   Bonobo_Unknown iface =
214     Accessibility_Accessible_queryInterface (*obj,
215                                              "IDL:Accessibility/Component:1.0",
216                                              &ev);
217   return (iface != NULL) ? TRUE : FALSE;
218 }
219
220 /**
221  * Accessible_isEditableText:
222  * @obj: a pointer to the #Accessible instance to query.
223  *
224  * Query whether the specified #Accessible implements #AccessibleEditableText.
225  * Not Yet Implemented.
226  *
227  * Returns: #TRUE if @obj implements the #AccessibleEditableText interface,
228  *          #FALSE otherwise.
229  **/
230 boolean
231 Accessible_isEditableText (Accessible *obj)
232 {
233   return FALSE;
234 }
235
236 /**
237  * Accessible_isHypertext:
238  * @obj: a pointer to the #Accessible instance to query.
239  *
240  * Query whether the specified #Accessible implements #AccessibleHypertext.
241  * Not Yet Implemented.
242  *
243  * Returns: #TRUE if @obj implements the #AccessibleHypertext interface,
244  *          #FALSE otherwise.
245  **/
246 boolean
247 Accessible_isHypertext (Accessible *obj)
248 {
249   return FALSE;
250 }
251
252 /**
253  * Accessible_isImage:
254  * @obj: a pointer to the #Accessible instance to query.
255  *
256  * Query whether the specified #Accessible implements #AccessibleImage.
257  * Not Yet Implemented.
258  *
259  * Returns: #TRUE if @obj implements the #AccessibleImage interface,
260  *          #FALSE otherwise.
261 **/
262 boolean
263 Accessible_isImage (Accessible *obj)
264 {
265   return FALSE;
266 }
267
268 /**
269   * Accessible_isSelection:
270  * @obj: a pointer to the #Accessible instance to query.
271  *
272  * Query whether the specified #Accessible implements #AccessibleSelection.
273  * Not Yet Implemented.
274  *
275  * Returns: #TRUE if @obj implements the #AccessibleSelection interface,
276  *          #FALSE otherwise.
277 **/
278 boolean
279 Accessible_isSelection (Accessible *obj)
280 {
281   return FALSE;
282 }
283
284 /**
285  * Accessible_isTable:
286  * @obj: a pointer to the #Accessible instance to query.
287  *
288  * Query whether the specified #Accessible implements #AccessibleTable.
289  * Not Yet Implemented.
290  *
291  * Returns: #TRUE if @obj implements the #AccessibleTable interface,
292  *          #FALSE otherwise.
293 **/
294 boolean
295 Accessible_isTable (Accessible *obj)
296 {
297   return FALSE;
298 }
299
300 /**
301  * Accessible_isText:
302  * @obj: a pointer to the #Accessible instance to query.
303  *
304  * Query whether the specified #Accessible implements #AccessibleText.
305  * Not Yet Implemented.
306  *
307  * Returns: #TRUE if @obj implements the #AccessibleText interface,
308  *          #FALSE otherwise.
309 **/
310 boolean
311 Accessible_isText (Accessible *obj)
312 {
313   return FALSE;
314 }
315
316 /**
317  * Accessible_getAction:
318  *
319  * Not Yet Implemented.
320  *
321  **/
322 AccessibleAction *
323 Accessible_getAction (Accessible *obj)
324 {
325   return NULL;
326 }
327
328 /**
329  * Accessible_getComponent:
330  * @obj: a pointer to the #Accessible instance to query.
331  *
332  * Get the #AccessibleComponent interface for an #Accessible.
333  *
334  * Returns: a pointer to an #AccessibleComponent interface instance, or
335  *          NULL if @obj does not implement #AccessibleComponent.
336  **/
337 AccessibleComponent *
338 Accessible_getComponent (Accessible *obj)
339 {
340   AccessibleComponent iface =
341     Accessibility_Accessible_queryInterface (*obj,
342                                              "IDL:Accessibility/Component:1.0",
343                                              &ev);
344   return Obj_Add (iface);
345 }
346
347 /**
348  * Accessible_queryInterface:
349  * @obj: a pointer to the #Accessible instance to query.
350  * @interface_name: a UTF-8 character string specifiying the requested interface.
351  *
352  * Query an #Accessible object to for a named interface.
353  *
354  * Returns: an instance of the named interface object, if it is implemented
355  *          by @obj, or NULL otherwise.
356  *
357  **/
358 GenericInterface *
359 Accessible_queryInterface (Accessible *obj, char *interface_name)
360 {
361   GenericInterface iface;
362   iface = Accessibility_Accessible_queryInterface (*obj,
363                                                     interface_name,
364                                                     &ev);
365   return (iface != NULL) ? Obj_Add (iface) : NULL;
366 }
367