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.
9 * Returns: (no return code implemented yet).
13 AccessibleSelection_ref (AccessibleSelection *obj)
15 cspi_object_ref (obj);
19 * AccessibleSelection_unref:
20 * @obj: a pointer to the #AccessibleSelection implementor on which to operate.
22 * Decrement the reference count for an #Accessible object.
24 * Returns: (no return code implemented yet).
28 AccessibleSelection_unref (AccessibleSelection *obj)
30 cspi_object_unref (obj);
34 * AccessibleSelection_getNSelectedChildren:
35 * @obj: a pointer to the #AccessibleSelection implementor on which to operate.
37 * Get the number of children of an #AccessibleSelection implementor which are
40 * Returns: a #long indicating the number of #Accessible children
41 * of the #AccessibleSelection implementor which are currently selected.
45 AccessibleSelection_getNSelectedChildren (AccessibleSelection *obj)
49 cspi_return_val_if_fail (obj != NULL, -1);
52 Accessibility_Selection__get_nSelectedChildren (CSPI_OBJREF (obj),
55 cspi_return_val_if_ev ("getNSelectedChildren", -1);
61 * AccessibleSelection_getSelectedChild:
62 * @obj: a pointer to the #AccessibleSelection on which to operate.
63 * @selectedChildIndex: a #long indicating which of the selected
64 * children is specified.
66 * Get the i-th selected #Accessible child of an #AccessibleSelection.
67 * Note that @childIndex refers to the index in the list of 'selected'
68 * children and generally differs from that used in
69 * #Accessible_getChildAtIndex() or returned by
70 * #Accessible_getIndexInParent(). @selectedChildIndex must lie between 0
71 * and #AccessibleSelection_getNSelectedChildren()-1, inclusive.
73 * Returns: a pointer to a selected #Accessible child object,
74 * specified by @childIndex.
78 AccessibleSelection_getSelectedChild (AccessibleSelection *obj,
79 long int selectedChildIndex)
81 Accessibility_Accessible child;
83 cspi_return_val_if_fail (obj != NULL, NULL);
85 child = Accessibility_Selection_getSelectedChild (
87 (CORBA_long) selectedChildIndex, cspi_ev ());
89 return (Accessible *) cspi_object_add (child);
93 * AccessibleSelection_selectChild:
94 * @obj: a pointer to the #AccessibleSelection on which to operate.
95 * @childIndex: a #long indicating which child of the #Accessible
98 * Add a child to the selected children list of an #AccessibleSelection.
99 * For #AccessibleSelection implementors that only allow
100 * single selections, this may replace the (single) current
103 * Returns: #TRUE if the child was successfully selected, #FALSE otherwise.
106 AccessibleSelection_selectChild (AccessibleSelection *obj,
111 cspi_return_val_if_fail (obj != NULL, FALSE);
114 Accessibility_Selection_selectChild (CSPI_OBJREF (obj),
115 (CORBA_long) childIndex, cspi_ev ());
117 cspi_return_val_if_ev ("selectChild", FALSE);
123 * AccessibleSelection_deselectSelectedChild:
124 * @obj: a pointer to the #AccessibleSelection on which to operate.
125 * @selectedChildIndex: a #long indicating which of the selected children
126 * of the #Accessible is to be selected.
128 * Remove a child to the selected children list of an #AccessibleSelection.
129 * Note that @childIndex is the index in the selected-children list,
130 * not the index in the parent container. @selectedChildIndex in this
131 * method, and @childIndex in #AccessibleSelection_selectChild
134 * Returns: #TRUE if the child was successfully deselected, #FALSE otherwise.
137 AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
138 long int selectedChildIndex)
142 cspi_return_val_if_fail (obj != NULL, FALSE);
144 retval = Accessibility_Selection_deselectSelectedChild (
145 CSPI_OBJREF (obj), (CORBA_long) selectedChildIndex, cspi_ev ());
147 cspi_return_val_if_ev ("deselectSelectedChild", FALSE);
153 * AccessibleSelection_isChildSelected:
154 * @obj: a pointer to the #AccessibleSelection implementor on which to operate.
155 * @childIndex: an index into the #AccessibleSelection's list of children.
157 * Determine whether a particular child of an #AccessibleSelection implementor
158 * is currently selected. Note that @childIndex is the index into the
159 * standard #Accessible container's list of children.
161 * Returns: #TRUE if the specified child is currently selected,
165 AccessibleSelection_isChildSelected (AccessibleSelection *obj,
170 cspi_return_val_if_fail (obj != NULL, FALSE);
172 retval = Accessibility_Selection_isChildSelected (
174 (CORBA_long) childIndex, cspi_ev ());
176 cspi_return_val_if_ev ("isChildSelected", FALSE);
178 return (SPIBoolean) retval;
182 * AccessibleSelection_selectAll:
183 * @obj: a pointer to the #AccessibleSelection implementor on which to operate.
185 * Attempt to select all of the children of an #AccessibleSelection implementor.
186 * Not all #AccessibleSelection implementors support this operation.
188 * Returns: #TRUE if successful, #FALSE otherwise.
192 AccessibleSelection_selectAll (AccessibleSelection *obj)
194 cspi_return_val_if_fail (obj != NULL, FALSE);
196 Accessibility_Selection_selectAll (CSPI_OBJREF (obj), cspi_ev ());
198 cspi_check_ev ("selectAll");
200 return TRUE; /* TODO: change the bonobo method to return SPIBoolean */
204 * AccessibleSelection_clearSelection:
205 * @obj: a pointer to the #AccessibleSelection implementor on which to operate.
207 * Clear the current selection, removing all selected children from the
208 * specified #AccessibleSelection implementor's selection list.
211 AccessibleSelection_clearSelection (AccessibleSelection *obj)
213 cspi_return_if_fail (obj != NULL);
215 Accessibility_Selection_clearSelection (CSPI_OBJREF (obj), cspi_ev ());
216 cspi_check_ev ("clearSelection");