Started fixing IDL docs.
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_accessible.c
index 6099f44..72a0dfa 100644 (file)
@@ -71,11 +71,16 @@ static char *role_names [MAX_ROLES] =
   "window",
 };
 
-/*
- * Returns a localizable string name for an AtkRole enumerated type.
- */
+/**
+ * AccessibleRole_getName:
+ * @role: an #AccessibleRole object to query.
+ *
+ * Get a localizeable string that indicates the name of an #AccessibleRole.
+ *
+ * Returns: a localizable string name for an #AccessibleRole enumerated type.
+ **/
 char*
-Accessible_Role_getName (Accessibility_Role role)
+AccessibleRole_getName (AccessibleRole role)
 {
   if (role < MAX_ROLES) return role_names [(int) role];
   else return "";
@@ -96,6 +101,7 @@ int
 Accessible_ref (Accessible *obj)
 {
   Accessibility_Accessible_ref (*obj, &ev);
+  spi_check_ev (&ev, "ref");
   return 0;
 }
 
@@ -113,6 +119,7 @@ int
 Accessible_unref (Accessible *obj)
 {
   Accessibility_Accessible_unref (*obj, &ev);
+  spi_check_ev (&ev, "unref");
   return 0;
 }
 
@@ -128,8 +135,11 @@ Accessible_unref (Accessible *obj)
 char *
 Accessible_getName (Accessible *obj)
 {
-  return (char *)
+  char *retval = 
+    (char *)
     Accessibility_Accessible__get_name (*obj, &ev);
+  spi_check_ev (&ev, "getName"); 
+  return retval;
 }
 
 /**
@@ -144,8 +154,10 @@ Accessible_getName (Accessible *obj)
 char *
 Accessible_getDescription (Accessible *obj)
 {
-  return (char *)
+  char *retval = (char *)
     Accessibility_Accessible__get_description (*obj, &ev);
+  spi_check_ev (&ev, "getDescription");
+  return retval;
 }
 
 /**
@@ -154,19 +166,21 @@ Accessible_getDescription (Accessible *obj)
  *
  * Get an #Accessible object's parent container.
  *
- * Returns: a pointer to the #Accessible object which contains the given
+ * Returns: a pointer tothe #Accessible object which contains the given
  *          #Accessible instance, or NULL if the @obj has no parent container.
  *
  **/
 Accessible *
 Accessible_getParent (Accessible *obj)
 {
-  return Obj_Add (Accessibility_Accessible__get_parent (*obj, &ev));
+  Accessible *retval = 
+      Obj_Add (Accessibility_Accessible__get_parent (*obj, &ev));
+  spi_check_ev (&ev, "getParent");
+  return retval;
 }
 
 /**
  * Accessible_getChildCount:
- *
  * @obj: a pointer to the #Accessible object on which to operate.
  *
  * Get the number of children contained by an #Accessible object.
@@ -178,12 +192,13 @@ Accessible_getParent (Accessible *obj)
 long
 Accessible_getChildCount (Accessible *obj)
 {
-  return Accessibility_Accessible__get_childCount (*obj, &ev);
+  long retval = (long) Accessibility_Accessible__get_childCount (*obj, &ev);
+  spi_check_ev (&ev, "getChildCount");
+  return retval;
 }
 
 /**
  * Accessible_getChildAtIndex:
- *
  * @obj: a pointer to the #Accessible object on which to operate.
  * @childIndex: a #long indicating which child is specified.
  *
@@ -195,14 +210,15 @@ Accessible_getChildCount (Accessible *obj)
  **/
 Accessible *
 Accessible_getChildAtIndex (Accessible *obj,
-                            long childIndex)
+                            long int childIndex)
 {
-  return Obj_Add (Accessibility_Accessible_getChildAtIndex (*obj, childIndex, &ev));
+  Accessible *retval = Obj_Add (Accessibility_Accessible_getChildAtIndex (*obj, childIndex, &ev));
+  spi_check_ev (&ev, "getChildAtIndex");
+  return retval;
 }
 
 /**
  * Accessible_getIndexInParent:
- *
  * @obj: a pointer to the #Accessible object on which to operate.
  *
  * Get the index of an #Accessible object in its containing #Accessible.
@@ -215,21 +231,41 @@ Accessible_getChildAtIndex (Accessible *obj,
 long
 Accessible_getIndexInParent (Accessible *obj)
 {
-  return Accessibility_Accessible_getIndexInParent (*obj, &ev);
+  long retval = (long) Accessibility_Accessible_getIndexInParent (*obj, &ev);
+  spi_check_ev (&ev, "getIndexInParent");
+  return retval;
 }
 
 /**
  * Accessible_getRelationSet:
+ * @obj: a pointer to the #Accessible object on which to operate.
  *
- * Not Yet Implemented.
+ * Get the set of #AccessibleRelation objects which describe this #Accessible object's
+ *       relationships with other #Accessible objects.
  *
- * Returns: a pointer to an array of #AccessibleRelations.
+ * Returns: an array of #AccessibleRelation pointers.
  *
  **/
 AccessibleRelation **
 Accessible_getRelationSet (Accessible *obj)
 {
-  return NULL;
+  AccessibleRelation **relations;
+  int n_relations;
+  int i;
+  Accessibility_RelationSet *relation_set =    
+         Accessibility_Accessible_getRelationSet (*obj, &ev);
+  
+  /* this looks hack-ish, but it's based on the CORBA C bindings spec */
+  n_relations = relation_set->_length;
+  relations = malloc (sizeof (AccessibleRelation *) * n_relations);
+  
+  for (i=0; i<n_relations; ++i)
+    {
+      relations[i] = Obj_Add (relation_set->_buffer[i]);
+    }
+  relations[i] = CORBA_OBJECT_NIL;
+
+  return relations;
 }
 
 /**
@@ -244,12 +280,15 @@ Accessible_getRelationSet (Accessible *obj)
 char *
 Accessible_getRole (Accessible *obj)
 {
-  return Accessible_Role_getName (
+  char *retval = AccessibleRole_getName (
                  Accessibility_Accessible_getRole (*obj, &ev));
+  spi_check_ev (&ev, "getRole");
+  return retval;
 }
 
 /**
  * Accessible_getStateSet:
+ * @obj: a pointer to the #Accessible object on which to operate.
  *
  * Not Yet Implemented.
  *
@@ -268,7 +307,6 @@ Accessible_getStateSet (Accessible *obj)
  * @obj: a pointer to the #Accessible instance to query.
  *
  * Query whether the specified #Accessible implements #AccessibleAction.
- * Not Yet Implemented.
  *
  * Returns: #TRUE if @obj implements the #AccessibleAction interface,
  *          #FALSE otherwise.
@@ -280,7 +318,9 @@ Accessible_isAction (Accessible *obj)
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Action:1.0",
                                              &ev);
-  return (iface != NULL) ? TRUE : FALSE;
+  spi_warn_ev (&ev, "isAction");
+
+  return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
 }
 
 /**
@@ -299,7 +339,9 @@ Accessible_isComponent (Accessible *obj)
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Component:1.0",
                                              &ev);
-  return (iface != NULL) ? TRUE : FALSE;
+  spi_warn_ev (&ev, "isComponent");
+
+  return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
 }
 
 /**
@@ -307,7 +349,6 @@ Accessible_isComponent (Accessible *obj)
  * @obj: a pointer to the #Accessible instance to query.
  *
  * Query whether the specified #Accessible implements #AccessibleEditableText.
- * Not Yet Implemented.
  *
  * Returns: #TRUE if @obj implements the #AccessibleEditableText interface,
  *          #FALSE otherwise.
@@ -319,7 +360,9 @@ Accessible_isEditableText (Accessible *obj)
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/EditableText:1.0",
                                              &ev);
-  return (iface != NULL) ? TRUE : FALSE;
+  spi_check_ev (&ev, "isEditableText");
+
+  return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
 }
 
 /**
@@ -327,7 +370,6 @@ Accessible_isEditableText (Accessible *obj)
  * @obj: a pointer to the #Accessible instance to query.
  *
  * Query whether the specified #Accessible implements #AccessibleHypertext.
- * Not Yet Implemented.
  *
  * Returns: #TRUE if @obj implements the #AccessibleHypertext interface,
  *          #FALSE otherwise.
@@ -339,7 +381,10 @@ Accessible_isHypertext (Accessible *obj)
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Hypertext:1.0",
                                              &ev);
-  return (iface != NULL) ? TRUE : FALSE;
+
+  spi_check_ev (&ev, "isHypertext");
+
+  return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
 }
 
 /**
@@ -347,7 +392,6 @@ Accessible_isHypertext (Accessible *obj)
  * @obj: a pointer to the #Accessible instance to query.
  *
  * Query whether the specified #Accessible implements #AccessibleImage.
- * Not Yet Implemented.
  *
  * Returns: #TRUE if @obj implements the #AccessibleImage interface,
  *          #FALSE otherwise.
@@ -359,15 +403,16 @@ Accessible_isImage (Accessible *obj)
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Image:1.0",
                                              &ev);
-  return (iface != NULL) ? TRUE : FALSE;
+  spi_check_ev (&ev, "isImage");
+
+  return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
 }
 
 /**
 * Accessible_isSelection:
+ * Accessible_isSelection:
  * @obj: a pointer to the #Accessible instance to query.
  *
  * Query whether the specified #Accessible implements #AccessibleSelection.
- * Not Yet Implemented.
  *
  * Returns: #TRUE if @obj implements the #AccessibleSelection interface,
  *          #FALSE otherwise.
@@ -379,7 +424,10 @@ Accessible_isSelection (Accessible *obj)
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Selection:1.0",
                                              &ev);
-  return (iface != NULL) ? TRUE : FALSE;
+  spi_warn_ev (&ev, "isSelection");
+
+  return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
+
 }
 
 /**
@@ -387,7 +435,6 @@ Accessible_isSelection (Accessible *obj)
  * @obj: a pointer to the #Accessible instance to query.
  *
  * Query whether the specified #Accessible implements #AccessibleTable.
- * Not Yet Implemented.
  *
  * Returns: #TRUE if @obj implements the #AccessibleTable interface,
  *          #FALSE otherwise.
@@ -399,7 +446,10 @@ Accessible_isTable (Accessible *obj)
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Table:1.0",
                                              &ev);
-  return (iface != NULL) ? TRUE : FALSE;
+  spi_check_ev (&ev, "isTable");
+
+  return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
+
 }
 
 /**
@@ -407,7 +457,6 @@ Accessible_isTable (Accessible *obj)
  * @obj: a pointer to the #Accessible instance to query.
  *
  * Query whether the specified #Accessible implements #AccessibleText.
- * Not Yet Implemented.
  *
  * Returns: #TRUE if @obj implements the #AccessibleText interface,
  *          #FALSE otherwise.
@@ -419,23 +468,52 @@ Accessible_isText (Accessible *obj)
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Text:1.0",
                                              &ev);
-  return (iface != NULL) ? TRUE : FALSE;
+  spi_warn_ev (&ev, "isText");
+
+  return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
+}
+
+/**
+ * Accessible_isValue:
+ * @obj: a pointer to the #Accessible instance to query.
+ *
+ * Query whether the specified #Accessible implements #AccessibleValue.
+ *
+ * Returns: #TRUE if @obj implements the #AccessibleValue interface,
+ *          #FALSE otherwise.
+**/
+boolean
+Accessible_isValue (Accessible *obj)
+{
+  Bonobo_Unknown iface =
+    Accessibility_Accessible_queryInterface (*obj,
+                                             "IDL:Accessibility/Value:1.0",
+                                             &ev);
+  spi_check_ev (&ev, "isValue");
+
+  return (CORBA_Object_is_nil (iface, &ev)) ? FALSE : TRUE;
 }
 
 /**
  * Accessible_getAction:
+ * @obj: a pointer to the #Accessible instance to query.
  *
- * Not Yet Implemented.
+ * Get the #AccessibleAction interface for an #Accessible.
  *
+ * Returns: a pointer to an #AccessibleAction interface instance, or
+ *          NULL if @obj does not implement #AccessibleAction.
  **/
 AccessibleAction *
 Accessible_getAction (Accessible *obj)
 {
-  AccessibleComponent iface =
+  Bonobo_Unknown iface =
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Action:1.0",
                                              &ev);
