1 #include <cspi/spi-private.h>
4 * AccessibleSelection_ref:
5 * @obj: a pointer to the #AccessibleSelection implementor on which to operate.
7 * Increment the reference count for an #AccessibleSelection object.
11 AccessibleSelection_ref (AccessibleSelection *obj)
13 cspi_object_ref (obj);
17 * AccessibleSelection_unref:
18 * @obj: a pointer to the #AccessibleSelection implementor on which to operate.
20 * Decrement the reference count for an #Accessible object.
24 AccessibleSelection_unref (AccessibleSelection *obj)
26 cspi_object_unref (obj);
30 * AccessibleSelection_getNSelectedChildren:
31 * @obj: a pointer to the #AccessibleSelection implementor on which to operate.
33 * Get the number of children of an #AccessibleSelection implementor which are
36 * Returns: a #long indicating the number of #Accessible children
37 * of the #AccessibleSelection implementor which are currently selected.
41 AccessibleSelection_getNSelectedChildren (AccessibleSelection *obj)
45 cspi_return_val_if_fail (obj != NULL, -1);
48 Accessibility_Selection__get_nSelectedChildren (CSPI_OBJREF (obj),
51 cspi_return_val_if_ev ("getNSelectedChildren", -1);
57 * AccessibleSelection_getSelectedChild:
58 * @obj: a pointer to the #AccessibleSelection on which to operate.
59 * @selectedChildIndex: a #long indicating which of the selected
60 * children is specified.
62 * Get the i-th selected #Accessible child of an #AccessibleSelection.
63 * Note that @childIndex refers to the index in the list of 'selected'
64 * children and generally differs from that used in
65 * #Accessible_getChildAtIndex() or returned by
66 * #Accessible_getIndexInParent(). @selectedChildIndex must lie between 0
67 * and #AccessibleSelection_getNSelectedChildren()-1, inclusive.
69 * Returns: a pointer to a selected #Accessible child object,
70 * specified by @childIndex.
74 AccessibleSelection_getSelectedChild (AccessibleSelection *obj,
75 long int selectedChildIndex)
77 Accessibility_Accessible child;
79 cspi_return_val_if_fail (obj != NULL, NULL);
81 child = Accessibility_Selection_getSelectedChild (
83 (CORBA_long) selectedChildIndex, cspi_ev ());
85 return (Accessible *) cspi_object_add (child);
89 * AccessibleSelection_selectChild:
90 * @obj: a pointer to the #AccessibleSelection on which to operate.
91 * @childIndex: a #long indicating which child of the #Accessible
94 * Add a child to the selected children list of an #AccessibleSelection.
95 * For #AccessibleSelection implementors that only allow
96 * single selections, this may replace the (single) current
99 * Returns: #TRUE if the child was successfully selected, #FALSE otherwise.
102 AccessibleSelection_selectChild (AccessibleSelection *obj,
107 cspi_return_val_if_fail (obj != NULL, FALSE);
110 Accessibility_Selection_selectChild (CSPI_OBJREF (obj),
111 (CORBA_long) childIndex, cspi_ev ());
113 cspi_return_val_if_ev ("selectChild", FALSE);
119 * AccessibleSelection_deselectSelectedChild:
120 * @obj: a pointer to the #AccessibleSelection on which to operate.
121 * @selectedChildIndex: a #long indicating which of the selected children
122 * of the #Accessible is to be selected.
124 * Remove a child to the selected children list of an #AccessibleSelection.
125 * Note that @childIndex is the index in the selected-children list,
126 * not the index in the parent container. @selectedChildIndex in this
127 * method, and @childIndex in #AccessibleSelection_selectChild
130 * Returns: #TRUE if the child was successfully deselected, #FALSE otherwise.
133 AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
134 long int selectedChildIndex)
138 cspi_return_val_if_fail (obj != NULL, FALSE);
140 retval = Accessibility_Selection_deselectSelectedChild (
141 CSPI_OBJREF (obj), (CORBA_long) selectedChildIndex, cspi_ev ());
143 cspi_return_val_if_ev ("deselectSelectedChild", FALSE);
149 * AccessibleSelection_isChildSelected:
150 * @obj: a pointer to the #AccessibleSelection implementor on which to operate.
151 * @childIndex: an index into the #AccessibleSelection's list of children.
153 * Determine whether a particular child of an #AccessibleSelection implementor
154 * is currently selected. Note that @childIndex is the index into the
155 * standard #Accessible container's list of children.
157 * Returns: #TRUE if the specified child is currently selected,
161 AccessibleSelection_isChildSelected (AccessibleSelection *obj,
166 cspi_return_val_if_fail (obj != NULL, FALSE);
168 retval = Accessibility_Selection_isChildSelected (
170 (CORBA_long) childIndex, cspi_ev ());
172 cspi_return_val_if_ev ("isChildSelected", FALSE);
174 return (SPIBoolean) retval;
178 * AccessibleSelection_selectAll:
179 * @obj: a pointer to the #AccessibleSelection implementor on which to operate.
181 * Attempt to select all of the children of an #AccessibleSelection implementor.
182 * Not all #AccessibleSelection implementors support this operation.
184 * Returns: #TRUE if successful, #FALSE otherwise.
188 AccessibleSelection_selectAll (AccessibleSelection *obj)
190 cspi_return_val_if_fail (obj != NULL, FALSE);
192 Accessibility_Selection_selectAll (CSPI_OBJREF (obj), cspi_ev ());
194 cspi_check_ev ("selectAll");
196 return TRUE; /* TODO: change the CORBA method to return SPIBoolean */
200 * AccessibleSelection_clearSelection:
201 * @obj: a pointer to the #AccessibleSelection implementor on which to operate.
203 * Clear the current selection, removing all selected children from the
204 * specified #AccessibleSelection implementor's selection list.
207 AccessibleSelection_clearSelection (AccessibleSelection *obj)
209 cspi_return_if_fail (obj != NULL);
211 Accessibility_Selection_clearSelection (CSPI_OBJREF (obj), cspi_ev ());
212 cspi_check_ev ("clearSelection");