Added docs and C bindings for AccessibleStateSet and AccessibleRelationSet.
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_accessible.c
1 #define MAX_ROLES 100
2
3 static char *role_names [MAX_ROLES] =
4 {
5   " ",
6   "accelerator label",
7   "alert",
8   "animation",
9   "arrow",
10   "calendar",
11   "canvas",
12   "check box",
13   "menu item",
14   "color chooser",
15   "column header",
16   "combo box",
17   "date editor",
18   "desktop icon",
19   "desktop frame",
20   "dial",
21   "dialog",
22   "directory pane",
23   "drawing area",
24   "file chooser",
25   "filler",
26   "font chooser",
27   "frame",
28   "glass pane",
29   "HTML container",
30   "icon",
31   "image",
32   "internal frame",
33   "label",
34   "layered pane",
35   "list",
36   "list item",
37   "menu",
38   "menubar",
39   "menu item",
40   "option pane",
41   "page tab",
42   "page tab list",
43   "panel",
44   "password text",
45   "popup menu",
46   "progress bar",
47   "pushbutton",
48   "radiobutton",
49   "radio menu item",
50   "root pane",
51   "row header",
52   "scrollbar",
53   "scrollpane",
54   "separator",
55   "slider",
56   "split pane",
57   "spin button",
58   "status bar",
59   "table",
60   "table cell",
61   "table column header",
62   "table row header",
63   "tearoff menu item",
64   "text",
65   "toggle button",
66   "toolbar",
67   "tooltip",
68   "tree",
69   " ",
70   "viewport",
71   "window",
72 };
73
74 /**
75  * AccessibleRole_getName:
76  * @role: an #AccessibleRole object to query.
77  *
78  * Get a localizeable string that indicates the name of an #AccessibleRole.
79  *
80  * Returns: a localizable string name for an #AccessibleRole enumerated type.
81  **/
82 char*
83 AccessibleRole_getName (AccessibleRole role)
84 {
85   if (role < MAX_ROLES) return role_names [(int) role];
86   else return "";
87 }
88
89
90
91 /**
92  * Accessible_ref:
93  * @obj: a pointer to the #Accessible object on which to operate.
94  *
95  * Increment the reference count for an #Accessible object.
96  *
97  * Returns: (no return code implemented yet).
98  *
99  **/
100 int
101 Accessible_ref (Accessible *obj)
102 {
103   Accessibility_Accessible_ref (*obj, &ev);
104   spi_check_ev (&ev, "ref");
105   return 0;
106 }
107
108
109 /**
110  * Accessible_unref:
111  * @obj: a pointer to the #Accessible object on which to operate.
112  *
113  * Decrement the reference count for an #Accessible object.
114  *
115  * Returns: (no return code implemented yet).
116  *
117  **/
118 int
119 Accessible_unref (Accessible *obj)
120 {
121   Accessibility_Accessible_unref (*obj, &ev);
122   spi_check_ev (&ev, "unref");
123   return 0;
124 }
125
126 /**
127  * Accessible_getName:
128  * @obj: a pointer to the #Accessible object on which to operate.
129  *
130  * Get the name of an #Accessible object.
131  *
132  * Returns: a UTF-8 string indicating the name of the #Accessible object.
133  *
134  **/
135 char *
136 Accessible_getName (Accessible *obj)
137 {
138   char *retval = 
139     (char *)
140     Accessibility_Accessible__get_name (*obj, &ev);
141   spi_check_ev (&ev, "getName"); 
142   return retval;
143 }
144
145 /**
146  * Accessible_getDescription:
147  * @obj: a pointer to the #Accessible object on which to operate.
148  *
149  * Get the description of an #Accessible object.
150  *
151  * Returns: a UTF-8 string describing the #Accessible object.
152  *
153  **/
154 char *
155 Accessible_getDescription (Accessible *obj)
156 {
157   char *retval = (char *)
158     Accessibility_Accessible__get_description (*obj, &ev);
159   spi_check_ev (&ev, "getDescription");
160   return retval;
161 }
162
163 /**
164  * Accessible_getParent:
165  * @obj: a pointer to the #Accessible object to query.
166  *
167  * Get an #Accessible object's parent container.
168  *
169  * Returns: a pointer tothe #Accessible object which contains the given
170  *          #Accessible instance, or NULL if the @obj has no parent container.
171  *
172  **/
173 Accessible *
174 Accessible_getParent (Accessible *obj)
175 {
176   Accessible *retval = 
177       Obj_Add (Accessibility_Accessible__get_parent (*obj, &ev));
178   spi_check_ev (&ev, "getParent");
179   return retval;
180 }
181
182 /**
183  * Accessible_getChildCount:
184  * @obj: a pointer to the #Accessible object on which to operate.
185  *
186  * Get the number of children contained by an #Accessible object.
187  *
188  * Returns: a #long indicating the number of #Accessible children
189  *          contained by an #Accessible object.
190  *
191  **/
192 long
193 Accessible_getChildCount (Accessible *obj)
194 {
195   long retval = (long) Accessibility_Accessible__get_childCount (*obj, &ev);
196   spi_check_ev (&ev, "getChildCount");
197   return retval;
198 }
199
200 /**
201  * Accessible_getChildAtIndex:
202  * @obj: a pointer to the #Accessible object on which to operate.
203  * @childIndex: a #long indicating which child is specified.
204  *
205  * Get the #Accessible child of an #Accessible object at a given index.
206  *
207  * Returns: a pointer to the #Accessible child object at index
208  *          @childIndex.
209  *
210  **/
211 Accessible *
212 Accessible_getChildAtIndex (Accessible *obj,
213                             long int childIndex)
214 {
215   Accessible *retval = Obj_Add (Accessibility_Accessible_getChildAtIndex (*obj, childIndex, &ev));
216   spi_check_ev (&ev, "getChildAtIndex");
217   return retval;
218 }
219
220 /**
221  * Accessible_getIndexInParent:
222  * @obj: a pointer to the #Accessible object on which to operate.
223  *
224  * Get the index of an #Accessible object in its containing #Accessible.
225  *
226  * Returns: a #long indicating the index of the #Accessible object
227  *          in its parent (i.e. containing) #Accessible instance,
228  *          or -1 if @obj has no containing parent.
229  *
230  **/
231 long
232 Accessible_getIndexInParent (Accessible *obj)
233 {
234   long retval = (long) Accessibility_Accessible_getIndexInParent (*obj, &ev);
235   spi_check_ev (&ev, "getIndexInParent");
236   return retval;
237 }
238
239 /**
240  * Accessible_getRelationSet:
241  * @obj: a pointer to the #Accessible object on which to operate.
242  *
243  * Get the set of #AccessibleRelation objects which describe this #Accessible object's
244  *       relationships with other #Accessible objects.
245  *
246  * Returns: an array of #AccessibleRelation pointers.
247  *
248  **/
249 AccessibleRelation **
250 Accessible_getRelationSet (Accessible *obj)
251 {
252   AccessibleRelation **relations;
253   int n_relations;
254   int i;
255   Accessibility_RelationSet *relation_set =     
256           Accessibility_Accessible_getRelationSet (*obj, &ev);
257   
258   /* this looks hack-ish, but it's based on the CORBA C bindings spec */
259   n_relations = relation_set->_length;
260   relations = malloc (sizeof (AccessibleRelation *) * n_relations);
261   
262   for (i=0; i<n_relations; ++i)
263     {
264       relations[i] = Obj_Add (relation_set->_buffer[i]);
265     }
266   relations[i] = CORBA_OBJECT_NIL;
267
268   return relations;
269 }
270
271 /**
272  * Accessible_getRole:
273  * @obj: a pointer to the #Accessible object on which to operate.
274  *
275  * Get the UI role of an #Accessible object.
276  *
277  * Returns: a UTF-8 string indicating the UI role of the #Accessible object.
278  *
279  **/
280 char *
281 Accessible_getRole (Accessible *obj)
282 {
283   char *retval = AccessibleRole_getName (
284                   Accessibility_Accessible_getRole (*obj, &ev));
285   spi_check_ev (&ev, "getRole");
286   return retval;
287 }
288
289 /**
290  * Accessible_getStateSet:
291  * @obj: a pointer to the #Accessible object on which to operate.
292  *
293  * Not Yet Implemented.
294  *
295  * Returns: a pointer to an #AccessibleStateSet representing the object's current state.
296  **/
297 AccessibleStateSet *
298 Accessible_getStateSet (Accessible *obj)
299 {
300   return NULL;
301 }
302
303 /* Interface query methods */
304
305 /**
306  * Accessible_isAction:
307  * @obj: a pointer to the #Accessible instance to query.
308  *
309  * Query whether the specified #Accessible implements #AccessibleAction.
310  *
311  * Returns: #TRUE if @obj implements the #AccessibleAction interface,
312  *          #FALSE otherwise.
313  **/
314 boolean
315 Accessible_isAction (Accessible *obj)
316 {
317   Bonobo_Unknown iface =
318     Accessibility_Accessible_queryInterface (*obj,
319                                              "IDL:Accessibility/Action:1.0",
320                                              &ev);
321   spi_warn_ev (&ev, "isAction");
322
323   return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
324 }
325
326 /**
327  * Accessible_isComponent:
328  * @obj: a pointer to the #Accessible instance to query.
329  *
330  * Query whether the specified #Accessible implements #AccessibleComponent.
331  *
332  * Returns: #TRUE if @obj implements the #AccessibleComponent interface,
333  *          #FALSE otherwise.
334  **/
335 boolean
336 Accessible_isComponent (Accessible *obj)
337 {
338   Bonobo_Unknown iface =
339     Accessibility_Accessible_queryInterface (*obj,
340                                              "IDL:Accessibility/Component:1.0",
341                                              &ev);
342   spi_warn_ev (&ev, "isComponent");
343
344   return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
345 }
346
347 /**
348  * Accessible_isEditableText:
349  * @obj: a pointer to the #Accessible instance to query.
350  *
351  * Query whether the specified #Accessible implements #AccessibleEditableText.
352  *
353  * Returns: #TRUE if @obj implements the #AccessibleEditableText interface,
354  *          #FALSE otherwise.
355  **/
356 boolean
357 Accessible_isEditableText (Accessible *obj)
358 {
359   Bonobo_Unknown iface =
360     Accessibility_Accessible_queryInterface (*obj,
361                                              "IDL:Accessibility/EditableText:1.0",
362                                              &ev);
363   spi_check_ev (&ev, "isEditableText");
364
365   return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
366 }
367
368 /**
369  * Accessible_isHypertext:
370  * @obj: a pointer to the #Accessible instance to query.
371  *
372  * Query whether the specified #Accessible implements #AccessibleHypertext.
373  *
374  * Returns: #TRUE if @obj implements the #AccessibleHypertext interface,
375  *          #FALSE otherwise.
376  **/
377 boolean
378 Accessible_isHypertext (Accessible *obj)
379 {
380   Bonobo_Unknown iface =
381     Accessibility_Accessible_queryInterface (*obj,
382                                              "IDL:Accessibility/Hypertext:1.0",
383                                              &ev);
384
385   spi_check_ev (&ev, "isHypertext");
386
387   return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
388 }
389
390 /**
391  * Accessible_isImage:
392  * @obj: a pointer to the #Accessible instance to query.
393  *
394  * Query whether the specified #Accessible implements #AccessibleImage.
395  *
396  * Returns: #TRUE if @obj implements the #AccessibleImage interface,
397  *          #FALSE otherwise.
398 **/
399 boolean
400 Accessible_isImage (Accessible *obj)
401 {
402   Bonobo_Unknown iface =
403     Accessibility_Accessible_queryInterface (*obj,
404                                              "IDL:Accessibility/Image:1.0",
405                                              &ev);
406   spi_check_ev (&ev, "isImage");
407
408   return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
409 }
410
411 /**
412  * Accessible_isSelection:
413  * @obj: a pointer to the #Accessible instance to query.
414  *
415  * Query whether the specified #Accessible implements #AccessibleSelection.
416  *
417  * Returns: #TRUE if @obj implements the #AccessibleSelection interface,
418  *          #FALSE otherwise.
419 **/
420 boolean
421 Accessible_isSelection (Accessible *obj)
422 {
423   Bonobo_Unknown iface =
424     Accessibility_Accessible_queryInterface (*obj,
425                                              "IDL:Accessibility/Selection:1.0",
426                                              &ev);
427   spi_warn_ev (&ev, "isSelection");
428
429   return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
430
431 }
432
433 /**
434  * Accessible_isTable:
435  * @obj: a pointer to the #Accessible instance to query.
436  *
437  * Query whether the specified #Accessible implements #AccessibleTable.
438  *
439  * Returns: #TRUE if @obj implements the #AccessibleTable interface,
440  *          #FALSE otherwise.
441 **/
442 boolean
443 Accessible_isTable (Accessible *obj)
444 {
445   Bonobo_Unknown iface =
446     Accessibility_Accessible_queryInterface (*obj,
447                                              "IDL:Accessibility/Table:1.0",
448                                              &ev);
449   spi_check_ev (&ev, "isTable");
450
451   return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
452
453 }
454
455 /**
456  * Accessible_isText:
457  * @obj: a pointer to the #Accessible instance to query.
458  *
459  * Query whether the specified #Accessible implements #AccessibleText.
460  *
461  * Returns: #TRUE if @obj implements the #AccessibleText interface,
462  *          #FALSE otherwise.
463 **/
464 boolean
465 Accessible_isText (Accessible *obj)
466 {
467   Bonobo_Unknown iface =
468     Accessibility_Accessible_queryInterface (*obj,
469                                              "IDL:Accessibility/Text:1.0",
470                                              &ev);
471   spi_warn_ev (&ev, "isText");
472
473   return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
474 }
475
476 /**
477  * Accessible_isValue:
478  * @obj: a pointer to the #Accessible instance to query.
479  *
480  * Query whether the specified #Accessible implements #AccessibleValue.
481  *
482  * Returns: #TRUE if @obj implements the #AccessibleValue interface,
483  *          #FALSE otherwise.
484 **/
485 boolean
486 Accessible_isValue (Accessible *obj)
487 {
488   Bonobo_Unknown iface =
489     Accessibility_Accessible_queryInterface (*obj,
490                                              "IDL:Accessibility/Value:1.0",
491                                              &ev);
492   spi_check_ev (&ev, "isValue");
493
494   return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
495 }
496
497 /**
498  * Accessible_getAction:
499  * @obj: a pointer to the #Accessible instance to query.
500  *
501  * Get the #AccessibleAction interface for an #Accessible.
502  *
503  * Returns: a pointer to an #AccessibleAction interface instance, or
504  *          NULL if @obj does not implement #AccessibleAction.
505  **/
506 AccessibleAction *
507 Accessible_getAction (Accessible *obj)
508 {
509   Bonobo_Unknown iface =
510     Accessibility_Accessible_queryInterface (*obj,
511                                              "IDL:Accessibility/Action:1.0",
512                                              &ev);
513   spi_check_ev (&ev, "getAction");
514
515   return (AccessibleAction *)
516           ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
517 }
518
519 /**
520  * Accessible_getComponent:
521  * @obj: a pointer to the #Accessible instance to query.
522  *
523  * Get the #AccessibleComponent interface for an #Accessible.
524  *
525  * Returns: a pointer to an #AccessibleComponent interface instance, or
526  *          NULL if @obj does not implement #AccessibleComponent.
527  **/
528 AccessibleComponent *
529 Accessible_getComponent (Accessible *obj)
530 {
531   Bonobo_Unknown iface =
532     Accessibility_Accessible_queryInterface (*obj,
533                                              "IDL:Accessibility/Component:1.0",
534                                              &ev);
535   spi_check_ev (&ev, "getComponent");
536
537   return (AccessibleComponent *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
538 }
539
540 /**
541  * Accessible_getEditableText:
542  * @obj: a pointer to the #Accessible instance to query.
543  *
544  * Get the #AccessibleEditableText interface for an #Accessible.
545  *
546  * Returns: a pointer to an #AccessibleEditableText interface instance, or
547  *          NULL if @obj does not implement #AccessibleEditableText.
548  **/
549 AccessibleEditableText *
550 Accessible_getEditableText (Accessible *obj)
551 {
552   Bonobo_Unknown iface =
553     Accessibility_Accessible_queryInterface (*obj,
554                                              "IDL:Accessibility/EditableText:1.0",
555                                              &ev);
556   spi_check_ev (&ev, "getEditableText");
557
558   return (AccessibleEditableText *)
559           ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
560 }
561
562
563
564 /**
565  * Accessible_getHypertext:
566  * @obj: a pointer to the #Accessible instance to query.
567  *
568  * Get the #AccessibleHypertext interface for an #Accessible.
569  *
570  * Returns: a pointer to an #AccessibleHypertext interface instance, or
571  *          NULL if @obj does not implement #AccessibleHypertext.
572  **/
573 AccessibleHypertext *
574 Accessible_getHypertext (Accessible *obj)
575 {
576   Bonobo_Unknown iface =
577     Accessibility_Accessible_queryInterface (*obj,
578                                              "IDL:Accessibility/Hypertext:1.0",
579                                              &ev);
580   spi_check_ev (&ev, "getHypertext");
581
582   return (AccessibleHypertext *)
583           ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
584 }
585
586
587
588 /**
589  * Accessible_getImage:
590  * @obj: a pointer to the #Accessible instance to query.
591  *
592  * Get the #AccessibleImage interface for an #Accessible.
593  *
594  * Returns: a pointer to an #AccessibleImage interface instance, or
595  *          NULL if @obj does not implement #AccessibleImage.
596  **/
597 AccessibleImage *
598 Accessible_getImage (Accessible *obj)
599 {
600   Bonobo_Unknown iface =
601     Accessibility_Accessible_queryInterface (*obj,
602                                              "IDL:Accessibility/Image:1.0",
603                                              &ev);
604   spi_check_ev (&ev, "getImage");
605
606   return (AccessibleImage *)
607           ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
608 }
609
610
611
612 /**
613  * Accessible_getSelection:
614  * @obj: a pointer to the #Accessible instance to query.
615  *
616  * Get the #AccessibleSelection interface for an #Accessible.
617  *
618  * Returns: a pointer to an #AccessibleSelection interface instance, or
619  *          NULL if @obj does not implement #AccessibleSelection.
620  **/
621 AccessibleSelection *
622 Accessible_getSelection (Accessible *obj)
623 {
624   Bonobo_Unknown iface =
625     Accessibility_Accessible_queryInterface (*obj,
626                                              "IDL:Accessibility/Selection:1.0",
627                                              &ev);
628   spi_warn_ev (&ev, "getSelection");
629
630   return (AccessibleSelection *)
631           ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
632 }
633
634
635
636 /**
637  * Accessible_getTable:
638  * @obj: a pointer to the #Accessible instance to query.
639  *
640  * Get the #AccessibleTable interface for an #Accessible.
641  *
642  * Returns: a pointer to an #AccessibleTable interface instance, or
643  *          NULL if @obj does not implement #AccessibleTable.
644  **/
645 AccessibleTable *
646 Accessible_getTable (Accessible *obj)
647 {
648   Bonobo_Unknown iface =
649     Accessibility_Accessible_queryInterface (*obj,
650                                              "IDL:Accessibility/Table:1.0",
651                                              &ev);
652   spi_check_ev (&ev, "getTable");
653
654   return (AccessibleTable *)
655           ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
656 }
657
658 /**
659  * Accessible_getText:
660  * @obj: a pointer to the #Accessible instance to query.
661  *
662  * Get the #AccessibleText interface for an #Accessible.
663  *
664  * Returns: a pointer to an #AccessibleText interface instance, or
665  *          NULL if @obj does not implement #AccessibleText.
666  **/
667 AccessibleText *
668 Accessible_getText (Accessible *obj)
669 {
670   Bonobo_Unknown iface =
671     Accessibility_Accessible_queryInterface (*obj,
672                                              "IDL:Accessibility/Text:1.0",
673                                              &ev);
674
675   spi_check_ev (&ev, "getText"); 
676
677   return (AccessibleText *)
678           ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
679 }
680
681
682
683 /**
684  * Accessible_getValue:
685  * @obj: a pointer to the #Accessible instance to query.
686  *
687  * Get the #AccessibleValue interface for an #Accessible.
688  *
689  * Returns: a pointer to an #AccessibleValue interface instance, or
690  *          NULL if @obj does not implement #AccessibleValue.
691  **/
692 AccessibleValue *
693 Accessible_getValue (Accessible *obj)
694 {
695   Bonobo_Unknown iface =
696     Accessibility_Accessible_queryInterface (*obj,
697                                              "IDL:Accessibility/Value:1.0",
698                                              &ev);
699   return (AccessibleValue *)
700           ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
701 }
702
703
704
705 /**
706  * Accessible_queryInterface:
707  * @obj: a pointer to the #Accessible instance to query.
708  * @interface_name: a UTF-8 character string specifiying the requested interface.
709  *
710  * Query an #Accessible object to for a named interface.
711  *
712  * Returns: an instance of the named interface object, if it is implemented
713  *          by @obj, or NULL otherwise.
714  *
715  **/
716 GenericInterface *
717 Accessible_queryInterface (Accessible *obj, char *interface_name)
718 {
719   GenericInterface iface;
720   iface = Accessibility_Accessible_queryInterface (*obj,
721                                                     interface_name,
722                                                     &ev);
723   return (iface != NULL) ? Obj_Add (iface) : NULL;
724 }
725
726
727 /**
728  * AccessibleRelation_ref:
729  * @obj: a pointer to the #AccessibleRelation object on which to operate.
730  *
731  * Increment the reference count for an #AccessibleRelation object.
732  *
733  * Returns: (no return code implemented yet).
734  *
735  **/
736 int
737 AccessibleRelation_ref (AccessibleRelation *obj)
738 {
739   Accessibility_Relation_ref (*obj, &ev);
740   spi_check_ev (&ev, "ref");
741   return 0;
742 }
743
744 /**
745  * AccessibleRelation_unref:
746  * @obj: a pointer to the #AccessibleRelation object on which to operate.
747  *
748  * Decrement the reference count for an #AccessibleRelation object.
749  *
750  * Returns: (no return code implemented yet).
751  *
752  **/
753 int
754 AccessibleRelation_unref (AccessibleRelation *obj)
755 {
756   Accessibility_Relation_unref (*obj, &ev);
757   spi_check_ev (&ev, "unref");
758   return 0;
759 }
760
761 /**
762  * AccessibleRelation_getRelationType:
763  * @obj: a pointer to the #AccessibleRelation object to query.
764  *
765  * Get the type of relationship represented by an #AccessibleRelation.
766  *
767  * Returns: an #AccessibleRelationType indicating the type of relation
768  *         encapsulated in this #AccessibleRelation object.
769  *
770  **/
771 AccessibleRelationType
772 AccessibleRelation_getRelationType (AccessibleRelation *obj)
773 {
774   return 0;
775 }
776
777 /**
778  * AccessibleRelation_getNTargets:
779  * @obj: a pointer to the #AccessibleRelation object to query.
780  *
781  * Get the number of objects which this relationship has as its
782  *       target objects (the subject is the #Accessible from which this
783  *       #AccessibleRelation originated).
784  *
785  * Returns: a short integer indicating how many target objects which the
786  *       originating #Accessible object has the #AccessibleRelation
787  *       relationship with.
788  **/
789 int
790 AccessibleRelation_getNTargets (AccessibleRelation *obj)
791 {
792   return 0;
793 }
794
795 /**
796  * AccessibleRelation_getTarget:
797  * @obj: a pointer to the #AccessibleRelation object to query.
798  * @i: a (zero-index) integer indicating which (of possibly several) target is requested.
799  *
800  * Get the @i-th target of a specified #AccessibleRelation relationship.
801  *
802  * Returns: an #Accessible which is the @i-th object with which the
803  *      originating #Accessible has relationship specified in the
804  *      #AccessibleRelation object.
805  *
806  **/
807 Accessible *
808 AccessibleRelation_getTarget (AccessibleRelation *obj, int i)
809 {
810   return NULL;
811 }
812
813 /**
814  * AccessibleStateSet_ref:
815  * @obj: a pointer to the #AccessibleStateSet object on which to operate.
816  *
817  * Increment the reference count for an #AccessibleStateSet object.
818  *
819  * Returns: (no return code implemented yet).
820  *
821  **/
822 int
823 AccessibleStateSet_ref (AccessibleStateSet *obj)
824 {
825 /*  Accessibility_StateSet_ref (*obj, &ev); */
826   spi_check_ev (&ev, "ref");
827   return 0;
828 }
829
830 /**
831  * AccessibleStateSet_unref:
832  * @obj: a pointer to the #AccessibleStateSet object on which to operate.
833  *
834  * Decrement the reference count for an #AccessibleStateSet object.
835  *
836  * Returns: (no return code implemented yet).
837  *
838  **/
839 int
840 AccessibleStateSet_unref (AccessibleStateSet *obj)
841 {
842 /*  Accessibility_StateSet_unref (*obj, &ev); */
843   spi_check_ev (&ev, "unref");
844   return 0;
845 }
846
847
848 /**
849  * AccessibleStateSet_contains:
850  * @obj: a pointer to the #AccessibleStateSet object on which to operate.
851  * @state: an #AccessibleState for which the specified #AccessibleStateSet
852  *       will be queried.
853  *
854  * Determine whether a given #AccessibleStateSet includes a given state; that is,
855  *       whether @state is true for the stateset in question.
856  *
857  * Returns: #TRUE if @state is true/included in the given #AccessibleStateSet,
858  *          otherwise #FALSE.
859  *
860  **/
861 boolean
862 AccessibleStateSet_contains (AccessibleStateSet *obj,
863                              AccessibleState state)
864 {
865   CORBA_boolean retval = Accessibility_StateSet_contains (*obj, state, &ev);
866   spi_check_ev (&ev, "contains");
867   return (boolean) retval;
868 }
869
870 /**
871  * AccessibleStateSet_add:
872  * @obj: a pointer to the #AccessibleStateSet object on which to operate.
873  * @state: an #AccessibleState to be added to the specified #AccessibleStateSet
874  *
875  * Add a particular #AccessibleState to an #AccessibleStateSet (i.e. set the
876  *       given state to #TRUE in the stateset.
877  *
878  **/
879 void
880 AccessibleStateSet_add (AccessibleStateSet *obj,
881                         AccessibleState state)
882 {
883   Accessibility_StateSet_add (*obj, state, &ev);
884   spi_check_ev (&ev, "contains");
885 }
886
887
888 /**
889  * AccessibleStateSet_remove:
890  * @obj: a pointer to the #AccessibleStateSet object on which to operate.
891  * @state: an #AccessibleState to be removed from the specified #AccessibleStateSet
892  *
893  * Remove a particular #AccessibleState to an #AccessibleStateSet (i.e. set the
894  *       given state to #FALSE in the stateset.)
895  *
896  **/
897 void
898 AccessibleStateSet_remove (AccessibleStateSet *obj,
899                            AccessibleState state)
900 {
901   Accessibility_StateSet_remove (*obj, state, &ev);
902   spi_check_ev (&ev, "contains");
903 }
904
905 /**
906  * AccessibleStateSet_equals:
907  * @obj: a pointer to the first #AccessibleStateSet object on which to operate.
908  * @obj2: a pointer to the second #AccessibleStateSet object on which to operate.
909  *
910  * Determine whether two instances of #AccessibleStateSet are equivalent (i.e.
911  *         consist of the same #AccessibleStates).  Useful for checking multiple
912  *         state variables at once; construct the target state then compare against it.
913  *
914  * @see AccessibleStateSet_compare().
915  *
916  * Returns: #TRUE if the two #AccessibleStateSets are equivalent,
917  *          otherwise #FALSE.
918  *
919  **/
920 boolean
921 AccessibleStateSet_equals (AccessibleStateSet *obj,
922                            AccessibleStateSet *obj2)
923 {
924   return Accessibility_StateSet_equals (*obj, *obj2, &ev);
925 }
926
927 /**
928  * AccessibleStateSet_compare:
929  * @obj: a pointer to the first #AccessibleStateSet object on which to operate.
930  * @obj2: a pointer to the second #AccessibleStateSet object on which to operate.
931  *
932  * Determine the differences between two instances of #AccessibleStateSet.
933  *.
934  * @see AccessibleStateSet_equals().
935  *
936  * Returns: an #AccessibleStateSet object containing all states contained on one of
937  *          the two sets but not the other.
938  *
939  **/
940 void
941 AccessibleStateSet_compare (AccessibleStateSet *obj,
942                             AccessibleStateSet *obj2,
943                             AccessibleStateSet **differenceSet);
944
945
946 /**
947  * AccessibleStateSet_isEmpty:
948  * @obj: a pointer to the #AccessibleStateSet object on which to operate.
949  *
950  * Determine whether a given #AccessibleStateSet is the empty set.
951  *
952  * Returns: #TRUE if the given #AccessibleStateSet contains no (true) states,
953  *          otherwise #FALSE.
954  *
955  **/
956 boolean
957 AccessibleStateSet_isEmpty (AccessibleStateSet *obj)
958 {
959   return TRUE;  
960   /*  return Accessibility_StateSet_isEmpty (*obj, &ev);*/
961 }
962
963
964
965