-  return Obj_Add (iface);
+  spi_check_ev (&ev, "getAction");
+
+  return (AccessibleAction *)
+         ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
 }
 
 /**
@@ -450,93 +528,176 @@ Accessible_getAction (Accessible *obj)
 AccessibleComponent *
 Accessible_getComponent (Accessible *obj)
 {
-  AccessibleComponent iface =
+  Bonobo_Unknown iface =
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Component:1.0",
                                              &ev);
-  return Obj_Add (iface);
+  spi_check_ev (&ev, "getComponent");
+
+  return (AccessibleComponent *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
 }
 
+/**
+ * Accessible_getEditableText:
+ * @obj: a pointer to the #Accessible instance to query.
+ *
+ * Get the #AccessibleEditableText interface for an #Accessible.
+ *
+ * Returns: a pointer to an #AccessibleEditableText interface instance, or
+ *          NULL if @obj does not implement #AccessibleEditableText.
+ **/
 AccessibleEditableText *
 Accessible_getEditableText (Accessible *obj)
 {
-  AccessibleComponent iface =
+  Bonobo_Unknown iface =
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/EditableText:1.0",
                                              &ev);
-  return Obj_Add (iface);
+  spi_check_ev (&ev, "getEditableText");
+
+  return (AccessibleEditableText *)
+         ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
 }
 
 
 
