3 static char *role_names [MAX_ROLES] =
61 "table column header",
75 * Returns a localizable string name for an AtkRole enumerated type.
78 SpiAccessible_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 SpiAccessible_ref (SpiAccessible *obj)
98 Accessibility_Accessible_ref (*obj, &ev);
99 spi_check_ev (&ev, "ref");
105 * SpiAccessible_unref:
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 SpiAccessible_unref (SpiAccessible *obj)
116 Accessibility_Accessible_unref (*obj, &ev);
117 spi_check_ev (&ev, "unref");
122 * SpiAccessible_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 SpiAccessible_getName (SpiAccessible *obj)
135 Accessibility_Accessible__get_name (*obj, &ev);
136 spi_check_ev (&ev, "getName");
141 * SpiAccessible_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 SpiAccessible_getDescription (SpiAccessible *obj)
152 char *retval = (char *)
153 Accessibility_Accessible__get_description (*obj, &ev);
154 spi_check_ev (&ev, "getDescription");
159 * SpiAccessible_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 SpiAccessible_getParent (SpiAccessible *obj)
171 SpiAccessible *retval =
172 Obj_Add (Accessibility_Accessible__get_parent (*obj, &ev));
173 spi_check_ev (&ev, "getParent");
178 * SpiAccessible_getChildCount:
180 * @obj: a pointer to the #Accessible object on which to operate.
182 * Get the number of children contained by an #Accessible object.
184 * Returns: a #long indicating the number of #Accessible children
185 * contained by an #Accessible object.
189 SpiAccessible_getChildCount (SpiAccessible *obj)
191 long retval = (long) Accessibility_Accessible__get_childCount (*obj, &ev);
192 spi_check_ev (&ev, "getChildCount");
197 * SpiAccessible_getChildAtIndex:
199 * @obj: a pointer to the #Accessible object on which to operate.
200 * @childIndex: a #long indicating which child is specified.
202 * Get the #Accessible child of an #Accessible object at a given index.
204 * Returns: a pointer to the #Accessible child object at index
209 SpiAccessible_getChildAtIndex (SpiAccessible *obj,
212 SpiAccessible *retval = Obj_Add (Accessibility_Accessible_getChildAtIndex (*obj, childIndex, &ev));
213 spi_check_ev (&ev, "getChildAtIndex");
218 * SpiAccessible_getIndexInParent:
220 * @obj: a pointer to the #Accessible object on which to operate.
222 * Get the index of an #Accessible object in its containing #Accessible.
224 * Returns: a #long indicating the index of the #Accessible object
225 * in its parent (i.e. containing) #Accessible instance,
226 * or -1 if @obj has no containing parent.
230 SpiAccessible_getIndexInParent (SpiAccessible *obj)
232 long retval = (long) Accessibility_Accessible_getIndexInParent (*obj, &ev);
233 spi_check_ev (&ev, "getIndexInParent");
238 * SpiAccessible_getRelationSet:
240 * Not Yet Implemented.
242 * Returns: a pointer to an array of #AccessibleRelations.
245 SpiAccessibleRelation **
246 SpiAccessible_getRelationSet (SpiAccessible *obj)
252 * SpiAccessible_getRole:
253 * @obj: a pointer to the #Accessible object on which to operate.
255 * Get the UI role of an #Accessible object.
257 * Returns: a UTF-8 string indicating the UI role of the #Accessible object.
261 SpiAccessible_getRole (SpiAccessible *obj)
263 char *retval = SpiAccessible_Role_getName (
264 Accessibility_Accessible_getRole (*obj, &ev));
265 spi_check_ev (&ev, "getRole");
270 * SpiAccessible_getStateSet:
272 * Not Yet Implemented.
274 * Returns: a pointer to an #AccessibleStateSet representing the object's current state.
276 SpiAccessibleStateSet *
277 SpiAccessible_getStateSet (SpiAccessible *obj)
282 /* Interface query methods */
285 * SpiAccessible_isAction:
286 * @obj: a pointer to the #Accessible instance to query.
288 * Query whether the specified #Accessible implements #AccessibleAction.
289 * Not Yet Implemented.
291 * Returns: #TRUE if @obj implements the #AccessibleAction interface,
295 SpiAccessible_isAction (SpiAccessible *obj)
297 Bonobo_Unknown iface =
298 Accessibility_Accessible_queryInterface (*obj,
299 "IDL:Accessibility/Action:1.0",
301 spi_warn_ev (&ev, "isAction");
303 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
307 * SpiAccessible_isComponent:
308 * @obj: a pointer to the #Accessible instance to query.
310 * Query whether the specified #Accessible implements #AccessibleComponent.
312 * Returns: #TRUE if @obj implements the #AccessibleComponent interface,
316 SpiAccessible_isComponent (SpiAccessible *obj)
318 Bonobo_Unknown iface =
319 Accessibility_Accessible_queryInterface (*obj,
320 "IDL:Accessibility/Component:1.0",
322 spi_warn_ev (&ev, "isComponent");
324 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
328 * SpiAccessible_isEditableText:
329 * @obj: a pointer to the #Accessible instance to query.
331 * Query whether the specified #Accessible implements #AccessibleEditableText.
332 * Not Yet Implemented.
334 * Returns: #TRUE if @obj implements the #AccessibleEditableText interface,
338 SpiAccessible_isEditableText (SpiAccessible *obj)
340 Bonobo_Unknown iface =
341 Accessibility_Accessible_queryInterface (*obj,
342 "IDL:Accessibility/EditableText:1.0",
344 spi_check_ev (&ev, "isEditableText");
346 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
350 * SpiAccessible_isHypertext:
351 * @obj: a pointer to the #Accessible instance to query.
353 * Query whether the specified #Accessible implements #AccessibleHypertext.
354 * Not Yet Implemented.
356 * Returns: #TRUE if @obj implements the #AccessibleHypertext interface,
360 SpiAccessible_isHypertext (SpiAccessible *obj)
362 Bonobo_Unknown iface =
363 Accessibility_Accessible_queryInterface (*obj,
364 "IDL:Accessibility/Hypertext:1.0",
367 spi_check_ev (&ev, "isHypertext");
369 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
373 * SpiAccessible_isImage:
374 * @obj: a pointer to the #Accessible instance to query.
376 * Query whether the specified #Accessible implements #AccessibleImage.
377 * Not Yet Implemented.
379 * Returns: #TRUE if @obj implements the #AccessibleImage interface,
383 SpiAccessible_isImage (SpiAccessible *obj)
385 Bonobo_Unknown iface =
386 Accessibility_Accessible_queryInterface (*obj,
387 "IDL:Accessibility/Image:1.0",
389 spi_check_ev (&ev, "isImage");
391 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
395 * SpiAccessible_isSelection:
396 * @obj: a pointer to the #Accessible instance to query.
398 * Query whether the specified #Accessible implements #AccessibleSelection.
399 * Not Yet Implemented.
401 * Returns: #TRUE if @obj implements the #AccessibleSelection interface,
405 SpiAccessible_isSelection (SpiAccessible *obj)
407 Bonobo_Unknown iface =
408 Accessibility_Accessible_queryInterface (*obj,
409 "IDL:Accessibility/Selection:1.0",
411 spi_warn_ev (&ev, "isSelection");
413 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
418 * SpiAccessible_isTable:
419 * @obj: a pointer to the #Accessible instance to query.
421 * Query whether the specified #Accessible implements #AccessibleTable.
422 * Not Yet Implemented.
424 * Returns: #TRUE if @obj implements the #AccessibleTable interface,
428 SpiAccessible_isTable (SpiAccessible *obj)
430 Bonobo_Unknown iface =
431 Accessibility_Accessible_queryInterface (*obj,
432 "IDL:Accessibility/Table:1.0",
434 spi_check_ev (&ev, "isTable");
436 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
441 * SpiAccessible_isText:
442 * @obj: a pointer to the #Accessible instance to query.
444 * Query whether the specified #Accessible implements #AccessibleText.
445 * Not Yet Implemented.
447 * Returns: #TRUE if @obj implements the #AccessibleText interface,
451 SpiAccessible_isText (SpiAccessible *obj)
453 Bonobo_Unknown iface =
454 Accessibility_Accessible_queryInterface (*obj,
455 "IDL:Accessibility/Text:1.0",
457 spi_warn_ev (&ev, "isText");
459 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
463 * SpiAccessible_isValue:
464 * @obj: a pointer to the #Accessible instance to query.
466 * Query whether the specified #Accessible implements #AccessibleValue.
467 * Not Yet Implemented.
469 * Returns: #TRUE if @obj implements the #AccessibleValue interface,
473 SpiAccessible_isValue (SpiAccessible *obj)
475 Bonobo_Unknown iface =
476 Accessibility_Accessible_queryInterface (*obj,
477 "IDL:Accessibility/Value:1.0",
479 spi_check_ev (&ev, "isValue");
481 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
485 * SpiAccessible_getAction:
487 * Not Yet Implemented.
490 SpiAccessibleAction *
491 SpiAccessible_getAction (SpiAccessible *obj)
493 Bonobo_Unknown iface =
494 Accessibility_Accessible_queryInterface (*obj,
495 "IDL:Accessibility/Action:1.0",
497 spi_check_ev (&ev, "getAction");
499 return (SpiAccessibleAction *)
500 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
504 * SpiAccessible_getComponent:
505 * @obj: a pointer to the #Accessible instance to query.
507 * Get the #AccessibleComponent interface for an #Accessible.
509 * Returns: a pointer to an #AccessibleComponent interface instance, or
510 * NULL if @obj does not implement #AccessibleComponent.
512 SpiAccessibleComponent *
513 SpiAccessible_getComponent (SpiAccessible *obj)
515 Bonobo_Unknown iface =
516 Accessibility_Accessible_queryInterface (*obj,
517 "IDL:Accessibility/Component:1.0",
519 spi_check_ev (&ev, "getComponent");
521 return (SpiAccessibleComponent *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
524 SpiAccessibleEditableText *
525 SpiAccessible_getEditableText (SpiAccessible *obj)
527 Bonobo_Unknown iface =
528 Accessibility_Accessible_queryInterface (*obj,
529 "IDL:Accessibility/EditableText:1.0",
531 spi_check_ev (&ev, "getEditableText");
533 return (SpiAccessibleEditableText *)
534 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
539 SpiAccessibleHypertext *
540 SpiAccessible_getHypertext (SpiAccessible *obj)
542 Bonobo_Unknown iface =
543 Accessibility_Accessible_queryInterface (*obj,
544 "IDL:Accessibility/Hypertext:1.0",
546 spi_check_ev (&ev, "getHypertext");
548 return (SpiAccessibleHypertext *)
549 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
555 SpiAccessible_getImage (SpiAccessible *obj)
557 Bonobo_Unknown iface =
558 Accessibility_Accessible_queryInterface (*obj,
559 "IDL:Accessibility/Image:1.0",
561 spi_check_ev (&ev, "getImage");
563 return (SpiAccessibleImage *)
564 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
569 SpiAccessibleSelection *
570 SpiAccessible_getSelection (SpiAccessible *obj)
572 Bonobo_Unknown iface =
573 Accessibility_Accessible_queryInterface (*obj,
574 "IDL:Accessibility/Selection:1.0",
576 spi_warn_ev (&ev, "getSelection");
578 return (SpiAccessibleSelection *)
579 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
585 SpiAccessible_getTable (SpiAccessible *obj)
587 Bonobo_Unknown iface =
588 Accessibility_Accessible_queryInterface (*obj,
589 "IDL:Accessibility/Table:1.0",
591 spi_check_ev (&ev, "getTable");
593 return (SpiAccessibleTable *)
594 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
598 SpiAccessible_getText (SpiAccessible *obj)
600 Bonobo_Unknown iface =
601 Accessibility_Accessible_queryInterface (*obj,
602 "IDL:Accessibility/Text:1.0",
605 spi_check_ev (&ev, "getText");
607 return (SpiAccessibleText *)
608 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
614 SpiAccessible_getValue (SpiAccessible *obj)
616 Bonobo_Unknown iface =
617 Accessibility_Accessible_queryInterface (*obj,
618 "IDL:Accessibility/Value:1.0",
620 return (SpiAccessibleValue *)
621 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
627 * SpiAccessible_queryInterface:
628 * @obj: a pointer to the #Accessible instance to query.
629 * @interface_name: a UTF-8 character string specifiying the requested interface.
631 * Query an #Accessible object to for a named interface.
633 * Returns: an instance of the named interface object, if it is implemented
634 * by @obj, or NULL otherwise.
638 SpiAccessible_queryInterface (SpiAccessible *obj, char *interface_name)
640 GenericInterface iface;
641 iface = Accessibility_Accessible_queryInterface (*obj,
644 return (iface != NULL) ? Obj_Add (iface) : NULL;