X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cspi%2Fspi_accessible.c;h=31fb8198a545f4b91daf7cd4ac17160d6d8fb662;hb=783e63cad5945ddb6df3ee129d20d5b53c6cce04;hp=7bf75dd1a3786c038794ade325a5c2716f0b51ce;hpb=66c4375c7cd9a0a01e79f562e1bb0326fc4dcd21;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/cspi/spi_accessible.c b/cspi/spi_accessible.c index 7bf75dd..31fb819 100644 --- a/cspi/spi_accessible.c +++ b/cspi/spi_accessible.c @@ -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* -SpiAccessible_Role_getName (Accessibility_Role role) +AccessibleRole_getName (AccessibleRole role) { if (role < MAX_ROLES) return role_names [(int) role]; else return ""; @@ -84,7 +89,7 @@ SpiAccessible_Role_getName (Accessibility_Role role) /** - * SpiAccessible_ref: + * Accessible_ref: * @obj: a pointer to the #Accessible object on which to operate. * * Increment the reference count for an #Accessible object. @@ -93,7 +98,7 @@ SpiAccessible_Role_getName (Accessibility_Role role) * **/ int -SpiAccessible_ref (SpiAccessible *obj) +Accessible_ref (Accessible *obj) { Accessibility_Accessible_ref (*obj, &ev); spi_check_ev (&ev, "ref"); @@ -102,7 +107,7 @@ SpiAccessible_ref (SpiAccessible *obj) /** - * SpiAccessible_unref: + * Accessible_unref: * @obj: a pointer to the #Accessible object on which to operate. * * Decrement the reference count for an #Accessible object. @@ -111,7 +116,7 @@ SpiAccessible_ref (SpiAccessible *obj) * **/ int -SpiAccessible_unref (SpiAccessible *obj) +Accessible_unref (Accessible *obj) { Accessibility_Accessible_unref (*obj, &ev); spi_check_ev (&ev, "unref"); @@ -119,7 +124,7 @@ SpiAccessible_unref (SpiAccessible *obj) } /** - * SpiAccessible_getName: + * Accessible_getName: * @obj: a pointer to the #Accessible object on which to operate. * * Get the name of an #Accessible object. @@ -128,7 +133,7 @@ SpiAccessible_unref (SpiAccessible *obj) * **/ char * -SpiAccessible_getName (SpiAccessible *obj) +Accessible_getName (Accessible *obj) { char *retval = (char *) @@ -138,7 +143,7 @@ SpiAccessible_getName (SpiAccessible *obj) } /** - * SpiAccessible_getDescription: + * Accessible_getDescription: * @obj: a pointer to the #Accessible object on which to operate. * * Get the description of an #Accessible object. @@ -147,7 +152,7 @@ SpiAccessible_getName (SpiAccessible *obj) * **/ char * -SpiAccessible_getDescription (SpiAccessible *obj) +Accessible_getDescription (Accessible *obj) { char *retval = (char *) Accessibility_Accessible__get_description (*obj, &ev); @@ -156,7 +161,7 @@ SpiAccessible_getDescription (SpiAccessible *obj) } /** - * SpiAccessible_getParent: + * Accessible_getParent: * @obj: a pointer to the #Accessible object to query. * * Get an #Accessible object's parent container. @@ -165,18 +170,17 @@ SpiAccessible_getDescription (SpiAccessible *obj) * #Accessible instance, or NULL if the @obj has no parent container. * **/ -SpiAccessible * -SpiAccessible_getParent (SpiAccessible *obj) +Accessible * +Accessible_getParent (Accessible *obj) { - SpiAccessible *retval = + Accessible *retval = Obj_Add (Accessibility_Accessible__get_parent (*obj, &ev)); spi_check_ev (&ev, "getParent"); return retval; } /** - * SpiAccessible_getChildCount: - * + * Accessible_getChildCount: * @obj: a pointer to the #Accessible object on which to operate. * * Get the number of children contained by an #Accessible object. @@ -186,7 +190,7 @@ SpiAccessible_getParent (SpiAccessible *obj) * **/ long -SpiAccessible_getChildCount (SpiAccessible *obj) +Accessible_getChildCount (Accessible *obj) { long retval = (long) Accessibility_Accessible__get_childCount (*obj, &ev); spi_check_ev (&ev, "getChildCount"); @@ -194,8 +198,7 @@ SpiAccessible_getChildCount (SpiAccessible *obj) } /** - * SpiAccessible_getChildAtIndex: - * + * Accessible_getChildAtIndex: * @obj: a pointer to the #Accessible object on which to operate. * @childIndex: a #long indicating which child is specified. * @@ -205,18 +208,17 @@ SpiAccessible_getChildCount (SpiAccessible *obj) * @childIndex. * **/ -SpiAccessible * -SpiAccessible_getChildAtIndex (SpiAccessible *obj, - long childIndex) +Accessible * +Accessible_getChildAtIndex (Accessible *obj, + long int childIndex) { - SpiAccessible *retval = 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; } /** - * SpiAccessible_getIndexInParent: - * + * Accessible_getIndexInParent: * @obj: a pointer to the #Accessible object on which to operate. * * Get the index of an #Accessible object in its containing #Accessible. @@ -227,7 +229,7 @@ SpiAccessible_getChildAtIndex (SpiAccessible *obj, * **/ long -SpiAccessible_getIndexInParent (SpiAccessible *obj) +Accessible_getIndexInParent (Accessible *obj) { long retval = (long) Accessibility_Accessible_getIndexInParent (*obj, &ev); spi_check_ev (&ev, "getIndexInParent"); @@ -235,21 +237,39 @@ SpiAccessible_getIndexInParent (SpiAccessible *obj) } /** - * SpiAccessible_getRelationSet: + * 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. * **/ -SpiAccessibleRelation ** -SpiAccessible_getRelationSet (SpiAccessible *obj) -{ - return NULL; +AccessibleRelation ** +Accessible_getRelationSet (Accessible *obj) +{ + 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_buffer[i]); + } + relations[i] = CORBA_OBJECT_NIL; + + return relations; } /** - * SpiAccessible_getRole: + * Accessible_getRole: * @obj: a pointer to the #Accessible object on which to operate. * * Get the UI role of an #Accessible object. @@ -258,23 +278,24 @@ SpiAccessible_getRelationSet (SpiAccessible *obj) * **/ char * -SpiAccessible_getRole (SpiAccessible *obj) +Accessible_getRole (Accessible *obj) { - char *retval = SpiAccessible_Role_getName ( + char *retval = AccessibleRole_getName ( Accessibility_Accessible_getRole (*obj, &ev)); spi_check_ev (&ev, "getRole"); return retval; } /** - * SpiAccessible_getStateSet: + * Accessible_getStateSet: + * @obj: a pointer to the #Accessible object on which to operate. * * Not Yet Implemented. * * Returns: a pointer to an #AccessibleStateSet representing the object's current state. **/ -SpiAccessibleStateSet * -SpiAccessible_getStateSet (SpiAccessible *obj) +AccessibleStateSet * +Accessible_getStateSet (Accessible *obj) { return NULL; } @@ -282,17 +303,16 @@ SpiAccessible_getStateSet (SpiAccessible *obj) /* Interface query methods */ /** - * SpiAccessible_isAction: + * Accessible_isAction: * @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. **/ boolean -SpiAccessible_isAction (SpiAccessible *obj) +Accessible_isAction (Accessible *obj) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -304,7 +324,7 @@ SpiAccessible_isAction (SpiAccessible *obj) } /** - * SpiAccessible_isComponent: + * Accessible_isComponent: * @obj: a pointer to the #Accessible instance to query. * * Query whether the specified #Accessible implements #AccessibleComponent. @@ -313,7 +333,7 @@ SpiAccessible_isAction (SpiAccessible *obj) * #FALSE otherwise. **/ boolean -SpiAccessible_isComponent (SpiAccessible *obj) +Accessible_isComponent (Accessible *obj) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -325,17 +345,16 @@ SpiAccessible_isComponent (SpiAccessible *obj) } /** - * SpiAccessible_isEditableText: + * Accessible_isEditableText: * @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. **/ boolean -SpiAccessible_isEditableText (SpiAccessible *obj) +Accessible_isEditableText (Accessible *obj) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -347,17 +366,16 @@ SpiAccessible_isEditableText (SpiAccessible *obj) } /** - * SpiAccessible_isHypertext: + * Accessible_isHypertext: * @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. **/ boolean -SpiAccessible_isHypertext (SpiAccessible *obj) +Accessible_isHypertext (Accessible *obj) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -370,17 +388,16 @@ SpiAccessible_isHypertext (SpiAccessible *obj) } /** - * SpiAccessible_isImage: + * Accessible_isImage: * @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. **/ boolean -SpiAccessible_isImage (SpiAccessible *obj) +Accessible_isImage (Accessible *obj) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -392,17 +409,16 @@ SpiAccessible_isImage (SpiAccessible *obj) } /** - * SpiAccessible_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. **/ boolean -SpiAccessible_isSelection (SpiAccessible *obj) +Accessible_isSelection (Accessible *obj) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -415,17 +431,16 @@ SpiAccessible_isSelection (SpiAccessible *obj) } /** - * SpiAccessible_isTable: + * Accessible_isTable: * @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. **/ boolean -SpiAccessible_isTable (SpiAccessible *obj) +Accessible_isTable (Accessible *obj) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -438,17 +453,16 @@ SpiAccessible_isTable (SpiAccessible *obj) } /** - * SpiAccessible_isText: + * Accessible_isText: * @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. **/ boolean -SpiAccessible_isText (SpiAccessible *obj) +Accessible_isText (Accessible *obj) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -460,17 +474,16 @@ SpiAccessible_isText (SpiAccessible *obj) } /** - * SpiAccessible_isValue: + * Accessible_isValue: * @obj: a pointer to the #Accessible instance to query. * * Query whether the specified #Accessible implements #AccessibleValue. - * Not Yet Implemented. * * Returns: #TRUE if @obj implements the #AccessibleValue interface, * #FALSE otherwise. **/ boolean -SpiAccessible_isValue (SpiAccessible *obj) +Accessible_isValue (Accessible *obj) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -482,13 +495,16 @@ SpiAccessible_isValue (SpiAccessible *obj) } /** - * SpiAccessible_getAction: + * 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. **/ -SpiAccessibleAction * -SpiAccessible_getAction (SpiAccessible *obj) +AccessibleAction * +Accessible_getAction (Accessible *obj) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -496,12 +512,12 @@ SpiAccessible_getAction (SpiAccessible *obj) &ev); spi_check_ev (&ev, "getAction"); - return (SpiAccessibleAction *) + return (AccessibleAction *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } /** - * SpiAccessible_getComponent: + * Accessible_getComponent: * @obj: a pointer to the #Accessible instance to query. * * Get the #AccessibleComponent interface for an #Accessible. @@ -509,8 +525,8 @@ SpiAccessible_getAction (SpiAccessible *obj) * Returns: a pointer to an #AccessibleComponent interface instance, or * NULL if @obj does not implement #AccessibleComponent. **/ -SpiAccessibleComponent * -SpiAccessible_getComponent (SpiAccessible *obj) +AccessibleComponent * +Accessible_getComponent (Accessible *obj) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -518,11 +534,20 @@ SpiAccessible_getComponent (SpiAccessible *obj) &ev); spi_check_ev (&ev, "getComponent"); - return (SpiAccessibleComponent *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); + return (AccessibleComponent *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } -SpiAccessibleEditableText * -SpiAccessible_getEditableText (SpiAccessible *obj) +/** + * 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) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -530,14 +555,23 @@ SpiAccessible_getEditableText (SpiAccessible *obj) &ev); spi_check_ev (&ev, "getEditableText"); - return (SpiAccessibleEditableText *) + return (AccessibleEditableText *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } -SpiAccessibleHypertext * -SpiAccessible_getHypertext (SpiAccessible *obj) +/** + * 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) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -545,14 +579,23 @@ SpiAccessible_getHypertext (SpiAccessible *obj) &ev); spi_check_ev (&ev, "getHypertext"); - return (SpiAccessibleHypertext *) + return (AccessibleHypertext *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } -SpiAccessibleImage * -SpiAccessible_getImage (SpiAccessible *obj) +/** + * 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) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -560,14 +603,23 @@ SpiAccessible_getImage (SpiAccessible *obj) &ev); spi_check_ev (&ev, "getImage"); - return (SpiAccessibleImage *) + return (AccessibleImage *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } -SpiAccessibleSelection * -SpiAccessible_getSelection (SpiAccessible *obj) +/** + * 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) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -575,14 +627,23 @@ SpiAccessible_getSelection (SpiAccessible *obj) &ev); spi_warn_ev (&ev, "getSelection"); - return (SpiAccessibleSelection *) + return (AccessibleSelection *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } -SpiAccessibleTable * -SpiAccessible_getTable (SpiAccessible *obj) +/** + * 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) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -590,12 +651,21 @@ SpiAccessible_getTable (SpiAccessible *obj) &ev); spi_check_ev (&ev, "getTable"); - return (SpiAccessibleTable *) + return (AccessibleTable *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } -SpiAccessibleText * -SpiAccessible_getText (SpiAccessible *obj) +/** + * 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) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, @@ -604,27 +674,36 @@ SpiAccessible_getText (SpiAccessible *obj) spi_check_ev (&ev, "getText"); - return (SpiAccessibleText *) + return (AccessibleText *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } -SpiAccessibleValue * -SpiAccessible_getValue (SpiAccessible *obj) +/** + * 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) { Bonobo_Unknown iface = Accessibility_Accessible_queryInterface (*obj, "IDL:Accessibility/Value:1.0", &ev); - return (SpiAccessibleValue *) + return (AccessibleValue *) ((CORBA_Object_is_nil (iface, &ev)) ? 0 : Obj_Add (iface)); } /** - * SpiAccessible_queryInterface: + * Accessible_queryInterface: * @obj: a pointer to the #Accessible instance to query. * @interface_name: a UTF-8 character string specifiying the requested interface. * @@ -635,7 +714,7 @@ SpiAccessible_getValue (SpiAccessible *obj) * **/ GenericInterface * -SpiAccessible_queryInterface (SpiAccessible *obj, char *interface_name) +Accessible_queryInterface (Accessible *obj, char *interface_name) { GenericInterface iface; iface = Accessibility_Accessible_queryInterface (*obj, @@ -644,3 +723,243 @@ SpiAccessible_queryInterface (SpiAccessible *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. + * + * 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);*/ +} + + + +