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:
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 Accessible_getChildCount (Accessible *obj)
191 long retval = (long) Accessibility_Accessible__get_childCount (*obj, &ev);
192 spi_check_ev (&ev, "getChildCount");
197 * Accessible_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 Accessible_getChildAtIndex (Accessible *obj,
212 Accessible *retval = Obj_Add (Accessibility_Accessible_getChildAtIndex (*obj, childIndex, &ev));
213 spi_check_ev (&ev, "getChildAtIndex");
218 * Accessible_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 Accessible_getIndexInParent (Accessible *obj)
232 long retval = (long) Accessibility_Accessible_getIndexInParent (*obj, &ev);
233 spi_check_ev (&ev, "getIndexInParent");
238 * Accessible_getRelationSet:
240 * Not Yet Implemented.
242 * Returns: a pointer to an array of #AccessibleRelations.
245 AccessibleRelation **
246 Accessible_getRelationSet (Accessible *obj)
252 * Accessible_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 Accessible_getRole (Accessible *obj)
263 char *retval = Accessible_Role_getName (
264 Accessibility_Accessible_getRole (*obj, &ev));
265 spi_check_ev (&ev, "getRole");
270 * Accessible_getStateSet:
272 * Not Yet Implemented.
274 * Returns: a pointer to an #AccessibleStateSet representing the object's current state.
277 Accessible_getStateSet (Accessible *obj)
282 /* Interface query methods */
285 * Accessible_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 Accessible_isAction (Accessible *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 * Accessible_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 Accessible_isComponent (Accessible *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 * Accessible_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 Accessible_isEditableText (Accessible *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 * Accessible_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 Accessible_isHypertext (Accessible *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 * Accessible_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 Accessible_isImage (Accessible *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 * Accessible_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 Accessible_isSelection (Accessible *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 * Accessible_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 Accessible_isTable (Accessible *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;
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 Accessible_isText (Accessible *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 * Accessible_isValue:
464 * @obj: a pointer to the #Accessible instance to query.
466 * Query whether the specified #Accessible implements #AccessibleValue.
468 * Returns: #TRUE if @obj implements the #AccessibleValue interface,
472 Accessible_isValue (Accessible *obj)
474 Bonobo_Unknown iface =
475 Accessibility_Accessible_queryInterface (*obj,
476 "IDL:Accessibility/Value:1.0",
478 spi_check_ev (&ev, "isValue");
480 return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
484 * Accessible_getAction:
489 Accessible_getAction (Accessible *obj)
491 Bonobo_Unknown iface =
492 Accessibility_Accessible_queryInterface (*obj,
493 "IDL:Accessibility/Action:1.0",
495 spi_check_ev (&ev, "getAction");
497 return (AccessibleAction *)
498 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
502 * Accessible_getComponent:
503 * @obj: a pointer to the #Accessible instance to query.
505 * Get the #AccessibleComponent interface for an #Accessible.
507 * Returns: a pointer to an #AccessibleComponent interface instance, or
508 * NULL if @obj does not implement #AccessibleComponent.
510 AccessibleComponent *
511 Accessible_getComponent (Accessible *obj)
513 Bonobo_Unknown iface =
514 Accessibility_Accessible_queryInterface (*obj,
515 "IDL:Accessibility/Component:1.0",
517 spi_check_ev (&ev, "getComponent");
519 return (AccessibleComponent *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
522 AccessibleEditableText *
523 Accessible_getEditableText (Accessible *obj)
525 Bonobo_Unknown iface =
526 Accessibility_Accessible_queryInterface (*obj,
527 "IDL:Accessibility/EditableText:1.0",
529 spi_check_ev (&ev, "getEditableText");
531 return (AccessibleEditableText *)
532 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
537 AccessibleHypertext *
538 Accessible_getHypertext (Accessible *obj)
540 Bonobo_Unknown iface =
541 Accessibility_Accessible_queryInterface (*obj,
542 "IDL:Accessibility/Hypertext:1.0",
544 spi_check_ev (&ev, "getHypertext");
546 return (AccessibleHypertext *)
547 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
553 Accessible_getImage (Accessible *obj)
555 Bonobo_Unknown iface =
556 Accessibility_Accessible_queryInterface (*obj,
557 "IDL:Accessibility/Image:1.0",
559 spi_check_ev (&ev, "getImage");
561 return (AccessibleImage *)
562 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
567 AccessibleSelection *
568 Accessible_getSelection (Accessible *obj)
570 Bonobo_Unknown iface =
571 Accessibility_Accessible_queryInterface (*obj,
572 "IDL:Accessibility/Selection:1.0",
574 spi_warn_ev (&ev, "getSelection");
576 return (AccessibleSelection *)
577 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
583 Accessible_getTable (Accessible *obj)
585 Bonobo_Unknown iface =
586 Accessibility_Accessible_queryInterface (*obj,
587 "IDL:Accessibility/Table:1.0",
589 spi_check_ev (&ev, "getTable");
591 return (AccessibleTable *)
592 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
596 Accessible_getText (Accessible *obj)
598 Bonobo_Unknown iface =
599 Accessibility_Accessible_queryInterface (*obj,
600 "IDL:Accessibility/Text:1.0",
603 spi_check_ev (&ev, "getText");
605 return (AccessibleText *)
606 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
612 Accessible_getValue (Accessible *obj)
614 Bonobo_Unknown iface =
615 Accessibility_Accessible_queryInterface (*obj,
616 "IDL:Accessibility/Value:1.0",
618 return (AccessibleValue *)
619 ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
625 * Accessible_queryInterface:
626 * @obj: a pointer to the #Accessible instance to query.
627 * @interface_name: a UTF-8 character string specifiying the requested interface.
629 * Query an #Accessible object to for a named interface.
631 * Returns: an instance of the named interface object, if it is implemented
632 * by @obj, or NULL otherwise.
636 Accessible_queryInterface (Accessible *obj, char *interface_name)
638 GenericInterface iface;
639 iface = Accessibility_Accessible_queryInterface (*obj,
642 return (iface != NULL) ? Obj_Add (iface) : NULL;