+AccessibleUnknown *
+Accessible_queryInterface (Accessible *obj,
+ const char *interface_name)
+{
+ Bonobo_Unknown iface;
+
+ if (!obj)
+ {
+ return NULL;
+ }
+
+ iface = Accessibility_Accessible_queryInterface (CSPI_OBJREF (obj),
+ interface_name,
+ cspi_ev ());
+
+
+ cspi_return_val_if_ev ("queryInterface", NULL);
+
+ /*
+ * FIXME: we need to be fairly sure that references are going
+ * to mach up if we are going to expose QueryInterface, ie. we
+ * can't allow people to do:
+ * b = a.qi ("b"); b.unref, b.unref to release a's reference.
+ * this should be no real problem though for this level of API
+ * user.
+ */
+
+ return cspi_object_add (iface);
+}
+
+
+/**
+ * AccessibleRelation_ref:
+ * @obj: a pointer to the #AccessibleRelation object on which to operate.
+ *
+ * Increment the reference count for an #AccessibleRelation object.
+ *
+ **/
+void
+AccessibleRelation_ref (AccessibleRelation *obj)
+{
+ cspi_object_ref (obj);
+}
+
+/**
+ * AccessibleRelation_unref:
+ * @obj: a pointer to the #AccessibleRelation object on which to operate.
+ *
+ * Decrement the reference count for an #AccessibleRelation object.
+ *
+ **/
+void
+AccessibleRelation_unref (AccessibleRelation *obj)
+{
+ cspi_object_unref (obj);
+}
+
+/**
+ * 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)
+{
+ cspi_return_val_if_fail (obj != NULL, -1);
+ 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)
+{
+ cspi_return_val_if_fail (obj != NULL, -1);
+ 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)
+{
+ cspi_return_val_if_fail (obj != NULL, NULL);
+ return NULL;
+}
+
+/**
+ * AccessibleStateSet_ref:
+ * @obj: a pointer to the #AccessibleStateSet object on which to operate.
+ *
+ * Increment the reference count for an #AccessibleStateSet object.
+ *
+ **/
+void
+AccessibleStateSet_ref (AccessibleStateSet *obj)
+{
+ cspi_object_ref (obj);
+}
+
+/**
+ * AccessibleStateSet_unref:
+ * @obj: a pointer to the #AccessibleStateSet object on which to operate.
+ *
+ * Decrement the reference count for an #AccessibleStateSet object.
+ *
+ **/
+void
+AccessibleStateSet_unref (AccessibleStateSet *obj)
+{
+ cspi_object_unref (obj);
+}
+
+/**
+ * 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.
+ *
+ **/
+SPIBoolean
+AccessibleStateSet_contains (AccessibleStateSet *obj,
+ AccessibleState state)
+{
+ CORBA_boolean retval;
+
+ cspi_return_val_if_fail (obj != NULL, FALSE);
+
+ retval = Accessibility_StateSet_contains (CSPI_OBJREF (obj),
+ state, cspi_ev ());
+
+ cspi_return_val_if_ev ("contains", FALSE);
+
+ return (SPIBoolean) 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)
+{
+ cspi_return_if_fail (obj != NULL);
+
+ Accessibility_StateSet_add (CSPI_OBJREF (obj), state, cspi_ev ());
+ cspi_check_ev ("add");
+}
+
+/**
+ * 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)