3 * AccessibleComponent function implementations
7 #include <cspi/spi-private.h>
10 * AccessibleComponent_ref:
11 * @obj: a pointer to an object implementing #AccessibleComponent on which to operate.
13 * Increment the reference count for an #AccessibleComponent.
15 * Returns: (no return code implemented yet).
19 AccessibleComponent_ref (AccessibleComponent *obj)
21 cspi_object_ref (obj);
25 * AccessibleComponent_unref:
26 * @obj: a pointer to the object implementing #AccessibleComponent on which to operate.
28 * Decrement the reference count for an #AccessibleComponent.
30 * Returns: (no return code implemented yet).
34 AccessibleComponent_unref (AccessibleComponent *obj)
36 cspi_object_unref (obj);
40 * AccessibleComponent_contains:
41 * @obj: a pointer to the #AccessibleComponent to query.
42 * @x: a #long specifying the x coordinate in question.
43 * @y: a #long specifying the y coordinate in question.
44 * @ctype: the desired coordinate system of the point (@x, @y)
45 * (e.g. CSPI_COORD_TYPE_WINDOW, CSPI_COORD_TYPE_SCREEN).
47 * Query whether a given #AccessibleComponent contains a particular point.
49 * Returns: a #TRUE if the specified component contains the point (@x, @y),
53 AccessibleComponent_contains (AccessibleComponent *obj,
56 AccessibleCoordType ctype)
58 cspi_return_val_if_fail (obj != NULL, FALSE);
60 return Accessibility_Component_contains (CSPI_OBJREF (obj),
68 * AccessibleComponent_getAccessibleAtPoint:
69 * @obj: a pointer to the #AccessibleComponent to query.
70 * @x: a #long specifying the x coordinate of the point in question.
71 * @y: a #long specifying the y coordinate of the point in question.
72 * @ctype: the coordinate system of the point (@x, @y)
73 * (e.g. CSPI_COORD_TYPE_WINDOW, CSPI_COORD_TYPE_SCREEN).
75 * Get the accessible child at a given coordinate within an #AccessibleComponent.
77 * Returns: a pointer to an #Accessible child of the specified component which
78 * contains the point (@x, @y), or NULL of no child contains the point.
81 AccessibleComponent_getAccessibleAtPoint (AccessibleComponent *obj,
84 AccessibleCoordType ctype)
86 Accessibility_Accessible child;
88 cspi_return_val_if_fail (obj != NULL, NULL);
90 child = Accessibility_Component_getAccessibleAtPoint (CSPI_OBJREF (obj),
95 return cspi_object_add (child);
99 * AccessibleComponent_getExtents:
100 * @obj: a pointer to the #AccessibleComponent to query.
101 * @x: a pointer to a #long into which the minimum x coordinate will be returned.
102 * @y: a pointer to a #long into which the minimum y coordinate will be returned.
103 * @width: a pointer to a #long into which the x extents (width) will be returned.
104 * @height: a pointer to a #long into which the y extents (height) will be returned.
105 * @ctype: the desired coordinate system into which to return the results,
106 * (e.g. CSPI_COORD_TYPE_WINDOW, CSPI_COORD_TYPE_SCREEN).
108 * Get the bounding box of the specified #AccessibleComponent.
112 AccessibleComponent_getExtents (AccessibleComponent *obj,
117 AccessibleCoordType ctype)
119 Accessibility_BoundingBox bbox;
121 cspi_return_if_fail (obj != NULL);
123 bbox = Accessibility_Component_getExtents (CSPI_OBJREF (obj),
126 if (cspi_check_ev ("AccessibleComponent_getExtents"))
128 *x = *y = *width = *height = 0;
135 *height = bbox.height;
140 * AccessibleComponent_getPosition:
141 * @obj: a pointer to the #AccessibleComponent to query.
142 * @x: a pointer to a #long into which the minimum x coordinate will be returned.
143 * @y: a pointer to a #long into which the minimum y coordinate will be returned.
144 * @ctype: the desired coordinate system into which to return the results,
145 * (e.g. CSPI_COORD_TYPE_WINDOW, CSPI_COORD_TYPE_SCREEN).
147 * Get the minimum x and y coordinates of the specified #AccessibleComponent.
151 AccessibleComponent_getPosition (AccessibleComponent *obj,
154 AccessibleCoordType ctype)
156 Accessibility_Component_getPosition (CSPI_OBJREF (obj),
164 * AccessibleComponent_getSize:
165 * @obj: a pointer to the #AccessibleComponent to query.
166 * @width: a pointer to a #long into which the x extents (width) will be returned.
167 * @height: a pointer to a #long into which the y extents (height) will be returned.
169 * Get the size of the specified #AccessibleComponent.
173 AccessibleComponent_getSize (AccessibleComponent *obj,
177 Accessibility_Component_getSize (CSPI_OBJREF (obj),
178 (CORBA_long *) width,
179 (CORBA_long *) height,
184 * AccessibleComponent_getLayer:
185 * @obj: a pointer to the #AccessibleComponent to query.
187 * Query which layer the component is painted into, to help determine its
188 * visibility in terms of stacking order.
190 * Returns: the #AccessibleComponentLayer into which this component is painted.
192 AccessibleComponentLayer
193 AccessibleComponent_getLayer (AccessibleComponent *obj)
195 Accessibility_ComponentLayer zlayer;
196 AccessibleComponentLayer retval;
198 zlayer = Accessibility_Component_getLayer (CSPI_OBJREF (obj),
202 case Accessibility_LAYER_BACKGROUND:
203 retval = SPI_LAYER_BACKGROUND;
205 case Accessibility_LAYER_CANVAS:
206 retval = SPI_LAYER_CANVAS;
208 case Accessibility_LAYER_WIDGET:
209 retval = SPI_LAYER_WIDGET;
211 case Accessibility_LAYER_MDI:
212 retval = SPI_LAYER_MDI;
214 case Accessibility_LAYER_POPUP:
215 retval = SPI_LAYER_POPUP;
217 case Accessibility_LAYER_OVERLAY:
218 retval = SPI_LAYER_OVERLAY;
221 retval = SPI_LAYER_INVALID;
228 * AccessibleComponent_getMDIZOrder:
229 * @obj: a pointer to the #AccessibleComponent to query.
231 * Query the z stacking order of a component which is in the MDI layer.
232 * (Bigger z-order numbers mean nearer the top)
234 * Returns: a short integer indicating the stacking order of the component
235 * in the MDI layer, or -1 if the component is not in the MDI layer.
238 AccessibleComponent_getMDIZOrder (AccessibleComponent *obj)
240 return (short) Accessibility_Component_getMDIZOrder (CSPI_OBJREF (obj),
245 * AccessibleComponent_grabFocus:
246 * @obj: a pointer to the #AccessibleComponent on which to operate.
248 * Attempt to set the keyboard input focus to the specified
249 * #AccessibleComponent.
253 AccessibleComponent_grabFocus (AccessibleComponent *obj)