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);
99 spi_check_ev (&ev, "ref");
106 * @obj: a pointer to the #Accessible object on which to operate.
108 * Decrement the reference count for an #Accessible object.
110 * Returns: (no return code implemented yet).
114 Accessible_unref (Accessible *obj)
116 Accessibility_Accessible_unref (*obj, &ev);
117 spi_check_ev (&ev, "unref");
122 * Accessible_getName:
123 * @obj: a pointer to the #Accessible object on which to operate.
125 * Get the name of an #Accessible object.
127 * Returns: a UTF-8 string indicating the name of the #Accessible object.
131 Accessible_getName (Accessible *obj)
135 Accessibility_Accessible__get_name (*obj, &ev);
136 spi_check_ev (&ev, "getName");
141 * Accessible_getDescription:
142 * @obj: a pointer to the #Accessible object on which to operate.
144 * Get the description of an #Accessible object.
146 * Returns: a UTF-8 string describing the #Accessible object.
150 Accessible_getDescription (Accessible *obj)
152 char *retval = (char *)
153 Accessibility_Accessible__get_description (*obj, &ev);
154 spi_check_ev (&ev, "getDescription");
159 * Accessible_getParent:
160 * @obj: a pointer to the #Accessible object to query.
162 * Get an #Accessible object's parent container.
164 * Returns: a pointer tothe #Accessible object which contains the given
165 * #Accessible instance, or NULL if the @obj has no parent container.
169 Accessible_getParent (Accessible *obj)
172 Obj_Add (Accessibility_Accessible__get_parent (*obj, &ev));
173 spi_check_ev (&ev, "getParent");
178 * Accessible_getChildCount:
179 * @obj: a pointer to the #Accessible object on which to operate.
181 * Get the number of children contained by an #Accessible object.
183 * Returns: a #long indicating the number of #Accessible children
184 * contained by an #Accessible object.
188 Accessible_getChildCount (Accessible *obj)
190 long retval = (long) Accessibility_Accessible__get_childCount (*obj, &ev);
191 spi_check_ev (&ev, "getChildCount");
196 * Accessible_getChildAtIndex:
197 * @obj: a pointer to the #Accessible object on which to operate.
198 * @childIndex: a #long indicating which child is specified.
200 * Get the #Accessible child of an #Accessible object at a given index.
202 * Returns: a pointer to the #Accessible child object at index
207 Accessible_getChildAtIndex (Accessible *obj,
210 Accessible *retval = Obj_Add (Accessibility_Accessible_getChildAtIndex (*obj, childIndex, &ev));
211 spi_check_ev (&ev, "getChildAtIndex");
216 * Accessible_getIndexInParent:
217 * @obj: a pointer to the #Accessible object on which to operate.
219 * Get the index of an #Accessible object in its containing #Accessible.
221 * Returns: a #long indicating the index of the #Accessible object
222 * in its parent (i.e. containing) #Accessible instance,
223 * or -1 if @obj has no containing parent.
227 Accessible_getIndexInParent (Accessible *obj)
229 long retval = (long) Accessibility_Accessible_getIndexInParent (*obj, &ev);
230 spi_check_ev (&ev, "getIndexInParent");
235 * Accessible_getRelationSet:
236 * @obj: a pointer to the #Accessible object on which to operate.
238 * Not Yet Implemented.
240 * Returns: a pointer to an array of #AccessibleRelations.
243 AccessibleRelation **
244 Accessible_getRelationSet (Accessible *obj)
250 * Accessible_getRole:
251 * @obj: a pointer to the #Accessible object on which to operate.
253 * Get the UI role of an #Accessible object.
255 * Returns: a UTF-8 string indicating the UI role of the #Accessible object.
259 Accessible_getRole (Accessible *obj)
261 char *retval = Accessible_Role_getName (
262 Accessibility_Accessible_getRole (*obj, &ev));
263 spi_check_ev (&ev, "getRole");
268 * Accessible_getStateSet:
269 * @obj: a pointer to the #Accessible object on which to operate.
271 * Not Yet Implemented.
273 * Returns: a pointer to an #AccessibleStateSet representing the object's current state.
276 Accessible_getStateSet (Accessible *obj)
281 /* Interface query methods */
284 * Accessible_isAction:
285 * @obj: a pointer to the #Accessible instance to query.
287 * Query whether the specified #Accessible implements #AccessibleAction.
289 * Returns: #TRUE if @obj implements the #AccessibleAction interface,
293 Accessible_isAction (Accessible *obj)
295 Bonobo_Unknown iface =
296 Accessibility_Accessible_queryInterface (*obj,
297 "IDL:Accessibility/Action:1.0",
299 spi_warn_ev (&ev, "isAction");
301 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
305 * Accessible_isComponent:
306 * @obj: a pointer to the #Accessible instance to query.
308 * Query whether the specified #Accessible implements #AccessibleComponent.
310 * Returns: #TRUE if @obj implements the #AccessibleComponent interface,
314 Accessible_isComponent (Accessible *obj)
316 Bonobo_Unknown iface =
317 Accessibility_Accessible_queryInterface (*obj,
318 "IDL:Accessibility/Component:1.0",
320 spi_warn_ev (&ev, "isComponent");
322 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
326 * Accessible_isEditableText:
327 * @obj: a pointer to the #Accessible instance to query.
329 * Query whether the specified #Accessible implements #AccessibleEditableText.
331 * Returns: #TRUE if @obj implements the #AccessibleEditableText interface,
335 Accessible_isEditableText (Accessible *obj)
337 Bonobo_Unknown iface =
338 Accessibility_Accessible_queryInterface (*obj,
339 "IDL:Accessibility/EditableText:1.0",
341 spi_check_ev (&ev, "isEditableText");
343 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
347 * Accessible_isHypertext:
348 * @obj: a pointer to the #Accessible instance to query.
350 * Query whether the specified #Accessible implements #AccessibleHypertext.
352 * Returns: #TRUE if @obj implements the #AccessibleHypertext interface,
356 Accessible_isHypertext (Accessible *obj)
358 Bonobo_Unknown iface =
359 Accessibility_Accessible_queryInterface (*obj,
360 "IDL:Accessibility/Hypertext:1.0",
363 spi_check_ev (&ev, "isHypertext");
365 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
369 * Accessible_isImage:
370 * @obj: a pointer to the #Accessible instance to query.
372 * Query whether the specified #Accessible implements #AccessibleImage.
374 * Returns: #TRUE if @obj implements the #AccessibleImage interface,
378 Accessible_isImage (Accessible *obj)
380 Bonobo_Unknown iface =
381 Accessibility_Accessible_queryInterface (*obj,
382 "IDL:Accessibility/Image:1.0",
384 spi_check_ev (&ev, "isImage");
386 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
390 * Accessible_isSelection:
391 * @obj: a pointer to the #Accessible instance to query.
393 * Query whether the specified #Accessible implements #AccessibleSelection.
395 * Returns: #TRUE if @obj implements the #AccessibleSelection interface,
399 Accessible_isSelection (Accessible *obj)
401 Bonobo_Unknown iface =
402 Accessibility_Accessible_queryInterface (*obj,
403 "IDL:Accessibility/Selection:1.0",
405 spi_warn_ev (&ev, "isSelection");
407 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
412 * Accessible_isTable:
413 * @obj: a pointer to the #Accessible instance to query.
415 * Query whether the specified #Accessible implements #AccessibleTable.
417 * Returns: #TRUE if @obj implements the #AccessibleTable interface,
421 Accessible_isTable (Accessible *obj)
423 Bonobo_Unknown iface =
424 Accessibility_Accessible_queryInterface (*obj,
425 "IDL:Accessibility/Table:1.0",
427 spi_check_ev (&ev, "isTable");
429 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
435 * @obj: a pointer to the #Accessible instance to query.
437 * Query whether the specified #Accessible implements #AccessibleText.
439 * Returns: #TRUE if @obj implements the #AccessibleText interface,
443 Accessible_isText (Accessible *obj)
445 Bonobo_Unknown iface =
446 Accessibility_Accessible_queryInterface (*obj,
447 "IDL:Accessibility/Text:1.0",
449 spi_warn_ev (&ev, "isText");
451 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
455 * Accessible_isValue:
456 * @obj: a pointer to the #Accessible instance to query.
458 * Query whether the specified #Accessible implements #AccessibleValue.
460 * Returns: #TRUE if @obj implements the #AccessibleValue interface,
464 Accessible_isValue (Accessible *obj)
466 Bonobo_Unknown iface =
467 Accessibility_Accessible_queryInterface (*obj,
468 "IDL:Accessibility/Value:1.0",
470 spi_check_ev (&ev, "isValue");
472 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
476 * Accessible_getAction:
477 * @obj: a pointer to the #Accessible instance to query.
479 * Get the #AccessibleAction interface for an #Accessible.
481 * Returns: a pointer to an #AccessibleAction interface instance, or
482 * NULL if @obj does not implement #AccessibleAction.
485 Accessible_getAction (Accessible *obj)
487 Bonobo_Unknown iface =
488 Accessibility_Accessible_queryInterface (*obj,
489 "IDL:Accessibility/Action:1.0",
491 spi_check_ev (&ev, "getAction");
493 return (AccessibleAction *)
494 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
498 * Accessible_getComponent:
499 * @obj: a pointer to the #Accessible instance to query.
501 * Get the #AccessibleComponent interface for an #Accessible.
503 * Returns: a pointer to an #AccessibleComponent interface instance, or
504 * NULL if @obj does not implement #AccessibleComponent.
506 AccessibleComponent *
507 Accessible_getComponent (Accessible *obj)
509 Bonobo_Unknown iface =
510 Accessibility_Accessible_queryInterface (*obj,
511 "IDL:Accessibility/Component:1.0",
513 spi_check_ev (&ev, "getComponent");
515 return (AccessibleComponent *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
519 * Accessible_getEditableText:
520 * @obj: a pointer to the #Accessible instance to query.
522 * Get the #AccessibleEditableText interface for an #Accessible.
524 * Returns: a pointer to an #AccessibleEditableText interface instance, or
525 * NULL if @obj does not implement #AccessibleEditableText.
527 AccessibleEditableText *
528 Accessible_getEditableText (Accessible *obj)
530 Bonobo_Unknown iface =
531 Accessibility_Accessible_queryInterface (*obj,
532 "IDL:Accessibility/EditableText:1.0",
534 spi_check_ev (&ev, "getEditableText");
536 return (AccessibleEditableText *)
537 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
543 * Accessible_getHypertext:
544 * @obj: a pointer to the #Accessible instance to query.
546 * Get the #AccessibleHypertext interface for an #Accessible.
548 * Returns: a pointer to an #AccessibleHypertext interface instance, or
549 * NULL if @obj does not implement #AccessibleHypertext.
551 AccessibleHypertext *
552 Accessible_getHypertext (Accessible *obj)
554 Bonobo_Unknown iface =
555 Accessibility_Accessible_queryInterface (*obj,
556 "IDL:Accessibility/Hypertext:1.0",
558 spi_check_ev (&ev, "getHypertext");
560 return (AccessibleHypertext *)
561 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
567 * Accessible_getImage:
568 * @obj: a pointer to the #Accessible instance to query.
570 * Get the #AccessibleImage interface for an #Accessible.
572 * Returns: a pointer to an #AccessibleImage interface instance, or
573 * NULL if @obj does not implement #AccessibleImage.
576 Accessible_getImage (Accessible *obj)
578 Bonobo_Unknown iface =
579 Accessibility_Accessible_queryInterface (*obj,
580 "IDL:Accessibility/Image:1.0",
582 spi_check_ev (&ev, "getImage");
584 return (AccessibleImage *)
585 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
591 * Accessible_getSelection:
592 * @obj: a pointer to the #Accessible instance to query.
594 * Get the #AccessibleSelection interface for an #Accessible.
596 * Returns: a pointer to an #AccessibleSelection interface instance, or
597 * NULL if @obj does not implement #AccessibleSelection.
599 AccessibleSelection *
600 Accessible_getSelection (Accessible *obj)
602 Bonobo_Unknown iface =
603 Accessibility_Accessible_queryInterface (*obj,
604 "IDL:Accessibility/Selection:1.0",
606 spi_warn_ev (&ev, "getSelection");
608 return (AccessibleSelection *)
609 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
615 * Accessible_getTable:
616 * @obj: a pointer to the #Accessible instance to query.
618 * Get the #AccessibleTable interface for an #Accessible.
620 * Returns: a pointer to an #AccessibleTable interface instance, or
621 * NULL if @obj does not implement #AccessibleTable.
624 Accessible_getTable (Accessible *obj)
626 Bonobo_Unknown iface =
627 Accessibility_Accessible_queryInterface (*obj,
628 "IDL:Accessibility/Table:1.0",
630 spi_check_ev (&ev, "getTable");
632 return (AccessibleTable *)
633 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
637 * Accessible_getText:
638 * @obj: a pointer to the #Accessible instance to query.
640 * Get the #AccessibleText interface for an #Accessible.
642 * Returns: a pointer to an #AccessibleText interface instance, or
643 * NULL if @obj does not implement #AccessibleText.
646 Accessible_getText (Accessible *obj)
648 Bonobo_Unknown iface =
649 Accessibility_Accessible_queryInterface (*obj,
650 "IDL:Accessibility/Text:1.0",
653 spi_check_ev (&ev, "getText");
655 return (AccessibleText *)
656 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
662 * Accessible_getValue:
663 * @obj: a pointer to the #Accessible instance to query.
665 * Get the #AccessibleValue interface for an #Accessible.
667 * Returns: a pointer to an #AccessibleValue interface instance, or
668 * NULL if @obj does not implement #AccessibleValue.
671 Accessible_getValue (Accessible *obj)
673 Bonobo_Unknown iface =
674 Accessibility_Accessible_queryInterface (*obj,
675 "IDL:Accessibility/Value:1.0",
677 return (AccessibleValue *)
678 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
684 * Accessible_queryInterface:
685 * @obj: a pointer to the #Accessible instance to query.
686 * @interface_name: a UTF-8 character string specifiying the requested interface.
688 * Query an #Accessible object to for a named interface.
690 * Returns: an instance of the named interface object, if it is implemented
691 * by @obj, or NULL otherwise.
695 Accessible_queryInterface (Accessible *obj, char *interface_name)
697 GenericInterface iface;
698 iface = Accessibility_Accessible_queryInterface (*obj,
701 return (iface != NULL) ? Obj_Add (iface) : NULL;