3 static char *role_names [MAX_ROLES] =
61 "table column header",
75 * Returns a localizable string name for an AtkRole enumerated type.
78 Accessible_Role_getName (Accessibility_Role role)
80 if (role < MAX_ROLES) return role_names [(int) role];
88 * @obj: a pointer to the #Accessible object on which to operate.
90 * Increment the reference count for an #Accessible object.
92 * Returns: (no return code implemented yet).
96 Accessible_ref (Accessible *obj)
98 Accessibility_Accessible_ref (*obj, &ev);
105 * @obj: a pointer to the #Accessible object on which to operate.
107 * Decrement the reference count for an #Accessible object.
109 * Returns: (no return code implemented yet).
113 Accessible_unref (Accessible *obj)
115 Accessibility_Accessible_unref (*obj, &ev);
120 * Accessible_getName:
121 * @obj: a pointer to the #Accessible object on which to operate.
123 * Get the name of an #Accessible object.
125 * Returns: a UTF-8 string indicating the name of the #Accessible object.
129 Accessible_getName (Accessible *obj)
131 return string_from_corba_string (
132 Accessibility_Accessible__get_name (*obj, &ev));
136 * Accessible_getDescription:
137 * @obj: a pointer to the #Accessible object on which to operate.
139 * Get the description of an #Accessible object.
141 * Returns: a UTF-8 string describing the #Accessible object.
145 Accessible_getDescription (Accessible *obj)
147 return string_from_corba_string (
148 Accessibility_Accessible__get_description (*obj, &ev));
152 * Accessible_getParent:
153 * @obj: a pointer to the #Accessible object to query.
155 * Get an #Accessible object's parent container.
157 * Returns: a pointer to the #Accessible object which contains the given
158 * #Accessible instance, or NULL if the @obj has no parent container.
162 Accessible_getParent (Accessible *obj)
164 return Obj_Add (Accessibility_Accessible__get_parent (*obj, &ev));
168 * Accessible_getChildCount:
170 * @obj: a pointer to the #Accessible object on which to operate.
172 * Get the number of children contained by an #Accessible object.
174 * Returns: a #long indicating the number of #Accessible children
175 * contained by an #Accessible object.
179 Accessible_getChildCount (Accessible *obj)
181 return Accessibility_Accessible__get_childCount (*obj, &ev);
185 * Accessible_getChildAtIndex:
187 * @obj: a pointer to the #Accessible object on which to operate.
188 * @childIndex: a #long indicating which child is specified.
190 * Get the #Accessible child of an #Accessible object at a given index.
192 * Returns: a pointer to the #Accessible child object at index
197 Accessible_getChildAtIndex (Accessible *obj,
200 return Obj_Add (Accessibility_Accessible_getChildAtIndex (*obj, childIndex, &ev));
204 * Accessible_getIndexInParent:
206 * @obj: a pointer to the #Accessible object on which to operate.
208 * Get the index of an #Accessible object in its containing #Accessible.
210 * Returns: a #long indicating the index of the #Accessible object
211 * in its parent (i.e. containing) #Accessible instance,
212 * or -1 if @obj has no containing parent.
216 Accessible_getIndexInParent (Accessible *obj)
218 return Accessibility_Accessible_getIndexInParent (*obj, &ev);
222 * Accessible_getRelationSet:
224 * Not Yet Implemented.
226 * Returns: a pointer to an array of #AccessibleRelations.
229 AccessibleRelation **
230 Accessible_getRelationSet (Accessible *obj)
236 * Accessible_getRole:
237 * @obj: a pointer to the #Accessible object on which to operate.
239 * Get the UI role of an #Accessible object.
241 * Returns: a UTF-8 string indicating the UI role of the #Accessible object.
245 Accessible_getRole (Accessible *obj)
247 return Accessible_Role_getName (
248 Accessibility_Accessible_getRole (*obj, &ev));
252 * Accessible_getStateSet:
254 * Not Yet Implemented.
256 * Returns: a pointer to an #AccessibleStateSet representing the object's current state.
259 Accessible_getStateSet (Accessible *obj)
264 /* Interface query methods */
267 * Accessible_isAction:
268 * @obj: a pointer to the #Accessible instance to query.
270 * Query whether the specified #Accessible implements #AccessibleAction.
271 * Not Yet Implemented.
273 * Returns: #TRUE if @obj implements the #AccessibleAction interface,
277 Accessible_isAction (Accessible *obj)
279 Bonobo_Unknown iface =
280 Accessibility_Accessible_queryInterface (*obj,
281 "IDL:Accessibility/Action:1.0",
283 return (iface != NULL) ? TRUE : FALSE;
287 * Accessible_isComponent:
288 * @obj: a pointer to the #Accessible instance to query.
290 * Query whether the specified #Accessible implements #AccessibleComponent.
292 * Returns: #TRUE if @obj implements the #AccessibleComponent interface,
296 Accessible_isComponent (Accessible *obj)
298 Bonobo_Unknown iface =
299 Accessibility_Accessible_queryInterface (*obj,
300 "IDL:Accessibility/Component:1.0",
302 return (iface != NULL) ? TRUE : FALSE;
306 * Accessible_isEditableText:
307 * @obj: a pointer to the #Accessible instance to query.
309 * Query whether the specified #Accessible implements #AccessibleEditableText.
310 * Not Yet Implemented.
312 * Returns: #TRUE if @obj implements the #AccessibleEditableText interface,
316 Accessible_isEditableText (Accessible *obj)
318 Bonobo_Unknown iface =
319 Accessibility_Accessible_queryInterface (*obj,
320 "IDL:Accessibility/EditableText:1.0",
322 return (iface != NULL) ? TRUE : FALSE;
326 * Accessible_isHypertext:
327 * @obj: a pointer to the #Accessible instance to query.
329 * Query whether the specified #Accessible implements #AccessibleHypertext.
330 * Not Yet Implemented.
332 * Returns: #TRUE if @obj implements the #AccessibleHypertext interface,
336 Accessible_isHypertext (Accessible *obj)
338 Bonobo_Unknown iface =
339 Accessibility_Accessible_queryInterface (*obj,
340 "IDL:Accessibility/Hypertext:1.0",
342 return (iface != NULL) ? TRUE : FALSE;
346 * Accessible_isImage:
347 * @obj: a pointer to the #Accessible instance to query.
349 * Query whether the specified #Accessible implements #AccessibleImage.
350 * Not Yet Implemented.
352 * Returns: #TRUE if @obj implements the #AccessibleImage interface,
356 Accessible_isImage (Accessible *obj)
358 Bonobo_Unknown iface =
359 Accessibility_Accessible_queryInterface (*obj,
360 "IDL:Accessibility/Image:1.0",
362 return (iface != NULL) ? TRUE : FALSE;
366 * Accessible_isSelection:
367 * @obj: a pointer to the #Accessible instance to query.
369 * Query whether the specified #Accessible implements #AccessibleSelection.
370 * Not Yet Implemented.
372 * Returns: #TRUE if @obj implements the #AccessibleSelection interface,
376 Accessible_isSelection (Accessible *obj)
378 Bonobo_Unknown iface =
379 Accessibility_Accessible_queryInterface (*obj,
380 "IDL:Accessibility/Selection:1.0",
382 return (iface != NULL) ? TRUE : FALSE;
386 * Accessible_isTable:
387 * @obj: a pointer to the #Accessible instance to query.
389 * Query whether the specified #Accessible implements #AccessibleTable.
390 * Not Yet Implemented.
392 * Returns: #TRUE if @obj implements the #AccessibleTable interface,
396 Accessible_isTable (Accessible *obj)
398 Bonobo_Unknown iface =
399 Accessibility_Accessible_queryInterface (*obj,
400 "IDL:Accessibility/Table:1.0",
402 return (iface != NULL) ? TRUE : FALSE;
407 * @obj: a pointer to the #Accessible instance to query.
409 * Query whether the specified #Accessible implements #AccessibleText.
410 * Not Yet Implemented.
412 * Returns: #TRUE if @obj implements the #AccessibleText interface,
416 Accessible_isText (Accessible *obj)
418 Bonobo_Unknown iface =
419 Accessibility_Accessible_queryInterface (*obj,
420 "IDL:Accessibility/Text:1.0",
422 return (iface != NULL) ? TRUE : FALSE;
426 * Accessible_getAction:
428 * Not Yet Implemented.
432 Accessible_getAction (Accessible *obj)
434 AccessibleComponent iface =
435 Accessibility_Accessible_queryInterface (*obj,
436 "IDL:Accessibility/Action:1.0",
438 return Obj_Add (iface);
442 * Accessible_getComponent:
443 * @obj: a pointer to the #Accessible instance to query.
445 * Get the #AccessibleComponent interface for an #Accessible.
447 * Returns: a pointer to an #AccessibleComponent interface instance, or
448 * NULL if @obj does not implement #AccessibleComponent.
450 AccessibleComponent *
451 Accessible_getComponent (Accessible *obj)
453 AccessibleComponent iface =
454 Accessibility_Accessible_queryInterface (*obj,
455 "IDL:Accessibility/Component:1.0",
457 return Obj_Add (iface);
460 AccessibleEditableText *
461 Accessible_getEditableText (Accessible *obj)
463 AccessibleComponent iface =
464 Accessibility_Accessible_queryInterface (*obj,
465 "IDL:Accessibility/EditableText:1.0",
467 return Obj_Add (iface);
472 AccessibleHypertext *
473 Accessible_getHypertext (Accessible *obj)
475 AccessibleComponent iface =
476 Accessibility_Accessible_queryInterface (*obj,
477 "IDL:Accessibility/Hypertext:1.0",
479 return Obj_Add (iface);
485 Accessible_getImage (Accessible *obj)
487 AccessibleComponent iface =
488 Accessibility_Accessible_queryInterface (*obj,
489 "IDL:Accessibility/Image:1.0",
491 return Obj_Add (iface);
496 AccessibleSelection *
497 Accessible_getSelection (Accessible *obj)
499 AccessibleComponent iface =
500 Accessibility_Accessible_queryInterface (*obj,
501 "IDL:Accessibility/Selection:1.0",
503 return Obj_Add (iface);
509 Accessible_getTable (Accessible *obj)
511 AccessibleComponent iface =
512 Accessibility_Accessible_queryInterface (*obj,
513 "IDL:Accessibility/Table:1.0",
515 return Obj_Add (iface);
521 Accessible_getText (Accessible *obj)
523 AccessibleComponent iface =
524 Accessibility_Accessible_queryInterface (*obj,
525 "IDL:Accessibility/Text:1.0",
527 return Obj_Add (iface);
533 Accessible_getValue (Accessible *obj)
535 AccessibleComponent iface =
536 Accessibility_Accessible_queryInterface (*obj,
537 "IDL:Accessibility/Value:1.0",
539 return Obj_Add (iface);
545 * Accessible_queryInterface:
546 * @obj: a pointer to the #Accessible instance to query.
547 * @interface_name: a UTF-8 character string specifiying the requested interface.
549 * Query an #Accessible object to for a named interface.
551 * Returns: an instance of the named interface object, if it is implemented
552 * by @obj, or NULL otherwise.
556 Accessible_queryInterface (Accessible *obj, char *interface_name)
558 GenericInterface iface;
559 iface = Accessibility_Accessible_queryInterface (*obj,
562 return (iface != NULL) ? Obj_Add (iface) : NULL;