+/**
+ * Accessible_getHypertext:
+ * @obj: a pointer to the #Accessible instance to query.
+ *
+ * Get the #AccessibleHypertext interface for an #Accessible.
+ *
+ * Returns: a pointer to an #AccessibleHypertext interface instance, or
+ *          NULL if @obj does not implement #AccessibleHypertext.
+ **/
 AccessibleHypertext *
 Accessible_getHypertext (Accessible *obj)
 {
-  AccessibleComponent iface =
+  Bonobo_Unknown iface =
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Hypertext:1.0",
                                              &ev);
-  return Obj_Add (iface);
+  spi_check_ev (&ev, "getHypertext");
+
+  return (AccessibleHypertext *)
+         ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
 }
 
 
 
+/**
+ * Accessible_getImage:
+ * @obj: a pointer to the #Accessible instance to query.
+ *
+ * Get the #AccessibleImage interface for an #Accessible.
+ *
+ * Returns: a pointer to an #AccessibleImage interface instance, or
+ *          NULL if @obj does not implement #AccessibleImage.
+ **/
 AccessibleImage *
 Accessible_getImage (Accessible *obj)
 {
-  AccessibleComponent iface =
+  Bonobo_Unknown iface =
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Image:1.0",
                                              &ev);
-  return Obj_Add (iface);
+  spi_check_ev (&ev, "getImage");
+
+  return (AccessibleImage *)
+         ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
 }
 
 
 
+/**
+ * Accessible_getSelection:
+ * @obj: a pointer to the #Accessible instance to query.
+ *
+ * Get the #AccessibleSelection interface for an #Accessible.
+ *
+ * Returns: a pointer to an #AccessibleSelection interface instance, or
+ *          NULL if @obj does not implement #AccessibleSelection.
+ **/
 AccessibleSelection *
 Accessible_getSelection (Accessible *obj)
 {
-  AccessibleComponent iface =
+  Bonobo_Unknown iface =
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Selection:1.0",
                                              &ev);
-  return Obj_Add (iface);
+  spi_warn_ev (&ev, "getSelection");
+
+  return (AccessibleSelection *)
+         ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
 }
 
 
 
+/**
+ * Accessible_getTable:
+ * @obj: a pointer to the #Accessible instance to query.
+ *
+ * Get the #AccessibleTable interface for an #Accessible.
+ *
+ * Returns: a pointer to an #AccessibleTable interface instance, or
+ *          NULL if @obj does not implement #AccessibleTable.
+ **/
 AccessibleTable *
 Accessible_getTable (Accessible *obj)
 {
-  AccessibleComponent iface =
+  Bonobo_Unknown iface =
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Table:1.0",
                                              &ev);
-  return Obj_Add (iface);
-}
-
+  spi_check_ev (&ev, "getTable");
 
+  return (AccessibleTable *)
+         ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
+}
 
+/**
+ * Accessible_getText:
+ * @obj: a pointer to the #Accessible instance to query.
+ *
+ * Get the #AccessibleText interface for an #Accessible.
+ *
+ * Returns: a pointer to an #AccessibleText interface instance, or
+ *          NULL if @obj does not implement #AccessibleText.
+ **/
 AccessibleText *
 Accessible_getText (Accessible *obj)
 {
-  AccessibleComponent iface =
+  Bonobo_Unknown iface =
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Text:1.0",
                                              &ev);
-  return Obj_Add (iface);
+
+  spi_check_ev (&ev, "getText"); 
+
+  return (AccessibleText *)
+         ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
 }
 
 
 
+/**
+ * Accessible_getValue:
+ * @obj: a pointer to the #Accessible instance to query.
+ *
+ * Get the #AccessibleValue interface for an #Accessible.
+ *
+ * Returns: a pointer to an #AccessibleValue interface instance, or
+ *          NULL if @obj does not implement #AccessibleValue.
+ **/
 AccessibleValue *
 Accessible_getValue (Accessible *obj)
 {
-  AccessibleComponent iface =
+  Bonobo_Unknown iface =
     Accessibility_Accessible_queryInterface (*obj,
                                              "IDL:Accessibility/Value:1.0",
                                              &ev);
-  return Obj_Add (iface);
+  return (AccessibleValue *)
+         ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface));
 }
 
 
@@ -562,3 +723,246 @@ Accessible_queryInterface (Accessible *obj, char *interface_name)
   return (iface != NULL) ? Obj_Add (iface) : NULL;
 }
 
+
+/**
+ * AccessibleRelation_ref:
+ * @obj: a pointer to the #AccessibleRelation object on which to operate.
+ *
+ * Increment the reference count for an #AccessibleRelation object.
+ *
+ * Returns: (no return code implemented yet).
+ *
+ **/
+int
+AccessibleRelation_ref (AccessibleRelation *obj)
+{
+  Accessibility_Relation_ref (*obj, &ev);
+  spi_check_ev (&ev, "ref");
+  return 0;
+}
+
+/**
+ * AccessibleRelation_unref:
+ * @obj: a pointer to the #AccessibleRelation object on which to operate.
+ *
+ * Decrement the reference count for an #AccessibleRelation object.
+ *
+ * Returns: (no return code implemented yet).
+ *
+ **/
+int
+AccessibleRelation_unref (AccessibleRelation *obj)
+{
+  Accessibility_Relation_unref (*obj, &ev);
+  spi_check_ev (&ev, "unref");
+  return 0;
+}
+
+/**
+ * AccessibleRelation_getRelationType:
+ * @obj: a pointer to the #AccessibleRelation object to query.
+ *
+ * Get the type of relationship represented by an #AccessibleRelation.
+ *
+ * Returns: an #AccessibleRelationType indicating the type of relation
+ *         encapsulated in this #AccessibleRelation object.
+ *
+ **/
+AccessibleRelationType
+AccessibleRelation_getRelationType (AccessibleRelation *obj)
+{
+  return 0;
+}
+
+/**
+ * AccessibleRelation_getNTargets:
+ * @obj: a pointer to the #AccessibleRelation object to query.
+ *
+ * Get the number of objects which this relationship has as its
+ *       target objects (the subject is the #Accessible from which this
+ *       #AccessibleRelation originated).
+ *
+ * Returns: a short integer indicating how many target objects which the
+ *       originating #Accessible object has the #AccessibleRelation
+ *       relationship with.
+ **/
+int
+AccessibleRelation_getNTargets (AccessibleRelation *obj)
+{
+  return 0;
+}
+
+/**
+ * AccessibleRelation_getTarget:
+ * @obj: a pointer to the #AccessibleRelation object to query.
+ * @i: a (zero-index) integer indicating which (of possibly several) target is requested.
+ *
+ * Get the @i-th target of a specified #AccessibleRelation relationship.
+ *
+ * Returns: an #Accessible which is the @i-th object with which the
+ *      originating #Accessible has relationship specified in the
+ *      #AccessibleRelation object.
+ *
+ **/
+Accessible *
+AccessibleRelation_getTarget (AccessibleRelation *obj, int i)
+{
+  return NULL;
+}
+
+/**
+ * AccessibleStateSet_ref:
+ * @obj: a pointer to the #AccessibleStateSet object on which to operate.
+ *
+ * Increment the reference count for an #AccessibleStateSet object.
+ *
+ * Returns: (no return code implemented yet).
+ *
+ **/
+int
+AccessibleStateSet_ref (AccessibleStateSet *obj)
+{
+/*  Accessibility_StateSet_ref (*obj, &ev); */
+  spi_check_ev (&ev, "ref");
+  return 0;
+}
+
+/**
+ * AccessibleStateSet_unref:
+ * @obj: a pointer to the #AccessibleStateSet object on which to operate.
+ *
+ * Decrement the reference count for an #AccessibleStateSet object.
+ *
+ * Returns: (no return code implemented yet).
+ *
+ **/
+int
+AccessibleStateSet_unref (AccessibleStateSet *obj)
+{
+/*  Accessibility_StateSet_unref (*obj, &ev); */
+  spi_check_ev (&ev, "unref");
+  return 0;
+}
+
+
+/**
+ * AccessibleStateSet_contains:
+ * @obj: a pointer to the #AccessibleStateSet object on which to operate.
+ * @state: an #AccessibleState for which the specified #AccessibleStateSet
+ *       will be queried.
+ *
+ * Determine whether a given #AccessibleStateSet includes a given state; that is,
+ *       whether @state is true for the stateset in question.
+ *
+ * Returns: #TRUE if @state is true/included in the given #AccessibleStateSet,
+ *          otherwise #FALSE.
+ *
+ **/
+boolean
+AccessibleStateSet_contains (AccessibleStateSet *obj,
+                            AccessibleState state)
+{
+  CORBA_boolean retval = Accessibility_StateSet_contains (*obj, state, &ev);
+  spi_check_ev (&ev, "contains");
+  return (boolean) retval;
+}
+
+/**
+ * AccessibleStateSet_add:
+ * @obj: a pointer to the #AccessibleStateSet object on which to operate.
+ * @state: an #AccessibleState to be added to the specified #AccessibleStateSet
+ *
+ * Add a particular #AccessibleState to an #AccessibleStateSet (i.e. set the
+ *       given state to #TRUE in the stateset.
+ *
+ **/
+void
+AccessibleStateSet_add (AccessibleStateSet *obj,
+                       AccessibleState state)
+{
+  Accessibility_StateSet_add (*obj, state, &ev);
+  spi_check_ev (&ev, "contains");
+}
+
+
+/**
+ * AccessibleStateSet_remove:
+ * @obj: a pointer to the #AccessibleStateSet object on which to operate.
+ * @state: an #AccessibleState to be removed from the specified #AccessibleStateSet
+ *
+ * Remove a particular #AccessibleState to an #AccessibleStateSet (i.e. set the
+ *       given state to #FALSE in the stateset.)
+ *
+ **/
+void
+AccessibleStateSet_remove (AccessibleStateSet *obj,
+                          AccessibleState state)
+{
+  Accessibility_StateSet_remove (*obj, state, &ev);
+  spi_check_ev (&ev, "contains");
+}
+
+/**
+ * AccessibleStateSet_equals:
+ * @obj: a pointer to the first #AccessibleStateSet object on which to operate.
+ * @obj2: a pointer to the second #AccessibleStateSet object on which to operate.
+ *
+ * Determine whether two instances of #AccessibleStateSet are equivalent (i.e.
+ *         consist of the same #AccessibleStates).  Useful for checking multiple
+ *         state variables at once; construct the target state then compare against it.
+ *
+ * @see AccessibleStateSet_compare().
+ *
+ * Returns: #TRUE if the two #AccessibleStateSets are equivalent,
+ *          otherwise #FALSE.
+ *
+ **/
+boolean
+AccessibleStateSet_equals (AccessibleStateSet *obj,
+                           AccessibleStateSet *obj2)
+{
+  return Accessibility_StateSet_equals (*obj, *obj2, &ev);
+}
+
+/**
+ * AccessibleStateSet_compare:
+ * @obj: a pointer to the first #AccessibleStateSet object on which to operate.
+ * @obj2: a pointer to the second #AccessibleStateSet object on which to operate.
+ * @differenceSet: a pointer to an array of #AccessibleStates, which is set when the
+ *        fuction returns to point to an array of states representing the states which
+ *        the two state sets do not have in common.
+ *
+ * Determine the differences between two instances of #AccessibleStateSet.
+ *.
+ * @see AccessibleStateSet_equals().
+ *
+ * Returns: an #AccessibleStateSet object containing all states contained on one of
+ *          the two sets but not the other.
+ *
+ **/
+void
+AccessibleStateSet_compare (AccessibleStateSet *obj,
+                            AccessibleStateSet *obj2,
+                            AccessibleStateSet **differenceSet);
+
+
+/**
+ * AccessibleStateSet_isEmpty:
+ * @obj: a pointer to the #AccessibleStateSet object on which to operate.
+ *
+ * Determine whether a given #AccessibleStateSet is the empty set.
+ *
+ * Returns: #TRUE if the given #AccessibleStateSet contains no (true) states,
+ *          otherwise #FALSE.
+ *
+ **/
+boolean
+AccessibleStateSet_isEmpty (AccessibleStateSet *obj)
+{
+  return TRUE; 
+  /*  return Accessibility_StateSet_isEmpty (*obj, &ev);*/
+}
+
+
+
+